blob: 0d3cf1d5c4367ab3218e684ba7c074afa85e463c [file] [log] [blame]
2015-01-23 Bartlomiej Gajda <b.gajda@samsung.com>
[MSE] Implement Range Removal algorithm.
https://bugs.webkit.org/show_bug.cgi?id=140622.
Reviewed by Jer Noble.
This extract Range Removal algorithm (Editor's Draft version, bug:26316) from remove(),
to separate function to deal with old FIXME since bug in spec was resolved.
This should both guarantee good order of events, and prevent from switching to 'open' state
during end of stream.
Test: media/media-source/media-source-end-of-stream-readyState.html
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::setDurationInternal): update to use rangeRemoval(), not remove()
(WebCore::MediaSource::streamEndedWithError): remove FIXME, brigning back correct order of events.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::remove): comments up to spec, extract rangeRemoval algorithm.
(WebCore::SourceBuffer::rangeRemoval):
(WebCore::SourceBuffer::removeTimerFired): comments up to spec.
* Modules/mediasource/SourceBuffer.h:
2015-01-23 Enrica Casucci <enrica@apple.com>
Hit test returns incorrect results when performed in paginated content over the page gaps.
https://bugs.webkit.org/show_bug.cgi?id=140837
rdar://problem/17494390
Reviewed by Dave Hyatt.
Tests: fast/multicol/pagination/LeftToRight-tb-hittest.html
fast/multicol/pagination/RightToLeft-rl-hittest.html
When hittesting reaches the RenderView we need to check if we are
in paginated content and use the correct class to compute hittest results.
* rendering/RenderView.cpp:
(WebCore::RenderView::updateHitTestResult):
2015-01-23 Andreas Kling <akling@apple.com>
Document should be a FontSelectorClient.
<https://webkit.org/b/140833>
Reviewed by Antti Koivisto.
Make Document a FontSelectorClient so it can listen to the invalidation
callbacks from FontSelector instead of having code in FontSelector that
calls out to Document on invalidation.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
* dom/Document.cpp:
(WebCore::Document::fontsNeedUpdate):
(WebCore::Document::fontSelector):
(WebCore::Document::clearStyleResolver):
* dom/Document.h:
2015-01-23 Chris Dumez <cdumez@apple.com>
Leverage CSSValuePool's font family cache in CSSComputedStyleDeclaration
https://bugs.webkit.org/show_bug.cgi?id=140829
Reviewed by Andreas Kling.
Leverage CSSValuePool's font family cache in CSSComputedStyleDeclaration
by calling CSSValuePool::createFontFamilyValue() to create the font
family CSSPrimitiveValue instead of cssValuePool().createValue().
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForFamily):
2015-01-23 Timothy Horton <timothy_horton@apple.com>
QLPreviewMenuItem popovers don't close when the page scrolls
https://bugs.webkit.org/show_bug.cgi?id=140806
<rdar://problem/19555618>
Reviewed by Beth Dakin.
* platform/spi/mac/QuickLookMacSPI.h:
Add some SPI.
2015-01-23 Andreas Kling <akling@apple.com>
Hang CSSFontSelector off Document instead of StyleResolver.
<https://webkit.org/b/140820>
Reviewed by Antti Koivisto.
Move the CSSFontSelector from StyleResolver to Document. This is the first
step towards making the CSSFontSelector be able to survive full style recalc.
Clearing a Document's StyleResolver will still nuke the CSSFontSelector,
though that is done in Document::clearStyleResolver() now.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::CSSFontSelector):
* css/CSSFontSelector.h:
Modernize CSSFontSelector construction a bit by having create() return
a Ref and the constructor take a Document& instead of a Document*.
Also made the constructor explicit.
(WebCore::StyleResolver::~StyleResolver):
* dom/Document.cpp:
(WebCore::Document::clearStyleResolver):
Nuke the current CSSFontSelector in clearStyleResolver() instead of
in ~StyleResolver. It's a minor change, but shows the way forward.
Added a FIXME about how CSSFontSelector should eventually survive
this operation.
(WebCore::Document::fontSelector):
* css/FontLoader.cpp:
(WebCore::FontLoader::loadFont):
(WebCore::FontLoader::checkFont):
(WebCore::FontLoader::resolveFontStyle):
* css/RuleSet.cpp:
(WebCore::RuleSet::addChildRules):
* css/StyleResolver.h:
(WebCore::StyleResolver::fontSelector): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::appendAuthorStyleSheets):
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::defaultStyleForElement):
(WebCore::StyleResolver::updateFont):
* dom/Document.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::paintItemForeground):
* rendering/RenderMenuList.cpp:
(RenderMenuList::fontSelector):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::fontSelector):
* rendering/TextAutoSizing.cpp:
(WebCore::TextAutoSizingValue::adjustNodeSizes):
(WebCore::TextAutoSizingValue::reset):
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
Move CSSFontSelector ownership from StyleResolver to Document.
2015-01-23 Jer Noble <jer.noble@apple.com>
Layout Test http/tests/media/track-in-band-hls-metadata.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=140827
Reviewed by Eric Carlson.
Create the m_metadataTrack by calling prepareMetadataTrack() before deref-ing it.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
2015-01-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add initial database process support
https://bugs.webkit.org/show_bug.cgi?id=139491
Reviewed by Sergio Villar Senin.
* platform/sql/SQLiteFileSystem.cpp:
(WebCore::SQLiteFileSystem::openDatabase): Use
WebCore::fileSystemRepresentation() for the database filename,
otherwise sqlite3_open() fails when the filename contains "%2E".
2015-01-23 Byeongha Cho <byeongha.cho@samsung.com>
Initialization for some member variable of FontPlatformData
https://bugs.webkit.org/show_bug.cgi?id=136327
Reviewed by Myles C. Maxfield.
No new tests. There's no functional change.
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::operator=):
(WebCore::FontPlatformData::~FontPlatformData):
2015-01-23 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Rename ChildNodeRemovalNotifier::m_insertionPoint to m_removalPoint
https://bugs.webkit.org/show_bug.cgi?id=140766
Reviewed by Andreas Kling.
ChildNodeRemovalNotifier::ChildNodeRemovalNotifier(...) should take
a node as removal point.
It's probably Copy/Paste from ChildNodeInsertionNotifier::m_insertionPoint.
No new tests. No behavior change.
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildNodeRemovalNotifier::ChildNodeRemovalNotifier):
(WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument):
(WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
2015-01-23 Hunseop Jeong <hs85.jeong@samsung.com>
[GTK] Fix debug build after r178940
https://bugs.webkit.org/show_bug.cgi?id=140814
Reviewed by Carlos Garcia Campos.
* platform/graphics/opentype/OpenTypeVerticalData.cpp:
(WebCore::OpenTypeVerticalData::substituteWithVerticalGlyphs):
2015-01-22 Zalan Bujtas <zalan@apple.com>
Simple line layout: Move leading whitespace handling from removeTrailingWhitespace() to initializeNewLine().
https://bugs.webkit.org/show_bug.cgi?id=140757
Reviewed by Antti Koivisto.
Checking if overflowed pre-wrap whitespace needs to be ignored should not be part of the trailing whitespace handling.
Move it to initializeNewLine().
No change in functionality.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::preWrap):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::initializeNewLine):
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::isLineBreak):
2015-01-22 Jer Noble <jer.noble@apple.com>
[iOS] Media controls disappear when loading a HLS live stream
https://bugs.webkit.org/show_bug.cgi?id=140792
rdar://problem/19491658
Reviewed by Dean Jackson.
Overload reconnectControls to reconnect the "start playback" button
if the control type has been set to "StartPlaybackButton".
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.reconnectControls):
2015-01-22 peavo@outlook.com <peavo@outlook.com>
[Win] No plugin content on some sites.
https://bugs.webkit.org/show_bug.cgi?id=140780
Reviewed by Anders Carlsson.
Return script instance from ScriptController::createScriptInstanceForWidget(),
instead of always returning null.
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::createScriptInstanceForWidget):
* plugins/PluginViewBase.h:
(WebCore::PluginViewBase::bindingInstance):
2015-01-22 Jer Noble <jer.noble@apple.com>
[Mac][EME] Adopt changes to AVStreamSession class methods
https://bugs.webkit.org/show_bug.cgi?id=140778
rdar://problem/19458200
Reviewed by Eric Carlson.
AVStreamSession class methods have added a "storageDirectoryAtURL:" parameter so as to be able to
read and modify records stored at non-default storage locations.
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::mediaKeysStorageDirectory): Implement client method by querying document and settings.
* Modules/encryptedmedia/MediaKeySession.h:
* platform/graphics/CDMSession.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Check whether the AVStreamSession class responds to new selector before calling.
(WebCore::CDMSessionMediaSourceAVFObjC::update): Ditto.
(WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage): Ditto.
(WebCore::CDMSessionMediaSourceAVFObjC::storagePath): Fetch the storage path from the client.
2015-01-22 Michael Saboff <msaboff@apple.com>
REGRESSION (174847): can't view NHK(Japan's national public broadcasting organization)’s news pages
https://bugs.webkit.org/show_bug.cgi?id=140794
Reviewed by Anders Carlsson.
If a document.open has been set, return it instead of always returning a new,
non-cached instance of jsHTMLDocumentPrototypeFunctionOpen.
Test: js/dom/document-overwrite-open.html
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
2015-01-22 Zalan Bujtas <zalan@apple.com>
Simple line layout: Reset LineState when starting a new line.
https://bugs.webkit.org/show_bug.cgi?id=140789
Reviewed by Antti Koivisto.
Reset LineState when starting a new line to ensure we always
start with a clean state.
No change in functionality.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::updateLineConstrains):
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::createTextRuns):
2015-01-22 Roger Fong <roger_fong@apple.com>
[WebGL2] Create empty interface files for new WebGL2 objects.
https://bugs.webkit.org/show_bug.cgi?id=140779.
<rdar://problem/15002288>
Reviewed by Dean Jackson.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/canvas/WebGLQuery.cpp: Added.
(WebCore::WebGLQuery::create):
(WebCore::WebGLQuery::~WebGLQuery):
(WebCore::WebGLQuery::WebGLQuery):
(WebCore::WebGLQuery::deleteObjectImpl):
* html/canvas/WebGLQuery.h: Added.
* html/canvas/WebGLQuery.idl: Added.
* html/canvas/WebGLSampler.cpp: Added.
(WebCore::WebGLSampler::create):
(WebCore::WebGLSampler::~WebGLSampler):
(WebCore::WebGLSampler::WebGLSampler):
(WebCore::WebGLSampler::deleteObjectImpl):
* html/canvas/WebGLSampler.h: Added.
* html/canvas/WebGLSampler.idl: Added.
* html/canvas/WebGLSharedObject.h:
(WebCore::WebGLSharedObject::isQuery):
(WebCore::WebGLSharedObject::isSampler):
(WebCore::WebGLSharedObject::isSync):
(WebCore::WebGLSharedObject::isTransformFeedback):
(WebCore::WebGLSharedObject::isVertexArrayObject):
* html/canvas/WebGLSync.cpp: Added.
(WebCore::WebGLSync::create):
(WebCore::WebGLSync::~WebGLSync):
(WebCore::WebGLSync::WebGLSync):
(WebCore::WebGLSync::deleteObjectImpl):
* html/canvas/WebGLSync.h: Added.
* html/canvas/WebGLSync.idl: Added.
* html/canvas/WebGLTransformFeedback.cpp: Added.
(WebCore::WebGLTransformFeedback::create):
(WebCore::WebGLTransformFeedback::~WebGLTransformFeedback):
(WebCore::WebGLTransformFeedback::WebGLTransformFeedback):
(WebCore::WebGLTransformFeedback::deleteObjectImpl):
* html/canvas/WebGLTransformFeedback.h: Added.
* html/canvas/WebGLTransformFeedback.idl: Added.
* html/canvas/WebGLVertexArrayObject.cpp: Added.
(WebCore::WebGLVertexArrayObject::create):
(WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject):
(WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject):
(WebCore::WebGLVertexArrayObject::deleteObjectImpl):
* html/canvas/WebGLVertexArrayObject.h: Added.
* html/canvas/WebGLVertexArrayObject.idl: Added.
2015-01-22 Chris Dumez <cdumez@apple.com>
Fix remaining multiple targets per rule issues in DerivedSources.make
https://bugs.webkit.org/show_bug.cgi?id=140790
Reviewed by David Kilzer.
Fix remaining multiple target per rule issues in DerivedSources.make,
similarly to Bug 140784 and Bug 140756.
This was causing us to run scripts several times to generate the same
files and may lead to malformed files in case of concurrency.
* DerivedSources.make:
2015-01-22 Ryosuke Niwa <rniwa@webkit.org>
Add a build flag for ES6 class syntax
https://bugs.webkit.org/show_bug.cgi?id=140760
Reviewed by Michael Saboff.
* Configurations/FeatureDefines.xcconfig:
2015-01-22 Chris Dumez <cdumez@apple.com>
SVGNames.cpp and HTMLNames.cpp are sometimes malformed
https://bugs.webkit.org/show_bug.cgi?id=140784
<rdar://problem/17701233>
Reviewed by David Kilzer.
Due to bad rules in DerivedSources.make, make_names.pl was called
several times with the same arguments during build. This is because
SVG/HTML/MathML each had several targets associated to the same
command. This would cause the command (make_names.pl) to be called
once per target. However, make_names.pl only needs to be executed
once to generate all of the files currently marked as target.
Calling make_names.pl several times for the same files is not only
wasteful, but it can also lead to malformed generated files if the
scripts instances are executed in parallel as they will read / write
from / to the same files.
This patch uses INTERMEDIATE targets instead so that we can still
indicate which files are generated by make_names.pl but only run
the script once.
This is a similar fix as for Bug 140756. There may several other
similar issues in DerivedSources.make but this patch focuses on
make_names.pl. I will take care of other in follow-ups if needed.
* DerivedSources.make:
2015-01-22 Chris Dumez <cdumez@apple.com>
Have Counter::create() return a Ref<Counter>
https://bugs.webkit.org/show_bug.cgi?id=140777
Reviewed by Andreas Kling.
Have Counter::create() return a Ref<Counter> instead of a PassRefPtr.
The CSSPrimitiveValue class needed some updates as well to support
constructing a CSSPrimitiveValue object from a Ref<>.
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::init):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::create):
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/Counter.h:
(WebCore::Counter::create):
(WebCore::Counter::cloneForCSSOM):
2015-01-22 Chris Dumez <cdumez@apple.com>
Drop the legacy FeatureCounter class
https://bugs.webkit.org/show_bug.cgi?id=140749
Reviewed by Andreas Kling.
Drop the legacy FeatureCounter class and use DiagnosticLoggingClient
instead.
* CMakeLists.txt:
* Configurations/WebCore.xcconfig:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest):
(WebCore::SubresourceLoader::didReceiveResponse):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::logMemoryCacheResourceRequest):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey):
(WebCore::DiagnosticLoggingKeys::playedKey):
(WebCore::DiagnosticLoggingKeys::noCacheKey):
(WebCore::DiagnosticLoggingKeys::noStoreKey):
(WebCore::DiagnosticLoggingKeys::notInMemoryCacheKey):
(WebCore::DiagnosticLoggingKeys::mediaKey):
(WebCore::DiagnosticLoggingKeys::isExpiredKey):
(WebCore::DiagnosticLoggingKeys::loadingKey):
(WebCore::DiagnosticLoggingKeys::inMemoryCacheKey):
(WebCore::DiagnosticLoggingKeys::reasonKey):
(WebCore::DiagnosticLoggingKeys::audioKey):
(WebCore::DiagnosticLoggingKeys::cachedResourceRevalidationKey):
(WebCore::DiagnosticLoggingKeys::resourceRequestKey):
(WebCore::DiagnosticLoggingKeys::revalidatingKey):
(WebCore::DiagnosticLoggingKeys::unusedKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonCredentialSettingsKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonErrorKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonMustRevalidateNoValidatorKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonNoStoreKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonRedirectChainKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonReloadKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonTypeMismatchKey):
(WebCore::DiagnosticLoggingKeys::usedKey):
(WebCore::DiagnosticLoggingKeys::userKey):
(WebCore::DiagnosticLoggingKeys::videoKey):
(WebCore::DiagnosticLoggingKeys::webViewKey):
(WebCore::DiagnosticLoggingKeys::zoomedKey):
* page/DiagnosticLoggingKeys.h:
* page/Settings.in:
* platform/FeatureCounter.cpp: Removed.
* platform/FeatureCounter.h: Removed.
* platform/FeatureCounterKeys.h: Removed.
* platform/ios/FeatureCounter.mm: Removed.
2015-01-22 Benjamin Poulain <benjamin@webkit.org>
When extending the fallback transitions with their closure, we are modifying the Set while iterating it
https://bugs.webkit.org/show_bug.cgi?id=140785
Reviewed by Andreas Kling.
* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::populateTransitions):
Make that in two steps: accumulate the fallback transitions then add the closure
of every element.
2015-01-21 Antti Koivisto <antti@apple.com>
Rename SimpleFontData to Font
https://bugs.webkit.org/show_bug.cgi?id=140496
Reviewed by Zalan Bujtas.
The fallback supporting Font type was renamed FontCascade.
We can now rename SimpleFontData to Font matching the usual definition.
2015-01-22 Zalan Bujtas <zalan@apple.com>
Simple line layout: Make trailing whitespace handling more explicit.
https://bugs.webkit.org/show_bug.cgi?id=140776
Reviewed by Antti Koivisto.
Differentiate between committed and uncommitted trailing whitespace.
This enables further cleanup in removeTrailingWhitespace().
No change in functionality.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::LineState::commitAndCreateRun):
(WebCore::SimpleLineLayout::LineState::addUncommitted):
(WebCore::SimpleLineLayout::LineState::hasWhitespaceOnly):
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::LineState::LineState): Deleted.
(WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace): Deleted.
(WebCore::SimpleLineLayout::LineState::resetTrailingWhitespace): Deleted.
2015-01-22 Alexey Proskuryakov <ap@apple.com>
Crash in URL::protocol() after appcache load fails
https://bugs.webkit.org/show_bug.cgi?id=140755
rdar://problem/7881290
Reviewed by Dan Bates.
Test: http/tests/appcache/404-resource-with-slow-main-resource.php
Not every cache that isn't being updated is complete. It could also be in a zombie
state after failing to load. We get rid of the cache once the main resource finishes
loading, but while it's being loaded, the zombie still looks like a regular
candidate application cache.
* loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::isComplete):
* loader/appcache/ApplicationCache.h:
Removed const from isComplete(), because otherwise we couldn't use ApplicationCacheGroup::m_caches.contains().
Constness doesn't make a lot of sense for these objects anyway.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::failedLoadingMainResource): Toned down an assertion.
We can fail a main resource load when the document has a zombie appcache, too.
* loader/appcache/ApplicationCacheGroup.h:
(WebCore::ApplicationCacheGroup::cacheIsComplete):
(WebCore::ApplicationCacheGroup::cacheIsBeingUpdated): Deleted.
These functions are only used in ApplicationCache::isComplete().
2015-01-22 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Avoid defining always empty Vector<TextCheckingResult>
https://bugs.webkit.org/show_bug.cgi?id=140765
Reviewed by Alexey Proskuryakov.
Pass an empty vector direclty instead.
No new tests. No behavior change.
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::didCheckCancel):
2015-01-22 Chris Dumez <cdumez@apple.com>
makeprop.pl script is called too many times during build
https://bugs.webkit.org/show_bug.cgi?id=140756
<rdar://problem/19467942>
Reviewed by David Kilzer.
The makeprop.pl script was called 4 times (instead of once) during
build due to a bad Makefile rule in DerivedSources.make. makeprop.pl
had 4 associated targets and thus was called 4 times (with the same
parameter). Calling it once is sufficient to generate all 4 files
that were marked as target. This patch uses an INTERMEDIATE target
instead so that we can indicate that several files are generated
by the same command.
I believe this may be the reason for the sporatic build failures
that look like:
"""
CSSPropertyNames.gperf: No keywords in input file!
calling gperf failed: 256 at WebCore/css/makeprop.pl line 1036.
"""
The makeprop.pl script is generating gperf's input file and calling the
gperf executable on this file. If the script is executed several times
in parallel, it would explain the build failures as several instances
of makeprop.pl may be writing / reading from the same
CSSPropertyNames.gperf file.
* DerivedSources.make:
2015-01-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178894.
https://bugs.webkit.org/show_bug.cgi?id=140775
Broke JSC and bindings tests (Requested by ap_ on #webkit).
Reverted changeset:
"put_by_val_direct need to check the property is index or not
for using putDirect / putDirectIndex"
https://bugs.webkit.org/show_bug.cgi?id=140426
http://trac.webkit.org/changeset/178894
2015-01-22 David Kilzer <ddkilzer@apple.com>
[iOS] Fix iphoneos SDK builds for ios-ews queue
<http://webkit.org/b/140748>
Reviewed by Daniel Bates.
* WebCore.xcodeproj/project.pbxproj: Add new SPI headers.
* platform/graphics/cg/ImageBufferCG.cpp: Switch to using
"IOSurfaceSPI.h" from <IOSurface/IOSurface.h>.
* platform/graphics/cg/ImageBufferDataCG.cpp: Ditto.
* platform/graphics/cocoa/IOSurface.mm: Ditto. Move definitions
in <IOSurface/IOSurfacePrivate.h> into "IOSurfaceSPI.h".
* platform/spi/cg/CoreGraphicsSPI.h: Switch to
WTF_EXTERN_C_{BEGIN,END}. Add
CGContextGetFontAntialiasingStyle() and
CGContextSetFontAntialiasingStyle().
* platform/spi/cocoa/IOPMLibSPI.h: Switch to use IOReturnSPI.h.
* platform/spi/cocoa/IOReturnSPI.h: Add.
* platform/spi/cocoa/IOSurfaceSPI.h: Add.
* platform/spi/cocoa/IOTypesSPI.h: Add.
2015-01-21 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Skip items spanning flex tracks when sizing content based tracks
https://bugs.webkit.org/show_bug.cgi?id=140720
Reviewed by David Hyatt.
Section "11.5. Resolve Intrinsic Track Sizes" of the specs forces
us to ignore items spanning tracks with flex sizing functions when
resolving the content-based track sizing functions. Items with
span < 2 are not affected by this rule (as they will belong to a
single track). This way the algorithm ensures that min-content and
max-content restrictions are fulfilled before distributing the
extra space.
Test: fast/css-grid-layout/flex-and-content-sized-resolution-columns.html
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
(WebCore::integerSpanForDirection):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
* rendering/RenderGrid.h:
2015-01-22 Yusuke Suzuki <utatane.tea@gmail.com>
put_by_val_direct need to check the property is index or not for using putDirect / putDirectIndex
https://bugs.webkit.org/show_bug.cgi?id=140426
Reviewed by Geoffrey Garen.
Test: js/dfg-put-by-val-direct-with-edge-numbers.html
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::callHTMLAllCollection):
(WebCore::JSHTMLAllCollection::item):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateImplementation):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64Array::getOwnPropertySlot):
(WebCore::JSFloat64Array::getOwnPropertyDescriptor):
(WebCore::JSFloat64Array::put):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::getOwnPropertySlot):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::getOwnPropertySlot):
(JSC::RuntimeArray::put):
2015-01-19 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Size tracks using a list of all items sorted by span
https://bugs.webkit.org/show_bug.cgi?id=140615
Reviewed by Andreas Kling.
In r173620 we fixed
RenderGrid::resolveContentBasedTrackSizingFunctions() so that it
now collects all items spanning content-sized tracks and process
them one by one after sorting them by ascending span.
The problem is that it was incorrectly implemented, it has two
important bugs. First one is that the hash table that collects
items is regenerated after processing each track, so it's actually
doing nothing. Secondly we're only sorting the items on each
track, instead of all the items in the grid.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2015-01-21 Daniel Bates <dabates@apple.com>
Fix the iOS release build after <http://trac.webkit.org/changeset/178868>
(https://bugs.webkit.org/show_bug.cgi?id=140742)
Substitute ASSERT_UNUSED() for ASSERT() since the parameter layer is used only in the assertion expression.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack):
2015-01-21 Daniel Bates <dabates@apple.com>
[iOS] Many compositing tests fail in DumpRenderTree due to contentsOpaque difference
https://bugs.webkit.org/show_bug.cgi?id=140742
Reviewed by Simon Fraser.
Make RenderLayerBacking::layerTreeAsText() (including internals.layerTreeAsText()) always
report that the main frame's RenderView layer is opaque when running iOS DumpRenderTree to
avoid test failures and the need to maintain for iOS WebKit1 an almost identical copy of the
platform-independent compositing test results.
The main frame's RenderView layer is always transparent in iOS WebKit1 since it does
not make use of a tiled cache layer and defers to UIKit to handle the final compositing
of the web view, including applying the page scale factor.
* platform/RuntimeApplicationChecksIOS.mm:
(WebCore::applicationIsDumpRenderTree): The app bundle identifier of DumpRenderTree has
the form org.webkit.DumpRenderTreeX where X is some non-negative integer.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::dumpProperties): Modified to report that a layer is opaque when
GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack() returns true.
* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added
default implementation (returns false).
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added;
returns true when running in DumpRenderTree and the passed GraphicsLayer corresponds to the main frame's
RenderView layer.
* rendering/RenderLayerBacking.h:
2015-01-21 Roger Fong <roger_fong@apple.com>
WebGL2 (spec section 3.1): Add new types to WebGL2 API.
https://bugs.webkit.org/show_bug.cgi?id=140741.
<rdar://problem/19552962>
Reviewed by Dean Jackson.
* html/canvas/WebGL2RenderingContext.idl:
2015-01-21 Zalan Bujtas <zalan@apple.com>
Simple line layout: Move nextTextFragment() to FlowContents class.
https://bugs.webkit.org/show_bug.cgi?id=140738
Reviewed by Antti Koivisto.
This is in preparation to make FlowContents an iterator class.
No change in functionality.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::LineState::addUncommitted):
(WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::TextFragment::TextFragment): Deleted.
(WebCore::SimpleLineLayout::TextFragment::isEmpty): Deleted.
(WebCore::SimpleLineLayout::nextFragment): Deleted.
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::nextTextFragment):
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::FlowContents::TextFragment::isEmpty):
2015-01-21 Andreas Kling <akling@apple.com>
DocumentLoader::timing() should return a reference.
<https://webkit.org/b/128272>
Reviewed by Antti Koivisto.
There is always a DocumentLoadTiming object, so return it by
reference since it can never be null.
* Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::from):
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::serviceScriptedAnimations):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForTiming):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::finishedLoading):
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::continueAfterNavigationPolicy):
(WebCore::DocumentLoader::startLoadingMainResource):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::timing):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchLoadEvent):
* page/Performance.cpp:
(WebCore::Performance::now):
* page/PerformanceNavigation.cpp:
(WebCore::PerformanceNavigation::redirectCount):
* page/PerformanceResourceTiming.cpp:
(WebCore::monotonicTimeToDocumentMilliseconds):
(WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::documentLoadTiming):
2015-01-21 Benjamin Poulain <benjamin@webkit.org>
Handle the transition on any character as a separate type of transition
https://bugs.webkit.org/show_bug.cgi?id=140711
Reviewed by Andreas Kling.
Instead of considering the universal transition as 127 transitions, it is now
handled as a separate type of transition.
The goal is to reduce the number of exit edge to consider for each node. Instead
of having 127 for any partition containing one universal transition, we have
as few exit edges as necessary + one universal transition.
In the NFA, the universal transition is stored directly on NFANode in a new
HashSet (transitionsOnAnyCharacter).
The target nodes are made exclusive between "transitionsOnAnyCharacter" and "transitions"
by construction. That is not strictly needed but it simplify debugging at the moment.
When converting a NFA to a DFA, we first find all the node that transition on any character.
Then, when we iterate over "real" transition, we also augment that set with the set on
any character.
When creating the DFA node, we first consider each "real" transition, then we have a single
"fallback" transition for any character that has not been handled yet.
When matching, we first search for any real transition. If there is none but a fallback exists,
we take the fallback.
* contentextensions/DFA.cpp:
(WebCore::ContentExtensions::DFA::nextState):
(WebCore::ContentExtensions::printTransitions):
(WebCore::ContentExtensions::DFA::debugPrintDot):
(WebCore::ContentExtensions::printTransition): Deleted.
* contentextensions/DFANode.h:
* contentextensions/NFA.cpp:
(WebCore::ContentExtensions::NFA::addTransition):
(WebCore::ContentExtensions::NFA::addTransitionsOnAnyCharacter):
(WebCore::ContentExtensions::printTransitions):
(WebCore::ContentExtensions::NFA::debugPrintDot):
(WebCore::ContentExtensions::printTransition): Deleted.
* contentextensions/NFA.h:
* contentextensions/NFANode.h:
* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::populateTransitions):
(WebCore::ContentExtensions::getOrCreateDFANode):
(WebCore::ContentExtensions::NFAToDFA::convert):
* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::GraphBuilder::generateTransition):
2015-01-20 Antti Koivisto <antti@apple.com>
REGRESSION(r178180): Membuster regressed ~4%
https://bugs.webkit.org/show_bug.cgi?id=140495
Reviewed by Andreas Kling.
After r178180 we keep system fallback fonts that are used on glyph pages alive.
Previously we would traverse the glyph pages and remove entries referencing system fallbacks.
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::purgeInactiveFontData):
* platform/graphics/FontCascade.cpp:
(WebCore::pruneUnreferencedEntriesFromFontGlyphsCache):
(WebCore::pruneSystemFallbackFonts):
* platform/graphics/FontCascade.h:
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::pruneSystemFallbacks):
When clearing the font cache also remove the cached glyph pages that may contain system fallback fonts
and release the fallbacks.
* platform/graphics/FontGlyphs.h:
2015-01-21 Manuel Rego Casasnovas <rego@igalia.com>
first-letter pseudo-element from ancestors is not being ignored in grids and flexboxes
https://bugs.webkit.org/show_bug.cgi?id=138424
Reviewed by Benjamin Poulain.
Source/WebCore:
According to the grid and flexbox specs:
"::first-letter pseudo-element do not apply to grid/flex containers".
http://dev.w3.org/csswg/css-grid/#grid-containers
http://dev.w3.org/csswg/css-flexbox/#flex-containers
Check also the CSS WG mailing list discussion:
http://lists.w3.org/Archives/Public/www-style/2014Dec/0305.html
This was almost working right, except in the case that an ancestor was
setting the ::first-letter pseudo-element.
Added a few more cases to the current tests in order to check this
behavior.
Also created some new tests to increase coverage
Tests: fast/css/first-letter-from-ancestors-not-apply-inline-elements.html
fast/css/first-letter-ignores-display-property.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::getFirstLetter): Go to the next sibling when
looking for the first text child if you reach a grid or flexbox.
2015-01-21 Csaba Osztrogonác <ossy@webkit.org>
Fix cast-align warning in Source/WebCore/platform/efl/EflScreenUtilities.cpp
https://bugs.webkit.org/show_bug.cgi?id=140670
Reviewed by Darin Adler.
* platform/efl/EflScreenUtilities.cpp:
(WebCore::createCustomCursor):
2015-01-21 Csaba Osztrogonác <ossy@webkit.org>
Remove ENABLE(INSPECTOR) ifdef guards
https://bugs.webkit.org/show_bug.cgi?id=140668
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
* WebCore.exp.in:
* bindings/js/JSCommandLineAPIHostCustom.cpp:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::supportsProfiling):
(WebCore::JSDOMWindowBase::supportsRichSourceInfo):
* bindings/js/JSInspectorFrontendHostCustom.cpp:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::collectIsolatedContexts):
* bindings/js/ScriptController.h:
* bindings/js/ScriptGlobalObject.cpp:
(WebCore::ScriptGlobalObject::set):
* bindings/js/ScriptGlobalObject.h:
* bindings/js/WorkerScriptDebugServer.cpp:
* bindings/js/WorkerScriptDebugServer.h:
* dom/Node.cpp:
(WebCore::Node::inspect):
* inspector/CommandLineAPIHost.cpp:
* inspector/CommandLineAPIHost.idl:
* inspector/CommandLineAPIModule.cpp:
* inspector/CommandLineAPIModule.h:
* inspector/DOMEditor.cpp:
* inspector/DOMEditor.h:
* inspector/DOMPatchSupport.cpp:
* inspector/DOMPatchSupport.h:
* inspector/InspectorApplicationCacheAgent.cpp:
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
* inspector/InspectorCSSAgent.h:
* inspector/InspectorClient.cpp:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
(WebCore::InspectorInstrumentation::consoleCount):
(WebCore::InspectorInstrumentation::startConsoleTiming):
(WebCore::InspectorInstrumentation::stopConsoleTiming):
(WebCore::InspectorInstrumentation::consoleTimeStamp):
(WebCore::InspectorInstrumentation::startProfiling):
(WebCore::InspectorInstrumentation::stopProfiling):
* inspector/InspectorController.cpp:
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseInstrumentation.h:
(WebCore::InspectorInstrumentation::didOpenDatabase):
* inspector/InspectorDatabaseResource.cpp:
* inspector/InspectorDatabaseResource.h:
* inspector/InspectorFrontendClientLocal.cpp:
* inspector/InspectorFrontendHost.cpp:
* inspector/InspectorFrontendHost.idl:
* inspector/InspectorHistory.cpp:
* inspector/InspectorHistory.h:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
(WebCore::InspectorInstrumentation::isDebuggerPaused):
(WebCore::InspectorInstrumentation::willInsertDOMNode):
(WebCore::InspectorInstrumentation::didInsertDOMNode):
(WebCore::InspectorInstrumentation::willRemoveDOMNode):
(WebCore::InspectorInstrumentation::didRemoveDOMNode):
(WebCore::InspectorInstrumentation::willModifyDOMAttr):
(WebCore::InspectorInstrumentation::didModifyDOMAttr):
(WebCore::InspectorInstrumentation::didRemoveDOMAttr):
(WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
(WebCore::InspectorInstrumentation::frameWindowDiscarded):
(WebCore::InspectorInstrumentation::mediaQueryResultChanged):
(WebCore::InspectorInstrumentation::didPushShadowRoot):
(WebCore::InspectorInstrumentation::willPopShadowRoot):
(WebCore::InspectorInstrumentation::didCreateNamedFlow):
(WebCore::InspectorInstrumentation::willRemoveNamedFlow):
(WebCore::InspectorInstrumentation::didChangeRegionOverset):
(WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElement):
(WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElement):
(WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
(WebCore::InspectorInstrumentation::handleTouchEvent):
(WebCore::InspectorInstrumentation::handleMousePress):
(WebCore::InspectorInstrumentation::forcePseudoState):
(WebCore::InspectorInstrumentation::characterDataModified):
(WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
(WebCore::InspectorInstrumentation::didInstallTimer):
(WebCore::InspectorInstrumentation::didRemoveTimer):
(WebCore::InspectorInstrumentation::willCallFunction):
(WebCore::InspectorInstrumentation::didCallFunction):
(WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent):
(WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent):
(WebCore::InspectorInstrumentation::willDispatchEvent):
(WebCore::InspectorInstrumentation::didDispatchEvent):
(WebCore::InspectorInstrumentation::willHandleEvent):
(WebCore::InspectorInstrumentation::didHandleEvent):
(WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
(WebCore::InspectorInstrumentation::didDispatchEventOnWindow):
(WebCore::InspectorInstrumentation::willEvaluateScript):
(WebCore::InspectorInstrumentation::didEvaluateScript):
(WebCore::InspectorInstrumentation::scriptsEnabled):
(WebCore::InspectorInstrumentation::willFireTimer):
(WebCore::InspectorInstrumentation::didFireTimer):
(WebCore::InspectorInstrumentation::didInvalidateLayout):
(WebCore::InspectorInstrumentation::willLayout):
(WebCore::InspectorInstrumentation::didLayout):
(WebCore::InspectorInstrumentation::didScroll):
(WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent):
(WebCore::InspectorInstrumentation::didDispatchXHRLoadEvent):
(WebCore::InspectorInstrumentation::willPaint):
(WebCore::InspectorInstrumentation::didPaint):
(WebCore::InspectorInstrumentation::willScrollLayer):
(WebCore::InspectorInstrumentation::didScrollLayer):
(WebCore::InspectorInstrumentation::willRecalculateStyle):
(WebCore::InspectorInstrumentation::didRecalculateStyle):
(WebCore::InspectorInstrumentation::didScheduleStyleRecalculation):
(WebCore::InspectorInstrumentation::applyEmulatedMedia):
(WebCore::InspectorInstrumentation::willSendRequest):
(WebCore::InspectorInstrumentation::continueAfterPingLoader):
(WebCore::InspectorInstrumentation::markResourceAsCached):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
(WebCore::InspectorInstrumentation::willReceiveResourceResponse):
(WebCore::InspectorInstrumentation::didReceiveResourceResponse):
(WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
(WebCore::InspectorInstrumentation::continueWithPolicyDownload):
(WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
(WebCore::InspectorInstrumentation::didReceiveData):
(WebCore::InspectorInstrumentation::didFinishLoading):
(WebCore::InspectorInstrumentation::didFailLoading):
(WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient):
(WebCore::InspectorInstrumentation::willLoadXHR):
(WebCore::InspectorInstrumentation::didFailXHRLoading):
(WebCore::InspectorInstrumentation::didFinishXHRLoading):
(WebCore::InspectorInstrumentation::didReceiveXHRResponse):
(WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
(WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
(WebCore::InspectorInstrumentation::scriptImported):
(WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
(WebCore::InspectorInstrumentation::didReceiveScriptResponse):
(WebCore::InspectorInstrumentation::domContentLoadedEventFired):
(WebCore::InspectorInstrumentation::loadEventFired):
(WebCore::InspectorInstrumentation::frameDetachedFromParent):
(WebCore::InspectorInstrumentation::didCommitLoad):
(WebCore::InspectorInstrumentation::frameDocumentUpdated):
(WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
(WebCore::InspectorInstrumentation::frameStartedLoading):
(WebCore::InspectorInstrumentation::frameStoppedLoading):
(WebCore::InspectorInstrumentation::frameScheduledNavigation):
(WebCore::InspectorInstrumentation::frameClearedScheduledNavigation):
(WebCore::InspectorInstrumentation::willRunJavaScriptDialog):
(WebCore::InspectorInstrumentation::didRunJavaScriptDialog):
(WebCore::InspectorInstrumentation::willDestroyCachedResource):
(WebCore::InspectorInstrumentation::willWriteHTML):
(WebCore::InspectorInstrumentation::didWriteHTML):
(WebCore::InspectorInstrumentation::didDispatchDOMStorageEvent):
(WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart):
(WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
(WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
(WebCore::InspectorInstrumentation::didCreateWebSocket):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorInstrumentation::didCloseWebSocket):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
(WebCore::InspectorInstrumentation::didSendWebSocketFrame):
(WebCore::InspectorInstrumentation::sessionCreated):
(WebCore::InspectorInstrumentation::sessionLoaded):
(WebCore::InspectorInstrumentation::sessionModified):
(WebCore::InspectorInstrumentation::segmentCreated):
(WebCore::InspectorInstrumentation::segmentCompleted):
(WebCore::InspectorInstrumentation::segmentLoaded):
(WebCore::InspectorInstrumentation::segmentUnloaded):
(WebCore::InspectorInstrumentation::captureStarted):
(WebCore::InspectorInstrumentation::captureStopped):
(WebCore::InspectorInstrumentation::playbackStarted):
(WebCore::InspectorInstrumentation::playbackPaused):
(WebCore::InspectorInstrumentation::playbackFinished):
(WebCore::InspectorInstrumentation::playbackHitPosition):
(WebCore::InspectorInstrumentation::networkStateChanged):
(WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
(WebCore::InspectorInstrumentation::didRequestAnimationFrame):
(WebCore::InspectorInstrumentation::didCancelAnimationFrame):
(WebCore::InspectorInstrumentation::willFireAnimationFrame):
(WebCore::InspectorInstrumentation::didFireAnimationFrame):
(WebCore::InspectorInstrumentation::layerTreeDidChange):
(WebCore::InspectorInstrumentation::renderLayerDestroyed):
(WebCore::InspectorInstrumentation::pseudoElementDestroyed):
(WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
(WebCore::InspectorInstrumentation::hasFrontends): Deleted.
(WebCore::InspectorInstrumentation::consoleAgentEnabled): Deleted.
(WebCore::InspectorInstrumentation::runtimeAgentEnabled): Deleted.
(WebCore::InspectorInstrumentation::timelineAgentEnabled): Deleted.
(WebCore::InspectorInstrumentation::replayAgentEnabled): Deleted.
* inspector/InspectorLayerTreeAgent.cpp:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorOverlay.cpp:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorPageAgent.h:
* inspector/InspectorReplayAgent.cpp:
* inspector/InspectorReplayAgent.h:
* inspector/InspectorResourceAgent.cpp:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorStyleSheet.cpp:
* inspector/InspectorStyleSheet.h:
* inspector/InspectorStyleTextEditor.cpp:
* inspector/InspectorStyleTextEditor.h:
* inspector/InspectorTimelineAgent.cpp:
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
* inspector/InspectorWorkerResource.h:
* inspector/InstrumentingAgents.cpp:
* inspector/NetworkResourcesData.cpp:
* inspector/NetworkResourcesData.h:
* inspector/PageConsoleAgent.cpp:
* inspector/PageConsoleAgent.h:
* inspector/PageDebuggerAgent.cpp:
* inspector/PageDebuggerAgent.h:
* inspector/PageRuntimeAgent.cpp:
* inspector/PageRuntimeAgent.h:
* inspector/PageScriptDebugServer.cpp:
* inspector/PageScriptDebugServer.h:
* inspector/TimelineRecordFactory.cpp:
* inspector/WebConsoleAgent.cpp:
* inspector/WebConsoleAgent.h:
* inspector/WebDebuggerAgent.cpp:
* inspector/WebDebuggerAgent.h:
* inspector/WebInjectedScriptHost.cpp:
* inspector/WebInjectedScriptHost.h:
* inspector/WebInjectedScriptManager.cpp:
* inspector/WebInjectedScriptManager.h:
* inspector/WorkerConsoleAgent.cpp:
* inspector/WorkerConsoleAgent.h:
* inspector/WorkerDebuggerAgent.cpp:
* inspector/WorkerDebuggerAgent.h:
* inspector/WorkerInspectorController.cpp:
* inspector/WorkerInspectorController.h:
* inspector/WorkerRuntimeAgent.cpp:
* inspector/WorkerRuntimeAgent.h:
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didReceiveResponse):
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::createResourceHandle):
(WebCore::ApplicationCacheGroup::didReceiveResponse):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::applicationCacheInfo):
* loader/appcache/ApplicationCacheHost.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::showContextMenu):
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::addInspectElementItem):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* page/FrameView.cpp:
(WebCore::FrameView::sendResizeEventIfNeeded):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
* page/Page.h:
* platform/ContextMenuItem.h:
* platform/efl/EflInspectorUtilities.cpp:
* platform/efl/EflInspectorUtilities.h:
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::ResourceRequestBase):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
* testing/Internals.cpp:
(WebCore::InspectorFrontendChannelDummy::sendMessageToFrontend):
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::inspectorHighlightRects):
(WebCore::Internals::inspectorHighlightObject):
(WebCore::Internals::setInspectorIsUnderTest):
* testing/Internals.h:
* testing/Internals.idl:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
* workers/WorkerGlobalScope.h:
* workers/WorkerGlobalScopeProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
(WebCore::WorkerMessagingProxy::sendMessageToInspector):
(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
* workers/WorkerMessagingProxy.h:
* workers/WorkerReportingProxy.h:
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):
2015-01-20 Chris Dumez <cdumez@apple.com>
Simplify DiagnosticLoggingClient call sites
https://bugs.webkit.org/show_bug.cgi?id=140701
Reviewed by Andreas Kling.
Simplify DiagnosticLoggingClient call sites by:
- Moving the Settings::diagnosticLoggingEnabled() check inside the
MainFrame::diagnosticLoggingClient() getter.
- Having MainFrame::diagnosticLoggingClient() return a reference
instead of a pointer (returning a dummy client if necessary).
Otherwise, each call site needs to both check the setting and do a
null-check on the client which is a bit annoying.
* history/PageCache.cpp:
(WebCore::logPageCacheFailureDiagnosticMessage):
(WebCore::logCanCacheFrameDecision):
(WebCore::logCanCachePageDecision):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::logNavigation):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
* loader/SubframeLoader.cpp:
(WebCore::logPluginRequest):
* loader/SubresourceLoader.cpp:
(WebCore::logResourceLoaded):
* page/DiagnosticLoggingClient.h:
(WebCore::DiagnosticLoggingClient::logDiagnosticMessage): Deleted.
(WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithResult): Deleted.
(WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithValue): Deleted.
* page/MainFrame.cpp:
(WebCore::MainFrame::diagnosticLoggingClient):
* page/MainFrame.h:
2015-01-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Should show dynamic specificity values
https://bugs.webkit.org/show_bug.cgi?id=140647
Reviewed by Benjamin Poulain.
Test: inspector/css/selector-dynamic-specificity.html
* inspector/InspectorCSSAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::setRuleSelector):
(WebCore::InspectorCSSAgent::addRule):
(WebCore::InspectorCSSAgent::buildObjectForRule):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
When building a response for a particular element, pass the element along.
* inspector/InspectorStyleSheet.h:
* inspector/InspectorStyleSheet.cpp:
(WebCore::hasDynamicSpecificity):
(WebCore::buildObjectForSelectorHelper):
(WebCore::selectorsFromSource):
(WebCore::InspectorStyleSheet::buildObjectForSelector):
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::buildArrayForRuleList):
(WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
When building a response for a Selector, include the specificity if we know
the element in context.
2015-01-20 Brent Fulgham <bfulgham@apple.com>
[Win] Build fix after r178760.
Windows will not accept a variable as the size declaration for an array.
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::appendGSUBTable): Make size argument a const.
2015-01-20 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed Windows project file gardening.
* WebCore.vcxproj/WebCore.vcxproj: Add missing SVG files and put things in their proper
folders.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2015-01-20 Benjamin Poulain <benjamin@webkit.org>
URLFilterParser dismisses the last atom when parsing a builtin character class
https://bugs.webkit.org/show_bug.cgi?id=140695
Reviewed by Andreas Kling.
The pending atom was not sunk before creating the new atom.
* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
2015-01-20 Andreas Kling <akling@apple.com>
Fast path for casting JSValue to JSDocument*.
<https://webkit.org/b/134655>
Add a custom JSType bit for JSDocument so we can quickly cast to it
from JSValue in the DocumentPrototype functions. This removes a bunch
of grunt work and branches from common functions like getElementById.
Also removed GetCastingHelperForBaseObject and replace it with
simple jsCasts since we don't need dynamic type checks for the base.
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMWrapper.h:
* bindings/js/JSDocumentCustom.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GetCastingHelperForThisObject):
(GenerateImplementation):
(GetCastingHelperForBaseObject): Deleted.
* dom/Document.idl:
2015-01-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178751.
https://bugs.webkit.org/show_bug.cgi?id=140694
Caused 32-bit JSC test failures (Requested by JoePeck on
#webkit).
Reverted changeset:
"put_by_val_direct need to check the property is index or not
for using putDirect / putDirectIndex"
https://bugs.webkit.org/show_bug.cgi?id=140426
http://trac.webkit.org/changeset/178751
2015-01-20 Zalan Bujtas <zalan@apple.com>
Simple line layout: Use FlowContents::Segment::text instead of renderer when possible.
https://bugs.webkit.org/show_bug.cgi?id=140692
Reviewed by Myles C. Maxfield.
No change in functionality.
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):
2015-01-20 David Kilzer <ddkilzer@apple.com>
Switch to comparing PLATFORM_NAME in terms of macosx
<http://webkit.org/b/139516>
Reviewed by Timothy Hatcher.
* bindings/scripts/preprocessor.pm:
(applyPreprocessor):
* generate-export-file:
(preprocessorMacros):
2015-01-20 Benjamin Poulain <benjamin@webkit.org>
Attempt to fix 32bits builds after r178743
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
2015-01-20 Yusuke Suzuki <utatane.tea@gmail.com>
put_by_val_direct need to check the property is index or not for using putDirect / putDirectIndex
https://bugs.webkit.org/show_bug.cgi?id=140426
Reviewed by Geoffrey Garen.
Test: js/dfg-put-by-val-direct-with-edge-numbers.html
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::callHTMLAllCollection):
(WebCore::JSHTMLAllCollection::item):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateImplementation):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64Array::getOwnPropertySlot):
(WebCore::JSFloat64Array::getOwnPropertyDescriptor):
(WebCore::JSFloat64Array::put):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::getOwnPropertySlot):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::getOwnPropertySlot):
(JSC::RuntimeArray::put):
2015-01-20 Chris Dumez <cdumez@apple.com>
Drop width / height shorthands code from StylePropertyShorthand.*
https://bugs.webkit.org/show_bug.cgi?id=140686
Reviewed by Andreas Kling.
Drop width / height shorthands code from StylePropertyShorthand.*.
width / height are not shorthands for min-width/max-width and
min-height/max-height. Also, only matchingCustomShorthandsForLonghand()
treats these as shorthands. For e.g, the reverse method
(indexOfShorthandForLonghand()) does not.
* css/StylePropertyShorthand.cpp:
(WebCore::widthShorthand): Deleted.
(WebCore::heightShorthand): Deleted.
* css/StylePropertyShorthand.h:
(WebCore::matchingCustomShorthandsForLonghand):
2015-01-20 Benjamin Poulain <benjamin@webkit.org>
Add a mechanism to ignore previous content extension rules
https://bugs.webkit.org/show_bug.cgi?id=140663
Reviewed by Andreas Kling.
* contentextensions/ContentExtensionRule.h:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
* contentextensions/ContentExtensionsManager.cpp:
(WebCore::ContentExtensions::ExtensionsManager::loadAction):
2015-01-20 Benjamin Poulain <benjamin@webkit.org>
Resolve the epsilon transitions for each state upfront instead of dynamically
https://bugs.webkit.org/show_bug.cgi?id=140654
Reviewed by Andreas Kling.
Instead of recomputing the epsilon-closure for each set, we compute the closure
of every element at the beginning of the transformation.
We then remove the epsilon transitions from the NFA to simplify populateTransitions().
The epsilon transitions are still there, but they are now in a separate graph we use
in parallel.
* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::epsilonClosureExcludingSelf):
(WebCore::ContentExtensions::resolveEpsilonClosures):
(WebCore::ContentExtensions::extendSetWithClosure):
(WebCore::ContentExtensions::populateTransitions):
(WebCore::ContentExtensions::NFAToDFA::convert):
(WebCore::ContentExtensions::epsilonClosure): Deleted.
(WebCore::ContentExtensions::populateTransitionsExcludingEpsilon): Deleted.
* contentextensions/NFAToDFA.h:
2015-01-20 Chris Dumez <cdumez@apple.com>
Log types of resources being loaded using DiagnosticLoggingClient
https://bugs.webkit.org/show_bug.cgi?id=140682
Reviewed by Andreas Kling.
Log types of resources being loaded using DiagnosticLoggingClient
instead of the legacy FeatureCounter.
* loader/SubresourceLoader.cpp:
(WebCore::logResourceLoaded):
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::logResourceLoadedUsingFeatureCounter): Deleted.
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::otherKey):
(WebCore::DiagnosticLoggingKeys::mainResourceKey):
(WebCore::DiagnosticLoggingKeys::loadedKey):
(WebCore::DiagnosticLoggingKeys::imageKey):
(WebCore::DiagnosticLoggingKeys::rawKey):
(WebCore::DiagnosticLoggingKeys::resourceKey):
(WebCore::DiagnosticLoggingKeys::scriptKey):
(WebCore::DiagnosticLoggingKeys::styleSheetKey):
(WebCore::DiagnosticLoggingKeys::svgDocumentKey):
(WebCore::DiagnosticLoggingKeys::fontKey):
* page/DiagnosticLoggingKeys.h:
* platform/FeatureCounterKeys.h:
2015-01-20 Zalan Bujtas <zalan@apple.com>
Simple line layout: Remove redundant style.preserveNewline check when collapsing trailing whitespace.
https://bugs.webkit.org/show_bug.cgi?id=140684
Reviewed by Antti Koivisto.
FlowContents::isLineBreak() checks whether we are at a hard newline.
No change in functionality.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
2015-01-19 Simon Fraser <simon.fraser@apple.com>
Add a way to collect scrolling performance data (viewport tile coverage) with UI-side compositing
https://bugs.webkit.org/show_bug.cgi?id=140474
Reviewed by Tim Horton.
Add accessors for standard names for container CALayer for each of the tile grids,
and when tile grids are swapped, update those names as appropriate.
* WebCore.exp.in:
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::tileGridContainerLayerName):
(WebCore::TileController::zoomedOutTileGridContainerLayerName):
(WebCore::TileController::setContentsScale):
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::TileGrid):
(WebCore::TileGrid::setIsZoomedOutTileGrid):
* platform/graphics/ca/TileGrid.h:
2015-01-20 Csaba Osztrogonác <ossy@webkit.org>
Fix unused-private-field warning in IconEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=140676
Reviewed by Darin Adler.
* platform/graphics/Icon.h:
* platform/graphics/efl/IconEfl.cpp:
(WebCore::Icon::Icon): Deleted.
2015-01-20 Csaba Osztrogonác <ossy@webkit.org>
Fix unused-private-field warning in FontCustomPlatformDataFreeType.cpp
https://bugs.webkit.org/show_bug.cgi?id=140677
Reviewed by Martin Robinson.
* platform/graphics/cairo/FontCustomPlatformData.h:
* platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::FontCustomPlatformData::FontCustomPlatformData):
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
2015-01-20 peavo@outlook.com <peavo@outlook.com>
Plugin content not loaded.
https://bugs.webkit.org/show_bug.cgi?id=140672
Reviewed by Brent Fulgham.
It seems this is caused by a std::unique_ptr in CClass::methodNamed being moved,
resetting its raw pointer. The raw pointer, which now is null, is then returned
from the method.
* bridge/c/c_class.cpp:
(JSC::Bindings::CClass::methodNamed):
(JSC::Bindings::CClass::fieldNamed):
2015-01-20 Darin Adler <darin@apple.com>
Remove SVGElementInstanceList, m_instanceUnderMouse, DUMP_INSTANCE_TREE, DUMP_SHADOW_TREE
https://bugs.webkit.org/show_bug.cgi?id=140679
Reviewed by Anders Carlsson.
First step in removing the SVG instance tree.
All based on redoing the same excellent work Rob Buis did to remove this in Blink in crbug.com/313438.
* CMakeLists.txt: Removed the source files.
* DerivedSources.cpp: Ditto.
* DerivedSources.make: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* page/EventHandler.cpp:
(WebCore::EventHandler::clear): Removed code to set unused m_instanceUnderMouse.
(WebCore::EventHandler::updateMouseEventTargetNode): Ditto.
* page/EventHandler.h: Removed m_instanceUnderMouse.
* svg/SVGAllInOne.cpp: Removed the source files.
* svg/SVGElementInstance.cpp:
(WebCore::SVGElementInstance::childNodes): Deleted.
* svg/SVGElementInstance.h: Removed childNodes.
* svg/SVGElementInstance.idl: Ditto.
* svg/SVGElementInstanceList.cpp: Removed.
* svg/SVGElementInstanceList.h: Removed.
* svg/SVGElementInstanceList.idl: Removed.
* svg/SVGUseElement.cpp:
(WebCore::dumpInstanceTree): Deleted.
(WebCore::SVGUseElement::buildShadowAndInstanceTree): Removed DUMP_INSTANCE_TREE and
DUMP_SHADOW_TREE code.
2015-01-19 Brian J. Burg <burg@cs.washington.edu>
Web Replay: code generator should take supplemental specifications and allow cross-framework references
https://bugs.webkit.org/show_bug.cgi?id=136312
Reviewed by Joseph Pecoraro.
Changes covered by existing input generator tests.
* DerivedSources.make: Add JSInputs.json as supplemental specification.
* replay/WebInputs.json: Moved common types to JSInputs.json.
2015-01-20 Csaba Osztrogonác <ossy@webkit.org>
Fix unused-const-variable warning in RenderLayerCompositor.cpp
https://bugs.webkit.org/show_bug.cgi?id=140678
Reviewed by Simon Fraser.
* rendering/RenderLayerCompositor.cpp:
2015-01-20 Csaba Osztrogonác <ossy@webkit.org>
[gstreamer] Fix expression result unused warning in GRefPtrGStreamer.cpp
https://bugs.webkit.org/show_bug.cgi?id=140671
Reviewed by Philippe Normand.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::refGPtr<GstToc>):
2015-01-19 Dean Jackson <dino@apple.com>
Support "plus-darker" in mix-blend mode
https://bugs.webkit.org/show_bug.cgi?id=140646
<rdar://problem/19523370>
Reviewed by Simon Fraser.
Support the "plus-darker" blending mode to CSS.
See: https://lists.w3.org/Archives/Public/public-fx/2015JanMar/0021.html
Test: css3/blending/svg-blend-plus-darker.html
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): mix-blend-mode can now accept
the new keyword.
* css/CSSPrimitiveValueMappings.h: Add the mappings.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator BlendMode):
* platform/graphics/GraphicsTypes.cpp: Add the new GraphicsType.
* platform/graphics/GraphicsTypes.h:
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Map to the CA compositing filter.
(PlatformCAFilters::setBlendingFiltersOnLayer):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setPlatformCompositeOperation): Map to the CG blending flag.
2015-01-20 Csaba Osztrogonác <ossy@webkit.org>
Fix 'register' storage class specifier is deprecated warning
https://bugs.webkit.org/show_bug.cgi?id=140669
Reviewed by Carlos Garcia Campos.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcLoop):
2015-01-20 Chris Dumez <cdumez@apple.com>
Use DiagnosticLoggingClient to log page cache failures
https://bugs.webkit.org/show_bug.cgi?id=140650
Reviewed by Andreas Kling.
Use DiagnosticLoggingClient to log page cache failures instead of the
legacy FeatureCounter.
* history/PageCache.cpp:
(WebCore::logPageCacheFailureDiagnosticMessage):
(WebCore::logCanCacheFrameDecision):
(WebCore::logCanCachePageDecision):
(WebCore::PageCache::canCache):
(WebCore::pruningReasonToDiagnosticLoggingKey):
(WebCore::PageCache::take):
(WebCore::PageCache::get):
(WebCore::pruningReasonToFeatureCounterKey): Deleted.
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::successKey):
(WebCore::DiagnosticLoggingKeys::failureKey):
(WebCore::DiagnosticLoggingKeys::pageLoadedKey):
(WebCore::DiagnosticLoggingKeys::engineFailedToLoadKey):
(WebCore::DiagnosticLoggingKeys::navigationKey):
(WebCore::DiagnosticLoggingKeys::pageCacheKey):
(WebCore::DiagnosticLoggingKeys::noDocumentLoaderKey):
(WebCore::DiagnosticLoggingKeys::mainDocumentErrorKey):
(WebCore::DiagnosticLoggingKeys::isErrorPageKey):
(WebCore::DiagnosticLoggingKeys::hasPluginsKey):
(WebCore::DiagnosticLoggingKeys::httpsNoStoreKey):
(WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey):
(WebCore::DiagnosticLoggingKeys::noCurrentHistoryItemKey):
(WebCore::DiagnosticLoggingKeys::quirkRedirectComingKey):
(WebCore::DiagnosticLoggingKeys::loadingAPISenseKey):
(WebCore::DiagnosticLoggingKeys::documentLoaderStoppingKey):
(WebCore::DiagnosticLoggingKeys::cannotSuspendActiveDOMObjectsKey):
(WebCore::DiagnosticLoggingKeys::applicationCacheKey):
(WebCore::DiagnosticLoggingKeys::deniedByClientKey):
(WebCore::DiagnosticLoggingKeys::deviceMotionKey):
(WebCore::DiagnosticLoggingKeys::deviceOrientationKey):
(WebCore::DiagnosticLoggingKeys::deviceProximityKey):
(WebCore::DiagnosticLoggingKeys::reloadKey):
(WebCore::DiagnosticLoggingKeys::reloadFromOriginKey):
(WebCore::DiagnosticLoggingKeys::sameLoadKey):
(WebCore::DiagnosticLoggingKeys::expiredKey):
(WebCore::DiagnosticLoggingKeys::prunedDueToMemoryPressureKey):
(WebCore::DiagnosticLoggingKeys::prunedDueToCapacityReached):
(WebCore::DiagnosticLoggingKeys::prunedDueToProcessSuspended):
(WebCore::DiagnosticLoggingKeys::passKey): Deleted.
(WebCore::DiagnosticLoggingKeys::failKey): Deleted.
(WebCore::DiagnosticLoggingKeys::noopKey): Deleted.
* page/DiagnosticLoggingKeys.h:
* platform/FeatureCounterKeys.h:
2015-01-19 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Wrong arguments passed to computeNormalizedFractionBreadth
https://bugs.webkit.org/show_bug.cgi?id=139058
Reviewed by Andreas Kling.
The method RenderGrid::computeNormalizedFractionBreadth() is
supposed to get as fourth argument either the grid element's
content box size or the max-size of a particular grid item. For
the former we were incorrectly passing the free space after
distributing the available space to tracks.
Apart from that, that method has a bug in its implementation. As
we were using the free space instead of the grid element's content
box size, we didn't have to subtract the usedBreadth of grid
tracks from the passed in value. That did not work for the case of
the caller passing the max-size of a particular item.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::computeNormalizedFractionBreadth):
2015-01-19 Myles C. Maxfield <mmaxfield@apple.com>
[SVG -> OTF Converter] Flip the switch on
https://bugs.webkit.org/show_bug.cgi?id=140592
Reviewed by Antti Koivisto.
* Configurations/FeatureDefines.xcconfig:
2015-01-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178683.
https://bugs.webkit.org/show_bug.cgi?id=140657
Lots of asserts in tests. (Requested by JoePeck on #webkit).
Reverted changeset:
"LayoutState and subtree layout code should use
RenderElement."
https://bugs.webkit.org/show_bug.cgi?id=126878
http://trac.webkit.org/changeset/178683
2015-01-19 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed gardening.
Avoid compiling files twice when they are included in an 'AllInOne.cpp' file.
* WebCore.vcxproj/WebCore.vcxproj: Mark several files as 'not to be built', since
they are also build as part of an 'AllInOne.cpp' file.
2015-01-19 Chris Dumez <cdumez@apple.com>
Stop using FeatureCounter to log navigation types
https://bugs.webkit.org/show_bug.cgi?id=140642
Reviewed by Andreas Kling.
Stop using FeatureCounter to log navigation types now that
DiagnosticLoggingClient is working on iOS.
* loader/FrameLoader.cpp:
(WebCore::logNavigation):
* platform/FeatureCounterKeys.h:
2015-01-19 Andreas Kling <akling@apple.com>
LayoutState and subtree layout code should use RenderElement.
<https://webkit.org/b/126878>
Subtree layout will never begin at a RenderText, so tighten up
the code to operate on RenderElements instead of RenderObjects.
Reviewed by Antti Koivisto.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willLayout):
* page/FrameView.cpp:
(WebCore::FrameView::layoutRoot):
(WebCore::FrameView::layout):
* page/FrameView.h:
Make FrameView::layoutRoot() return RenderElement*.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::willBeDestroyed):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::willBeDestroyed):
* rendering/RenderObject.h:
Move subtree layout root clearing logic in willBeDestroyed()
from RenderObject to RenderElement.
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
* rendering/RenderView.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::pushLayoutState):
(WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
Make all of these functions take RenderElement instead of
RenderObject since layout never starts from a RenderText.
(WebCore::RenderView::shouldDisableLayoutStateForSubtree):
Tweak loop since it's never null on first iteration.
2015-01-19 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* platform/spi/mac/NSViewSPI.h:
2015-01-19 Timothy Horton <timothy_horton@apple.com>
Adjust naming of action menu SPI
https://bugs.webkit.org/show_bug.cgi?id=140644
<rdar://problem/19448129>
Reviewed by Brian Weinstein.
* platform/spi/mac/NSViewSPI.h:
Add an underscore.
2015-01-19 Dhi Aurrahman <diorahman@rockybars.com>
Canonicalization of :lang() should preserve the :lang()'s arguments representations
https://bugs.webkit.org/show_bug.cgi?id=139928
Reviewed by Benjamin Poulain.
Preserve the representation of IDENT and STRING when serializing the
:lang(). For example, :lang(foo,"bar", baz) should be serialize as
:lang(foo, "bar", baz) instead of :lang(foo, bar, baz).
Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
CSSSelector::setLangArgumentList and CSSSelector::langArgumentList
respectively, since those methods are being exclusively used in respect
with :lang().
Update the test of serializing :lang() with IDENT and STRING arguments.
* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::setLangArgumentList):
(WebCore::CSSParserSelector::setArgumentList): Deleted.
* css/CSSParserValues.h:
(WebCore::CSSParserString::tokenType):
(WebCore::CSSParserString::setTokenType):
* css/CSSSelector.cpp:
(WebCore::appendLangArgumentList):
(WebCore::CSSSelector::selectorText):
(WebCore::CSSSelector::setLangArgumentList):
(WebCore::appendArgumentList): Deleted.
(WebCore::CSSSelector::setArgumentList): Deleted.
* css/CSSSelector.h:
(WebCore::CSSSelector::langArgumentList):
(WebCore::CSSSelector::argumentList): Deleted.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorCheckerTestFunctions.h:
(WebCore::matchesLangPseudoClass):
2015-01-16 Roger Fong <roger_fong@apple.com>
WebGL2: Support webgl2 context creation.
https://bugs.webkit.org/show_bug.cgi?id=126408
<rdar://problem/15002170>
Reviewed by Dean Jackson.
Tests covered by existing Khronos tests for WebGL 1.0 conformance.
Create a WebGLRenderingContextBase class that extends to a WebGLRenderingContext and WebGL2RenderingContext.
Replace all previous instances of WebGLRenderingContext usages with WebGLRenderingContextBase usages for now.
As the first step, the WebGL1 and WebGL2 contexts will have the exact same functionality.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/js/JSDocumentCustom.cpp:
* bindings/js/JSHTMLCanvasElementCustom.cpp:
* bindings/js/JSWebGL2RenderingContextCustom.cpp: Added.
(WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
* bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Added.
* bindings/js/JSWebGLRenderingContextCustom.cpp: Move code to JSWebGLRenderingContextBaseCustom.cpp.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::reset):
(WebCore::HTMLCanvasElement::paint):
(WebCore::HTMLCanvasElement::getImageData):
* html/canvas/ANGLEInstancedArrays.cpp:
(WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
(WebCore::ANGLEInstancedArrays::supported):
* html/canvas/ANGLEInstancedArrays.h:
* html/canvas/CanvasRenderingContext.h:
(WebCore::CanvasRenderingContext::isWebGL1):
(WebCore::CanvasRenderingContext::isWebGL2):
(WebCore::CanvasRenderingContext::is3d):
* html/canvas/EXTBlendMinMax.cpp:
(WebCore::EXTBlendMinMax::EXTBlendMinMax):
* html/canvas/EXTBlendMinMax.h:
* html/canvas/EXTFragDepth.cpp:
(WebCore::EXTFragDepth::EXTFragDepth):
* html/canvas/EXTFragDepth.h:
* html/canvas/EXTShaderTextureLOD.cpp:
(WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
* html/canvas/EXTShaderTextureLOD.h:
* html/canvas/EXTTextureFilterAnisotropic.cpp:
(WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):
* html/canvas/EXTTextureFilterAnisotropic.h:
* html/canvas/EXTsRGB.cpp:
(WebCore::EXTsRGB::EXTsRGB):
* html/canvas/EXTsRGB.h:
* html/canvas/OESElementIndexUint.cpp:
(WebCore::OESElementIndexUint::OESElementIndexUint):
* html/canvas/OESElementIndexUint.h:
* html/canvas/OESStandardDerivatives.cpp:
(WebCore::OESStandardDerivatives::OESStandardDerivatives):
* html/canvas/OESStandardDerivatives.h:
* html/canvas/OESTextureFloat.cpp:
(WebCore::OESTextureFloat::OESTextureFloat):
* html/canvas/OESTextureFloat.h:
* html/canvas/OESTextureFloatLinear.cpp:
(WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
* html/canvas/OESTextureFloatLinear.h:
* html/canvas/OESTextureHalfFloat.cpp:
(WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
* html/canvas/OESTextureHalfFloat.h:
* html/canvas/OESTextureHalfFloatLinear.cpp:
(WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear):
* html/canvas/OESTextureHalfFloatLinear.h:
* html/canvas/OESVertexArrayObject.cpp:
(WebCore::OESVertexArrayObject::OESVertexArrayObject):
* html/canvas/OESVertexArrayObject.h:
* html/canvas/WebGL2RenderingContext.cpp: Added.
(WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
* html/canvas/WebGL2RenderingContext.h: Added.
* html/canvas/WebGL2RenderingContext.idl: Added.
* html/canvas/WebGLBuffer.cpp:
(WebCore::WebGLBuffer::create):
(WebCore::WebGLBuffer::WebGLBuffer):
* html/canvas/WebGLBuffer.h:
* html/canvas/WebGLCompressedTextureATC.cpp:
(WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
(WebCore::WebGLCompressedTextureATC::supported):
* html/canvas/WebGLCompressedTextureATC.h:
* html/canvas/WebGLCompressedTexturePVRTC.cpp:
(WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
(WebCore::WebGLCompressedTexturePVRTC::supported):
* html/canvas/WebGLCompressedTexturePVRTC.h:
* html/canvas/WebGLCompressedTextureS3TC.cpp:
(WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
(WebCore::WebGLCompressedTextureS3TC::supported):
* html/canvas/WebGLCompressedTextureS3TC.h:
* html/canvas/WebGLContextGroup.cpp:
(WebCore::WebGLContextGroup::getAGraphicsContext3D):
(WebCore::WebGLContextGroup::addContext):
(WebCore::WebGLContextGroup::removeContext):
(WebCore::WebGLContextGroup::loseContextGroup):
* html/canvas/WebGLContextGroup.h:
* html/canvas/WebGLContextObject.cpp:
(WebCore::WebGLContextObject::WebGLContextObject):
* html/canvas/WebGLContextObject.h:
(WebCore::WebGLContextObject::context):
* html/canvas/WebGLDebugRendererInfo.cpp:
(WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo):
* html/canvas/WebGLDebugRendererInfo.h:
* html/canvas/WebGLDebugShaders.cpp:
(WebCore::WebGLDebugShaders::WebGLDebugShaders):
* html/canvas/WebGLDebugShaders.h:
* html/canvas/WebGLDepthTexture.cpp:
(WebCore::WebGLDepthTexture::WebGLDepthTexture):
* html/canvas/WebGLDepthTexture.h:
* html/canvas/WebGLDrawBuffers.cpp:
(WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
(WebCore::WebGLDrawBuffers::supported):
(WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
* html/canvas/WebGLDrawBuffers.h:
* html/canvas/WebGLExtension.cpp:
(WebCore::WebGLExtension::WebGLExtension):
* html/canvas/WebGLExtension.h:
(WebCore::WebGLExtension::context):
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::create):
(WebCore::WebGLFramebuffer::WebGLFramebuffer):
* html/canvas/WebGLFramebuffer.h:
* html/canvas/WebGLLoseContext.cpp:
(WebCore::WebGLLoseContext::WebGLLoseContext):
(WebCore::WebGLLoseContext::loseContext):
* html/canvas/WebGLLoseContext.h:
* html/canvas/WebGLObject.cpp:
(WebCore::WebGLObject::WebGLObject):
* html/canvas/WebGLObject.h:
* html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::create):
(WebCore::WebGLProgram::WebGLProgram):
* html/canvas/WebGLProgram.h:
* html/canvas/WebGLRenderbuffer.cpp:
(WebCore::WebGLRenderbuffer::create):
(WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
* html/canvas/WebGLRenderbuffer.h:
* html/canvas/WebGLRenderingContext.cpp: Move implementation to WebGLRenderingContextBase.cpp.
* html/canvas/WebGLRenderingContext.h: Move implementation to WebGLRenderingContextBase.h.
* html/canvas/WebGLRenderingContext.idl: Move implementation to WebGLRenderingContextBase.idl.
* html/canvas/WebGLRenderingContextBase.cpp: Added.
* html/canvas/WebGLRenderingContextBase.h: Added.
* html/canvas/WebGLRenderingContextBase.idl: Added.
* html/canvas/WebGLShader.cpp:
(WebCore::WebGLShader::create):
(WebCore::WebGLShader::WebGLShader):
* html/canvas/WebGLShader.h:
* html/canvas/WebGLSharedObject.cpp:
(WebCore::WebGLSharedObject::WebGLSharedObject):
* html/canvas/WebGLSharedObject.h:
* html/canvas/WebGLTexture.cpp:
(WebCore::WebGLTexture::create):
(WebCore::WebGLTexture::WebGLTexture):
* html/canvas/WebGLTexture.h:
* html/canvas/WebGLVertexArrayObjectOES.cpp:
(WebCore::WebGLVertexArrayObjectOES::create):
(WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
* html/canvas/WebGLVertexArrayObjectOES.h:
2015-01-19 Antti Koivisto <antti@apple.com>
REGRESSION(r178250): ~2% PLT regression
https://bugs.webkit.org/show_bug.cgi?id=140640
Reviewed by Andreas Kling.
* platform/graphics/FontCache.cpp:
The patch accidentally contained a change to reduce the size of the cache (to verify that purgin works).
Restore it back to the original value.
2015-01-19 peavo@outlook.com <peavo@outlook.com>
[WinCairo][Video] Windows Media Foundation implementation is not completed.
https://bugs.webkit.org/show_bug.cgi?id=140337
Reviewed by Alex Christensen.
This patch aims to complete some of the methods which are not implemented.
Currently, only MP4 is supported.
Video is rendered in a child window of the main window.
We should eventually render the video directly in the main window,
by reading and painting individual video frames from the stream.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
(WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
(WebCore::MediaPlayerPrivateMediaFoundation::getSupportedTypes):
(WebCore::MediaPlayerPrivateMediaFoundation::supportsType):
(WebCore::MediaPlayerPrivateMediaFoundation::load):
(WebCore::MediaPlayerPrivateMediaFoundation::play):
(WebCore::MediaPlayerPrivateMediaFoundation::pause):
(WebCore::MediaPlayerPrivateMediaFoundation::naturalSize):
(WebCore::MediaPlayerPrivateMediaFoundation::hasVideo):
(WebCore::MediaPlayerPrivateMediaFoundation::hasAudio):
(WebCore::MediaPlayerPrivateMediaFoundation::setVisible):
(WebCore::MediaPlayerPrivateMediaFoundation::paused):
(WebCore::MediaPlayerPrivateMediaFoundation::readyState):
(WebCore::MediaPlayerPrivateMediaFoundation::didLoadingProgress):
(WebCore::MediaPlayerPrivateMediaFoundation::setSize):
(WebCore::MediaPlayerPrivateMediaFoundation::paint):
(WebCore::MediaPlayerPrivateMediaFoundation::createSession):
(WebCore::MediaPlayerPrivateMediaFoundation::endSession):
(WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
(WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
(WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
(WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
(WebCore::MediaPlayerPrivateMediaFoundation::addBranchToPartialTopology):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoViewWndProc):
(WebCore::MediaPlayerPrivateMediaFoundation::registerVideoWindowClass):
(WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow):
(WebCore::MediaPlayerPrivateMediaFoundation::destroyVideoWindow):
(WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
(WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
(WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSource):
(WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::QueryInterface):
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AddRef):
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Release):
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::GetParameters):
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2015-01-19 Brian J. Burg <burg@cs.washington.edu>
Web Replay: convert to is<T> and downcast<T> for decoding replay inputs
https://bugs.webkit.org/show_bug.cgi?id=140512
Reviewed by Chris Dumez.
No new tests, no behavior changed.
* replay/EventLoopInput.h: Make overridden methods public.
* replay/MemoizedDOMResult.h: Add type trait specialization here. It is
special-cased because the input type parameter doesn't work with macros.
* replay/SerializationMethods.cpp:
(JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
Use is() and downcast() when dispatching to encoders based on type.
2015-01-19 Zan Dobersek <zdobersek@igalia.com>
Replace use of WTF::bind() in MemoryPressureHandlerLinux.cpp with a C++ lambda
https://bugs.webkit.org/show_bug.cgi?id=140614
Reviewed by Carlos Garcia Campos.
Use a C++ lambda instead of WTF::bind() in the MemoryPressureHandler
implementation for Linux.
* platform/linux/MemoryPressureHandlerLinux.cpp:
(WebCore::MemoryPressureHandler::waitForMemoryPressureEvent):
2015-01-19 Zan Dobersek <zdobersek@igalia.com>
Replace uses of WTF::bind() in MockMediaPlayerMediaSource with C++ lambdas
https://bugs.webkit.org/show_bug.cgi?id=140612
Reviewed by Philippe Normand.
Use C++ lambdas in place of WTF::bind() in the MockMediaPlayerMediaSource class.
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::play):
(WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
(WebCore::MockMediaPlayerMediaSource::seekCompleted):
2015-01-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178653.
https://bugs.webkit.org/show_bug.cgi?id=140634
Broke multiple SVG tests on Mountain Lion (Requested by ap on
#webkit).
Reverted changeset:
"[SVG -> OTF Converter] Flip the switch on"
https://bugs.webkit.org/show_bug.cgi?id=140592
http://trac.webkit.org/changeset/178653
2015-01-19 Brent Fulgham <bfulgham@apple.com>
Layers need to be already updated before we call adjustViewSize
https://bugs.webkit.org/show_bug.cgi?id=135514
Reviewed by Simon Fraser.
Tested by 'fast/dynamic/layer-no-longer-paginated.html'
Defer painting operations until we have finished layout. This
has a couple of benefits:
(1) We do not attempt to modify render layers during layout.
(2) In WK1 we do not attempt to paint during layout.
Add a new virtual predicate to ScrollView indicating when we are in
layout so that calls to setContentsSize do not attempt
to adjust scrollbars.
Modify FrameView to set its ScrollView state to block paint
operations during layout. Also add a post-layout handler to
complete the scrollbar updates after layout is finished.
* WebCore.exp.in: Move linker symbol to ScrollView (from FrameView).
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
(WebCore::FrameView::scrollPositionChangedViaPlatformWidget): Removed (Renamed).
(WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added (Renamed)
(WebCore::FrameView::paintContents): Do not paint if we are inside view size adjustment.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollPositionChangedViaPlatformWidget): Added. Checks whether we need to defer
painting, and calls virtual scrollPositionChangedViaPlatformWidgetImpl if we do not.
(WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added.
(WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
(WebCore::ScrollView::scrollTo): If we should defer painting, cache the
the scroll delta and apply it after the layout is complete.
(WebCore::ScrollView::completeUpdatesAfterScrollTo): Split off part of 'scrollTo' into its own method
so we can reuse it in handleDeferredScrollUpdateAfterContentSizeChange.
* platform/ScrollView.h:
(WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
2015-01-16 Ada Chan <adachan@apple.com>
HTMLMediaElement::isPlayingAudio() should return false if the element is explicitly muted by script.
https://bugs.webkit.org/show_bug.cgi?id=140524
Reviewed by Andreas Kling.
Test: media/muted-video-is-playing-audio.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):
Call Document::updateIsPlayingAudio() to recalculate the overall audio playing state.
(WebCore::HTMLMediaElement::isPlayingAudio):
HTMLMediaElement::isPlayingAudio() should return false if the media element is explicitly muted.
2015-01-19 Myles C. Maxfield <mmaxfield@apple.com>
[SVG -> OTF Converter] Flip the switch on
https://bugs.webkit.org/show_bug.cgi?id=140592
Reviewed by Antti Koivisto.
* Configurations/FeatureDefines.xcconfig:
2015-01-16 Alexey Proskuryakov <ap@apple.com>
Console log sometimes prefixed with line number
https://bugs.webkit.org/show_bug.cgi?id=105280
Reviewed by Darin Adler.
Improve the logic for determining whether a console message should be associated
with a source code location.
* dom/ScriptableDocumentParser.h:
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
* html/parser/HTMLDocumentParser.h:
* page/PageConsoleClient.cpp:
(WebCore::getParserLocationForConsoleMessage):
(WebCore::PageConsoleClient::addMessage):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::pauseParsing):
* xml/parser/XMLDocumentParser.h:
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
2015-01-19 Myles C. Maxfield <mmaxfield@apple.com>
[SVG -> OTF Converter] Glyphs get clipped weirdly
https://bugs.webkit.org/show_bug.cgi?id=137095
Reviewed by Antti Koivisto.
The Adobe CFF spec doesn't actually tell you how to serialize a
"FontBBox." After trial and error, it seems to be (x, y, width,
height).
Test: svg/text/kerning.svg
svg/W3C-SVG-1.1/fonts-kern-01-t.svg
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::appendHEADTable):
(WebCore::SVGToOTFFontConverter::appendCFFTable):
(WebCore::SVGToOTFFontConverter::appendVHEATable):
(WebCore::CFFBuilder::CFFBuilder):
(WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
(WebCore::SVGToOTFFontConverter::processGlyphElement):
2015-01-19 Csaba Osztrogonác <ossy@webkit.org>
REGRESSION(r178486): It broke the !ENABLE(VIDEO) build
https://bugs.webkit.org/show_bug.cgi?id=140611
Reviewed by Eric Carlson.
* testing/Internals.cpp:
(WebCore::Internals::elementIsBlockingDisplaySleep):
* testing/Internals.h:
2015-01-19 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
https://bugs.webkit.org/show_bug.cgi?id=139059
Reviewed by David Hyatt.
Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2015-01-18 Alexey Proskuryakov <ap@apple.com>
Update bindings generation test results after <https://trac.webkit.org/changeset/178633>.
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::constructJSTestEventConstructor):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
2015-01-18 Chris Dumez <cdumez@apple.com>
Generate matchingShorthandsForLonghand() implementation from CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=140599
Reviewed by Antti Koivisto.
Generate matchingShorthandsForLonghand() implementation from
CSSPropertyNames.in. We already have all the information we need in
CSSPropertyNames.in to generate the big switch() in
matchingShorthandsForLonghand().
A few shorthands still aren't generated. I will look into getting rid
of the custom code in a follow-up patch.
* css/StylePropertyShorthand.cpp:
(WebCore::makeVector): Deleted.
(WebCore::matchingShorthandsForLonghand): Deleted.
* css/StylePropertyShorthand.h:
(WebCore::matchingCustomShorthandsForLonghand):
* css/makeprop.pl:
(constructShorthandsVector):
2015-01-18 Dean Jackson <dino@apple.com>
Out of bounds write in canvas.toDataURL
https://bugs.webkit.org/show_bug.cgi?id=140594
<rdar://problem/19449135>
Reviewed by Alexey Proskuryakov.
In the case where we have a canvas object that does
not have premultiplied alpha (an option you can select
when using WebGL) we have to multiply out the alpha when
converting to JPEG via toDataURL.
For this we created a buffer, but were not accurately
resizing it before flattening the alpha.
Test: fast/canvas/webgl/toDataURL-unpremultipliedAlpha.html
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageDataToDataURL): Call resize once we've
determined we have enough space.
2015-01-17 Sam Weinig <sam@webkit.org>
Add initial experimental user content filtering API
https://bugs.webkit.org/show_bug.cgi?id=140584
Reviewed by Benjamin Poulain.
Change content extensions to be managed through the UserContentController.
* WebCore.exp.in:
Update exports.
* WebCore.xcodeproj/project.pbxproj:
Update for removed files.
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::removeAllRuleLists):
(WebCore::ContentExtensions::ContentExtensionsBackend::sharedInstance): Deleted.
* contentextensions/ContentExtensionsBackend.h:
Remove concept of a shared instance and add a removeAllRuleLists() function.
* contentextensions/ContentExtensionsInterface.cpp: Removed.
* contentextensions/ContentExtensionsInterface.h: Removed.
Since there is no shared instance anymore, checking if a URL should be blocked
now has to go directly to the backend.
* contentextensions/ContentExtensionsManager.cpp:
(WebCore::ContentExtensions::ExtensionsManager::createRuleList):
(WebCore::ContentExtensions::ExtensionsManager::loadExtension): Deleted.
* contentextensions/ContentExtensionsManager.h:
Update interface to accommodate the lack of a shared instance. Now, all this
file does is take a serialized rule list and outputs the Vector of ContentExtensionRules
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
Check with the UserContentController to see if the URL should be blocked.
* page/UserContentController.cpp:
(WebCore::UserContentController::addUserContentFilter):
(WebCore::UserContentController::removeAllUserContentFilters):
(WebCore::UserContentController::contentFilterBlocksURL):
* page/UserContentController.h:
Add single point of interaction for both the WebKit level to add and remove
content filters and WebCore to check to see if URLs should be blocked.
2015-01-18 Darin Adler <darin@apple.com>
REGRESSION (r125251): wrapper lifetimes of SVGElementInstance are incorrect
https://bugs.webkit.org/show_bug.cgi?id=132148
Reviewed by Anders Carlsson.
Test: svg/custom/use-instanceRoot-event-listeners.xhtml
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::addEventListener): Updated for the new return type
of JSListener::create. For the event type, use JSString::toAtomicString instead of
calling JSString::value and then converting to an AtomicString.
(WebCore::JSDOMWindow::removeEventListener): Same changes as for addEventListener.
* bindings/js/JSEventListener.cpp:
(WebCore::forwardsEventListeners): Added. Helper to detect the special case needed
for SVGElementInstance. In the future, for better encapsulation, we could use virtual
functions, but for now hard coding this single class seems fine.
(WebCore::correspondingElementWrapper): Added. For use if forwardsEventListeners
returns true, to find out where event listeners will be forwarded.
(WebCore::createJSEventListenerForAttribute): Added. Replaces the old function
createJSAttributeEventListener, for SVGElementInstance attributes only.
(WebCore::createJSEventListenerForAdd): Added. Helper function to avoid repeated
generated code in the addElementListener bindings other than the DOMWindow one.
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::create): Changed to return a Ref instead of a PassRefPtr.
(WebCore::createJSEventListenerForAttribute): Renamed from createJSAttributeEventListener,
changed to return a RefPtr instead of a PassRefPtr and to take references rather than
pointers for non-null things.
(WebCore::createJSEventListenerForRemove): Added. Small wrapper that calls
createJSEventListenerForAdd since they are currently identical.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributeEventListenerCall): Removed the special case for JSSVGElementInstance
and updated to call the new createJSEventListenerForAttribute. The special case for
SVGElementInstance is now in JSEventListener.h/cpp, which is nicer since we prefer to
keep the generated code simpler if possible.
(GenerateEventListenerCall): Removed the special case for JSSVGElementInstance. This
has been dead code since the explicit definition of add/removeEventListener was removed
from SVGElementInstance.idl, and was also a problem if someone were to use the
addEventListener function from EventTarget on an SVGElementInstance object. The function
needs to be generic at runtime. Use toAtomicString as in JSDOMWindow::addEventListener above.
Call the two new functions, createJSEventListenerForAdd and createJSEventListenerForRemove.
Those new functions properly handle SVGElementInstance.
(GenerateImplementation): Don't pass the class name to GenerateAttributeEventListenerCall
or GenerateEventListenerCall any more.
(GenerateConstructorDefinition): Use JSString::toAtomicString instead of calling
JSString::value and then converting to AtomicString.
2015-01-17 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: highlight data for overlay should use protocol type builders
https://bugs.webkit.org/show_bug.cgi?id=129441
Reviewed by Timothy Hatcher.
As a first step towards cleaning up the inspector overlay, convert highlight
data construction to use protocol type builders. It's now really obvious what
data is being sent to the inspector overlay page.
This change paves the way towards using inspector protocol commands and events
if we want to support more interactive functionality in the inspector overlay.
This patch makes a few style cleanups, such as standardizing variable names,
using default member initializers, passing by reference, and fixing casts.
No new tests, no behavior changed.
* WebCore.exp.in:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::getHighlight):
(WebCore::InspectorController::buildObjectForHighlightedNode):
(WebCore::InspectorController::inspect): Deleted.
* inspector/InspectorController.h:
* inspector/InspectorOverlay.cpp:
(WebCore::buildRendererHighlight):
(WebCore::buildNodeHighlight):
(WebCore::buildQuadHighlight):
(WebCore::InspectorOverlay::InspectorOverlay):
(WebCore::InspectorOverlay::getHighlight):
(WebCore::buildObjectForPoint):
(WebCore::buildObjectForRect):
(WebCore::buildArrayForQuad):
(WebCore::buildObjectForHighlight):
(WebCore::buildObjectForRegion):
(WebCore::buildObjectForFlowRegions):
(WebCore::buildObjectForSize):
(WebCore::buildQuadObjectForCSSRegionContentClip):
Simplify how the clipping area is encoded. It's now 'regionClippingArea'
stored on a FragmentHighlightData instance.
(WebCore::InspectorOverlay::updatePaintRectsTimerFired):
(WebCore::InspectorOverlay::drawPaintRects):
(WebCore::buildArrayForRendererFragments):
(WebCore::appendPathCommandAndPoints):
(WebCore::appendPathSegment):
(WebCore::buildObjectForShapeOutside):
(WebCore::buildObjectForElementData):
(WebCore::InspectorOverlay::buildObjectForHighlightedNode):
(WebCore::InspectorOverlay::drawNodeHighlight):
(WebCore::InspectorOverlay::drawQuadHighlight):
(WebCore::InspectorOverlay::reset):
(WebCore::buildObjectForRegionHighlight): Deleted.
(WebCore::buildObjectForCSSRegionsHighlight): Deleted.
(WebCore::buildObjectForCSSRegionContentClip): Deleted.
(WebCore::buildObjectForRendererFragments): Deleted.
(WebCore::buildObjectForElementInfo): Deleted.
* inspector/InspectorOverlay.h:
(WebCore::Highlight::Highlight):
* inspector/InspectorOverlayPage.js:
(_createElementTitle):
(_drawElementTitle):
(_drawFragmentHighlight):
(drawNodeHighlight):
* testing/Internals.cpp:
(WebCore::Internals::inspectorHighlightRects):
(WebCore::Internals::inspectorHighlightObject):
2015-01-17 Myles C. Maxfield <mmaxfield@apple.com>
[SVG -> OTF Converter] Crashes when SVG font is invalid
https://bugs.webkit.org/show_bug.cgi?id=140378
Reviewed by Antti Koivisto.
Because CachedSVGFonts are cached, they have to be able to be used
in subsequent documents regardless how the first document left it.
Tests: fast/css/font-face-svg-decoding-error.html
svg/custom/svg-fonts-in-html.html
svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData):
* loader/cache/CachedFont.h:
* loader/cache/CachedSVGFont.cpp:
(WebCore::CachedSVGFont::getFontData):
(WebCore::CachedSVGFont::ensureCustomFontData):
(WebCore::CachedSVGFont::maybeInitializeExternalSVGFontElement):
* loader/cache/CachedSVGFont.h:
2015-01-17 Chris Dumez <cdumez@apple.com>
Converting time, angle and frequency units in CSS calc() function
https://bugs.webkit.org/show_bug.cgi?id=138356
Reviewed by Darin Adler.
Update CSSPrimitiveValue::primitiveType() to actually query the
primitiveType of the CSSCalcValue instead of assuming a given
type based on its category (e.g. If category is CalcTime, then
assume type is CSS_MS, even though it would be CSS_S as well).
This would like to calculation errors such as:
calc(4s + 1s) -> 5ms
Because we would assume the unit is CSS_MS without actually
checking.
This patch is inspired by the following Blink revision
by <rhodovan.u-szeged@partner.samsung.com> and initial WebKit
patch from <tmeszaros.u-szeged@partner.samsung.com>:
https://src.chromium.org/viewvc/blink?view=rev&revision=179101
Test: fast/css/calc-with-angle-time-frequency.html
* css/CSSCalculationValue.h:
(WebCore::CSSCalcValue::primitiveType):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::primitiveType):
2015-01-17 Chris Dumez <cdumez@apple.com>
Generate shorthandForProperty() implementation from CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=140556
Reviewed by Darin Adler.
Generate shorthandForProperty() implementation from CSSPropertyNames.in.
This is just a big switch() statement calling the right
StylePropertyShorthand factory function for a given CSSPropertyID.
* css/StylePropertyShorthand.cpp:
(WebCore::shorthandForProperty): Deleted.
* css/StylePropertyShorthand.h:
* css/makeprop.pl:
2015-01-16 Brent Fulgham <bfulgham@apple.com>
[Mac] Correct infinite loop in Wheel Handler code in EventHandlerMac
https://bugs.webkit.org/show_bug.cgi?id=140564
<rdar://problem/19386426.
Reviewed by Dean Jackson.
* page/mac/EventHandlerMac.mm:
(WebCore::latchingIsLockedToAncestorOfThisFrame): Put missing assignment
back into the loop!
2015-01-16 Zalan Bujtas <zalan@apple.com>
When border-radius is present, inset/outset/groove/ridge border color changes.
https://bugs.webkit.org/show_bug.cgi?id=140551
Reviewed by Simon Fraser.
This patch applies the same color lighten/darken adjustment on the radius borders
that we use for non-radius border.
Test: fast/borders/wrong-border-color-when-radius-is-present.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::calculateBorderStyleColor):
* rendering/RenderObject.h:
2015-01-16 Pratik Solanki <psolanki@apple.com>
Web pages fail to load using public iOS WebKit; ASSERT(!isMainThread()) in
-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]
https://bugs.webkit.org/show_bug.cgi?id=140470
Reviewed by Alexey Proskuryakov.
Fixes an issue where a web page would fail to load in iOS WebKit2 built with the public iOS SDK
because NSURLConnection callbacks were always being scheduled on the main thread.
Currently we always schedule NSURLConnection callbacks to occur on the WebThread or the main
thread depending on whether the WebThread was started. In iOS WebKit2, the callbacks were
always being scheduled on the main thread regardless of whether we were using the NetworkProcess
(since the WebThread is only started when using WebKit1). This led to an assertion failure.
Instead we want to schedule callbacks to an NSOperationsQueue queue when using WebKit2 with the
NetworkProcess (i.e. ResourceHandleClient::usesAsyncCallbacks() is true), on the main thread when
using WebKit2 without the NetworkProcess and on the WebThread when using WebKit1.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::operationQueueForAsyncClients): Remove PLATFORM(IOS)-guards as we want to make use
of this code for iOS WebKit2 with the NetworkProcess.
(WebCore::ResourceHandle::start): Modified to use the existing Mac code path to conditionally
schedule NSURLConnection callbacks to an operation queue when ResourceHandleClient::usesAsyncCallbacks()
is true. Otherwise, schedule the callbacks on the run loop returned by WebThreadNSRunLoop(),
which is either the WebThread or the main thread run loop when using WebKit1 and WebKit2 without
the NetworkProcess, respectively.
2015-01-16 Brian J. Burg <burg@cs.washington.edu>
Web Replay: purge remaining PassRefPtr uses and minor cleanup
https://bugs.webkit.org/show_bug.cgi?id=140456
Reviewed by Andreas Kling.
Get rid of PassRefPtr. Introduce default initializers where it makes sense. Change
uses of ASSERT to ASSERT_ARG when the assert is a precondition on an argument.
Remove mistaken uses of AtomicString that were not removed as part of r174113.
No new tests, no behavior changed.
* inspector/InspectorReplayAgent.cpp:
(WebCore::SerializeInputToJSONFunctor::operator()):
(WebCore::SerializeInputToJSONFunctor::returnValue):
(WebCore::InspectorReplayAgent::sessionCreated):
(WebCore::InspectorReplayAgent::sessionModified):
(WebCore::InspectorReplayAgent::sessionLoaded):
(WebCore::InspectorReplayAgent::segmentCreated):
(WebCore::InspectorReplayAgent::segmentCompleted):
(WebCore::InspectorReplayAgent::segmentLoaded):
(WebCore::InspectorReplayAgent::switchSession):
(WebCore::InspectorReplayAgent::insertSessionSegment):
(WebCore::InspectorReplayAgent::removeSessionSegment):
(WebCore::InspectorReplayAgent::findSession):
(WebCore::InspectorReplayAgent::findSegment):
* inspector/InspectorReplayAgent.h:
* replay/CapturingInputCursor.cpp:
(WebCore::CapturingInputCursor::CapturingInputCursor):
(WebCore::CapturingInputCursor::create):
(WebCore::CapturingInputCursor::loadInput):
* replay/CapturingInputCursor.h:
* replay/EventLoopInputDispatcher.cpp:
(WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
* replay/EventLoopInputDispatcher.h:
* replay/FunctorInputCursor.h:
(WebCore::FunctorInputCursor::FunctorInputCursor):
(WebCore::FunctorInputCursor::loadInput):
* replay/ReplayController.cpp:
(WebCore::ReplayController::ReplayController):
(WebCore::ReplayController::setForceDeterministicSettings):
(WebCore::ReplayController::setSessionState):
(WebCore::ReplayController::setSegmentState):
(WebCore::ReplayController::switchSession):
(WebCore::ReplayController::createSegment):
(WebCore::ReplayController::completeSegment):
(WebCore::ReplayController::loadSegmentAtIndex):
(WebCore::ReplayController::unloadSegment):
(WebCore::ReplayController::frameNavigated):
(WebCore::ReplayController::loadedSession):
(WebCore::ReplayController::loadedSegment):
(WebCore::ReplayController::activeInputCursor):
(WebCore::ReplayController::dispatcher):
* replay/ReplayController.h:
* replay/ReplaySession.cpp:
(WebCore::ReplaySession::create):
(WebCore::ReplaySession::at):
(WebCore::ReplaySession::appendSegment):
(WebCore::ReplaySession::insertSegment):
(WebCore::ReplaySession::removeSegment):
* replay/ReplaySession.h:
* replay/ReplaySessionSegment.cpp:
(WebCore::ReplaySessionSegment::create):
(WebCore::ReplaySessionSegment::ReplaySessionSegment):
* replay/ReplaySessionSegment.h:
* replay/ReplayingInputCursor.cpp:
(WebCore::ReplayingInputCursor::ReplayingInputCursor):
(WebCore::ReplayingInputCursor::create):
(WebCore::ReplayingInputCursor::loadInput):
* replay/ReplayingInputCursor.h:
* replay/SegmentedInputStorage.cpp:
(WebCore::SegmentedInputStorage::store):
(WebCore::SegmentedInputStorage::queue):
(WebCore::SegmentedInputStorage::SegmentedInputStorage): Deleted.
* replay/SegmentedInputStorage.h:
2015-01-16 Andreas Kling <akling@apple.com>
Remove assertion that Page::m_editorClient is non-null.
Unreviewed debug build fix. (It's a reference, it won't be null.)
* page/Page.cpp:
(WebCore::Page::Page):
2015-01-16 Andreas Kling <akling@apple.com>
Page::editorClient() should return a reference.
<https://webkit.org/b/140552>
Reviewed by Chris Dumez.
Page always has an EditorClient, so make editorClient() return a reference.
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::editorClient):
(WebCore::AlternativeTextController::textChecker):
* editing/Editor.cpp:
(WebCore::Editor::client):
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::client):
* page/FocusController.cpp:
(WebCore::FocusController::setFocusedElement):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
(WebCore::Page::clearUndoRedoOperations):
* page/Page.h:
(WebCore::Page::editorClient):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2015-01-16 Benjamin Poulain <benjamin@webkit.org>
Make URL filters case-insensitive by default
https://bugs.webkit.org/show_bug.cgi?id=140531
Reviewed by Andreas Kling.
Safari's filters were case-insensitive. Adopt that convention in the engine,
and add a flag in case someone ever need a case-sensitive filter.
* contentextensions/ContentExtensionRule.h:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
* contentextensions/ContentExtensionsManager.cpp:
(WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::trivialAtomFromASCIICharacter):
(WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
(WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
(WebCore::ContentExtensions::GraphBuilder::generateTransition):
(WebCore::ContentExtensions::URLFilterParser::addPattern):
* contentextensions/URLFilterParser.h:
2015-01-16 Benjamin Poulain <bpoulain@apple.com>
Add the alternative syntax for CSS Selector's descendant combinator (">>")
https://bugs.webkit.org/show_bug.cgi?id=140525
Reviewed by Antti Koivisto.
The latest Selector spec introduces the combinator ">>" as an alias for the descendant
relation: http://dev.w3.org/csswg/selectors-4/#descendant-combinators
This patch implements that combinator as an alias of the existing one. For CSSOM's selector
serialization, I use one bit of CSSSelector to store if that alternative syntax was used.
Tests: fast/css/descendant-combinator-doubled-child-syntax-styling.html
fast/css/parsing-css-descendant-combinator-doubled-child-syntax.html
fast/selectors/element-closest-descendant-combinator-doubled-child-syntax.html
fast/selectors/element-matches-descendant-combinator-doubled-child-syntax.html
fast/selectors/querySelector-descendant-combinator-doubled-child-syntax.html
* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::appendTagHistory):
* css/CSSParserValues.h:
(WebCore::CSSParserSelector::setDescendantUseDoubleChildSyntax):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
(WebCore::CSSSelector::setDescendantUseDoubleChildSyntax):
(WebCore::CSSSelector::CSSSelector):
2015-01-16 Chris Dumez <cdumez@apple.com>
Generate StylePropertyShorthand.* from CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=140501
Reviewed by Darin Adler.
Add initial support for having makeprop.pl generate most of
StylePropertyShorthand.* from CSSPropertyNames.in.
This patch replaces [Shorthand] parameter in CSSPropertyNames.in by a
more descriptive [Longhands=property1|property2|...] parameter. With
this information, makeprop.pl is now able to generate the
StylePropertyShorthand factories for all CSS shorthand properties
in a new StylePropertyShorthandFunctions.h header.
The switches in StylePropertyShorthand.cpp could also be generated
but this will be taken care of in follow-up patches to reduce patch
size.
* CMakeLists.txt:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPropertyNames.in:
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
* css/StylePropertyShorthand.cpp:
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
(WebCore::backgroundShorthand): Deleted.
(WebCore::backgroundPositionShorthand): Deleted.
(WebCore::backgroundRepeatShorthand): Deleted.
(WebCore::borderShorthand): Deleted.
(WebCore::borderBottomShorthand): Deleted.
(WebCore::borderColorShorthand): Deleted.
(WebCore::borderImageShorthand): Deleted.
(WebCore::borderLeftShorthand): Deleted.
(WebCore::borderRadiusShorthand): Deleted.
(WebCore::webkitBorderRadiusShorthand): Deleted.
(WebCore::borderRightShorthand): Deleted.
(WebCore::borderSpacingShorthand): Deleted.
(WebCore::borderStyleShorthand): Deleted.
(WebCore::borderTopShorthand): Deleted.
(WebCore::borderWidthShorthand): Deleted.
(WebCore::listStyleShorthand): Deleted.
(WebCore::marginShorthand): Deleted.
(WebCore::markerShorthand): Deleted.
(WebCore::outlineShorthand): Deleted.
(WebCore::overflowShorthand): Deleted.
(WebCore::paddingShorthand): Deleted.
(WebCore::transitionShorthand): Deleted.
(WebCore::animationShorthand): Deleted.
(WebCore::webkitAnimationShorthand): Deleted.
(WebCore::webkitBorderAfterShorthand): Deleted.
(WebCore::webkitBorderBeforeShorthand): Deleted.
(WebCore::webkitBorderEndShorthand): Deleted.
(WebCore::webkitBorderStartShorthand): Deleted.
(WebCore::webkitColumnsShorthand): Deleted.
(WebCore::webkitColumnRuleShorthand): Deleted.
(WebCore::flexFlowShorthand): Deleted.
(WebCore::flexShorthand): Deleted.
(WebCore::webkitMarginCollapseShorthand): Deleted.
(WebCore::webkitGridShorthand): Deleted.
(WebCore::webkitGridTemplateShorthand): Deleted.
(WebCore::webkitGridAreaShorthand): Deleted.
(WebCore::webkitGridColumnShorthand): Deleted.
(WebCore::webkitGridRowShorthand): Deleted.
(WebCore::webkitMarqueeShorthand): Deleted.
(WebCore::webkitMaskShorthand): Deleted.
(WebCore::webkitMaskPositionShorthand): Deleted.
(WebCore::webkitMaskRepeatShorthand): Deleted.
(WebCore::webkitTextDecorationShorthand): Deleted.
(WebCore::webkitTextEmphasisShorthand): Deleted.
(WebCore::webkitTextStrokeShorthand): Deleted.
(WebCore::webkitTransitionShorthand): Deleted.
(WebCore::webkitPerspectiveOriginShorthand): Deleted.
(WebCore::webkitTransformOriginShorthand): Deleted.
* css/StylePropertyShorthand.h:
* css/makeprop.pl:
2015-01-16 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178532.
https://bugs.webkit.org/show_bug.cgi?id=140548
Broke fast/css/parsing-css-lang.html on some bots (Requested
by ap on #webkit).
Reverted changeset:
"Canonicalization of :lang() should preserve the :lang()'s
arguments representations"
https://bugs.webkit.org/show_bug.cgi?id=139928
http://trac.webkit.org/changeset/178532
2015-01-16 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178577.
https://bugs.webkit.org/show_bug.cgi?id=140546
Broke fast/css-grid-layout/grid-content-sized-columns-
resolution.html (Requested by ap on #webkit).
Reverted changeset:
"[CSS Grid Layout] Tracks shrink sometimes with indefinite
remaining space"
https://bugs.webkit.org/show_bug.cgi?id=139059
http://trac.webkit.org/changeset/178577
2015-01-16 Andreas Kling <akling@apple.com>
Some improvements to RuleSet shrinking.
<https://webkit.org/b/140534>
Reviewed by Antti Koivisto.
Give an inline capacity (1) to the RuleData Vectors in RuleSet.
The vast majority of Vectors have only a single entry, and this
avoids having to allocate a separate Vector backing store for them.
Also make sure to shrink some Vectors that we weren't already,
like those in RuleFeatureSet.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
* css/ElementRuleCollector.h:
* css/RuleFeature.cpp:
(WebCore::RuleFeatureSet::shrinkToFit):
* css/RuleFeature.h:
* css/RuleSet.cpp:
(WebCore::RuleSet::addToRuleSet):
(WebCore::rulesCountForName):
(WebCore::shrinkMapVectorsToFit):
(WebCore::RuleSet::shrinkToFit):
* css/RuleSet.h:
(WebCore::RuleSet::idRules):
(WebCore::RuleSet::classRules):
(WebCore::RuleSet::tagRules):
(WebCore::RuleSet::shadowPseudoElementRules):
(WebCore::RuleSet::linkPseudoClassRules):
(WebCore::RuleSet::cuePseudoRules):
(WebCore::RuleSet::focusPseudoClassRules):
(WebCore::RuleSet::universalRules):
2015-01-16 Antti Koivisto <antti@apple.com>
Correct naming for FontCascade implementation files
https://bugs.webkit.org/show_bug.cgi?id=140544
Reviewed by Zalan Bujtas.
Also reduce their number.
Merge FontFastPath.cpp into FontCascade.cpp
Merge FontMac.mm and FontComplexTextMac.cpp into FontCascadeCocoa.mm
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::getEmphasisMarkGlyphData):
(WebCore::FontCascade::emphasisMarkAscent):
(WebCore::FontCascade::emphasisMarkDescent):
(WebCore::FontCascade::emphasisMarkHeight):
(WebCore::FontCascade::getGlyphsAndAdvancesForSimpleText):
(WebCore::FontCascade::drawSimpleText):
(WebCore::FontCascade::drawEmphasisMarksForSimpleText):
(WebCore::FontCascade::drawGlyphBuffer):
(WebCore::offsetToMiddleOfGlyph):
(WebCore::offsetToMiddleOfGlyphAtIndex):
(WebCore::FontCascade::drawEmphasisMarks):
(WebCore::FontCascade::floatWidthForSimpleText):
(WebCore::FontCascade::adjustSelectionRectForSimpleText):
(WebCore::FontCascade::offsetForPositionForSimpleText):
* platform/graphics/FontFastPath.cpp: Removed.
* platform/graphics/cocoa/FontCascadeCocoa.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
(WebCore::FontCascade::drawGlyphs):
(WebCore::FontCascade::adjustSelectionRectForComplexText):
(WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
(WebCore::FontCascade::drawComplexText):
(WebCore::FontCascade::drawEmphasisMarksForComplexText):
(WebCore::FontCascade::floatWidthForComplexText):
(WebCore::FontCascade::offsetForPositionForComplexText):
(WebCore::FontCascade::fontDataForCombiningCharacterSequence):
* platform/graphics/mac/FontComplexTextMac.cpp: Removed.
* platform/graphics/mac/FontMac.mm: Removed.
2014-11-26 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
https://bugs.webkit.org/show_bug.cgi?id=139059
Reviewed by David Hyatt.
Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2015-01-15 Csaba Osztrogonác <ossy@webkit.org>
Remove ENABLE(SQL_DATABASE) guards
https://bugs.webkit.org/show_bug.cgi?id=140434
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
* Modules/webdatabase/AbstractDatabaseServer.h:
* Modules/webdatabase/ChangeVersionData.h:
* Modules/webdatabase/ChangeVersionWrapper.cpp:
* Modules/webdatabase/ChangeVersionWrapper.h:
* Modules/webdatabase/DOMWindowWebDatabase.cpp:
* Modules/webdatabase/DOMWindowWebDatabase.h:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/Database.cpp:
* Modules/webdatabase/Database.h:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseBackend.cpp:
* Modules/webdatabase/DatabaseBackend.h:
* Modules/webdatabase/DatabaseBackendBase.cpp:
* Modules/webdatabase/DatabaseBackendBase.h:
* Modules/webdatabase/DatabaseBasicTypes.h:
* Modules/webdatabase/DatabaseCallback.h:
* Modules/webdatabase/DatabaseCallback.idl:
* Modules/webdatabase/DatabaseContext.cpp:
* Modules/webdatabase/DatabaseContext.h:
* Modules/webdatabase/DatabaseDetails.h:
* Modules/webdatabase/DatabaseError.h:
* Modules/webdatabase/DatabaseManager.cpp:
* Modules/webdatabase/DatabaseManager.h:
* Modules/webdatabase/DatabaseManagerClient.h:
* Modules/webdatabase/DatabaseServer.cpp:
* Modules/webdatabase/DatabaseServer.h:
* Modules/webdatabase/DatabaseTask.cpp:
* Modules/webdatabase/DatabaseTask.h:
* Modules/webdatabase/DatabaseThread.cpp:
* Modules/webdatabase/DatabaseThread.h:
* Modules/webdatabase/DatabaseTracker.cpp:
* Modules/webdatabase/DatabaseTracker.h:
* Modules/webdatabase/OriginLock.cpp:
* Modules/webdatabase/OriginLock.h:
* Modules/webdatabase/SQLCallbackWrapper.h:
* Modules/webdatabase/SQLError.h:
* Modules/webdatabase/SQLError.idl:
* Modules/webdatabase/SQLException.cpp:
* Modules/webdatabase/SQLException.h:
* Modules/webdatabase/SQLException.idl:
* Modules/webdatabase/SQLResultSet.cpp:
* Modules/webdatabase/SQLResultSet.h:
* Modules/webdatabase/SQLResultSet.idl:
* Modules/webdatabase/SQLResultSetRowList.cpp:
* Modules/webdatabase/SQLResultSetRowList.h:
* Modules/webdatabase/SQLResultSetRowList.idl:
* Modules/webdatabase/SQLStatement.cpp:
* Modules/webdatabase/SQLStatement.h:
* Modules/webdatabase/SQLStatementBackend.cpp:
* Modules/webdatabase/SQLStatementBackend.h:
* Modules/webdatabase/SQLStatementCallback.h:
* Modules/webdatabase/SQLStatementCallback.idl:
* Modules/webdatabase/SQLStatementErrorCallback.h:
* Modules/webdatabase/SQLStatementErrorCallback.idl:
* Modules/webdatabase/SQLTransaction.cpp:
* Modules/webdatabase/SQLTransaction.h:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/SQLTransactionBackend.cpp:
* Modules/webdatabase/SQLTransactionBackend.h:
* Modules/webdatabase/SQLTransactionCallback.h:
* Modules/webdatabase/SQLTransactionCallback.idl:
* Modules/webdatabase/SQLTransactionClient.cpp:
* Modules/webdatabase/SQLTransactionClient.h:
* Modules/webdatabase/SQLTransactionCoordinator.cpp:
* Modules/webdatabase/SQLTransactionCoordinator.h:
* Modules/webdatabase/SQLTransactionErrorCallback.h:
* Modules/webdatabase/SQLTransactionErrorCallback.idl:
* Modules/webdatabase/SQLTransactionState.h:
* Modules/webdatabase/SQLTransactionStateMachine.cpp:
* Modules/webdatabase/SQLTransactionStateMachine.h:
* bindings/js/JSCommandLineAPIHostCustom.cpp:
(WebCore::JSCommandLineAPIHost::databaseId):
* bindings/js/JSCustomSQLStatementErrorCallback.cpp:
* bindings/js/JSExceptionBase.cpp:
(WebCore::toExceptionBase):
* bindings/js/JSSQLResultSetRowListCustom.cpp:
* bindings/js/JSSQLTransactionCustom.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
(webkit_dom_test_callback_finalize):
(webkit_dom_test_callback_constructor):
(webkit_dom_test_callback_callback_with_no_param):
(webkit_dom_test_callback_callback_with_array_param):
(webkit_dom_test_callback_callback_with_serialized_script_value_param):
(webkit_dom_test_callback_callback_with_non_bool_return_type):
(webkit_dom_test_callback_callback_with_string_list):
(webkit_dom_test_callback_callback_with_boolean):
(webkit_dom_test_callback_callback_requires_this_to_pass):
* bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
* bindings/scripts/test/JS/JSTestCallback.cpp:
* bindings/scripts/test/JS/JSTestCallback.h:
* bindings/scripts/test/ObjC/DOMTestCallback.mm:
* bindings/scripts/test/TestCallback.idl:
* dom/DOMExceptions.in:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::setDatabaseContext):
* dom/ScriptExecutionContext.h:
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::CommandLineAPIHost):
(WebCore::CommandLineAPIHost::disconnect):
(WebCore::CommandLineAPIHost::databaseIdImpl):
* inspector/CommandLineAPIHost.h:
(WebCore::CommandLineAPIHost::init):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseInstrumentation.h:
(WebCore::InspectorInstrumentation::didOpenDatabase):
* inspector/InspectorDatabaseResource.cpp:
* inspector/InspectorDatabaseResource.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
(WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
* inspector/InspectorInstrumentation.h:
* inspector/InstrumentingAgents.cpp:
(WebCore::InstrumentingAgents::InstrumentingAgents):
(WebCore::InstrumentingAgents::reset):
* inspector/InstrumentingAgents.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
* page/ChromeClient.h:
* platform/FeatureCounterKeys.h:
2015-01-15 Zalan Bujtas <zalan@apple.com>
Element appears correctly but does not receive event with a large translation.
https://bugs.webkit.org/show_bug.cgi?id=139815
Reviewed by Simon Fraser.
When the hit point gets translated beyond the min/max value of LayoutRect (infiniteRect()),
we fail to find the corresponding layer.
When there's no clipping on a layer, we use min/max values to represent infiniteness.
However it does not work well across types. With IntPoint(hittest) we can address a point that's outside
of LayoutRect's boundary(clipping).
This patch addresses the immediate issue of not being able to hittest transformed layers properly.
Fixing the representation of infiniteness is tracked here: webkit.org/b/140533
Test: transforms/hittest-translated-content-off-to-infinity-and-back.html
* rendering/ClipRect.cpp:
(WebCore::ClipRect::intersects):
2015-01-15 Myles C. Maxfield <mmaxfield@apple.com>
tables/mozilla/bugs/bug10633.html is flakey on Yosemite
https://bugs.webkit.org/show_bug.cgi?id=140487
Reviewed by Simon Fraser.
The workaround in https://bugs.webkit.org/show_bug.cgi?id=140253 works
on both OSes.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit):
2015-01-15 Ryosuke Niwa <rniwa@webkit.org>
Removing an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChildrenChanged
https://bugs.webkit.org/show_bug.cgi?id=140523
<rdar://problem/19464329>
Reviewed by Chris Dumez.
The bug was caused by adjustDirectionalityIfNeededAfterChildrenChanged always traversing children to
unset selfOrAncestorHasDirAutoAttribute flag while removing a child element.
Fixed the bug by removing this code. This code was no-op prior to being refactored in r154957 since
we only entered a for loop with the invariant "counter < childCountDelta" when "childCountDelta < 0".
See http://trac.webkit.org/changeset/154957/trunk/Source/WebCore/html/HTMLElement.cpp.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
2015-01-15 Brent Fulgham <bfulgham@apple.com>
RenderLayerCompositor: Strange comparison of opacity (float) to boolean.
https://bugs.webkit.org/show_bug.cgi?id=140477.
Reviewed by Simon Fraser.
* rendering/RenderLayerCompositor.cpp:
(WebCore::styleChangeRequiresLayerRebuild): Add a cast to make the meaning of this
code clearer.
2015-01-15 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed, rolling out r178531.
Caused LayoutTest ASSERTs/CRASHs on Debug Yosemite build-bot.
Reverted changeset:
"Layers need to be already updated before we call adjustViewSize."
https://bugs.webkit.org/show_bug.cgi?id=135514
http://trac.webkit.org/changeset/178531
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::updateCompositingLayersAfterScrolling):
(WebCore::FrameView::paintContents):
(WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollTo):
(WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Deleted.
* platform/ScrollView.h:
(WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
2015-01-15 Chris Dumez <cdumez@apple.com>
[WK2] Wire diagnostic logging messages through the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=140486
Reviewed by Sam Weinig.
Wire diagnostic logging messages through the UIProcess.
Eventually, the corresponding bundle API should go away.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Add page/DiagnosticLoggingResultType.h to Windows project.
* WebCore.xcodeproj/project.pbxproj:
Add page/DiagnosticLoggingResultType.h to XCode project.
* html/HTMLMediaElement.cpp:
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
* page/DiagnosticLoggingClient.h:
* page/DiagnosticLoggingResultType.h: Copied from Source/WebCore/page/DiagnosticLoggingClient.h.
Use new DiagnosticLoggingResultType enum instead of old
DiagnosticLoggingClient::LogType one.
2015-01-15 Zalan Bujtas <zalan@apple.com>
Reduce LayoutRect::infiniteRect() usage.
https://bugs.webkit.org/show_bug.cgi?id=140511
Reviewed by Simon Fraser.
This is in preparation to get rid of LayoutRect/FloatRect::infiniteRect().
No change in functionality.
* platform/graphics/LayoutRect.h:
(WebCore::LayoutRect::isInfinite):
* rendering/ClipRect.h:
(WebCore::ClipRect::reset):
(WebCore::ClipRect::isEmpty):
(WebCore::ClipRect::isInfinite):
(WebCore::ClipRect::setRect): Deleted.
* rendering/PaintInfo.h:
(WebCore::PaintInfo::applyTransform):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRects::reset):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::clippedByAncestor):
2015-01-15 Chris Dumez <cdumez@apple.com>
Intermittent WebCore build failures - CSSPropertyNames.gperf: No keywords in input file! calling gperf failed: 256 at WebCore/css/makeprop.pl line 901
https://bugs.webkit.org/show_bug.cgi?id=140521
Reviewed by Alexey Proskuryakov.
Close the CSSPropertyNames.gperf file before calling gperf on it
to make sure the content we wrote was flushed. This was causing
intermittent build failures.
* css/makeprop.pl:
2015-01-15 Zalan Bujtas <zalan@apple.com>
LayerFragment should be able to intersect with ClipRect.
https://bugs.webkit.org/show_bug.cgi?id=140498
Reviewed by Simon Fraser.
No change in functionality.
* rendering/LayerFragment.h:
(WebCore::LayerFragment::intersect):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::collectFragments):
2015-01-15 Zalan Bujtas <zalan@apple.com>
Move ClipRects and ClipRectsCache classes to RenderLayer.cpp.
https://bugs.webkit.org/show_bug.cgi?id=140461
Reviewed by Simon Fraser.
Move classes only used by RenderLayer to RenderLayer.cpp.
No change in functionality.
* rendering/RenderLayer.cpp:
(WebCore::ClipRects::create):
(WebCore::ClipRects::reset):
(WebCore::ClipRects::overflowClipRect):
(WebCore::ClipRects::setOverflowClipRect):
(WebCore::ClipRects::fixedClipRect):
(WebCore::ClipRects::setFixedClipRect):
(WebCore::ClipRects::posClipRect):
(WebCore::ClipRects::setPosClipRect):
(WebCore::ClipRects::fixed):
(WebCore::ClipRects::setFixed):
(WebCore::ClipRects::ref):
(WebCore::ClipRects::deref):
(WebCore::ClipRects::operator==):
(WebCore::ClipRects::operator=):
(WebCore::ClipRects::ClipRects):
(WebCore::ClipRectsCache::ClipRectsCache):
(WebCore::ClipRectsCache::getClipRects):
(WebCore::ClipRectsCache::setClipRects):
(WebCore::ClipRectsCache::getIndex):
(WebCore::RenderLayer::clipRects):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRects::create): Deleted.
(WebCore::ClipRects::ClipRects): Deleted.
(WebCore::ClipRects::reset): Deleted.
(WebCore::ClipRects::overflowClipRect): Deleted.
(WebCore::ClipRects::setOverflowClipRect): Deleted.
(WebCore::ClipRects::fixedClipRect): Deleted.
(WebCore::ClipRects::setFixedClipRect): Deleted.
(WebCore::ClipRects::posClipRect): Deleted.
(WebCore::ClipRects::setPosClipRect): Deleted.
(WebCore::ClipRects::fixed): Deleted.
(WebCore::ClipRects::setFixed): Deleted.
(WebCore::ClipRects::ref): Deleted.
(WebCore::ClipRects::deref): Deleted.
(WebCore::ClipRects::operator==): Deleted.
(WebCore::ClipRects::operator=): Deleted.
(WebCore::ClipRectsCache::ClipRectsCache): Deleted.
(WebCore::ClipRectsCache::getClipRects): Deleted.
(WebCore::ClipRectsCache::setClipRects): Deleted.
(WebCore::ClipRectsCache::getIndex): Deleted.
2015-01-15 Dhi Aurrahman <diorahman@rockybars.com>
Canonicalization of :lang() should preserve the :lang()'s arguments representations
https://bugs.webkit.org/show_bug.cgi?id=139928
Reviewed by Benjamin Poulain.
Preserve the representation of IDENT and STRING when serializing the
:lang(). For example, :lang(foo,"bar" ,baz) should be serialized as
:lang(foo, "bar", baz) instead of :lang(foo, bar, baz).
Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
CSSSelector::setLangArgumentList and CSSSelector::langArgumentList
respectively, since those methods are being exclusively used in respect
with :lang().
Update the test of serializing :lang() with IDENT and STRING arguments.
* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::setLangArgumentList):
(WebCore::CSSParserSelector::setArgumentList): Deleted.
* css/CSSParserValues.h:
(WebCore::CSSParserString::init):
(WebCore::CSSParserString::clear):
(WebCore::CSSParserString::isParsedFromString):
(WebCore::CSSParserString::setParsedFromString):
* css/CSSSelector.cpp:
(WebCore::appendLangArgumentList):
(WebCore::CSSSelector::selectorText):
(WebCore::CSSSelector::setLangArgumentList):
(WebCore::appendArgumentList): Deleted.
(WebCore::CSSSelector::setArgumentList): Deleted.
* css/CSSSelector.h:
(WebCore::CSSSelector::langArgumentList):
(WebCore::CSSSelector::langArgumentParsedFromStringFlagList):
(WebCore::CSSSelector::argumentList): Deleted.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
2015-01-15 Brent Fulgham <bfulgham@apple.com>
Layers need to be already updated before we call adjustViewSize
https://bugs.webkit.org/show_bug.cgi?id=135514
Reviewed by Simon Fraser.
Tested by 'fast/dynamic/layer-no-longer-paginated.html'
Defer updating scrollbars until we have finished layout. This
has a couple of benefits:
(1) We do not attempt to modify render layers during layout.
(2) In WK1 we do not attempt to paint during layout.
Add a new virtual predicate to ScrollView indicating when we are in
layout so that calls to setContentsSize do not attempt
to adjust scrollbars.
Modify FrameView to set its ScrollView state to block drawing
scrollbar updates during layout. Also add a post-layout
handler to complete the scrollbar updates after layout is
finished.
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
(WebCore::ScrollView::scrollTo): If we should defer painting, cache the
the scroll delta and apply it after the layout is complete.
* platform/ScrollView.h:
(WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
2015-01-15 Benjamin Poulain <benjamin@webkit.org>
When building the NFA of the global disjunction, share the prefix subgraph of existing subpatterns
https://bugs.webkit.org/show_bug.cgi?id=140465
Reviewed by Andreas Kling.
This patch updates the parser to produce smaller graphs when multiple patterns
of the rule list share a common prefix.
Previously, GraphBuilder would generate subgraph in place of each parsed
atom. We now only create subgraph if an atom does not appear in the prefix tree.
We accumulate the parsing information into small uint16_t named TrivialAtom.
When generating the subgraph for an new atom, we first check if the prefix tree already
has a corresponding subgraph for that atom. If it does, we do not generate anything and we extend the existing
graph. If there is no existing prefix, we create the subgraph and extend the prefix tree.
Sharing prefix subtrees slows down the subtree generation a bit but the resulting graph is much
simpler for many kind of inputs.
* WebCore.xcodeproj/project.pbxproj:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
The URLFilterParser now maintains states (the prefix tree) between patterns.
* contentextensions/DFA.cpp:
(WebCore::ContentExtensions::DFA::debugPrintDot):
* contentextensions/DFANode.h:
Fix a typo :)
* contentextensions/NFA.cpp:
(WebCore::ContentExtensions::NFA::createNode):
(WebCore::ContentExtensions::NFA::setFinal):
(WebCore::ContentExtensions::NFA::restoreToGraphSize):
(WebCore::ContentExtensions::NFA::addRuleId):
(WebCore::ContentExtensions::NFA::debugPrintDot):
* contentextensions/NFA.h:
(WebCore::ContentExtensions::NFA::addRuleId):
* contentextensions/NFANode.cpp: Removed.
* contentextensions/NFANode.h:
NFA nodes from two patterns are now "merged" by construction, thus we need
to keep track of multiple rules per node.
* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::trivialAtomFromAsciiCharacter):
(WebCore::ContentExtensions::quantifyTrivialAtom):
(WebCore::ContentExtensions::trivialAtomForNewlineClassIDBuiltin):
(WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
(WebCore::ContentExtensions::GraphBuilder::m_LastPrefixTreeEntry):
(WebCore::ContentExtensions::GraphBuilder::finalize):
(WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
(WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
(WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
(WebCore::ContentExtensions::GraphBuilder::fail):
(WebCore::ContentExtensions::GraphBuilder::generateTransition):
(WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom):
(WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary):
(WebCore::ContentExtensions::URLFilterParser::URLFilterParser):
(WebCore::ContentExtensions::URLFilterParser::addPattern):
(WebCore::ContentExtensions::GraphBuilder::m_lastAtom): Deleted.
(WebCore::ContentExtensions::URLFilterParser::parse): Deleted.
* contentextensions/URLFilterParser.h:
(WebCore::ContentExtensions::URLFilterParser::hasError): Deleted.
(WebCore::ContentExtensions::URLFilterParser::errorMessage): Deleted.
2015-01-14 Alexey Proskuryakov <ap@apple.com>
Web Inspector and regular console use different source code locations for messages
https://bugs.webkit.org/show_bug.cgi?id=140478
Reviewed by Brian Burg.
We now create a ConsoleMessage object in a place where we can look at it and use
the source location it computed in a client call.
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
* inspector/InspectorInstrumentation.h:
* inspector/WebConsoleAgent.cpp:
(WebCore::WebConsoleAgent::didFinishXHRLoading):
(WebCore::WebConsoleAgent::didReceiveResponse):
(WebCore::WebConsoleAgent::didFailLoading):
* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::addMessage):
(WebCore::PageConsoleClient::messageWithTypeAndLevel):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
2015-01-15 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed Windows build fix.
More missing Font->FontCascade changes.
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
(WebCore::WebCoreAlwaysUsesComplexTextCodePath):
2015-01-15 Antti Koivisto <antti@apple.com>
REGRESSION(r178133): Membuster regressed ~4%
https://bugs.webkit.org/show_bug.cgi?id=140495
Reviewed by Andreas Kling.
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::purgeInactiveFontData):
Fonts may ref other fonts. Keep clearing until there are no changes.
2015-01-15 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix.
* platform/graphics/win/FontCacheWin.cpp:
* platform/win/DragImageWin.cpp:
* platform/win/WebCoreTextRenderer.h:
2015-01-15 Antti Koivisto <antti@apple.com>
Try to fix windows build.
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::displayCallback):
* platform/win/DragImageWin.cpp:
(WebCore::dragLabelFont):
(WebCore::createDragImageForLink):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::calculatePositionAndSize):
(WebCore::PopupMenuWin::paint):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
(WebCore::WebCoreDrawDoubledTextAtPoint):
(WebCore::WebCoreTextFloatWidth):
(WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
(WebCore::WebCoreAlwaysUsesComplexTextCodePath):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::setFontFromControlSize):
2015-01-15 Antti Koivisto <antti@apple.com>
Unreviewed, rolling out r178518.
Didn't mean to commit some of this
Reverted changeset:
"Try to fix windows build."
http://trac.webkit.org/changeset/178518
2015-01-15 Antti Koivisto <antti@apple.com>
Try to fix windows build.
* platform/graphics/Font.cpp: Copied from Source/WebCore/platform/graphics/SimpleFontData.cpp.
* platform/graphics/Font.h: Copied from Source/WebCore/platform/graphics/SimpleFontData.h.
* platform/graphics/FontCascadeFastPath.cpp: Copied from Source/WebCore/platform/graphics/FontFastPath.cpp.
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::displayCallback):
* platform/graphics/ios/FontIOS.mm: Copied from Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm.
* platform/graphics/mac/FontCascadeComplexTextMac.cpp: Copied from Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp.
* platform/graphics/mac/FontCascadeMac.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
* platform/graphics/mac/FontCoreText.cpp: Copied from Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp.
* platform/graphics/mac/FontMac.mm: Replaced with Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm.
* platform/win/DragImageWin.cpp:
(WebCore::dragLabelFont):
(WebCore::createDragImageForLink):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::calculatePositionAndSize):
(WebCore::PopupMenuWin::paint):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
(WebCore::WebCoreDrawDoubledTextAtPoint):
(WebCore::WebCoreTextFloatWidth):
(WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
(WebCore::WebCoreAlwaysUsesComplexTextCodePath):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::setFontFromControlSize):
2015-01-15 Myles C. Maxfield <mmaxfield@apple.com>
http/tests/misc/acid3.html is flakey on Mavericks
https://bugs.webkit.org/show_bug.cgi?id=140253
Reviewed by Alexey Proskuryakov.
CoreText has a bug <rdar://problem/19433490> in which kerning is not applied for a font
if a CTTypesetter is created using that font before a call to CTFontTransformGlyphs. We
often create typesetters in the complex code path, so it's not obvious when this bug
might present itself. This patch simply makes a dummy invocation of
CTFontTransformGlyphs() when creating a SimpleFontData.
No new tests because this is covered by http/tests/misc/acid3.html.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit):
2015-01-15 Chris Dumez <cdumez@apple.com>
Get rid of custom StyleBuilder code for 'line-height' CSS property
https://bugs.webkit.org/show_bug.cgi?id=140462
Reviewed by Antti Koivisto.
Get rid of custom StyleBuilder code for 'line-height' CSS property by
using a conditional converter.
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertLineHeight):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueLineHeight):
(WebCore::StyleBuilderCustom::convertLineHeight): Deleted.
2015-01-15 Antti Koivisto <antti@apple.com>
Rename Font to FontCascade
https://bugs.webkit.org/show_bug.cgi?id=140442
Reviewed by Darin Adler.
We can then rename SimpleFontData to Font. This will match the usual definition of a "font".
2015-01-15 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Assert failure in RenderBlock::locateFlowThreadContainingBlock when showing the render tree debug info
https://bugs.webkit.org/show_bug.cgi?id=140441
Reviewed by Andrei Bucur.
When showing the render tree debug information for an element inside a flow thread,
we will display the region range information for all the render boxes. To avoid
computation of flow thread containing block in these situations, we will use
only the cached flow thread containing block information.
No new tests as this code path is only touched when using showRenderTree* methods.
* rendering/RenderObject.cpp:
(WebCore::flowThreadContainingBlockFromRenderer):
(WebCore::RenderObject::showRegionsInformation):
2015-01-14 Simon Fraser <simon.fraser@apple.com>
Graphics corruption after Find on some pages
https://bugs.webkit.org/show_bug.cgi?id=140489
Reviewed by Zalan Bujtas.
After doing a Find on http://shop.outlier.cc/shop/retail/chino.html,
garbage could appear on some parts of the page. This is caused by creating
a compositing layer which is marked as opaque, yet failing to paint the entire
layer contents.
This was caused by a bug in RenderBox::computeBackgroundIsKnownToBeObscured()
logic. On the page in question, doing a Find could cause overflow:hidden sections
to get scrolled (since Find can reveal the selection by scrolling overflow).
However, the render tree walking under RenderBox::foregroundIsKnownToBeOpaqueInRect()
fails to take overflow scrolling into account, so gives the wrong answer
in some content configurations. As a result, we'd think that the background
is obscured, and never paint it.
Conservative fix is to have isCandidateForOpaquenessTest() return false
when the content has any non-zero scroll offset.
Tests: compositing/contents-opaque/opaque-with-scrolled.html
fast/backgrounds/opaque-scrolled-paint-background.html
* rendering/RenderBox.cpp:
(WebCore::isCandidateForOpaquenessTest):
2015-01-14 Jer Noble <jer.noble@apple.com>
[Mac][MSE] Stalled YouTube playback does not allow display to sleep.
https://bugs.webkit.org/show_bug.cgi?id=140468
rdar://problem/19171162
Reviewed by Eric Carlson.
Test: media/media-source/media-source-stalled-holds-sleep-assertion.html
The unstated convention of MediaPlayerPrivate::paused() is that implementations should
return 'true' if the playback rate is 0. However, MediaPlayerPrivateMediaSourceAVFObjC
was returning 'false' if it was supposed to be playing, regardless of the actual rate.
This caused a check in HTMLMediaElement of whether to release the sleep assertion token
to fail, thinking the media engine was still playing.
Add some testing infrastructure to allow us to test whether the media element is disabling
display sleep from within layout tests.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::isDisablingSleep):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused):
* testing/Internals.cpp:
(WebCore::Internals::elementIsBlockingDisplaySleep):
* testing/Internals.h:
* testing/Internals.idl:
2015-01-14 Zalan Bujtas <zalan@apple.com>
Move LayoutFragment and ClipRect to their own files.
https://bugs.webkit.org/show_bug.cgi?id=140457
Reviewed by Simon Fraser.
Move these classes to their own files to to make RenderLayer.h less heavy.
No change in functionality.
* WebCore.xcodeproj/project.pbxproj:
* rendering/ClipRect.cpp: Added.
(WebCore::ClipRect::intersects):
* rendering/ClipRect.h: Added.
(WebCore::ClipRect::ClipRect):
(WebCore::ClipRect::rect):
(WebCore::ClipRect::setRect):
(WebCore::ClipRect::affectedByRadius):
(WebCore::ClipRect::setAffectedByRadius):
(WebCore::ClipRect::operator==):
(WebCore::ClipRect::operator!=):
(WebCore::ClipRect::intersect):
(WebCore::ClipRect::move):
(WebCore::ClipRect::moveBy):
(WebCore::ClipRect::isEmpty):
(WebCore::ClipRect::intersects):
(WebCore::ClipRect::inflateX):
(WebCore::ClipRect::inflateY):
(WebCore::ClipRect::inflate):
(WebCore::intersection):
* rendering/LayerFragment.h: Added.
(WebCore::LayerFragment::setRects):
(WebCore::LayerFragment::moveBy):
(WebCore::LayerFragment::intersect):
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::ClipRect::intersects): Deleted.
* rendering/RenderLayer.h:
(WebCore::ClipRect::ClipRect): Deleted.
(WebCore::ClipRect::rect): Deleted.
(WebCore::ClipRect::setRect): Deleted.
(WebCore::ClipRect::affectedByRadius): Deleted.
(WebCore::ClipRect::setAffectedByRadius): Deleted.
(WebCore::ClipRect::operator==): Deleted.
(WebCore::ClipRect::operator!=): Deleted.
(WebCore::ClipRect::intersect): Deleted.
(WebCore::ClipRect::move): Deleted.
(WebCore::ClipRect::moveBy): Deleted.
(WebCore::ClipRect::isEmpty): Deleted.
(WebCore::ClipRect::intersects): Deleted.
(WebCore::ClipRect::inflateX): Deleted.
(WebCore::ClipRect::inflateY): Deleted.
(WebCore::ClipRect::inflate): Deleted.
(WebCore::intersection): Deleted.
(WebCore::LayerFragment::LayerFragment): Deleted.
(WebCore::LayerFragment::setRects): Deleted.
(WebCore::LayerFragment::moveBy): Deleted.
(WebCore::LayerFragment::intersect): Deleted.
* rendering/RenderMultiColumnSet.h:
* rendering/RenderRegion.h:
* rendering/RenderTreeAsText.cpp:
2015-01-14 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178438.
https://bugs.webkit.org/show_bug.cgi?id=140484
Broke a few MediaSource tests (Requested by JoePeck on
#webkit).
Reverted changeset:
"[MSE] Implement per TrackBuffer buffered."
https://bugs.webkit.org/show_bug.cgi?id=139813
http://trac.webkit.org/changeset/178438
2015-01-14 Enrica Casucci <enrica@apple.com>
REGRESSION (r165385): Crash when applying autocorrection exceeds maximum text area length.
https://bugs.webkit.org/show_bug.cgi?id=137902
rdar://problem/18568864
Reviewed by Darin Adler.
Test: editing/text-iterator/invalid-subrange.html
characterSubrange should check the iterator position after each advance.
This changed adds a new method to the Internals object to be able to test this.
* editing/TextIterator.cpp:
(WebCore::characterSubrange):
(WebCore::TextIterator::subrange):
(WebCore::findPlainText):
* testing/Internals.cpp:
(WebCore::Internals::subrange):
* testing/Internals.h:
* testing/Internals.idl:
2015-01-14 Said Abou-Hallawa <sabouhallawa@apple.com>
REGRESSION (r154769): Wrong <title> taken as a tooltip for SVG element.
https://bugs.webkit.org/show_bug.cgi?id=139690.
Reviewed by Daniel Bates.
Before r154769, we were calling Traversal<SVGTitleElement>::firstWithin(), which returns
the first immediate SVGTitleElement child. In r154769, Traversal<SVGTitleElement>::firstWithin()
was replaced by descendantsOfType<SVGTitleElement> which returns all descendants SVGTitleElements.
Then we were returning the first element of these descendants, which may not be an immediate
child of the element, as the title of the SVGElement. This was the reason of this bug. The
fix is to use childrenOfType<SVGTitleElement>() instead, which returns the immediate SVGTitleElement
children of an SVGElement.
Also we were not following exactly the specs for the rootmost SVG element's title value.
According to the W3C specs, for stand-alone SVG documents only, the rootmost SVG element
should not return a title. But we were not returning a title for the rootmost SVG element
always. The fix is to return a empty title for the rootmost SVG element only if topDocument()
of the element isSVGDocument().
NOTE: The main SVG specs http://www.w3.org/TR/SVG/interact.html#hit-testing (W3C Recommendation
16 August 2011) and http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements (W3C
Recommendation 16 August 2011) do not say how the tooltip of an SVG element is calculated. But
the SVG tiny specs http://www.w3.org/TR/SVGTiny12/struct.html#uiTitleDescBehavior (W3C
Recommendation 22 December 2008) however explains well the tooltip calculation for the embedded
and the stand-alone SVG cases. And it seems this what we should rely on.
Test: svg/hittest/svg-standalone-tooltip.svg
svg/hittest/svg-embedded-tooltip.html
* WebCore.exp.in:
* rendering/HitTestResult.h:
Make HitTestResult::setInnerNode be WEBCORE_EXPORT
* svg/SVGElement.cpp:
(WebCore::SVGElement::title):
Replace descendantsOfType<SVGTitleElement>() by childrenOfType<SVGTitleElement>().
Fix the title value of the rootmost SVG element.
* testing/Internals.cpp:
(WebCore::Internals::toolTipFromElement):
* testing/Internals.h:
* testing/Internals.idl:
Add a new internal function toolTipFromElement() which returns the tooltip text for a
given element.
2015-01-14 Csaba Osztrogonác <ossy@webkit.org>
Buildfix after r178434
https://bugs.webkit.org/show_bug.cgi?id=140467
Reviewed by Chris Dumez.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertPerspective):
2015-01-14 Benjamin Poulain <bpoulain@apple.com>
Build fix for NFAToDFA on ARM
* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
(WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):
2015-01-14 Bartlomiej Gajda <b.gajda@samsung.com>
[MSE] Implement per TrackBuffer buffered.
https://bugs.webkit.org/show_bug.cgi?id=139813.
Reviewed by Jer Noble.
Added implementation of SourceBuffer buffered() algorithm as per specification,
and caching mechanism called when samples are added, removed, or MediaSource
readyState is changed.
Tests: media/media-source/media-source-multiple-trackBuffers-buffered-in-ended-state.html
media/media-source/media-source-multiple-trackBuffers-buffered.html
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::setReadyState):
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::buffered):
(WebCore::SourceBuffer::invalidateBuffered):
(WebCore::SourceBuffer::recalculateBuffered):
(WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
(WebCore::SourceBuffer::removeCodedFrames):
(WebCore::SourceBuffer::evictCodedFrames):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
(WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
(WebCore::SourceBuffer::hasCurrentTime):
* Modules/mediasource/SourceBuffer.h:
2015-01-14 Benjamin Poulain <benjamin@webkit.org>
Do not create new set for every sub-operation when converting a NFA to DFA
https://bugs.webkit.org/show_bug.cgi?id=140380
Reviewed by Andreas Kling.
This is the first step toward making the NFA-to-DFA conversion more scalable: instead
of creating new sets for each step of the algorithm, we use two kinds of sets
and never do any copy.
The first new tool to do that is UniqueNodeIdSetImpl. It represents a set of NFA state corresponding to a DFA
state. It is unique per DFA state.
HashableNodeIdSet is a helper tool storing a UniqueNodeIdSetImpl.
The creation of new sets now goes like this:
1) Get a NodeIdSet for each possible transition.
2) For each transition:
2a) Extend the NodeIdSet in place with its epsilon closure.
2b) Get the UniqueNodeIdSetImpl corresponding to the new set we discovered.
2c) If the UniqueNodeIdSetImpl is new, queue it for processing.
* WebCore.xcodeproj/project.pbxproj:
* contentextensions/ContentExtensionsDebugging.h: Copied from Source/WebCore/contentextensions/DFANode.h.
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
* contentextensions/ContentExtensionsManager.cpp:
(WebCore::ContentExtensions::ExtensionsManager::loadExtension):
Added some logging to inspect more easily what the clients are sending.
* contentextensions/DFA.cpp:
* contentextensions/DFA.h:
* contentextensions/DFANode.h:
* contentextensions/NFA.cpp:
* contentextensions/NFA.h:
* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::epsilonClosure):
Instead of returning a new HashSet, extend the input HashSet.
(WebCore::ContentExtensions::UniqueNodeIdSetImpl::buffer):
(WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
(WebCore::ContentExtensions::UniqueNodeIdSet::operator=):
(WebCore::ContentExtensions::UniqueNodeIdSet::~UniqueNodeIdSet):
(WebCore::ContentExtensions::UniqueNodeIdSet::operator==):
(WebCore::ContentExtensions::UniqueNodeIdSet::impl):
(WebCore::ContentExtensions::UniqueNodeIdSet::hash):
(WebCore::ContentExtensions::UniqueNodeIdSet::isEmptyValue):
(WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):
(WebCore::ContentExtensions::UniqueNodeIdSetHash::hash):
(WebCore::ContentExtensions::UniqueNodeIdSetHash::equal):
UniqueNodeIdSetImpl is a compact representation of a NodeIdSet corresponding to a DFA node.
It is never built directly, it is only built on demand through NodeIdSetToUniqueNodeIdSetTranslator
from a NodeIdSet.
(WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource):
(WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::hash):
(WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::equal):
(WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
(WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::operator[]):
(WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::size):
(WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::begin):
(WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::end):
(WebCore::ContentExtensions::populateTransitionsExcludingEpsilon):
(WebCore::ContentExtensions::NFAToDFA::convert):
(WebCore::ContentExtensions::setTransitionsExcludingEpsilon): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSet::HashableNodeIdSet): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSet::operator=): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSet::isEmptyValue): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSet::isDeletedValue): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSet::nodeIdSet): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSetHash::hash): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSetHash::equal): Deleted.
(WebCore::ContentExtensions::addDFAState): Deleted.
2015-01-14 Chris Dumez <cdumez@apple.com>
Make 'TypeName' parameter unnecessary in CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=140347
Reviewed by Darin Adler.
Make 'TypeName' parameter unnecessary in CSSPropertyNames.in by:
- Removing the static_cast to the destination type in the generated
StyleBuilder code and let compiler implicitly convert the
CSSPrimitiveValue to the setter's argument type.
- Updating conditional converters to return a WTF::Optional<>
instead of returning a boolean and having an output argument
passed by reference. This way, we can use "auto" in the generated
StyleBuilder code to deduce the return type.
* css/CSSPropertyNames.in:
Drop TypeName parameter from all properties as it is no longer needed.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertGridTrackSize):
(WebCore::StyleBuilderConverter::convertGridPosition):
(WebCore::StyleBuilderConverter::convertWordSpacing):
(WebCore::StyleBuilderConverter::convertPerspective):
(WebCore::StyleBuilderConverter::convertMarqueeIncrement):
(WebCore::StyleBuilderConverter::convertFilterOperations):
(WebCore::StyleBuilderConverter::convertMaskImageOperations):
Update conditional converters to return an Optional<>.
* css/makeprop.pl:
(generateValueSetter):
Drop support for TypeName, stop using static_cast to destination
type and update the generated code now that the conditional
converters return an Optional.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::systemFont):
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::setIsItalic):
(WebCore::FontDescription::setIsSmallCaps):
(WebCore::FontDescription::setItalic): Deleted.
(WebCore::FontDescription::setSmallCaps): Deleted.
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::systemFont):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemFont):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemFont):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::systemFont):
* rendering/RenderThemeWin.cpp:
(WebCore::fillFontDescription):
* rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::updateStyle):
Now that we call the RenderStyle setters with a CSSPrimitiveValue
and let it be implicitly converted to the right type, instead of
doing an explicit static_cast, two setters on FontDescription
were ambiguous: setItalic() / setSmallCaps(). Rename the overloads
taking a boolean in argument to setIsItalic() / setIsSmallCaps()
to resolve the ambiguity.
2015-01-14 Jer Noble <jer.noble@apple.com>
Null-deref crash when seeking immediately before looping.
https://bugs.webkit.org/show_bug.cgi?id=140394
Reviewed by Eric Carlson.
It is possible for finishSeek() to be called when a seek() has caused a pending seek task
to be scheduled, but before that pending seek task is run. In this case, if a seek request
is issued, the existing pending seek task will not be cancelled, which will cause a crash
when the pending seek task is run.
When checking whether an existing seek task needs to be cancelled, check the actual timer,
rather than the m_seeking boolean, so that this case is covered.
Test: media/video-ended-seek-crash.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::seekWithTolerance):
2015-01-14 Brent Fulgham <bfulgham@apple.com>
[Win] Layout Test fast/css/crash-on-custom-cursor-when-loading.html is failing
https://bugs.webkit.org/show_bug.cgi?id=140425
Reviewed by Anders Carlsson.
* platform/win/CursorWin.cpp:
(WebCore::createSharedCursor): Return nullptr when operating system
cannot support the requested icon specification.
(WebCore::Cursor::ensurePlatformCursor): Check for 'createSharedCursor'
returning nullptr, and fall back to the default icon construction.
2015-01-14 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r178367): [GStreamer] Several media tests time out after r178367
https://bugs.webkit.org/show_bug.cgi?id=140437
Reviewed by Philippe Normand.
Add implementation for MediaPlayerPrivate::rate() to GStreamer
media backend.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::rate):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2015-01-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178390, r178392, r178398, r178400,
r178402, and r178410.
https://bugs.webkit.org/show_bug.cgi?id=140431
Way too many failures to skip (Requested by ap_ on #webkit).
Reverted changesets:
"WebGL2: Support webgl2 context creation."
https://bugs.webkit.org/show_bug.cgi?id=126408
http://trac.webkit.org/changeset/178390
"Unreviewed iOS build fix after r178390."
http://trac.webkit.org/changeset/178392
"[Unreviewed] Windows build fix after r178390."
http://trac.webkit.org/changeset/178398
"[Unreviewed] Speculative test fix after r178390."
http://trac.webkit.org/changeset/178400
"[Unreviewed] Skip webgl tests for temporarily."
https://bugs.webkit.org/show_bug.cgi?id=140423
http://trac.webkit.org/changeset/178402
"[EFL] Fix build after r178390"
https://bugs.webkit.org/show_bug.cgi?id=140424
http://trac.webkit.org/changeset/178410
2015-01-13 Hunseop Jeong <hs85.jeong@samsung.com>
[EFL] Fix build after r178390
https://bugs.webkit.org/show_bug.cgi?id=140424
Reviewed by Csaba Osztrogonác.
* CMakeLists.txt:
2015-01-13 Zalan Bujtas <zalan@apple.com>
Simple line layout: Refactor TextFragment class.
https://bugs.webkit.org/show_bug.cgi?id=140417
Reviewed by Andreas Kling.
Introduce text fragment type and use class member initializers.
No change in functionality.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::LineState::addUncommitted):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::nextFragment):
(WebCore::SimpleLineLayout::createLineRuns):
2015-01-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178400.
https://bugs.webkit.org/show_bug.cgi?id=140422
Test fix breaks build (Requested by rfong on #webkit).
Reverted changeset:
"[Unreviewed] Speculative test fix after r178390."
http://trac.webkit.org/changeset/178400
2015-01-13 Roger Fong <roger_fong@apple.com>
[Unreviewed] Speculative test fix after r178390.
* html/canvas/WebGL1RenderingContext.idl:
2015-01-13 Roger Fong <roger_fong@apple.com>
[Unreviewed] Windows build fix after r178390.
* DerivedSources.cpp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* bindings/js/JSBindingsAllInOne.cpp:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
2015-01-13 Joseph Pecoraro <pecoraro@apple.com>
NSButtonCell leak allocated under WebCore::paintToggleButton
https://bugs.webkit.org/show_bug.cgi?id=137014
Reviewed by Alexey Proskuryakov.
* platform/mac/ThemeMac.mm:
(WebCore::createToggleButtonCell):
Immediately adopt the NSButtonCell allocation.
(WebCore::sharedRadioCell):
(WebCore::sharedCheckboxCell):
Move from the RetainPtr into the static variable.
(WebCore::paintToggleButton):
Use RetainPtr logic to better manage lifetimes.
2015-01-13 Zalan Bujtas <zalan@apple.com>
Simple line layout: Refactor SimpleLineLayout::nextFragment().
https://bugs.webkit.org/show_bug.cgi?id=140407
Reviewed by Andreas Kling.
Simplify the code by using content specific branches with early returns.
No change in functionality.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::nextFragment):
2015-01-13 Chris Dumez <cdumez@apple.com>
Unreviewed iOS build fix after r178390.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
m_type is undeclared.
* html/canvas/WebGLContextGroup.h:
Fix bad include.
2015-01-13 Roger Fong <roger_fong@apple.com>
WebGL2: Support webgl2 context creation.
https://bugs.webkit.org/show_bug.cgi?id=126408
<rdar://problem/15002170>
Reviewed by Dean Jackson.
Tests covered by existing Khronos tests for WebGL 1.0 conformance.
Create a WebGLRenderingContextBase class that extends to a WebGL1RenderingContext and WebGL2RenderingContext.
Replace all previous instances of WebGLRenderingContext usages with WebGLRenderingContextBase usages for now.
As the first step, the WebGL1 and WebGL2 contexts will have the exact same functionality.
* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/js/JSDocumentCustom.cpp:
* bindings/js/JSHTMLCanvasElementCustom.cpp:
* bindings/js/JSWebGL1RenderingContextCustom.cpp: Copied from Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp.
* bindings/js/JSWebGL2RenderingContextCustom.cpp: Added.
(WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
* bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Added.
* bindings/js/JSWebGLRenderingContextCustom.cpp: Removed.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::is3dType):
(WebCore::HTMLCanvasElement::reset):
(WebCore::HTMLCanvasElement::paint):
(WebCore::HTMLCanvasElement::getImageData):
* html/canvas/ANGLEInstancedArrays.cpp:
(WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
(WebCore::ANGLEInstancedArrays::supported):
* html/canvas/ANGLEInstancedArrays.h:
* html/canvas/CanvasRenderingContext.h:
(WebCore::CanvasRenderingContext::type):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
* html/canvas/EXTBlendMinMax.cpp:
(WebCore::EXTBlendMinMax::EXTBlendMinMax):
* html/canvas/EXTBlendMinMax.h:
* html/canvas/EXTFragDepth.cpp:
(WebCore::EXTFragDepth::EXTFragDepth):
* html/canvas/EXTFragDepth.h:
* html/canvas/EXTShaderTextureLOD.cpp:
(WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
* html/canvas/EXTShaderTextureLOD.h:
* html/canvas/EXTTextureFilterAnisotropic.cpp:
(WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):
* html/canvas/EXTTextureFilterAnisotropic.h:
* html/canvas/EXTsRGB.cpp:
(WebCore::EXTsRGB::EXTsRGB):
* html/canvas/EXTsRGB.h:
* html/canvas/OESElementIndexUint.cpp:
(WebCore::OESElementIndexUint::OESElementIndexUint):
* html/canvas/OESElementIndexUint.h:
* html/canvas/OESStandardDerivatives.cpp:
(WebCore::OESStandardDerivatives::OESStandardDerivatives):
* html/canvas/OESStandardDerivatives.h:
* html/canvas/OESTextureFloat.cpp:
(WebCore::OESTextureFloat::OESTextureFloat):
* html/canvas/OESTextureFloat.h:
* html/canvas/OESTextureFloatLinear.cpp:
(WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
* html/canvas/OESTextureFloatLinear.h:
* html/canvas/OESTextureHalfFloat.cpp:
(WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
* html/canvas/OESTextureHalfFloat.h:
* html/canvas/OESTextureHalfFloatLinear.cpp:
(WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear):
* html/canvas/OESTextureHalfFloatLinear.h:
* html/canvas/OESVertexArrayObject.cpp:
(WebCore::OESVertexArrayObject::OESVertexArrayObject):
* html/canvas/OESVertexArrayObject.h:
* html/canvas/WebGL1RenderingContext.cpp: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.cpp.
* html/canvas/WebGL1RenderingContext.h: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.h.
* html/canvas/WebGL1RenderingContext.idl: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.idl.
* html/canvas/WebGL2RenderingContext.cpp: Added.
(WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
* html/canvas/WebGL2RenderingContext.h: Added.
* html/canvas/WebGL2RenderingContext.idl: Added.
* html/canvas/WebGLBuffer.cpp:
(WebCore::WebGLBuffer::create):
(WebCore::WebGLBuffer::WebGLBuffer):
* html/canvas/WebGLBuffer.h:
* html/canvas/WebGLCompressedTextureATC.cpp:
(WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
(WebCore::WebGLCompressedTextureATC::supported):
* html/canvas/WebGLCompressedTextureATC.h:
* html/canvas/WebGLCompressedTexturePVRTC.cpp:
(WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
(WebCore::WebGLCompressedTexturePVRTC::supported):
* html/canvas/WebGLCompressedTexturePVRTC.h:
* html/canvas/WebGLCompressedTextureS3TC.cpp:
(WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
(WebCore::WebGLCompressedTextureS3TC::supported):
* html/canvas/WebGLCompressedTextureS3TC.h:
* html/canvas/WebGLContextGroup.cpp:
(WebCore::WebGLContextGroup::getAGraphicsContext3D):
(WebCore::WebGLContextGroup::addContext):
(WebCore::WebGLContextGroup::removeContext):
(WebCore::WebGLContextGroup::loseContextGroup):
* html/canvas/WebGLContextGroup.h:
* html/canvas/WebGLContextObject.cpp:
(WebCore::WebGLContextObject::WebGLContextObject):
* html/canvas/WebGLContextObject.h:
(WebCore::WebGLContextObject::context):
* html/canvas/WebGLDebugRendererInfo.cpp:
(WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo):
* html/canvas/WebGLDebugRendererInfo.h:
* html/canvas/WebGLDebugShaders.cpp:
(WebCore::WebGLDebugShaders::WebGLDebugShaders):
* html/canvas/WebGLDebugShaders.h:
* html/canvas/WebGLDepthTexture.cpp:
(WebCore::WebGLDepthTexture::WebGLDepthTexture):
* html/canvas/WebGLDepthTexture.h:
* html/canvas/WebGLDrawBuffers.cpp:
(WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
(WebCore::WebGLDrawBuffers::supported):
(WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
* html/canvas/WebGLDrawBuffers.h:
* html/canvas/WebGLExtension.cpp:
(WebCore::WebGLExtension::WebGLExtension):
* html/canvas/WebGLExtension.h:
(WebCore::WebGLExtension::context):
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::create):
(WebCore::WebGLFramebuffer::WebGLFramebuffer):
* html/canvas/WebGLFramebuffer.h:
* html/canvas/WebGLLoseContext.cpp:
(WebCore::WebGLLoseContext::WebGLLoseContext):
(WebCore::WebGLLoseContext::loseContext):
* html/canvas/WebGLLoseContext.h:
* html/canvas/WebGLObject.cpp:
(WebCore::WebGLObject::WebGLObject):
* html/canvas/WebGLObject.h:
* html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::create):
(WebCore::WebGLProgram::WebGLProgram):
* html/canvas/WebGLProgram.h:
* html/canvas/WebGLRenderbuffer.cpp:
(WebCore::WebGLRenderbuffer::create):
(WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
* html/canvas/WebGLRenderbuffer.h:
* html/canvas/WebGLRenderingContext.cpp: Removed.
* html/canvas/WebGLRenderingContext.h: Removed.
* html/canvas/WebGLRenderingContext.idl: Removed.
* html/canvas/WebGLRenderingContextBase.cpp: Added.
* html/canvas/WebGLRenderingContextBase.h: Added.
* html/canvas/WebGLRenderingContextBase.idl: Added.
* html/canvas/WebGLShader.cpp:
(WebCore::WebGLShader::create):
(WebCore::WebGLShader::WebGLShader):
* html/canvas/WebGLShader.h:
* html/canvas/WebGLSharedObject.cpp:
(WebCore::WebGLSharedObject::WebGLSharedObject):
* html/canvas/WebGLSharedObject.h:
* html/canvas/WebGLTexture.cpp:
(WebCore::WebGLTexture::create):
(WebCore::WebGLTexture::WebGLTexture):
* html/canvas/WebGLTexture.h:
* html/canvas/WebGLVertexArrayObjectOES.cpp:
(WebCore::WebGLVertexArrayObjectOES::create):
(WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
* html/canvas/WebGLVertexArrayObjectOES.h:
2015-01-13 Chris Dumez <cdumez@apple.com>
Unreviewed, fix Mac build after r178388
FontRanges::isEmpty() -> FontRanges::isNull().
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::fontDataForCombiningCharacterSequence):
2015-01-13 Antti Koivisto <antti@apple.com>
Devirtualize FontData
https://bugs.webkit.org/show_bug.cgi?id=140390
Reviewed by Andreas Kling.
This patch removes the FontData base class and turns SegmentedFontData into a non-virtual FontRanges type.
SimpleFontData remains as is (without the base) and it can be renamed later to something more sensible.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::fontRangesForFamily):
(WebCore::CSSFontSelector::fallbackFontDataAt):
(WebCore::CSSFontSelector::getFontData): Deleted.
(WebCore::CSSFontSelector::getFallbackFontData): Deleted.
* css/CSSFontSelector.h:
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::pruneTable):
(WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading):
(WebCore::CSSSegmentedFontFace::fontRanges):
(WebCore::CSSSegmentedFontFace::loadFont):
(WebCore::CSSSegmentedFontFace::getFontData): Deleted.
* css/CSSSegmentedFontFace.h:
* platform/graphics/Font.h:
(WebCore::Font::fallbackRangesAt):
(WebCore::Font::fontDataAt): Deleted.
* platform/graphics/FontData.cpp: Removed.
* platform/graphics/FontData.h: Removed.
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::FontGlyphs::determinePitch):
(WebCore::FontGlyphs::isLoadingCustomFonts):
(WebCore::realizeNextFallback):
(WebCore::FontGlyphs::realizeFallbackRangesAt):
(WebCore::FontGlyphs::glyphDataForSystemFallback):
(WebCore::FontGlyphs::glyphDataForVariant):
(WebCore::FontGlyphs::glyphDataForNormalVariant):
(WebCore::glyphPageFromFontRanges):
(WebCore::FontGlyphs::glyphDataForCharacter):
(WebCore::realizeNextFamily): Deleted.
(WebCore::FontGlyphs::realizeFontDataAt): Deleted.
(WebCore::glyphPageFromFontData): Deleted.
* platform/graphics/FontGlyphs.h:
(WebCore::FontGlyphs::primarySimpleFontData):
* platform/graphics/FontRanges.cpp: Copied from Source/WebCore/platform/graphics/SegmentedFontData.cpp.
(WebCore::FontRanges::FontRanges):
(WebCore::FontRanges::~FontRanges):
(WebCore::FontRanges::fontDataForCharacter):
(WebCore::FontRanges::fontDataForFirstRange):
(WebCore::FontRanges::isLoading):
(WebCore::SegmentedFontData::SegmentedFontData): Deleted.
(WebCore::SegmentedFontData::~SegmentedFontData): Deleted.
(WebCore::SegmentedFontData::simpleFontDataForCharacter): Deleted.
(WebCore::SegmentedFontData::simpleFontDataForFirstRange): Deleted.
(WebCore::SegmentedFontData::isCustomFont): Deleted.
(WebCore::SegmentedFontData::isLoading): Deleted.
(WebCore::SegmentedFontData::isSegmented): Deleted.
(WebCore::SegmentedFontData::description): Deleted.
* platform/graphics/FontRanges.h: Copied from Source/WebCore/platform/graphics/SegmentedFontData.h.
(WebCore::FontRanges::Range::Range):
(WebCore::FontRanges::Range::from):
(WebCore::FontRanges::Range::to):
(WebCore::FontRanges::Range::fontData):
(WebCore::FontRanges::isEmpty):
(WebCore::FontRanges::appendRange):
(WebCore::FontRanges::size):
(WebCore::FontRanges::rangeAt):
(WebCore::FontDataRange::FontDataRange): Deleted.
(WebCore::FontDataRange::from): Deleted.
(WebCore::FontDataRange::to): Deleted.
(WebCore::FontDataRange::fontData): Deleted.
(WebCore::SegmentedFontData::create): Deleted.
(WebCore::SegmentedFontData::appendRange): Deleted.
(WebCore::SegmentedFontData::numRanges): Deleted.
(WebCore::SegmentedFontData::rangeAt): Deleted.
(isType): Deleted.
* platform/graphics/FontSelector.h:
* platform/graphics/SegmentedFontData.cpp: Removed.
* platform/graphics/SegmentedFontData.h: Removed.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::simpleFontDataForCharacter): Deleted.
(WebCore::SimpleFontData::simpleFontDataForFirstRange): Deleted.
(WebCore::SimpleFontData::isSegmented): Deleted.
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::isCustomFont):
(WebCore::SimpleFontData::isLoading):
(isType): Deleted.
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(-[WebCascadeList initWithFont:character:]):
(-[WebCascadeList objectAtIndex:]):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::fontDataForCombiningCharacterSequence):
2015-01-13 Dean Jackson <dino@apple.com>
Filters aren't applied to elements in columns after the first
https://bugs.webkit.org/show_bug.cgi?id=140331
Reviewed by Simon Fraser.
The important bits of this change came from Simon.
Filters and clipping were not taking columns into
account when using their offset rectangles. The fix
is to recalculate the rects if you're in such a
situation.
Tests: fast/multicol/clip-in-columns.html
fast/multicol/filter-in-columns.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hasFilterThatIsPainting): New method used
to check if we're about to paint a filter.
(WebCore::RenderLayer::setupFilters): Use the new helper if possible.
(WebCore::RenderLayer::paintLayerContents): If we're in columns,
and we either have a clip or a filter, recalculate the offset rectangles.
* rendering/RenderLayer.h:
2015-01-13 Beth Dakin <bdakin@apple.com>
Should disable immediate actions for iTunes
https://bugs.webkit.org/show_bug.cgi?id=140405
-and corresponding-
rdar://problem/19461358
Reviewed by Tim Horton.
* WebCore.exp.in:
2015-01-13 Anders Carlsson <andersca@apple.com>
Remove pure virtual functions from DatabaseBackendBase
https://bugs.webkit.org/show_bug.cgi?id=140402
Reviewed by Sam Weinig.
Also change DatabaseBackendBase to Database in a couple of places.
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::DatabaseBackendBase::closeDatabase):
(WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
(WebCore::DatabaseBackendBase::performOpenAndVerify):
(WebCore::DatabaseBackendBase::maximumSize):
* Modules/webdatabase/DatabaseBackendBase.h:
* Modules/webdatabase/DatabaseServer.cpp:
(WebCore::DatabaseServer::createDatabase):
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::getMaxSizeForDatabase):
(WebCore::DatabaseTracker::doneCreatingDatabase):
(WebCore::DatabaseTracker::addOpenDatabase):
(WebCore::DatabaseTracker::removeOpenDatabase):
(WebCore::DatabaseTracker::getOpenDatabases):
(WebCore::DatabaseTracker::deleteDatabaseFile):
* Modules/webdatabase/DatabaseTracker.h:
2015-01-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused ResizeImage and DecodeImageData timeline events
https://bugs.webkit.org/show_bug.cgi?id=140404
Reviewed by Timothy Hatcher.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::toProtocol):
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createDecodeImageData): Deleted.
(WebCore::TimelineRecordFactory::createResizeImageData): Deleted.
* inspector/TimelineRecordFactory.h:
2015-01-13 Jer Noble <jer.noble@apple.com>
defaultPlaybackRate not respected when set before source is loaded
https://bugs.webkit.org/show_bug.cgi?id=140282
Reviewed by Eric Carlson.
Test: media/video-defaultplaybackrate-before-load.html
When the HTMLMediaElement is notified that the media player's rate has changed, it asks
for the rate from MediaPlayer. However, MediaPlayer never requests the playback rate
from the underlying MediaPlayerPrivate; it just returns the last rate which was set, or
1 if no rate was set. HTMLMediaElement then sets its playbackRate to the returned
value. So the end result is that the value from defaultPlaybackRate is overwritten by
the default value of 1 in MediaPlayer.
Rather than caching the requested rate in MediaPlayer, cache the value reported by
MediaPlayer inside HTMLMediaElement. And instead of returning the reported playback
rate from HTMLMediaElement.playbackRate, just return the last value set. The reported
value is still used for estimating the current time during playback.
Add MediaPlayerPrivate interface method to return the current playback rate.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_reportedPlaybackRate.
(WebCore::HTMLMediaElement::effectivePlaybackRate): Return m_reportedPlaybackRate.
(WebCore::HTMLMediaElement::requestedPlaybackRate): Return m_playbackRate.
(WebCore::HTMLMediaElement::updatePlaybackRate): Use requestedPlaybackRate() instead
of effectivePlaybackRate();
(WebCore::HTMLMediaElement::ended): Ditto.
(WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
(WebCore::HTMLMediaElement::endedPlayback): Ditto.
(WebCore::HTMLMediaElement::updatePlayState): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerRateChanged): Set m_reportedPlaybackRate.
(WebCore::HTMLMediaElement::mediaPlayerRequestedPlaybackRate): Return
requestedPlaybackRate() if playing and 0 if not.
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::MediaPlayer): Removed m_rate.
(WebCore::MediaPlayer::rate): Pass to MediaPlayerPrivate.
(WebCore::MediaPlayer::setRate): Do not cache the rate.
(WebCore::MediaPlayer::requestedRate): Added; ask HTMLMediaElement.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerRequestedPlaybackRate): Added.
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::rate): Added.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
Do not cache the requested rate.
(WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Pass to MediaPlayer.
(WebCore::MediaPlayerPrivateAVFoundation::setRate): Deleted.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Deleted.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::setRate): Renamed from updateRate.
(WebCore::MediaPlayerPrivateAVFoundationCF::rate): Fetch the rate from the player.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Renamed from updateRate.
(WebCore::MediaPlayerPrivateAVFoundationObjC::rate): Fetch the rate from the player.
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::rate): Fetch the rate from the QTMovie.
2015-01-13 Andreas Kling <akling@apple.com>
Element::normalizeAttributes() needs to handle arbitrary JS executing between loop iterations.
<https://webkit.org/b/140379>
<rdar://problem/19446901>
Reviewed by Benjamin Poulain.
Since DOM mutation events may arise below the call to Node::normalize(),
have the loop in Element::normalizeAttributes() make a copy of the Attr nodes
beforehand, to guard against mutations.
Based on a patch by Chris "Chris Dumez" Dumez.
Test: fast/dom/Element/normalize-crash2.html
* dom/Element.cpp:
(WebCore::Element::normalizeAttributes):
2015-01-13 Shivakumar JM <shiva.jm@samsung.com>
Fix Debug Build Error in Webcore module.
https://bugs.webkit.org/show_bug.cgi?id=140383
Reviewed by Csaba Osztrogonác.
No new tests because there is no visible behavior change.
* platform/linux/MemoryPressureHandlerLinux.cpp:
(WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
2015-01-12 Benjamin Poulain <benjamin@webkit.org>
Fix a typo in r178313
* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
2015-01-12 Benjamin Poulain <benjamin@webkit.org>
Add basic pattern matching support to the url filters
https://bugs.webkit.org/show_bug.cgi?id=140283
Reviewed by Andreas Kling.
This patch adds some basic generic pattern support for the url filters
of ContentExtensions.
Instead of writting a new parser, I re-used Gavin's parser for JavaScript
RegExp.
This patch only implements the very basic stuffs: transition on any character
and repetition.
* WebCore.xcodeproj/project.pbxproj:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
Use the new parser.
* contentextensions/DFA.cpp:
(WebCore::ContentExtensions::DFA::DFA):
(WebCore::ContentExtensions::printRange):
(WebCore::ContentExtensions::printTransition):
(WebCore::ContentExtensions::DFA::debugPrintDot):
* contentextensions/NFA.cpp:
(WebCore::ContentExtensions::printRange):
(WebCore::ContentExtensions::printTransition):
(WebCore::ContentExtensions::NFA::debugPrintDot):
The graphs generated with the extended patterns are vastly more complicated
than the old prefix matcher.
I changed the debug output to have a single link between any two nodes
instead of one per transition. This makes the graph a little more manageable.
* contentextensions/NFA.cpp:
(WebCore::ContentExtensions::NFA::addTransition):
(WebCore::ContentExtensions::NFA::addEpsilonTransition):
(WebCore::ContentExtensions::NFA::graphSize):
(WebCore::ContentExtensions::NFA::restoreToGraphSize):
* contentextensions/NFA.h:
* contentextensions/NFANode.h:
(WebCore::ContentExtensions::epsilonClosure):
The new parser can generate transitions back to the root node of index zero.
All the hash structures had to be updated to support this kind of key.
* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::HashableNodeIdSetHash::hash):
Two tiny improvements:
-Don't hash zero to zero, it causes more conflicts that needed.
-The hash operation must use a commutative operation, otherwise the order
of elements can affect the hash, which is undesired for a set.
I'll improve this further later.
(WebCore::ContentExtensions::NFAToDFA::convert):
* contentextensions/URLFilterParser.cpp: Added.
(WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
(WebCore::ContentExtensions::GraphBuilder::m_lastAtom):
(WebCore::ContentExtensions::GraphBuilder::finalize):
(WebCore::ContentExtensions::GraphBuilder::errorMessage):
(WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
(WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
(WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
(WebCore::ContentExtensions::GraphBuilder::atomBackReference):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
(WebCore::ContentExtensions::GraphBuilder::assertionBOL):
(WebCore::ContentExtensions::GraphBuilder::assertionEOL):
(WebCore::ContentExtensions::GraphBuilder::assertionWordBoundary):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBegin):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassEnd):
(WebCore::ContentExtensions::GraphBuilder::atomParenthesesSubpatternBegin):
(WebCore::ContentExtensions::GraphBuilder::atomParentheticalAssertionBegin):
(WebCore::ContentExtensions::GraphBuilder::atomParenthesesEnd):
(WebCore::ContentExtensions::GraphBuilder::disjunction):
(WebCore::ContentExtensions::GraphBuilder::hasError):
(WebCore::ContentExtensions::GraphBuilder::fail):
(WebCore::ContentExtensions::URLFilterParser::parse):
* contentextensions/URLFilterParser.h:
(WebCore::ContentExtensions::URLFilterParser::hasError):
(WebCore::ContentExtensions::URLFilterParser::errorMessage):
2015-01-11 Sam Weinig <sam@webkit.org>
Remove support for SharedWorkers
https://bugs.webkit.org/show_bug.cgi?id=140344
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.cpp:
* DerivedSources.make:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::sharedWorkerEnabled): Deleted.
* bindings/generic/RuntimeEnabledFeatures.h:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/js/JSSharedWorkerCustom.cpp: Removed.
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::toJSWorkerGlobalScope):
(WebCore::toJSSharedWorkerGlobalScope): Deleted.
* bindings/js/JSWorkerGlobalScopeBase.h:
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::initScript):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/preprocess-idls.pl:
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
* dom/EventTarget.h:
* dom/EventTargetFactory.in:
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* loader/FrameLoader.cpp:
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::canAccessLocalStorage):
(WebCore::SecurityOrigin::canAccessSharedWorkers): Deleted.
* platform/FeatureCounterKeys.h:
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::PlatformStrategies):
(WebCore::PlatformStrategies::sharedWorkerStrategy): Deleted.
* workers/DefaultSharedWorkerRepository.cpp: Removed.
* workers/DefaultSharedWorkerRepository.h: Removed.
* workers/SharedWorker.cpp: Removed.
* workers/SharedWorker.h: Removed.
* workers/SharedWorker.idl: Removed.
* workers/SharedWorkerGlobalScope.cpp: Removed.
* workers/SharedWorkerGlobalScope.h: Removed.
* workers/SharedWorkerGlobalScope.idl: Removed.
* workers/SharedWorkerRepository.cpp: Removed.
* workers/SharedWorkerRepository.h: Removed.
* workers/SharedWorkerStrategy.h: Removed.
* workers/SharedWorkerThread.cpp: Removed.
* workers/SharedWorkerThread.h: Removed.
* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::isSharedWorkerGlobalScope): Deleted.
2015-01-12 Byungseon Shin <sun.shin@lge.com>
REGRESSION(r178029): [GTK][EFL] Caused no-backing-for-clip-overlap test failures
https://bugs.webkit.org/show_bug.cgi?id=140336
Reviewed by Simon Fraser.
Avoid creating childClippingMaskLayer when renderer has not border radius nor clip path.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateChildClippingStrategy):
2015-01-12 Myles C. Maxfield <mmaxfield@apple.com>
[Apple] Squelch stderr log regarding negative stroke thickness
https://bugs.webkit.org/show_bug.cgi?id=140372
<rdar://problem/19426485>
Reviewed by Eric Carlson.
No new tests because there is no visible behavior change.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setPlatformStrokeThickness):
2015-01-12 Timothy Horton <timothy_horton@apple.com>
Get rid of unnecessary reimplementations of CGFloor/Ceiling
https://bugs.webkit.org/show_bug.cgi?id=140375
Reviewed by Simon Fraser.
* platform/mac/DragImageMac.mm:
(WebCore::widthWithFont):
(WebCore::drawAtPoint):
(WebCore::webkit_CGCeiling): Deleted.
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController windowDidLoad]):
(webkit_CGFloor): Deleted.
Delete unnecessary code, use the real CGFloor/Ceiling instead.
2015-01-12 Timothy Horton <timothy_horton@apple.com>
REGRESSION (r177656): Text in find-in-page yellow bouncy rectangle is not crisp
https://bugs.webkit.org/show_bug.cgi?id=140373
<rdar://problem/19447156>
Reviewed by Simon Fraser.
* page/mac/TextIndicatorWindow.mm:
(WebCore::TextIndicatorWindow::setTextIndicator):
Expand the window margin to the nearest integer.
The window was already being pixel-snapped, but then we'd translate by
the non-integral margin when building up the layer tree.
It's OK to do this on 2x because it's fine to have the margin be bigger
than needed.
* platform/spi/cg/CoreGraphicsSPI.h:
Add a CGCeiling to match CGFloor.
2015-01-12 Andreas Kling <akling@apple.com>
Guard web thread stuff with USE(WEB_THREAD) instead of PLATFORM(IOS).
Dan pointed out that we should guard WebThreadIsLockedOrDisabled() with
USE(WEB_THREAD) to communicate our ambitions to someday have an iOS
build of WebKit that doesn't need any of that.
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::resume):
2015-01-12 Andreas Kling <akling@apple.com>
Fix build for non-iOS platforms. :|
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::resume):
2015-01-12 Carlos Alberto Lopez Perez <clopez@igalia.com>
[Freetype] Don't use non-scalable fonts.
https://bugs.webkit.org/show_bug.cgi?id=31931
Reviewed by Martin Robinson.
No new tests needed.
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::createFontPlatformData): Prefer scalable fonts.
2015-01-12 Andreas Kling <akling@apple.com>
Geolocation objects shouldn't prevent page caching.
<https://webkit.org/b/140369>
Reviewed by Joseph Pecoraro.
Enable the code for suspend/resume of Geolocation objects on all platforms
instead of just iOS. This allows pages using geolocation to use page cache
instead of reloading on back/forward navigation.
Test: fast/history/page-cache-geolocation.html
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::Geolocation):
(WebCore::Geolocation::resetAllGeolocationPermission):
(WebCore::Geolocation::stop):
(WebCore::Geolocation::setIsAllowed):
(WebCore::Geolocation::positionChanged):
(WebCore::Geolocation::setError):
* Modules/geolocation/Geolocation.h:
2015-01-12 Chris Dumez <cdumez@apple.com>
Log navigation types using DiagnosticLoggingClient
https://bugs.webkit.org/show_bug.cgi?id=140323
Reviewed by Darin Adler.
Log navigation types using DiagnosticLoggingClient to help us understand
what types of navigations are common and give us an estimate on the
total number of navigations.
* loader/FrameLoader.cpp:
(WebCore::logNavigation):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::logNavigationWithFeatureCounter): Deleted.
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::navigationKey):
* page/DiagnosticLoggingKeys.h:
2015-01-12 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: ASSERT under WebCore::InspectorResourceAgent::loadResource
https://bugs.webkit.org/show_bug.cgi?id=140367
Reviewed by Andreas Kling.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::loadResource): use copyRef() instead of move(),
since we check the callback after giving it to the loader client.
2015-01-12 Anders Carlsson <andersca@apple.com>
Move DatabaseBackend functions back to Database
https://bugs.webkit.org/show_bug.cgi?id=140368
Reviewed by Sam Weinig.
* Modules/webdatabase/Database.cpp:
(WebCore::Database::openAndVerifyVersion):
(WebCore::Database::close):
(WebCore::Database::performOpenAndVerify):
(WebCore::Database::scheduleTransaction):
(WebCore::Database::runTransaction):
(WebCore::Database::scheduleTransactionStep):
(WebCore::Database::inProgressTransactionCompleted):
(WebCore::Database::transactionClient):
(WebCore::Database::transactionCoordinator):
* Modules/webdatabase/Database.h:
* Modules/webdatabase/DatabaseBackend.cpp:
(WebCore::DatabaseBackend::openAndVerifyVersion): Deleted.
(WebCore::DatabaseBackend::performOpenAndVerify): Deleted.
(WebCore::DatabaseBackend::close): Deleted.
(WebCore::DatabaseBackend::runTransaction): Deleted.
(WebCore::DatabaseBackend::inProgressTransactionCompleted): Deleted.
(WebCore::DatabaseBackend::scheduleTransaction): Deleted.
(WebCore::DatabaseBackend::scheduleTransactionStep): Deleted.
(WebCore::DatabaseBackend::transactionClient): Deleted.
(WebCore::DatabaseBackend::transactionCoordinator): Deleted.
* Modules/webdatabase/DatabaseBackend.h:
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::recordDatabaseOpen):
(WebCore::DatabaseThread::recordDatabaseClosed):
(WebCore::SameDatabasePredicate::SameDatabasePredicate):
(WebCore::DatabaseThread::unscheduleDatabaseTasks):
* Modules/webdatabase/DatabaseThread.h:
* Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::create):
(WebCore::SQLTransactionBackend::SQLTransactionBackend):
* Modules/webdatabase/SQLTransactionBackend.h:
(WebCore::SQLTransactionBackend::database):
2015-01-12 Myles C. Maxfield <mmaxfield@apple.com>
Addressing post-review comment after r178292
https://bugs.webkit.org/show_bug.cgi?id=136769
Unreviewed.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData):
2015-01-12 Myles C. Maxfield <mmaxfield@apple.com>
Allow targetting the SVG->OTF font converter with ENABLE(SVG_OTF_CONVERTER)
https://bugs.webkit.org/show_bug.cgi?id=136769
Reviewed by Antti Koivisto.
If ENABLE(SVG_OTF_CONVERTER) is defined, use the converter. It can be defined at the same
time as ENABLE(SVG_FONTS) but, if so, the SVG font code will be dead code.
No new tests because the define is off by default. Tests will come soon, I promise.
* Configurations/FeatureDefines.xcconfig:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): When creating a font, if the ENABLE is on,
do the transcode and take the non-SVG path.
(WebCore::CSSFontFaceSource::ensureFontData): Pass extra arguments to
CachedFont::ensureCustomFontData()
* css/CSSFontFaceSource.h: For the case of in-document SVG fonts, keep the transcoded
bytes around.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData): For out-of-document SVG fonts, do the
transcode if the ENABLE is on, then treat as if the font is any old webfont.
(WebCore::CachedFont::getSVGFontById): This function looks up the relevant <font>
element. Modify it to take a pointer to a (possibly external) document within which
to search.
* loader/cache/CachedFont.h: Extra arguments to CachedFont::ensureCustomFontData()
and CachedFont::getSVGFontById()
2015-01-12 Zan Dobersek <zdobersek@igalia.com>
Clean up FrameTree::traverseNext() traversals of main frames
https://bugs.webkit.org/show_bug.cgi?id=140338
Reviewed by Andreas Kling.
There's no reason to pass the main frame as the stayWithin parameter
to FrameTree::traverseNext() when traversing over that same main frame.
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::deleteCookie):
(WebCore::InspectorPageAgent::searchInResources):
* replay/SerializationMethods.cpp:
(WebCore::frameIndexFromFrame):
(WebCore::frameFromFrameIndex):
2015-01-12 Timothy Horton <timothy_horton@apple.com>
Multi-rect TextIndicators are vertically flipped in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=140350
<rdar://problem/19441243>
Reviewed by Beth Dakin.
* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithSelectionInFrame):
(WebCore::TextIndicator::TextIndicator):
* page/TextIndicator.h:
(WebCore::TextIndicator::selectionRectInRootViewCoordinates):
(WebCore::TextIndicator::textBoundingRectInRootViewCoordinates):
(WebCore::TextIndicator::selectionRectInWindowCoordinates): Deleted.
(WebCore::TextIndicator::textBoundingRectInWindowCoordinates): Deleted.
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
(WebCore::TextIndicatorWindow::setTextIndicator):
Compute, store, and use TextIndicator's selectionRect and textBoundingRect
in root view coordinates instead of window coordinates; this way, each
WebKit can do the conversion itself, and the rootView vs. window flipping
isn't wrongly factored into textRectsInBoundingRectCoordinates.
2015-01-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178281.
https://bugs.webkit.org/show_bug.cgi?id=140366
Broke many media tests (Requested by ap on #webkit).
Reverted changeset:
"defaultPlaybackRate not respected when set before source is
loaded"
https://bugs.webkit.org/show_bug.cgi?id=140282
http://trac.webkit.org/changeset/178281
2015-01-12 Anders Carlsson <andersca@apple.com>
Merge DatabaseBackendContext into DatabaseContext
https://bugs.webkit.org/show_bug.cgi?id=140365
Reviewed by Antti Koivisto.
* CMakeLists.txt:
* Modules/webdatabase/AbstractDatabaseServer.h:
* Modules/webdatabase/Database.cpp:
(WebCore::Database::Database):
* Modules/webdatabase/Database.h:
* Modules/webdatabase/DatabaseBackend.cpp:
(WebCore::DatabaseBackend::DatabaseBackend):
* Modules/webdatabase/DatabaseBackend.h:
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::DatabaseBackendBase::DatabaseBackendBase):
* Modules/webdatabase/DatabaseBackendBase.h:
(WebCore::DatabaseBackendBase::databaseContext):
* Modules/webdatabase/DatabaseBackendContext.cpp: Removed.
* Modules/webdatabase/DatabaseBackendContext.h: Removed.
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::securityOrigin):
(WebCore::DatabaseContext::isContextThread):
(WebCore::DatabaseContext::backend): Deleted.
* Modules/webdatabase/DatabaseContext.h:
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabaseBackend):
(WebCore::DatabaseManager::interruptAllDatabasesForContext):
* Modules/webdatabase/DatabaseServer.cpp:
(WebCore::DatabaseServer::interruptAllDatabasesForContext):
(WebCore::DatabaseServer::openDatabase):
(WebCore::DatabaseServer::createDatabase):
* Modules/webdatabase/DatabaseServer.h:
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::canEstablishDatabase):
(WebCore::DatabaseTracker::retryCanEstablishDatabase):
(WebCore::DatabaseTracker::interruptAllDatabasesForContext):
* Modules/webdatabase/DatabaseTracker.h:
* Modules/webdatabase/SQLTransactionBackend.cpp:
* Modules/webdatabase/SQLTransactionClient.cpp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
2015-01-12 Jer Noble <jer.noble@apple.com>
defaultPlaybackRate not respected when set before source is loaded
https://bugs.webkit.org/show_bug.cgi?id=140282
Reviewed by Eric Carlson.
Test: media/video-defaultplaybackrate-before-load.html
When the HTMLMediaElement is notified that the media player's rate has changed, it asks
for the rate from MediaPlayer. However, MediaPlayer never requests the playback rate
from the underlying MediaPlayerPrivate; it just returns the last rate which was set, or
1 if no rate was set. HTMLMediaElement then sets its playbackRate to the returned
value. So the end result is that the value from defaultPlaybackRate is overwritten by
the default value of 1 in MediaPlayer.
Rather than caching the requested rate in MediaPlayer, cache the value reported by
MediaPlayer inside HTMLMediaElement. And instead of returning the reported playback
rate from HTMLMediaElement.playbackRate, just return the last value set. The reported
value is still used for estimating the current time during playback.
Add MediaPlayerPrivate interface method to return the current playback rate.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_reportedPlaybackRate.
(WebCore::HTMLMediaElement::effectivePlaybackRate): Return m_reportedPlaybackRate.
(WebCore::HTMLMediaElement::requestedPlaybackRate): Return m_playbackRate.
(WebCore::HTMLMediaElement::updatePlaybackRate): Use requestedPlaybackRate() instead
of effectivePlaybackRate();
(WebCore::HTMLMediaElement::ended): Ditto.
(WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
(WebCore::HTMLMediaElement::endedPlayback): Ditto.
(WebCore::HTMLMediaElement::updatePlayState): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerRateChanged): Set m_reportedPlaybackRate.
(WebCore::HTMLMediaElement::mediaPlayerRequestedPlaybackRate): Return
requestedPlaybackRate() if playing and 0 if not.
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::MediaPlayer): Removed m_rate.
(WebCore::MediaPlayer::rate): Pass to MediaPlayerPrivate.
(WebCore::MediaPlayer::setRate): Do not cache the rate.
(WebCore::MediaPlayer::requestedRate): Added; ask HTMLMediaElement.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerRequestedPlaybackRate): Added.
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::rate): Added.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
Do not cache the requested rate.
(WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Pass to MediaPlayer.
(WebCore::MediaPlayerPrivateAVFoundation::setRate): Deleted.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Deleted.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::setRate): Renamed from updateRate.
(WebCore::MediaPlayerPrivateAVFoundationCF::rate): Fetch the rate from the player.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Renamed from updateRate.
(WebCore::MediaPlayerPrivateAVFoundationObjC::rate): Fetch the rate from the player.
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::rate): Fetch the rate from the QTMovie.
2015-01-11 Anders Carlsson <andersca@apple.com>
Merge DatabaseBase into Database
https://bugs.webkit.org/show_bug.cgi?id=140345
Reviewed by Antti Koivisto.
* CMakeLists.txt:
* Modules/webdatabase/Database.cpp:
(WebCore::Database::Database):
(WebCore::Database::runTransaction):
(WebCore::Database::logErrorMessage):
* Modules/webdatabase/Database.h:
(WebCore::Database::scriptExecutionContext):
* Modules/webdatabase/DatabaseBackendBase.cpp:
* Modules/webdatabase/DatabaseBackendBase.h:
(WebCore::DatabaseBackendBase::setFrontend):
* Modules/webdatabase/DatabaseBase.cpp: Removed.
* Modules/webdatabase/DatabaseBase.h: Removed.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
2015-01-12 Darin Adler <darin@apple.com>
Modernize and streamline HTMLTokenizer
https://bugs.webkit.org/show_bug.cgi?id=140166
Reviewed by Sam Weinig.
* html/parser/AtomicHTMLToken.h:
(WebCore::AtomicHTMLToken::initializeAttributes): Removed unneeded assertions
based on fields I removed.
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser): Change to use updateStateFor
to set the initial state when parsing a fragment, since it implements the same
rule taht the tokenizerStateForContextElement function did.
(WebCore::HTMLDocumentParser::pumpTokenizer): Updated to use the revised
interfaces for HTMLSourceTracker and HTMLTokenizer.
(WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Changed to take a
TokenPtr instead of an HTMLToken, so we can clear out the TokenPtr earlier
for non-character tokens, and let them get cleared later for character tokens.
(WebCore::HTMLDocumentParser::insert): Pass references.
(WebCore::HTMLDocumentParser::append): Ditto.
(WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan): Ditto.
* html/parser/HTMLDocumentParser.h: Updated argument type for constructTreeFromHTMLToken
and removed now-unneeded m_token data members.
* html/parser/HTMLEntityParser.cpp: Removed unneeded uses of the inline keyword.
(WebCore::HTMLEntityParser::consumeNamedEntity): Replaced two uses of
advanceAndASSERT with just plain advance; there's really no need to assert the
character is the one we just got out of the string.
* html/parser/HTMLInputStream.h: Moved the include of TextPosition.h here from
its old location since this class has two data members that are OrdinalNumber.
* html/parser/HTMLMetaCharsetParser.cpp:
(WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser): Removed most of the
initialization, since it's now done by defaults.
(WebCore::extractCharset): Rewrote this to be a non-member function, and to
use a for loop, and to handle quote marks in a simpler way. Also changed it
to return a StringView so we don't have to allocate a new string.
(WebCore::HTMLMetaCharsetParser::processMeta): Use a modern for loop, and
also take a token argument since it's no longer a data member.
(WebCore::HTMLMetaCharsetParser::encodingFromMetaAttributes): Use a modern for
loop, StringView instead of string, and don't bother naming the local enum.
(WebCore::HTMLMetaCharsetParser::checkForMetaCharset): Updated for the new
way of getting tokens from the tokenizer.
* html/parser/HTMLMetaCharsetParser.h: Got rid of some data members and
tightened up the formatting a little. Don't bother allocating the tokenizer
on the heap.
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::TokenPreloadScanner): Removed unneeded
initialization.
(WebCore::HTMLPreloadScanner::HTMLPreloadScanner): Ditto.
(WebCore::HTMLPreloadScanner::scan): Changed to take a reference.
* html/parser/HTMLPreloadScanner.h: Removed unneeded includes, typedefs,
and forward declarations. Removed explicit declaration of the destructor,
since the default one works. Removed unused createCheckpoint and rewindTo
functions. Gave initial values for various data members. Marked the device
scale factor const beacuse it's set in the constructor and never changed.
Also removed the unneeded isSafeToSendToAnotherThread.
* html/parser/HTMLResourcePreloader.cpp:
(WebCore::PreloadRequest::isSafeToSendToAnotherThread): Deleted.
* html/parser/HTMLResourcePreloader.h:
(WebCore::PreloadRequest::PreloadRequest): Removed unneeded calls to
isolatedCopy. Also removed isSafeToSendToAnotherThread.
* html/parser/HTMLSourceTracker.cpp:
(WebCore::HTMLSourceTracker::startToken): Renamed. Changed to keep state
in the source tracker itself, not the token.
(WebCore::HTMLSourceTracker::endToken): Ditto.
(WebCore::HTMLSourceTracker::source): Renamed. Changed to use the state
from the source tracker.
* html/parser/HTMLSourceTracker.h: Removed unneeded include of HTMLToken.h.
Renamed functions, removed now-unneeded comment.
* html/parser/HTMLToken.h: Cut down on the fields used by the source tracker.
It only needs to know the start and end of each attribute, not each part of
each attribute. Removed setBaseOffset, setEndOffset, length, addNewAttribute,
beginAttributeName, endAttributeName, beginAttributeValue, endAttributeValue,
m_baseOffset and m_length. Added beginAttribute and endAttribute.
(WebCore::HTMLToken::clear): No need to zero m_length or m_baseOffset any more.
(WebCore::HTMLToken::length): Deleted.
(WebCore::HTMLToken::setBaseOffset): Deleted.
(WebCore::HTMLToken::setEndOffset): Deleted.
(WebCore::HTMLToken::beginStartTag): Only null out m_currentAttribute if we
are compiling in assertions.
(WebCore::HTMLToken::beginEndTag): Ditto.
(WebCore::HTMLToken::addNewAttribute): Deleted.
(WebCore::HTMLToken::beginAttribute): Moved the code from addNewAttribute in
here and set the start offset.
(WebCore::HTMLToken::beginAttributeName): Deleted.
(WebCore::HTMLToken::endAttributeName): Deleted.
(WebCore::HTMLToken::beginAttributeValue): Deleted.
(WebCore::HTMLToken::endAttributeValue): Deleted.
* html/parser/HTMLTokenizer.cpp:
(WebCore::HTMLToken::endAttribute): Added. Sets the end offset.
(WebCore::HTMLToken::appendToAttributeName): Updated assertion.
(WebCore::HTMLToken::appendToAttributeValue): Ditto.
(WebCore::convertASCIIAlphaToLower): Renamed from toLowerCase and changed
so it's legal to call on lower case letters too.
(WebCore::vectorEqualsString): Changed to take a string literal rather than
a WTF::String.
(WebCore::HTMLTokenizer::inEndTagBufferingState): Made this a member function.
(WebCore::HTMLTokenizer::HTMLTokenizer): Updated for data member changes.
(WebCore::HTMLTokenizer::bufferASCIICharacter): Added. Optimized version of
bufferCharacter for the common case where we know the character is ASCII.
(WebCore::HTMLTokenizer::bufferCharacter): Moved this function here from the
header since it's only used inside the class.
(WebCore::HTMLTokenizer::emitAndResumeInDataState): Moved this here, renamed
it and removed the state argument.
(WebCore::HTMLTokenizer::emitAndReconsumeInDataState): Ditto.
(WebCore::HTMLTokenizer::emitEndOfFile): More of the same.
(WebCore::HTMLTokenizer::saveEndTagNameIfNeeded): Ditto.
(WebCore::HTMLTokenizer::haveBufferedCharacterToken): Ditto.
(WebCore::HTMLTokenizer::flushBufferedEndTag): Updated since m_token is now
the actual token, not just a pointer.
(WebCore::HTMLTokenizer::flushEmitAndResumeInDataState): Renamed this and
removed the state argument.
(WebCore::HTMLTokenizer::processToken): This function, formerly nextToken,
is now the internal function used by nextToken. Updated its contents to use
simpler macros, changed code to set m_state when returning, rather than
constantly setting it when cycling through states, switched style to use
early return/goto rather than lots of else statements, took out unneeded
braces now that BEGIN/END_STATE handles the braces, collapsed upper and
lower case letter handling in many states, changed lookAhead call sites to
use the new advancePast function instead.
(WebCore::HTMLTokenizer::updateStateFor): Set m_state directly instead of
calling a setstate function.
(WebCore::HTMLTokenizer::appendToTemporaryBuffer): Moved here from header.
(WebCore::HTMLTokenizer::temporaryBufferIs): Changed argument type to
a literal instead of a WTF::String.
(WebCore::HTMLTokenizer::appendToPossibleEndTag): Renamed and changed type
to be a UChar instead of LChar, although all characters will be ASCII.
(WebCore::HTMLTokenizer::isAppropriateEndTag): Marked const, and changed
type from size_t to unsigned.
* html/parser/HTMLTokenizer.h: Changed interface of nextToken so it returns
a TokenPtr so code doesn't have to understand special rules about when to
work with an HTMLToken and when to clear it. Made most functions private,
and made the State enum private as well. Replaced the state and setState
functions with more specific functions for the few states we need to deal
with outside the class. Moved function bodies outside the class definition
so it's easier to read the class definition.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Updated to use the
new set state functions instead of setState.
(WebCore::HTMLTreeBuilder::processEndTag): Ditto.
(WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processScriptStartTag): Ditto.
* html/parser/InputStreamPreprocessor.h: Marked the constructor explicit,
and mde it take a reference rather than a pointer.
* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::insertFakePreElement): Updated to use the
new set state functions instead of setState.
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::decodedSnippetForName): Updated for name change.
(WebCore::XSSAuditor::decodedSnippetForAttribute): Updated for changes to
attribute range tracking.
(WebCore::XSSAuditor::decodedSnippetForJavaScript): Updated for name change.
(WebCore::XSSAuditor::isSafeToSendToAnotherThread): Deleted.
* html/parser/XSSAuditor.h: Deleted isSafeToSendToAnotherThread.
* html/track/WebVTTTokenizer.cpp: Removed the local state variable from
WEBVTT_ADVANCE_TO; there is no need for it.
(WebCore::WebVTTTokenizer::WebVTTTokenizer): Use a reference instead of a
pointer for the preprocessor.
(WebCore::WebVTTTokenizer::nextToken): Ditto. Also removed the state local
variable and the switch statement, replacing with labels instead since we
go between states with goto.
* platform/text/SegmentedString.cpp:
(WebCore::SegmentedString::operator=): Changed the return type to be non-const
to match normal C++ design rules.
(WebCore::SegmentedString::pushBack): Renamed from prepend since this is not a
general purpose prepend function. Also fixed assertions to not use the strangely
named "escaped" function, since we are deleting it.
(WebCore::SegmentedString::append): Ditto.
(WebCore::SegmentedString::advancePastNonNewlines): Renamed from advance, since
the function only works for non-newlines.
(WebCore::SegmentedString::currentColumn): Got rid of unneeded local variable.
(WebCore::SegmentedString::advancePastSlowCase): Moved here from header and
renamed. This function now consumes the characters if they match.
* platform/text/SegmentedString.h: Made the changes mentioned above.
(WebCore::SegmentedString::excludeLineNumbers): Deleted.
(WebCore::SegmentedString::advancePast): Renamed from lookAhead. Also changed
behavior so the characters are consumed.
(WebCore::SegmentedString::advancePastIgnoringCase): Ditto.
(WebCore::SegmentedString::advanceAndASSERT): Deleted.
(WebCore::SegmentedString::advanceAndASSERTIgnoringCase): Deleted.
(WebCore::SegmentedString::escaped): Deleted.
* xml/parser/CharacterReferenceParserInlines.h:
(WebCore::isHexDigit): Deleted.
(WebCore::unconsumeCharacters): Updated for name change.
(WebCore::consumeCharacterReference): Removed unneeded name for local enum,
renamed local variable "cc" to character. Changed code to use helpers like
isASCIIAlpha and toASCIIHexValue. Removed unneeded use of advanceAndASSERT,
since we don't really need to assert the character we just extracted.
* xml/parser/MarkupTokenizerInlines.h:
(WebCore::isTokenizerWhitespace): Renamed argument to character.
(WebCore::advanceStringAndASSERTIgnoringCase): Deleted.
(WebCore::advanceStringAndASSERT): Deleted.
Changed all the macro implementations so they set m_state only when
returning from the function and just use goto inside the state machine.
2015-01-11 Andreas Kling <akling@apple.com>
Enable Vector bounds checking for ElementDescendantIterator.
<https://webkit.org/b/140346>
Reviewed by Sam Weinig.
I had originally disabled Vector bounds checking for
ElementDescendantIterator's internal ancestor stack, but upon
re-running performance benchmarks, it appears to have little-to-no
measurable benefit.
This change adds back the bounds checking.
* dom/ElementDescendantIterator.h:
2015-01-11 Chris Dumez <cdumez@apple.com>
Drop legacy SVGCSSStyleSelector.cpp
https://bugs.webkit.org/show_bug.cgi?id=140342
Reviewed by Antti Koivisto.
Drop legacy SVGCSSStyleSelector.cpp by porting the remaining SVG CSS
properties to the generated StyleBuilder. This patch also removes
support for the "LegacyStyleBuilder" option in CSSPropertyNames.in
as all properties have now been ported over.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Drop SVGCSSStyleSelector.cpp file as it was removed.
* css/CSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp: Removed.
* css/StyleBuilder.h:
StyleBuilder::applyProperty() no longer need to return a boolean as
it now handles ALL CSS properties.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueBaselineShift):
(WebCore::StyleBuilderCustom::applyInitialFill):
(WebCore::StyleBuilderCustom::applyInheritFill):
(WebCore::StyleBuilderCustom::applyValueFill):
(WebCore::StyleBuilderCustom::applyInitialStroke):
(WebCore::StyleBuilderCustom::applyInheritStroke):
(WebCore::StyleBuilderCustom::applyValueStroke):
(WebCore::StyleBuilderCustom::applyInitialWebkitSvgShadow):
(WebCore::StyleBuilderCustom::applyInheritWebkitSvgShadow):
(WebCore::StyleBuilderCustom::applyValueWebkitSvgShadow):
Move 'fill', 'stroke' and '-webkit-svg-shadow' to the new
StyleBuilder.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* css/makeprop.pl:
2015-01-11 Antti Koivisto <antti@apple.com>
Remove FontCachePurgePreventer
https://bugs.webkit.org/show_bug.cgi?id=139628
Reviewed by Anders Carlsson.
This stack type is bug prone and invasive. A missing FontCachePurgePreventer in a code that touches fonts is always
a hard-to-detect bug and there are many places that need it. Instead purge the font cache on top of the runloop.
The purge timer could in principle fire in a nested runloop. However we should never have unreferenced
SimpleFontData objects in the stack in such case (GlyphData objects don't currently ref the font) because those
only occur during layout and painting. Layout and painting can't trigger a nested runloops as there would be
bigger problems.
Purging may also be triggered synchronously by a memory notification. That case won't have any GlyphDatas in the stack either.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::measureText):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::paintContents):
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::FontCache):
(WebCore::FontCache::fontForFamily):
(WebCore::FontCache::purgeTimerFired):
(WebCore::FontCache::purgeInactiveFontData):
* platform/graphics/FontCache.h:
(WebCore::FontCache::disablePurging): Deleted.
(WebCore::FontCache::enablePurging): Deleted.
(WebCore::FontCachePurgePreventer::FontCachePurgePreventer): Deleted.
(WebCore::FontCachePurgePreventer::~FontCachePurgePreventer): Deleted.
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::emphasisMarkAscent):
(WebCore::Font::emphasisMarkDescent):
(WebCore::Font::emphasisMarkHeight):
(WebCore::Font::drawEmphasisMarks):
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::displayCallback):
* platform/mac/DragImageMac.mm:
(WebCore::widthWithFont):
(WebCore::drawAtPoint):
(WebCore::createDragImageForLink):
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageForLink):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
(WebCore::WebCoreTextFloatWidth):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::offsetForPosition):
(WebCore::InlineTextBox::positionForOffset):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::setImageSizeForAltText):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::paintItemForeground):
* rendering/RenderMenuList.cpp:
(RenderMenuList::updateOptionsWidth):
* rendering/RenderThemeIOS.mm:
(WebCore::adjustInputElementButtonStyle):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::updateStyle):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::subtreeChildWasAdded):
(WebCore::RenderSVGText::subtreeStyleDidChange):
(WebCore::RenderSVGText::subtreeTextDidChange):
(WebCore::RenderSVGText::removeChild):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::selectionRectForTextFragment):
2015-01-11 Myles C. Maxfield <mmaxfield@apple.com>
[SVG -> OTF Converter] Implement ligatures
https://bugs.webkit.org/show_bug.cgi?id=137094
Reviewed by Dan Bernstein.
Use the "liga" OpenType feature to implement ligatures inside the GSUB table.
Tests: svg/W3C-SVG-1.1/fonts-glyph-04-t.svg
svg/W3C-SVG-1.1/text-text-06-t.svg
svg/text/kerning.svg
svg/text/multichar-glyph.svg
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::grow):
(WebCore::SVGToOTFFontConverter::appendCMAPTable): Use StringView::codePoints().
(WebCore::SVGToOTFFontConverter::firstGlyph): Returns the first element of the input
vector, along with some ASSERTs.
(WebCore::SVGToOTFFontConverter::appendLigatureSubtable):
(WebCore::SVGToOTFFontConverter::appendScriptSubtable): Used inside appendGSUBTable.
(WebCore::SVGToOTFFontConverter::appendGSUBTable): Updating for ligatures.
(WebCore::codepointToString): Wrapper around U16_APPEND().
(WebCore::SVGToOTFFontConverter::glyphsForCodepoint): Call codepointToString and look
in internal map.
(WebCore::SVGToOTFFontConverter::addCodepointRanges): Use glyphsForCodepoint().
(WebCore::SVGToOTFFontConverter::appendLigatureGlyphs): Ligatures are implemented as
mapping a sequence of glyphs to another glyph inside OpenType. However, SVG models
ligatures as mapping a sequence of codepoints to a glyph. This function makes dummy
glyphs for all the codepoints that we don't have glyphs for and appends them to
m_glyphs.
(WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically):
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Use appendEmptyGlyph() and
call appendLigatureGlyphs().
2015-01-11 Chris Dumez <cdumez@apple.com>
Move more SVG CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140340
Reviewed by Antti Koivisto.
Move more SVG CSS properties to the new StyleBuilder by introducing
the necessary converters in StyleBuilderConverter.
* css/CSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
(WebCore::roundToNearestGlyphOrientationAngle): Deleted.
(WebCore::angleToGlyphOrientation): Deleted.
(WebCore::colorFromSVGColorCSSValue): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertNumber):
(WebCore::StyleBuilderConverter::convertNumberOrAuto):
(WebCore::StyleBuilderConverter::convertOpacity):
(WebCore::StyleBuilderConverter::convertSVGURIReference):
(WebCore::StyleBuilderConverter::convertSVGColor):
(WebCore::StyleBuilderConverter::convertGlyphOrientation):
(WebCore::StyleBuilderConverter::convertGlyphOrientationOrAuto):
* rendering/style/RenderStyle.h:
2015-01-10 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed buildfix for !ENABLE(INSPECTOR) builds after r178201.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willReceiveResourceResponse):
2015-01-10 Chris Dumez <cdumez@apple.com>
Move 'kerning' / 'paint-order' / 'stroke-dasharray' SVG CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140327
Reviewed by Sam Weinig.
Move 'kerning' / 'paint-order' / 'stroke-dasharray' SVG CSS properties
to the new StyleBuilder by introducing the necessary converters in
StyleBuilderConverter.
* css/CSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertSVGLength):
(WebCore::StyleBuilderConverter::convertSVGLengthVector):
(WebCore::StyleBuilderConverter::convertStrokeDashArray):
(WebCore::StyleBuilderConverter::convertPaintOrder):
* svg/SVGLength.cpp:
(WebCore::SVGLength::fromCSSPrimitiveValue):
* svg/SVGLength.h:
2015-01-09 Andreas Kling <akling@apple.com>
CTTE: GeolocationController always has a client.
<https://webkit.org/b/140330>
Reviewed by Anders Carlsson.
Change GeolocationController::m_client to be a reference and remove
a whole bunch of unnecessary null checks.
* Modules/geolocation/GeolocationController.cpp:
(WebCore::GeolocationController::GeolocationController):
(WebCore::GeolocationController::~GeolocationController):
(WebCore::GeolocationController::addObserver):
(WebCore::GeolocationController::removeObserver):
(WebCore::GeolocationController::requestPermission):
(WebCore::GeolocationController::cancelPermissionRequest):
(WebCore::GeolocationController::lastPosition):
(WebCore::GeolocationController::viewStateDidChange):
(WebCore::provideGeolocationTo):
* Modules/geolocation/GeolocationController.h:
(WebCore::GeolocationController::client):
2015-01-09 Zalan Bujtas <zalan@apple.com>
Calling clearSelection on a detached RenderObject leads to segfault.
https://bugs.webkit.org/show_bug.cgi?id=140275
Reviewed by Simon Fraser.
We collect selection rects and compute selection gaps in order to
paint/clear selection. With certain content, we need to be able
to walk the tree up to a particular container to compute the selection rect.
However this container might not be available when the selection is part of a detached tree.
This is a null-check fix to ensure we don't crash in such cases, but in the long run
selection gaps and rect should be cached between two layouts so that we don't need to
keep collecting/recomputing them. Tracked here: webkit.org/b/140321
Test: editing/selection/clearselection-on-detached-subtree-crash.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::containingBlockLogicalWidthForContent):
(WebCore::RenderBox::containingBlockLogicalHeightForContent):
* rendering/RenderView.cpp:
(WebCore::RenderView::clearSelection):
2015-01-09 Anders Carlsson <andersca@apple.com>
Remove more sync database code
https://bugs.webkit.org/show_bug.cgi?id=140328
Reviewed by Sam Weinig.
* Modules/webdatabase/AbstractDatabaseServer.h:
* Modules/webdatabase/DatabaseBackend.cpp:
(WebCore::DatabaseBackend::DatabaseBackend):
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::DatabaseBackendBase::DatabaseBackendBase):
* Modules/webdatabase/DatabaseBackendBase.h:
(WebCore::DatabaseBackendBase::isSyncDatabase): Deleted.
* Modules/webdatabase/DatabaseBasicTypes.h:
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabaseBackend):
(WebCore::DatabaseManager::openDatabase):
* Modules/webdatabase/DatabaseManager.h:
* Modules/webdatabase/DatabaseServer.cpp:
(WebCore::DatabaseServer::openDatabase):
(WebCore::DatabaseServer::createDatabase):
* Modules/webdatabase/DatabaseServer.h:
2015-01-09 Daniel Bates <dabates@apple.com>
Fix the iOS build after <http://trac.webkit.org/changeset/178213>
(https://bugs.webkit.org/show_bug.cgi?id=140310)
* platform/spi/cocoa/CoreTextSPI.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemFont):
2015-01-09 Chris Dumez <cdumez@apple.com>
Get rid of legacy StyleBuilder switch in StyleResolver.cpp
https://bugs.webkit.org/show_bug.cgi?id=140315
Reviewed by Sam Weinig.
Get rid of legacy StyleBuilder switch in StyleResolver.cpp now that most
properties have been ported to the new generated StyleBuilder in previous
patches. The properties that remained in this switch were shorthand
properties or other properties that do not require any handling in the
StyleBuilder.
To achieve this, this patch introduces 2 parameters in
CSSPropertyNames.in:
- SkipBuilder: Indicates that no StyleBuilder code should be generated
for this property.
- Shorthand: Indicates that this is a shorthand property, which therefore
does not use the StyleBuilder. makeprop.pl will merely generate
assertions for such properties, to validate that this is a shorthand
property and that the StyleBuilder code is never reached.
* css/CSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* css/makeprop.pl:
2015-01-09 Brent Fulgham <bfulgham@apple.com>
[Win] Build fix after r178219.
* WebCore.vcxproj/WebCore.vcxproj: Remove PaintHooks.asm references in project file.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2015-01-09 Andreas Kling <akling@apple.com>
Log which ActiveDOMObject(s) can't be suspended for PageCache.
<https://webkit.org/b/139697>
Reviewed by Chris Dumez.
Give ActiveDOMObject a pure virtual activeDOMObjectName() so we can
find their names.
Dump the names of all the ActiveDOMObjects that fail to suspend when
we're trying to put a page into PageCache.
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/geolocation/Geolocation.h:
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBTransaction.h:
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/SourceBuffer.h:
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/RTCDTMFSender.h:
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCSessionDescriptionRequestImpl.h:
* Modules/mediastream/RTCStatsRequestImpl.h:
* Modules/mediastream/RTCVoidRequestImpl.h:
* Modules/notifications/Notification.h:
* Modules/notifications/NotificationCenter.h:
* Modules/webaudio/AudioContext.h:
* Modules/webdatabase/DatabaseContext.h:
* Modules/websockets/WebSocket.h:
* WebCore.exp.in:
* css/FontLoader.h:
* dom/ActiveDOMObject.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
* dom/ScriptExecutionContext.h:
* fileapi/FileReader.h:
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
* html/HTMLMarqueeElement.h:
* html/HTMLMediaElement.h:
* html/PublicURLManager.h:
* html/canvas/WebGLRenderingContext.h:
* page/EventSource.h:
* page/SuspendableTimer.h:
* workers/AbstractWorker.h:
* xml/XMLHttpRequest.h:
2015-01-09 Anders Carlsson <andersca@apple.com>
Get rid of the database strategy
https://bugs.webkit.org/show_bug.cgi?id=140322
Reviewed by Sam Weinig.
* CMakeLists.txt:
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::ProposedDatabase::ProposedDatabase):
(WebCore::DatabaseManager::DatabaseManager):
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/DatabaseStrategy.cpp: Removed.
* platform/DatabaseStrategy.h: Removed.
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::PlatformStrategies):
(WebCore::PlatformStrategies::databaseStrategy): Deleted.
2015-01-06 Anders Carlsson <andersca@apple.com>
Move the Windows only plug-in code to WebKit/win
https://bugs.webkit.org/show_bug.cgi?id=140133
Reviewed by Darin Adler.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2015-01-09 Anders Carlsson <andersca@apple.com>
Another Windows build fix.
* DerivedSources.cpp:
2015-01-09 Enrica Casucci <enrica@apple.com>
[iOS] Support additional text styles.
https://bugs.webkit.org/show_bug.cgi?id=140310
rdar://problem/18568864
Reviewed by Joseph Pecoraro.
Add support for three new text styles.
* css/CSSValueKeywords.in:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemFont):
2015-01-09 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* bindings/js/JSBindingsAllInOne.cpp:
2015-01-09 Anders Carlsson <andersca@apple.com>
Remove more worker database code
https://bugs.webkit.org/show_bug.cgi?id=140320
Reviewed by Tim Horton.
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::stop):
2015-01-09 Anders Carlsson <andersca@apple.com>
Remove more sync database code
https://bugs.webkit.org/show_bug.cgi?id=140318
Reviewed by Sam Weinig.
* CMakeLists.txt:
* DerivedSources.make:
* Modules/webdatabase/DatabaseBackendSync.cpp: Removed.
* Modules/webdatabase/DatabaseBackendSync.h: Removed.
* Modules/webdatabase/DatabaseCallback.h:
* Modules/webdatabase/DatabaseCallback.idl:
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabaseSync): Deleted.
* Modules/webdatabase/DatabaseManager.h:
* Modules/webdatabase/DatabaseServer.cpp:
(WebCore::DatabaseServer::createDatabase):
* Modules/webdatabase/DatabaseSync.cpp: Removed.
* Modules/webdatabase/DatabaseSync.h: Removed.
* Modules/webdatabase/DatabaseSync.idl: Removed.
* Modules/webdatabase/SQLStatementSync.cpp: Removed.
* Modules/webdatabase/SQLStatementSync.h: Removed.
* Modules/webdatabase/SQLTransactionBackendSync.cpp: Removed.
* Modules/webdatabase/SQLTransactionBackendSync.h: Removed.
* Modules/webdatabase/SQLTransactionSync.cpp: Removed.
* Modules/webdatabase/SQLTransactionSync.h: Removed.
* Modules/webdatabase/SQLTransactionSync.idl: Removed.
* Modules/webdatabase/SQLTransactionSyncCallback.h: Removed.
* Modules/webdatabase/SQLTransactionSyncCallback.idl: Removed.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSSQLTransactionSyncCustom.cpp: Removed.
2015-01-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove or use TimelineAgent Resource related event types
https://bugs.webkit.org/show_bug.cgi?id=140155
Reviewed by Timothy Hatcher.
Remove unused timeline events. The frontend was ignoring these events
and was often already getting nearly identical data from the Network domain.
* WebCore.exp.in:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willSendRequestImpl):
(WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl):
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
(WebCore::InspectorInstrumentation::didFailLoadingImpl):
(WebCore::InspectorInstrumentation::didScheduleResourceRequestImpl): Deleted.
(WebCore::InspectorInstrumentation::willReceiveResourceDataImpl): Deleted.
(WebCore::InspectorInstrumentation::didReceiveResourceDataImpl): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willReceiveResourceResponse):
(WebCore::InspectorInstrumentation::didScheduleResourceRequest): Deleted.
(WebCore::InspectorInstrumentation::willReceiveResourceData): Deleted.
(WebCore::InspectorInstrumentation::didReceiveResourceData): Deleted.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::toProtocol):
(WebCore::InspectorTimelineAgent::didScheduleResourceRequest): Deleted.
(WebCore::InspectorTimelineAgent::willSendResourceRequest): Deleted.
(WebCore::InspectorTimelineAgent::willReceiveResourceData): Deleted.
(WebCore::InspectorTimelineAgent::didReceiveResourceData): Deleted.
(WebCore::InspectorTimelineAgent::willReceiveResourceResponse): Deleted.
(WebCore::InspectorTimelineAgent::didReceiveResourceResponse): Deleted.
(WebCore::InspectorTimelineAgent::didFinishLoadingResource): Deleted.
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createScheduleResourceRequestData): Deleted.
(WebCore::TimelineRecordFactory::createResourceSendRequestData): Deleted.
(WebCore::TimelineRecordFactory::createResourceReceiveResponseData): Deleted.
(WebCore::TimelineRecordFactory::createResourceFinishData): Deleted.
(WebCore::TimelineRecordFactory::createReceiveResourceData): Deleted.
* inspector/TimelineRecordFactory.h:
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didReceiveResponse):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::scheduleLoad):
(WebCore::ResourceLoadScheduler::notifyDidScheduleResourceRequest): Deleted.
* loader/ResourceLoadScheduler.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveData):
(WebCore::ResourceLoader::didReceiveBuffer):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didReceiveResponse):
* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::didReceiveDataArray):
2015-01-09 Benjamin Poulain <bpoulain@apple.com>
Update r177745, one of the review comments was not integrated
* css/SelectorCheckerTestFunctions.h:
(WebCore::matchesLangPseudoClass):
I cq+ before Dhi could make an update and this was left out.
2015-01-09 Benjamin Poulain <benjamin@webkit.org>
Fix error handling of ContentExtensionsManager when the top level input is unusable
https://bugs.webkit.org/show_bug.cgi?id=140284
Reviewed by Andreas Kling.
There are a couple of ways the WebProcess would crash if the input
is really really bad:
-If the JSON is unreadable, we can have an exception or decodedRules can be null.
-On any of the error, we cannot return immediately or we will skip vm.clear().
This patch adds a branch to fix the first issue.
For the second issue, a new function, loadEncodedRules(), encapsulate all the early
returns to make sure we execute the end of loadExtension().
* contentextensions/ContentExtensionsManager.cpp:
(WebCore::ContentExtensions::ExtensionsManager::loadEncodedRules):
(WebCore::ContentExtensions::ExtensionsManager::loadExtension):
2015-01-09 Bem Jones-Bey <bjonesbe@adobe.com>
Simplify LineWidth::wrapNextToShapeOutside()
https://bugs.webkit.org/show_bug.cgi?id=140304
Reviewed by Zoltan Horvath.
This function used to manually check to see if the entire height of
the line would have enough space next to the float. However, the code
to compute the offsets will do this automatically (and probably a lot
faster), if the line height is passed in. This patch does just that.
No new tests, no behavior change.
* rendering/line/LineWidth.cpp:
(WebCore::availableWidthAtOffset): Remove now unused override, allow
passing in lineHeight.
(WebCore::LineWidth::wrapNextToShapeOutside): Pass the lineHeight
when computing the available width, so we don't need to check
isWholeLineFit anymore.
(WebCore::isWholeLineFit): Deleted.
2015-01-09 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] content inside second shape area when two floats interact
https://bugs.webkit.org/show_bug.cgi?id=137702
Reviewed by Zalan Bujtas.
If a float has a shape-outside, we cannot assume that it has a uniform
width for the height of the float, so we cannot use simple line
layout.
Test: fast/shapes/shape-outside-floats/shape-outside-text-overlap-float.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Don't use simple line layout
if we have shape-outside. Also, rename floatRenderer to
floatingObject, since the variable doesn't contain a renderer.
2015-01-09 Chris Dumez <cdumez@apple.com>
Allow HTTPS + 'Cache-control: no-store' sub-frames into the page cache
https://bugs.webkit.org/show_bug.cgi?id=140302
Reviewed by Andreas Kling.
Allow HTTPS + 'Cache-control: no-store' sub-frames into the page cache.
We already restore 'no-store' sub-resources on history navigation from
the memory cache so there is no reason for our page cache policy to be
more restrictive.
We should align our memory cache / history navigation policy with our
page cache policy.
For now, 'no-store' main resources are not restored from either cache
(memory cache / page cache) on history navigation though. This behavior
does not change.
Test: http/tests/navigation/https-no-store-subframe-in-page-cache.html
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
2015-01-09 Anders Carlsson <andersca@apple.com>
Try to trigger a rebuild of generated JS bindings.
* bindings/scripts/CodeGeneratorJS.pm:
2015-01-09 Chris Dumez <cdumez@apple.com>
Add support for SVG CSS Properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140277
Reviewed by Andreas Kling.
Update the new StyleBuilder generator to add support for SVG CSS
Properties whose methods are on SVGRenderStyle instead of RenderStyle.
A new "SVG" parameter is now supported by makeprop.pl to correctly
generate such properties.
* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSPropertyNames.in:
* css/SVGCSSPropertyNames.in: Removed.
Merged SVG CSS properties into CSSPropertyNames.in. I personally don't
think having a separate file for SVG CSS properties is really helpful.
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
Drop legacy StyleBuilder code for several SVG properties and generate
them instead. Those are trivial and do not require any custom code or
converter.
* css/StyleResolver.cpp:
Update the id of the first low-priority property.
* css/makeprop.pl:
Add support for SVG CSS Properties whose methods are on SVGRenderStyle
instead of RenderStyle.
2015-01-08 Anders Carlsson <andersca@apple.com>
Start removing Web Database support from workers
https://bugs.webkit.org/show_bug.cgi?id=140271
Reviewed by Sam Weinig.
Remove WorkerGlobalScopeWebDatabase which is the entry point for web database in workers.
* CMakeLists.txt:
* DerivedSources.make:
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp: Removed.
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.h: Removed.
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl: Removed.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
2015-01-09 Brent Fulgham <bfulgham@apple.com>
[Win] Layout Test fast/canvas/canvas-path-addPath.html is failing
https://bugs.webkit.org/show_bug.cgi?id=140303
<rdar://problem/19428865>
Reviewed by Simon Fraser.
Although the code clearly states that CG doesn't allow adding a path to itself,
and branches to handle this case, it simply uses the branch to try adding the
path to itself (ignoring the copy it just made)!
Fix this copy/paste bug so that we use the copy and avoid violating the CG
API contract.
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::addPath): Fix path used.
2015-01-09 Andreas Kling <akling@apple.com>
[Cocoa] Make decoded image data purgeable ASAP.
<https://webkit.org/b/140298>
Reviewed by Antti Koivisto.
Mark decoded images as "transient" which makes CoreGraphics mark
the backing stores as purgeable shortly after they're used.
The decoded representation will remain in CoreGraphics's caches
indefinitely unless the kernel gets starved and needs the pages.
Most resources will now reach a state where the encoded data is
mmap'ed from disk cache (once the entire resource is downloaded)
and the decoded data is purgeable.
This also has the side effect of making the MemoryCache more
palatial since the decoded data cost can be deducted for images,
allowing us to cache more resources.
Note that the worst case for this new behavior would be something
like hovering below 100% memory utilization and constantly having
to drop and re-decode images. While churny, it still beats
crashing the process, plus there's tiling to remove many of the
reasons we'd need the decoded data.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::createFrameAtIndex):
2015-01-09 Gwang Yoon Hwang <yoon@igalia.com>
Rename GraphicsLayerAnimation to TextureMapperAnimation
https://bugs.webkit.org/show_bug.cgi?id=140296
Reviewed by Martin Robinson.
GraphicsLayerAnimation is only used by TextureMapper and CoordinatedGraphics.
This should be placed in the platform/graphics/texmap.
And this patch also changes its name to TextureMapperAnimation to remove ambiguity.
No new tests because this is a simply refactoring.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::addAnimation):
(WebCore::GraphicsLayerTextureMapper::setAnimations):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/TextureMapperAnimation.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsLayerAnimation.cpp.
* platform/graphics/texmap/TextureMapperAnimation.h: Renamed from Source/WebCore/platform/graphics/GraphicsLayerAnimation.h.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::setAnimations):
* platform/graphics/texmap/TextureMapperLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::addAnimation):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
2015-01-09 Antti Koivisto <antti@apple.com>
FontCache should only deal with SimpleFontData
https://bugs.webkit.org/show_bug.cgi?id=140293
Reviewed by Andreas Kling.
FontCache::fontForFamilyAtIndex hands out FontData objects and calls to FontSelector. That sort
of code does not belong to the cache layer. Move the functionality up to FontGlyphs.
* platform/graphics/Font.cpp:
(WebCore::Font::operator==):
(WebCore::Font::drawText):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::isLoadingCustomFonts):
* platform/graphics/Font.h:
(WebCore::Font::loadingCustomFonts): Deleted.
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::similarFontPlatformData):
Generic null implementation to reduce #ifs.
(WebCore::FontCache::fontForFamilyAtIndex): Deleted.
* platform/graphics/FontCache.h:
Unfriend FontGlyphs.
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::FontGlyphs::isLoadingCustomFonts):
We can figure thus out cheaply without caching a bit.
(WebCore::realizeNextFamily):
(WebCore::FontGlyphs::realizeFontDataAt):
Reorganize a bit to make the logic clearer.
Get rid of the strange cAllFamiliesScanned constant.
(WebCore::FontGlyphs::glyphDataForVariant):
(WebCore::FontGlyphs::glyphDataForNormalVariant):
Loop until null, that always works.
* platform/graphics/FontGlyphs.h:
(WebCore::FontGlyphs::loadingCustomFonts): Deleted.
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::similarFontPlatformData):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::similarFontPlatformData):
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::dashesForIntersectionsWithRect):
2015-01-09 Csaba Osztrogonác <ossy@webkit.org>
REGRESSION(r177925): It broke the !ENABLE(INSPECTOR) build
https://bugs.webkit.org/show_bug.cgi?id=140098
Reviewed by Brian Burg.
* inspector/InspectorInstrumentationCookie.cpp: Removed ENABLE(INSPECTOR) guard,
becaue InspectorInstrumentationCookie is used everywhere unconditionally.
* inspector/InspectorInstrumentationCookie.h: Removed ENABLE(INSPECTOR) guard.
* loader/appcache/ApplicationCacheGroup.h: Removed ENABLE(INSPECTOR) guard around
m_currentResourceIdentifier, because it is used unconditionally in the cpp.
2015-01-09 Byungseon Shin <sun.shin@lge.com>
[EFL] Fix crash introduced in r178029
https://bugs.webkit.org/show_bug.cgi?id=140289
Reviewed by Martin Robinson.
Clearing childClippingMaskLayer of CoordinatedGraphics should be called
before clearing childClippingLayer.
No new tests, covered by existing tests.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::~RenderLayerBacking):
2015-01-08 Enrica Casucci <enrica@apple.com>
[iOS] Cannot paste an image URL in a plain text field in a page.
https://bugs.webkit.org/show_bug.cgi?id=140274
rdar://problem/18590809
Reviewed by Alexey Proskuryakov.
When we want to get plain text from the pasteboard, we
should also try kUTTypeURL if there is no kUTTypeText available.
* WebCore.exp.in:
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::read):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::readString):
2015-01-09 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178154, r178163, and r178164.
https://bugs.webkit.org/show_bug.cgi?id=140292
Still multiple assertion failures on tests (Requested by ap on
#webkit).
Reverted changesets:
"Modernize and streamline HTMLTokenizer"
https://bugs.webkit.org/show_bug.cgi?id=140166
http://trac.webkit.org/changeset/178154
"Unreviewed speculative buildfix after r178154."
http://trac.webkit.org/changeset/178163
"One more unreviewed speculative buildfix after r178154."
http://trac.webkit.org/changeset/178164
2015-01-09 Bartlomiej Gajda <b.gajda@samsung.com>
[MSE] Implement Append Window support.
https://bugs.webkit.org/show_bug.cgi?id=139861
Reviewed by Jer Noble.
Implement Append Windows support for SourceBuffer as per spec.
Also change order in idl to match spec order.
Test: media/media-source/media-source-append-buffer-with-append-window.html
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::appendWindowStart):
(WebCore::SourceBuffer::setAppendWindowStart):
(WebCore::SourceBuffer::appendWindowEnd):
(WebCore::SourceBuffer::setAppendWindowEnd):
(WebCore::SourceBuffer::abort):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
* Modules/mediasource/SourceBuffer.h:
* Modules/mediasource/SourceBuffer.idl:
2015-01-09 Chris Fleizach <cfleizach@apple.com>
AX: Crash at -[WebAccessibilityObjectWrapperBase accessibilityTitle] + 31
https://bugs.webkit.org/show_bug.cgi?id=140286
Reviewed by Mario Sanchez Prada.
This is crashing because AppKit is checking if certain method names like "accessibilityTitle" exist,
and then it bypasses accessibilityAttributeValue: to call directly into those methods.
That bypasses are safety checks. I think a safe way to avoid this is rename our methods.
No new tests, problem only occurs when triggered through AppKit.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityLabel]):
(-[WebAccessibilityObjectWrapper accessibilityHint]):
* accessibility/mac/WebAccessibilityObjectWrapperBase.h:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase baseAccessibilityTitle]):
(-[WebAccessibilityObjectWrapperBase baseAccessibilityDescription]):
(-[WebAccessibilityObjectWrapperBase baseAccessibilityHelpText]):
(-[WebAccessibilityObjectWrapperBase accessibilityTitle]): Deleted.
(-[WebAccessibilityObjectWrapperBase accessibilityDescription]): Deleted.
(-[WebAccessibilityObjectWrapperBase accessibilityHelpText]): Deleted.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2015-01-06 Philippe Normand <pnormand@igalia.com>
[GStreamer][MSE] ASSERT in MediaSourceClientGStreamer::addSourceBuffer
https://bugs.webkit.org/show_bug.cgi?id=140119
Reviewed by Carlos Garcia Campos.
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
(WebCore::MediaSourceClientGStreamer::addSourceBuffer): Use a raw
pointer for the ghost pad, its reference is then taken once attached
to the parent element.
2015-01-09 Zan Dobersek <zdobersek@igalia.com>
After r178166, ANGLE's EGL/GLES/GLES2 headers are included before the
system-default headers because the Source/ThirdParty/ANGLE/include
directory is searched through. This shouldn't be the case for ports
which want to use system-default headers and are searching for them
explicitly. To avoid that, OPENGL_INCLUDE_DIR or OPENGLES2_INCLUDE_DIR
should be added to WebCore_INCLUDE_DIRECTORIES before ANGLE directories.
Rubber-stamped by Carlos Garcia Campos.
* CMakeLists.txt:
2015-01-09 Carlos Garcia Campos <cgarcia@igalia.com>
Use angle-bracket form to include external headers in WebCore
https://bugs.webkit.org/show_bug.cgi?id=140288
Reviewed by Žan Doberšek.
* CMakeLists.txt:
* platform/graphics/GraphicsContext.cpp:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
* platform/graphics/harfbuzz/HarfBuzzFace.cpp:
* platform/graphics/harfbuzz/HarfBuzzFaceCoreText.cpp:
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
* platform/graphics/win/GraphicsContext3DWin.cpp:
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
* platform/image-decoders/png/PNGImageDecoder.cpp:
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
* platform/image-encoders/JPEGImageEncoder.cpp:
* platform/image-encoders/PNGImageEncoder.cpp:
* platform/text/TextEncodingDetectorICU.cpp:
2015-01-09 Csaba Osztrogonác <ossy@webkit.org>
One more unreviewed speculative buildfix after r178154.
* xml/parser/CharacterReferenceParserInlines.h:
(WebCore::consumeCharacterReference): Remove highestValidCharacter too, it became unused after r178163.
2015-01-08 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed speculative buildfix after r178154.
* xml/parser/CharacterReferenceParserInlines.h:
(WebCore::consumeCharacterReference): Remove unused overflow variable.
2015-01-08 Darin Adler <darin@apple.com>
Remove strange CharacterData::dataImpl function
https://bugs.webkit.org/show_bug.cgi?id=140115
Reviewed by Anders Carlsson.
Every call site could just use the data function instead.
* dom/CharacterData.h:
(WebCore::CharacterData::dataImpl): Deleted.
* dom/Text.cpp:
(WebCore::Text::splitText): Use data instead of dataImpl.
(WebCore::Text::createTextRenderer): Ditto.
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::RenderCombineText): Updated to take
const String&. We missed this class when RenderText changed.
* rendering/RenderCombineText.h: Ditto.
* style/StyleResolveTree.cpp:
(WebCore::Style::updateTextRendererAfterContentChange): Use data.
2015-01-08 Chris Dumez <cdumez@apple.com>
ASSERTION FAILED: !valueWithCalculation.calculation() in WebCore::CSSParser::validateCalculationUnit
https://bugs.webkit.org/show_bug.cgi?id=140251
Reviewed by Darin Adler.
Using a calculated value for text-shadow's blur-radius was hitting an
assertion in CSSParser::validateCalculationUnit() because validUnit()
is called twice, first with 'FLength' unit, then more stricly with
'FLength|FNonNeg' if parsing the blur-radius as it cannot be negative
as per the specification:
- http://dev.w3.org/csswg/css-text-decor-3/#text-shadow-property
- http://dev.w3.org/csswg/css-backgrounds-3/#shadow
On the second call, the ValueWithCalculation's m_calculation member
was already initialized and the code did not handle this. This patch
updates validateCalculationUnit() to teach it to reuse the previously
parsed calculation in this case. All it needs to do is to update the
existing CSSCalcValue's range to allow negative values or not.
When writing the layout test for this, I also noticed that the CSS
parser was not rejecting negative calculated values for blur-radius
(only negative non-calculated ones). This is because
validateCalculationUnit() was ignoring FNonNeg if the calculated
value is a Length. This patch also addresses the issue.
Test: fast/css/text-shadow-calc-value.html
* css/CSSCalculationValue.h:
(WebCore::CSSCalcValue::setPermittedValueRange):
Add a setter to update the CSSCalculationValue's permitted value range
so that the CSS parser does not need to fully reparse the calculation
only to update the permitted value range.
* css/CSSParser.cpp:
(WebCore::CSSParser::validateCalculationUnit):
- Teach the code to reuse the previously parsed calculation value.
- Do the FNonNeg check for Length calculations as well.
2015-01-08 Darin Adler <darin@apple.com>
Modernize and streamline HTMLTokenizer
https://bugs.webkit.org/show_bug.cgi?id=140166
Reviewed by Sam Weinig.
* html/parser/AtomicHTMLToken.h:
(WebCore::AtomicHTMLToken::initializeAttributes): Removed unneeded assertions
based on fields I removed.
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser): Change to use updateStateFor
to set the initial state when parsing a fragment, since it implements the same
rule taht the tokenizerStateForContextElement function did.
(WebCore::HTMLDocumentParser::pumpTokenizer): Updated to use the revised
interfaces for HTMLSourceTracker and HTMLTokenizer.
(WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Changed to take a
TokenPtr instead of an HTMLToken, so we can clear out the TokenPtr earlier
for non-character tokens, and let them get cleared later for character tokens.
(WebCore::HTMLDocumentParser::insert): Pass references.
(WebCore::HTMLDocumentParser::append): Ditto.
(WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan): Ditto.
* html/parser/HTMLDocumentParser.h: Updated argument type for constructTreeFromHTMLToken
and removed now-unneeded m_token data members.
* html/parser/HTMLEntityParser.cpp: Removed unneeded uses of the inline keyword.
(WebCore::HTMLEntityParser::consumeNamedEntity): Replaced two uses of
advanceAndASSERT with just plain advance; there's really no need to assert the
character is the one we just got out of the string.
* html/parser/HTMLInputStream.h: Moved the include of TextPosition.h here from
its old location since this class has two data members that are OrdinalNumber.
* html/parser/HTMLMetaCharsetParser.cpp:
(WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser): Removed most of the
initialization, since it's now done by defaults.
(WebCore::extractCharset): Rewrote this to be a non-member function, and to
use a for loop, and to handle quote marks in a simpler way. Also changed it
to return a StringView so we don't have to allocate a new string.
(WebCore::HTMLMetaCharsetParser::processMeta): Use a modern for loop, and
also take a token argument since it's no longer a data member.
(WebCore::HTMLMetaCharsetParser::encodingFromMetaAttributes): Use a modern for
loop, StringView instead of string, and don't bother naming the local enum.
(WebCore::HTMLMetaCharsetParser::checkForMetaCharset): Updated for the new
way of getting tokens from the tokenizer.
* html/parser/HTMLMetaCharsetParser.h: Got rid of some data members and
tightened up the formatting a little. Don't bother allocating the tokenizer
on the heap.
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::TokenPreloadScanner): Removed unneeded
initialization.
(WebCore::HTMLPreloadScanner::HTMLPreloadScanner): Ditto.
(WebCore::HTMLPreloadScanner::scan): Changed to take a reference.
* html/parser/HTMLPreloadScanner.h: Removed unneeded includes, typedefs,
and forward declarations. Removed explicit declaration of the destructor,
since the default one works. Removed unused createCheckpoint and rewindTo
functions. Gave initial values for various data members. Marked the device
scale factor const beacuse it's set in the constructor and never changed.
Also removed the unneeded isSafeToSendToAnotherThread.
* html/parser/HTMLResourcePreloader.cpp:
(WebCore::PreloadRequest::isSafeToSendToAnotherThread): Deleted.
* html/parser/HTMLResourcePreloader.h:
(WebCore::PreloadRequest::PreloadRequest): Removed unneeded calls to
isolatedCopy. Also removed isSafeToSendToAnotherThread.
* html/parser/HTMLSourceTracker.cpp:
(WebCore::HTMLSourceTracker::startToken): Renamed. Changed to keep state
in the source tracker itself, not the token.
(WebCore::HTMLSourceTracker::endToken): Ditto.
(WebCore::HTMLSourceTracker::source): Renamed. Changed to use the state
from the source tracker.
* html/parser/HTMLSourceTracker.h: Removed unneeded include of HTMLToken.h.
Renamed functions, removed now-unneeded comment.
* html/parser/HTMLToken.h: Cut down on the fields used by the source tracker.
It only needs to know the start and end of each attribute, not each part of
each attribute. Removed setBaseOffset, setEndOffset, length, addNewAttribute,
beginAttributeName, endAttributeName, beginAttributeValue, endAttributeValue,
m_baseOffset and m_length. Added beginAttribute and endAttribute.
(WebCore::HTMLToken::clear): No need to zero m_length or m_baseOffset any more.
(WebCore::HTMLToken::length): Deleted.
(WebCore::HTMLToken::setBaseOffset): Deleted.
(WebCore::HTMLToken::setEndOffset): Deleted.
(WebCore::HTMLToken::beginStartTag): Only null out m_currentAttribute if we
are compiling in assertions.
(WebCore::HTMLToken::beginEndTag): Ditto.
(WebCore::HTMLToken::addNewAttribute): Deleted.
(WebCore::HTMLToken::beginAttribute): Moved the code from addNewAttribute in
here and set the start offset.
(WebCore::HTMLToken::beginAttributeName): Deleted.
(WebCore::HTMLToken::endAttributeName): Deleted.
(WebCore::HTMLToken::beginAttributeValue): Deleted.
(WebCore::HTMLToken::endAttributeValue): Deleted.
* html/parser/HTMLTokenizer.cpp:
(WebCore::HTMLToken::endAttribute): Added. Sets the end offset.
(WebCore::HTMLToken::appendToAttributeName): Updated assertion.
(WebCore::HTMLToken::appendToAttributeValue): Ditto.
(WebCore::convertASCIIAlphaToLower): Renamed from toLowerCase and changed
so it's legal to call on lower case letters too.
(WebCore::vectorEqualsString): Changed to take a string literal rather than
a WTF::String.
(WebCore::HTMLTokenizer::inEndTagBufferingState): Made this a member function.
(WebCore::HTMLTokenizer::HTMLTokenizer): Updated for data member changes.
(WebCore::HTMLTokenizer::bufferASCIICharacter): Added. Optimized version of
bufferCharacter for the common case where we know the character is ASCII.
(WebCore::HTMLTokenizer::bufferCharacter): Moved this function here from the
header since it's only used inside the class.
(WebCore::HTMLTokenizer::emitAndResumeInDataState): Moved this here, renamed
it and removed the state argument.
(WebCore::HTMLTokenizer::emitAndReconsumeInDataState): Ditto.
(WebCore::HTMLTokenizer::emitEndOfFile): More of the same.
(WebCore::HTMLTokenizer::saveEndTagNameIfNeeded): Ditto.
(WebCore::HTMLTokenizer::haveBufferedCharacterToken): Ditto.
(WebCore::HTMLTokenizer::flushBufferedEndTag): Updated since m_token is now
the actual token, not just a pointer.
(WebCore::HTMLTokenizer::flushEmitAndResumeInDataState): Renamed this and
removed the state argument.
(WebCore::HTMLTokenizer::processToken): This function, formerly nextToken,
is now the internal function used by nextToken. Updated its contents to use
simpler macros, changed code to set m_state when returning, rather than
constantly setting it when cycling through states, switched style to use
early return/goto rather than lots of else statements, took out unneeded
braces now that BEGIN/END_STATE handles the braces, collapsed upper and
lower case letter handling in many states, changed lookAhead call sites to
use the new advancePast function instead.
(WebCore::HTMLTokenizer::updateStateFor): Set m_state directly instead of
calling a setstate function.
(WebCore::HTMLTokenizer::appendToTemporaryBuffer): Moved here from header.
(WebCore::HTMLTokenizer::temporaryBufferIs): Changed argument type to
a literal instead of a WTF::String.
(WebCore::HTMLTokenizer::appendToPossibleEndTag): Renamed and changed type
to be a UChar instead of LChar, although all characters will be ASCII.
(WebCore::HTMLTokenizer::isAppropriateEndTag): Marked const, and changed
type from size_t to unsigned.
* html/parser/HTMLTokenizer.h: Changed interface of nextToken so it returns
a TokenPtr so code doesn't have to understand special rules about when to
work with an HTMLToken and when to clear it. Made most functions private,
and made the State enum private as well. Replaced the state and setState
functions with more specific functions for the few states we need to deal
with outside the class. Moved function bodies outside the class definition
so it's easier to read the class definition.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Updated to use the
new set state functions instead of setState.
(WebCore::HTMLTreeBuilder::processEndTag): Ditto.
(WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processScriptStartTag): Ditto.
* html/parser/InputStreamPreprocessor.h: Marked the constructor explicit,
and mde it take a reference rather than a pointer.
* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::insertFakePreElement): Updated to use the
new set state functions instead of setState.
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::decodedSnippetForName): Updated for name change.
(WebCore::XSSAuditor::decodedSnippetForAttribute): Updated for changes to
attribute range tracking.
(WebCore::XSSAuditor::decodedSnippetForJavaScript): Updated for name change.
(WebCore::XSSAuditor::isSafeToSendToAnotherThread): Deleted.
* html/parser/XSSAuditor.h: Deleted isSafeToSendToAnotherThread.
* html/track/WebVTTTokenizer.cpp: Removed the local state variable from
WEBVTT_ADVANCE_TO; there is no need for it.
(WebCore::WebVTTTokenizer::WebVTTTokenizer): Use a reference instead of a
pointer for the preprocessor.
(WebCore::WebVTTTokenizer::nextToken): Ditto. Also removed the state local
variable and the switch statement, replacing with labels instead since we
go between states with goto.
* platform/text/SegmentedString.cpp:
(WebCore::SegmentedString::operator=): Changed the return type to be non-const
to match normal C++ design rules.
(WebCore::SegmentedString::pushBack): Renamed from prepend since this is not a
general purpose prepend function. Also fixed assertions to not use the strangely
named "escaped" function, since we are deleting it.
(WebCore::SegmentedString::append): Ditto.
(WebCore::SegmentedString::advancePastNonNewlines): Renamed from advance, since
the function only works for non-newlines.
(WebCore::SegmentedString::currentColumn): Got rid of unneeded local variable.
(WebCore::SegmentedString::advancePastSlowCase): Moved here from header and
renamed. This function now consumes the characters if they match.
* platform/text/SegmentedString.h: Made the changes mentioned above.
(WebCore::SegmentedString::excludeLineNumbers): Deleted.
(WebCore::SegmentedString::advancePast): Renamed from lookAhead. Also changed
behavior so the characters are consumed.
(WebCore::SegmentedString::advancePastIgnoringCase): Ditto.
(WebCore::SegmentedString::advanceAndASSERT): Deleted.
(WebCore::SegmentedString::advanceAndASSERTIgnoringCase): Deleted.
(WebCore::SegmentedString::escaped): Deleted.
* xml/parser/CharacterReferenceParserInlines.h:
(WebCore::isHexDigit): Deleted.
(WebCore::unconsumeCharacters): Updated for name change.
(WebCore::consumeCharacterReference): Removed unneeded name for local enum,
renamed local variable "cc" to character. Changed code to use helpers like
isASCIIAlpha and toASCIIHexValue. Removed unneeded use of advanceAndASSERT,
since we don't really need to assert the character we just extracted.
* xml/parser/MarkupTokenizerInlines.h:
(WebCore::isTokenizerWhitespace): Renamed argument to character.
(WebCore::advanceStringAndASSERTIgnoringCase): Deleted.
(WebCore::advanceStringAndASSERT): Deleted.
Changed all the macro implementations so they set m_state only when
returning from the function and just use goto inside the state machine.
2015-01-08 Benjamin Poulain <benjamin@webkit.org>
Build fix after r178151
* contentextensions/DFA.cpp:
(WebCore::ContentExtensions::DFA::actions):
2015-01-08 Benjamin Poulain <benjamin@webkit.org>
[WK2] Start a prototype for declarative site specific extensions
https://bugs.webkit.org/show_bug.cgi?id=140160
Reviewed by Andreas Kling.
Currently, clients have various ways to execute custom code for certain URLs.
Each of those mechanism implies messaging the UIProcess, executing some code
calling back to the WebProcess, then actually load the resource.
All this back and forth introduces delays before we actually load resources.
Since the set of actions is done per site is actually simple and limited,
it may be possible to do everything in WebCore and shortcut the defered loading.
This patch provides the starting point for this idea. The "rules" (currently just blocking)
are be passed to WebCore in a JSON format. In WebCore, we create a state
machine to match the rules and we execute the action when the state machine tells
us to.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* contentextensions/ContentExtensionRule.cpp: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
(WebCore::ContentExtensions::ContentExtensionRule::ContentExtensionRule):
* contentextensions/ContentExtensionRule.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
(WebCore::ContentExtensions::ContentExtensionRule::trigger):
(WebCore::ContentExtensions::ContentExtensionRule::action):
* contentextensions/ContentExtensionsBackend.cpp: Added.
(WebCore::ContentExtensions::ContentExtensionsBackend::sharedInstance):
(WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
(WebCore::ContentExtensions::ContentExtensionsBackend::removeRuleList):
(WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
* contentextensions/ContentExtensionsBackend.h: Added.
* contentextensions/ContentExtensionsInterface.cpp: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
(WebCore::ContentExtensions::shouldBlockURL):
* contentextensions/ContentExtensionsInterface.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
* contentextensions/ContentExtensionsManager.cpp: Added.
(WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
(WebCore::ContentExtensions::ExtensionsManager::loadAction):
(WebCore::ContentExtensions::ExtensionsManager::loadRule):
(WebCore::ContentExtensions::ExtensionsManager::loadExtension):
* contentextensions/ContentExtensionsManager.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
* contentextensions/DFA.cpp: Added.
(WebCore::ContentExtensions::DFA::DFA):
(WebCore::ContentExtensions::DFA::operator=):
(WebCore::ContentExtensions::DFA::nextState):
(WebCore::ContentExtensions::DFA::actions):
(WebCore::ContentExtensions::DFA::debugPrintDot):
* contentextensions/DFA.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
(WebCore::ContentExtensions::DFA::root):
* contentextensions/DFANode.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
* contentextensions/NFA.cpp: Added.
(WebCore::ContentExtensions::NFA::NFA):
(WebCore::ContentExtensions::NFA::createNode):
(WebCore::ContentExtensions::NFA::addTransition):
(WebCore::ContentExtensions::NFA::addEpsilonTransition):
(WebCore::ContentExtensions::NFA::setFinal):
(WebCore::ContentExtensions::NFA::debugPrintDot):
* contentextensions/NFA.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
(WebCore::ContentExtensions::NFA::root):
* contentextensions/NFANode.cpp: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
(WebCore::ContentExtensions::NFANode::NFANode):
* contentextensions/NFANode.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
* contentextensions/NFAToDFA.cpp: Added.
(WebCore::ContentExtensions::epsilonClosure):
(WebCore::ContentExtensions::setTransitionsExcludingEpsilon):
(WebCore::ContentExtensions::HashableNodeIdSet::HashableNodeIdSet):
(WebCore::ContentExtensions::HashableNodeIdSet::operator=):
(WebCore::ContentExtensions::HashableNodeIdSet::isEmptyValue):
(WebCore::ContentExtensions::HashableNodeIdSet::isDeletedValue):
(WebCore::ContentExtensions::HashableNodeIdSet::nodeIdSet):
(WebCore::ContentExtensions::HashableNodeIdSetHash::hash):
(WebCore::ContentExtensions::HashableNodeIdSetHash::equal):
(WebCore::ContentExtensions::addDFAState):
(WebCore::ContentExtensions::NFAToDFA::convert):
* contentextensions/NFAToDFA.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
2015-01-08 Benjamin Poulain <bpoulain@apple.com>
Make better use of the stack when compiling selectors
https://bugs.webkit.org/show_bug.cgi?id=139615
rdar://problem/19226482
Reviewed by Andreas Kling.
Selectors used to be only on one level. To avoid memory allocations, we were allocating
a lot of stack upfront and we were using that to create all the intermediary objects
used by the code generator.
Then, selectors became multilevel. We now support arbitrary nesting of selector lists.
We did not adapt any of the structures and the creation of the intermediary object is recursive.
This resulted in over 1k of stack allocation at every level, quickly accumulating to unreasonable
numbers.
This patch fixes this problem by making each stack frame of the recursion much lighter.
We no longer allocate the big objects (SelectorFragment and SelectorFragmentList) on the stack.
In each case where we would have used a Stack allocated SelectorFragment or SelectorFragmentList,
we now allocate the memory directly into the target vector.
In the cases where the object should not be on the vector, we simply remove it. Those are uncommon
cases so that should not be too bad.
Tests: fast/selectors/matches-selector-list-ending-with-never-matching-selectors.html
fast/selectors/not-selector-list-ending-with-never-matching-selectors.html
fast/selectors/nth-child-of-selector-list-ending-with-never-matching-selectors.html
fast/selectors/nth-last-child-of-selector-list-ending-with-never-matching-selectors.html
* cssjit/SelectorCompiler.cpp:
SelectorFragmentList is also used for nested lists. Keeping 32 SelectorFragment preallocated
for each nested list is way too big.
(WebCore::SelectorCompiler::addPseudoClassType):
There are three cases of nested selector lists supported by the compiler: :matches(), :not()
and :nth-child(). For those 3 cases, use the target vector memory instead of the stack.
(WebCore::SelectorCompiler::constructFragmentsInternal):
(WebCore::SelectorCompiler::constructFragments):
Make sure we do not modify the input list on failure since it may be reused.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesMatchesPseudoClass):
I changed the handling of :nth-child(An+B of selectorList) to not generate empty filters.
With that we can generalize the assertion to generateElementMatchesSelectorList() and simplify
the flow of selector lists a bit.
2015-01-08 Chris Dumez <cdumez@apple.com>
Move '-webkit-font-feature-settings' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140267
Reviewed by Andreas Kling.
Move '-webkit-font-feature-settings' CSS property to the new
StyleBuilder.
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertFontFeatureSettings):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitFontFeatureSettings):
(WebCore::StyleBuilderCustom::applyInheritWebkitFontFeatureSettings):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::makeNormalFeatureSettings): Deleted.
* platform/graphics/FontDescription.h:
2015-01-08 Brent Fulgham <bfulgham@apple.com>
[Win] Build fix after r178133.
* platform/graphics/FontCache.h: Correct declaration of fontDataFromDescriptionAndLogFont
* platform/graphics/SimpleFontData.h: We still need 'platformDestroy'
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformDestroy): Add stub back to prevent build break.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::fontDataFromDescriptionAndLogFont): Correct signature.
(WebCore::FontCache::lastResortFallbackFont): Correct '::' syntax.
(WebCore::FontCache:lastResortFallbackFont): Deleted.
2015-01-08 Antti Koivisto <antti@apple.com>
Remove the concept of "retained" font
https://bugs.webkit.org/show_bug.cgi?id=140246
Reviewed by Darin Adler.
FontCache currently maintains a secondary refcount for SimpleFontDatas. This is used to decide whether
a font is considered inactive and is eligible for purging. This is confusing and complex.
The new scheme in this patch considers fonts in font cache inactive if their refcount is 1 (they are
owned by the cache only). This simplifies the code and gives similar behavior. Types that "retained" the
font this way always also ref it.
We also avoid unnecessarily removing fonts that wouldn't get deleted from the cache.
Also modernized some names and code.
* WebCore.exp.in:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::getFontData):
(WebCore::CSSFontSelector::getFallbackFontData):
* platform/graphics/FontCache.cpp:
(WebCore::fontPlatformDataCache):
(WebCore::FontCache::getCachedFontPlatformData):
(WebCore::cachedFonts):
(WebCore::FontCache::fontForFamily):
(WebCore::FontCache::fontDataForPlatformData):
(WebCore::FontCache::purgeInactiveFontDataIfNeeded):
(WebCore::FontCache::purgeInactiveFontData):
(WebCore::FontCache::fontDataCount):
(WebCore::FontCache::inactiveFontDataCount):
(WebCore::FontCache::fontForFamilyAtIndex):
(WebCore::FontCache::invalidate):
(WebCore::FontCache::getCachedFontData): Deleted.
(WebCore::FontCache::getNonRetainedLastResortFallbackFont): Deleted.
(WebCore::FontCache::releaseFontData): Deleted.
(WebCore::FontCache::getFontData): Deleted.
* platform/graphics/FontCache.h:
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::FontGlyphs::~FontGlyphs):
(WebCore::FontGlyphs::realizeFontDataAt):
(WebCore::FontGlyphs::releaseFontData): Deleted.
* platform/graphics/FontGlyphs.h:
(WebCore::FontGlyphs::~FontGlyphs): Deleted.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::~SimpleFontData):
* platform/graphics/SimpleFontData.h:
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::platformDestroy): Deleted.
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::FontCache::similarFontPlatformData):
(WebCore::FontCache::lastResortFallbackFont):
(WebCore::FontCache::getLastResortFallbackFont): Deleted.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformCreateScaledFontData):
(WebCore::SimpleFontData::platformDestroy): Deleted.
2015-01-08 Anders Carlsson <andersca@apple.com>
Remove AbstractSQLTransaction
https://bugs.webkit.org/show_bug.cgi?id=140265
Reviewed by Tim Horton.
* Modules/webdatabase/AbstractSQLTransaction.h: Removed.
* Modules/webdatabase/DatabaseBackend.cpp:
* Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::~SQLTransaction):
* Modules/webdatabase/SQLTransaction.h:
* Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::create):
(WebCore::SQLTransactionBackend::SQLTransactionBackend):
* Modules/webdatabase/SQLTransactionBackend.h:
* WebCore.xcodeproj/project.pbxproj:
2015-01-08 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix after r178124.
Remove uses of the removed applicationChromeMode method.
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::getThemeData):
(WebCore::RenderThemeWin::paintMenuList):
2015-01-08 Anders Carlsson <andersca@apple.com>
Remove AbstractSQLTransactionBackend
https://bugs.webkit.org/show_bug.cgi?id=140227
Reviewed by Darin Adler.
* Modules/webdatabase/AbstractSQLTransaction.h:
* Modules/webdatabase/AbstractSQLTransactionBackend.h: Removed.
* Modules/webdatabase/SQLStatementBackend.cpp:
* Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::setBackend):
* Modules/webdatabase/SQLTransaction.h:
* Modules/webdatabase/SQLTransactionBackend.h:
* WebCore.xcodeproj/project.pbxproj:
2015-01-08 Darin Adler <darin@apple.com>
ASSERTION FAILED: character != kEndOfFileMarker in WebCore::HTMLTokenizer::bufferCharacter
https://bugs.webkit.org/show_bug.cgi?id=140179
Reviewed by Anders Carlsson.
Test: fast/parser/numeric-entities.html
* html/parser/HTMLEntityParser.cpp:
(WebCore::HTMLEntityParser::legalEntityFor): Merged adjustEntity logic in here.
Since the type UChar32 is a signed integer, need to check for <= 0, not just 0.
This <= change alone would have fixed the bug.
* xml/parser/CharacterReferenceParserInlines.h:
(WebCore::consumeCharacterReference): Added overflow checking when parsing hex
and decimal character references. This change alone would also have fixed the
bug, but in addition it makes overflow cases reliably generate replacement
characters rather than ignoring the overflow and producing seemingly random
characters. Test cases cover the original reported bug and other overflow cases.
2015-01-08 Dean Jackson <dino@apple.com>
Text not drawn or white-on-white for "Close Page"/"Go Back" button on safe browsing warning page
https://bugs.webkit.org/show_bug.cgi?id=140232
<rdar://problem/19371010>
Reviewed by Anders Carlsson.
We need to support default button styling even when application chrome
mode is not enabled (it was a bit weird that this was exposed as a Setting
anyway). We should render as a default button whenever content sets
the proprietary -webkit-appearance. This means we don't need the
applicationChromeMode setting.
For normal Web content there should be no change in behavior.
* page/Settings.in: Remove applicationChromeMode
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isDefault): Don't test for the setting.
2015-01-08 Chris Dumez <cdumez@apple.com>
Unfriend StyleResolver and StyleBuilderCustom
https://bugs.webkit.org/show_bug.cgi?id=140247
Reviewed by Darin Adler.
Stop marking StyleBuilderCustom as a friend of StyleResolver by
refactoring the code a bit.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueFont):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyFont):
* css/StyleResolver.h:
(WebCore::StyleResolver::documentSettings):
2015-01-08 Gwang Yoon Hwang <yoon@igalia.com>
[CoordinatedGraphics] Update fixedVisibleContentRect only it is actually changed
https://bugs.webkit.org/show_bug.cgi?id=140244
Reviewed by Martin Robinson.
CompositingCoordinator::setVisibleContentsRect already knows whether the
rect has been changed. Therefore, there is no need to call
FrameView::setFixedVisibleContentRect every time.
No new tests, covered by existing tests.
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::setVisibleContentsRect):
2015-01-08 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r177637) [HarfBuzz][GTK][EFL] It made 3 performance tests crash and +24 layout tests crashes/failures
https://bugs.webkit.org/show_bug.cgi?id=139905
Reviewed by Antti Koivisto.
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::collectHarfBuzzRuns): Fallback to
primary font data for missing glyphs.
2015-01-08 Myles C. Maxfield <mmaxfield@apple.com>
Borders inside box-decoration-break: clone after a br do not contribute to line breaking
https://bugs.webkit.org/show_bug.cgi?id=140238
Reviewed by Darin Adler.
When we iterate through renderers for line breaking, we determine which of the renderers
is responsible for inserting its parent's border width. However, this determination didn't
take a <br> and box-decoration-break: clone into account.
Test: fast/box-decoration-break/box-decoration-break-clone-line-break.html
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::shouldAddBorderPaddingMargin):
(WebCore::previousInFlowSibling): Clean up to use a do / while block.
2015-01-08 Gwang Yoon Hwang <yoon@igalia.com>
[GTK] Seperate updateBackingStore from flushCompositingState.
https://bugs.webkit.org/show_bug.cgi?id=136887
Reviewed by Žan Doberšek.
When LayerTreeHostGtk flushes pending layer changes, it updates backing
stores using same loop. This makes requesting layer flush during
flushing in certain condition which causes a assertion failure.
Animated GIF's animations are drived by the painting cycle,
GraphicsLayerTextureMapper::updateBackingStoreIfNeeded would request
scheduleLayerFlush during flushing layers, if animated GIF needs to
advance its frame immediately. It doesn't mean the advanced frame should
be painted in this painting phase. This frame advancing happens after
painting a current frame to the backing store. It means the advanced
frame should be painted ASAP without using its frame timer.
This patch seperates updateBackingStore from flushCompositingState
to avoid above behavior.
No new tests. The bug is timing-dependent.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
(WebCore::toGraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2015-01-07 Chris Dumez <cdumez@apple.com>
Move -webkit-tap-highlight-color / -webkit-overflow-scrolling / -webkit-touch-callout to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140219
Reviewed by Darin Adler.
Move -webkit-tap-highlight-color / -webkit-overflow-scrolling /
-webkit-touch-callout to the new StyleBuilder.
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::gradientWithStylesResolved):
* css/CSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTouchCallout):
(WebCore::StyleBuilderConverter::convertTapHighlightColor):
(WebCore::StyleBuilderConverter::convertOverflowScrolling):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::colorFromPrimitiveValueIsDerivedFromElement):
(WebCore::StyleResolver::colorFromPrimitiveValue):
(WebCore::StyleResolver::createFilterOperations):
* css/StyleResolver.h:
2015-01-07 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: Editing Inline Styles Not Working
https://bugs.webkit.org/show_bug.cgi?id=140239
Reviewed by Joseph Pecoraro.
Fix a regression introduced in r178060, where we no longer set
m_ordinal in InspectorCSSId. The original refactoring should have
passed m_ordinal. Fix this and introduce a sensible default value.
* inspector/InspectorStyleSheet.h:
(WebCore::InspectorCSSId::InspectorCSSId):
2015-01-07 Chris Dumez <cdumez@apple.com>
Assert should never be reached hit in WebCore::CSSCalcPrimitiveValue::doubleValue
https://bugs.webkit.org/show_bug.cgi?id=140180
Reviewed by Darin Adler.
Add support for using floating-point angles with 'turn' unit, as per the
specification:
http://dev.w3.org/csswg/css-values-3/#angles
Previously, we only supported integer values for the 'turn' unit even
though other angle units (e.g. 'deg') handle floating-point values just
fine. Trying to use a floating-point value with 'turn' unit would cause
us to hit an assertion in CSSCalcPrimitiveValue::doubleValue().
Also fix the support for angles in calc().
CSSPrimitiveValue::computeDegrees() was accessing m_primitiveUnitType
member directly, which would be incorrect in the case of calculated
values. This patch switches to calling CSSPrimitiveValue::primitiveType()
which handles calculated values.
Test: fast/css/turn-angle-double.html
* css/CSSCalculationValue.cpp:
(WebCore::hasDoubleValue):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeDegrees):
2015-01-07 Chris Dumez <cdumez@apple.com>
Move 'font' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140181
Reviewed by Darin Adler.
Move 'font' CSS property to the new StyleBuilder.
2015-01-07 Chris Dumez <cdumez@apple.com>
Move '-webkit-dashboard-region' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140204
Reviewed by Darin Adler.
Move '-webkit-dashboard-region' CSS property to the new StyleBuilder.
* css/CSSPropertyNames.in:
* css/StyleBuilderCustom.h:
(WebCore::convertToIntLength):
(WebCore::StyleBuilderCustom::applyValueWebkitDashboardRegion):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::convertToIntLength): Deleted.
2015-01-07 Said Abou-Hallawa <sabouhallawa@apple.com>
The ASCII decoding for non ASCII character is incorrect if this character comes after going through the fast decoding code path and before the end of the text by less than a machine word size of characters.
https://bugs.webkit.org/show_bug.cgi?id=140173.
Reviewed by Darin Adler.
Tests: fast/encoding/char-after-fast-path-ascii-decoding.html.
* platform/text/TextCodecLatin1.cpp:
(WebCore::TextCodecLatin1::decode):
This function has a bug when it goes through the fast decoding code path. After copying
one or more all ASCII MachineWords from source to the destination, the following byte
is copied as is from the source to the destination even if it is non ASCII byte. This
causes the decoded bytes to be incorrect. The fix is to ensure that the current byte
is still ASCII after exiting the fast decoding code path.
2015-01-07 Shivakumar JM <shiva.jm@samsung.com>
HTMLSelectElement and HTMLOptionsCollection add() method should support index as second argument.
https://bugs.webkit.org/show_bug.cgi?id=139179
Reviewed by Darin Adler.
HTMLSelectElement and HTMLOptionsCollection add() method should support index as second argument as per specification
http://www.w3.org/html/wg/drafts/html/master/forms.html#the-select-element.
Also this matches the behavior of Chrome and FireFox.
Tests: fast/dom/HTMLSelectElement/add.html
fast/dom/HTMLSelectElement/options-collection-add.html
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::add): Deleted.
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::add):
* html/HTMLOptionsCollection.h:
* html/HTMLOptionsCollection.idl:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::add):
* html/HTMLSelectElement.h:
* html/HTMLSelectElement.idl:
2015-01-07 Gwang Yoon Hwang <yoon@igalia.com>
[GTK][ThreadedCompositor] Add support for threaded compositor.
https://bugs.webkit.org/show_bug.cgi?id=118265
Reviewed by Martin Robinson.
* PlatformGTK.cmake:
Adds CoodinatedGraphics and threaded compositor related classes to
support threaded compositor
* platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
* platform/graphics/texmap/coordinated/CoordinatedTile.h:
This class should be guarded by COORDINATED_GRAPHICS instead of
TILED_BACKING_STORE
2015-01-07 Daniel Bates <dabates@apple.com>
[iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
https://bugs.webkit.org/show_bug.cgi?id=137371
Reviewed by David Kilzer.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/GraphicsServicesSPI.h: Added.
* platform/spi/cocoa/QuartzCoreSPI.h: Add CALayer SPI property hitTestsAsOpaque.
* platform/spi/cocoa/ServersSPI.h: Added.
2015-01-07 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178068.
https://bugs.webkit.org/show_bug.cgi?id=140235
Breaks the iOS build (Requested by enrica on #webkit).
Reverted changeset:
"[iOS] Make WebKit2 build with public iOS SDK and more build
fixes for DRT"
https://bugs.webkit.org/show_bug.cgi?id=137371
http://trac.webkit.org/changeset/178068
2015-01-07 Enrica Casucci <enrica@apple.com>
Can't copy URL for images and paste it into plain text fields.
https://bugs.webkit.org/show_bug.cgi?id=140230
rdar://problem/18736680
Reviewed by Dan Bernstein.
The incorrect objective C type was being written to the pasteboard.
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write):
2015-01-07 Anders Carlsson <andersca@apple.com>
Fix build.
* Modules/webdatabase/SQLStatementBackend.cpp:
2015-01-07 Daniel Bates <dabates@apple.com>
[iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
https://bugs.webkit.org/show_bug.cgi?id=137371
Reviewed by David Kilzer.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/GraphicsServicesSPI.h: Added.
* platform/spi/cocoa/QuartzCoreSPI.h: Add CALayer SPI property hitTestsAsOpaque.
* platform/spi/cocoa/ServersSPI.h: Added.
2015-01-07 Jaehun Lim <ljaehun.lim@samsung.com>
ASSERTION FAILED: !lengthOrPercentageValue.isUndefined() in WebCore::ApplyPropertyTextIndent::applyValue
https://bugs.webkit.org/show_bug.cgi?id=130341
Reviewed by Chris Dumez.
Replace ASSERT() with 'if' statement because 'ex' unit length in <title> is not defined.
Test: fast/css3-text/css3-text-indent/text-indent-crash-in-title.html
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueTextIndent): Change ASSERT() to 'if' statement.
2015-01-07 Anders Carlsson <andersca@apple.com>
Remove AbstractSQLStatement
https://bugs.webkit.org/show_bug.cgi?id=140223
Reviewed by Sam Weinig.
* Modules/webdatabase/AbstractSQLStatement.h: Removed.
* Modules/webdatabase/AbstractSQLTransactionBackend.h:
* Modules/webdatabase/SQLStatement.h:
* Modules/webdatabase/SQLStatementBackend.cpp:
(WebCore::SQLStatementBackend::create):
(WebCore::SQLStatementBackend::SQLStatementBackend):
(WebCore::SQLStatementBackend::frontend):
* Modules/webdatabase/SQLStatementBackend.h:
* Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::deliverStatementCallback):
* Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::currentStatement):
(WebCore::SQLTransactionBackend::executeSQL):
* Modules/webdatabase/SQLTransactionBackend.h:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
2015-01-07 Timothy Horton <timothy_horton@apple.com>
Manually-animated TextIndicator fades out blue selection if you click inside it
https://bugs.webkit.org/show_bug.cgi?id=140224
<rdar://problem/19317526>
Reviewed by Beth Dakin.
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView hasCompletedAnimation]):
(WebCore::TextIndicatorWindow::~TextIndicatorWindow):
Avoid fading out the TextIndicator if the animation hadn't completed.
Also, use wantsManualAnimation instead of duplicating the switch here.
2015-01-07 Anders Carlsson <andersca@apple.com>
Remove AbstractSQLStatementBackend
https://bugs.webkit.org/show_bug.cgi?id=140222
Reviewed by Sam Weinig.
We're unlikely to fully take advantage of the SQL implementation being abstract anyway, so let's just simplify the code instead.
* Modules/webdatabase/AbstractSQLStatement.h:
* Modules/webdatabase/AbstractSQLStatementBackend.h: Removed.
* Modules/webdatabase/SQLStatement.cpp:
(WebCore::SQLStatement::setBackend):
* Modules/webdatabase/SQLStatement.h:
* Modules/webdatabase/SQLStatementBackend.cpp:
(WebCore::SQLStatementBackend::~SQLStatementBackend):
* Modules/webdatabase/SQLStatementBackend.h:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
2015-01-07 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: purge PassRefPtr from Inspector code and use Ref for typed and untyped protocol objects
https://bugs.webkit.org/show_bug.cgi?id=140053
Reviewed by Andreas Kling.
This patch replaces uses of PassRefPtr with uses of RefPtr&& and WTF::move() in code
related to Web Inspector. It also converts many uses of RefPtr to Ref where
references are always non-null. These two refactorings have been combined since
they tend to require similar changes to the code.
No new tests, no behavior changed.
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabase):
* dom/Document.cpp:
(WebCore::Document::logExceptionToConsole):
(WebCore::Document::addMessage):
* dom/Document.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::reportException):
* dom/ScriptExecutionContext.h:
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::generateViolationReport):
* inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::inspectImpl):
* inspector/CommandLineAPIHost.h:
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
(WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
(WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
(WebCore::InspectorCSSAgent::setStyleText):
(WebCore::InspectorCSSAgent::setPropertyText):
(WebCore::InspectorCSSAgent::toggleProperty):
(WebCore::InspectorCSSAgent::setRuleSelector):
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::forcePseudoState):
(WebCore::InspectorCSSAgent::getNamedFlowCollection):
(WebCore::InspectorCSSAgent::detectOrigin):
(WebCore::InspectorCSSAgent::buildObjectForRule):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
(WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
(WebCore::InspectorCSSAgent::buildArrayForRegions):
(WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
(WebCore::InspectorInstrumentation::consoleCount):
(WebCore::InspectorInstrumentation::stopConsoleTiming):
(WebCore::InspectorInstrumentation::consoleTimeStamp):
(WebCore::InspectorInstrumentation::stopProfiling):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::buildObjectForHighlightedNode):
(WebCore::InspectorController::executionStopwatch):
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::parseColor):
(WebCore::parseConfigColor):
(WebCore::InspectorDOMAgent::pushNodePathToFrontend):
(WebCore::InspectorDOMAgent::performSearch):
(WebCore::InspectorDOMAgent::setInspectModeEnabled):
(WebCore::InspectorDOMAgent::highlightRect):
(WebCore::InspectorDOMAgent::highlightQuad):
(WebCore::InspectorDOMAgent::innerHighlightQuad):
(WebCore::InspectorDOMAgent::highlightNode):
(WebCore::InspectorDOMAgent::highlightFrame):
(WebCore::InspectorDOMAgent::buildObjectForNode):
(WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
(WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
(WebCore::InspectorDOMAgent::processAccessibilityChildren):
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
(WebCore::InspectorDOMAgent::didCommitLoad):
(WebCore::InspectorDOMAgent::didInsertDOMNode):
(WebCore::InspectorDOMAgent::styleAttributeInvalidated):
(WebCore::InspectorDOMAgent::resolveNode):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
(WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
(WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
(WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
(WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
(WebCore::InspectorDOMStorageAgent::storageId):
(WebCore::InspectorDOMStorageAgent::findStorageArea):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp: Use Ref for all callbacks since they are
not nullable.
(WebCore::InspectorDatabaseAgent::executeSQL):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseInstrumentation.h:
(WebCore::InspectorInstrumentation::didOpenDatabase):
* inspector/InspectorDatabaseResource.cpp:
(WebCore::InspectorDatabaseResource::create):
(WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
(WebCore::InspectorDatabaseResource::bind):
* inspector/InspectorDatabaseResource.h:
(WebCore::InspectorDatabaseResource::setDatabase):
* inspector/InspectorFrontendHost.h:
(WebCore::InspectorFrontendHost::create):
* inspector/InspectorIndexedDBAgent.cpp: Use Ref for all callbacks since they are
not nullable.
(WebCore::InspectorIndexedDBAgent::requestDatabaseNames):
(WebCore::InspectorIndexedDBAgent::requestDatabase):
(WebCore::InspectorIndexedDBAgent::requestData):
(WebCore::ClearObjectStoreListener::create):
(WebCore::ClearObjectStoreListener::ClearObjectStoreListener):
(WebCore::ClearObjectStore::create):
(WebCore::ClearObjectStore::ClearObjectStore):
(WebCore::InspectorIndexedDBAgent::clearObjectStore):
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willLoadXHRImpl):
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::consoleCountImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
(WebCore::InspectorInstrumentation::consoleTimeStampImpl):
(WebCore::InspectorInstrumentation::stopProfilingImpl):
(WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
(WebCore::InspectorInstrumentation::sessionCreatedImpl):
(WebCore::InspectorInstrumentation::sessionLoadedImpl):
(WebCore::InspectorInstrumentation::sessionModifiedImpl):
(WebCore::InspectorInstrumentation::segmentCreatedImpl):
(WebCore::InspectorInstrumentation::segmentCompletedImpl):
(WebCore::InspectorInstrumentation::segmentLoadedImpl):
(WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl): Deleted.
(WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl): Deleted.
(WebCore::InspectorInstrumentation::startProfilingImpl): Deleted.
(WebCore::InspectorInstrumentation::didDispatchDOMStorageEventImpl): Deleted.
(WebCore::InspectorInstrumentation::willEvaluateWorkerScript): Deleted.
(WebCore::InspectorInstrumentation::captureStoppedImpl): Deleted.
(WebCore::InspectorInstrumentation::playbackStartedImpl): Deleted.
(WebCore::InspectorInstrumentation::playbackPausedImpl): Deleted.
(WebCore::InspectorInstrumentation::playbackHitPositionImpl): Deleted.
(WebCore::InspectorInstrumentation::playbackFinishedImpl): Deleted.
(WebCore::InspectorInstrumentation::networkStateChangedImpl): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willLoadXHR):
(WebCore::InspectorInstrumentation::sessionCreated):
(WebCore::InspectorInstrumentation::sessionLoaded):
(WebCore::InspectorInstrumentation::sessionModified):
(WebCore::InspectorInstrumentation::segmentCreated):
(WebCore::InspectorInstrumentation::segmentCompleted):
(WebCore::InspectorInstrumentation::segmentLoaded):
(WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): Deleted.
(WebCore::InspectorInstrumentation::didSendWebSocketFrame): Deleted.
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
(WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForPoint):
(WebCore::buildObjectForRect):
(WebCore::buildArrayForQuad):
(WebCore::buildObjectForHighlight):
(WebCore::buildObjectForRegionHighlight):
(WebCore::buildObjectForCSSRegionsHighlight):
(WebCore::buildObjectForSize):
(WebCore::buildObjectForCSSRegionContentClip):
(WebCore::InspectorOverlay::drawPaintRects):
(WebCore::buildObjectForRendererFragments):
(WebCore::buildObjectForShapeOutside):
(WebCore::buildObjectForElementInfo):
(WebCore::InspectorOverlay::buildObjectForHighlightedNode):
(WebCore::InspectorOverlay::reset):
(WebCore::InspectorOverlay::evaluateInOverlay):
* inspector/InspectorOverlay.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::createXHRTextDecoder):
(WebCore::buildObjectForCookie):
(WebCore::buildArrayForCookies):
(WebCore::buildObjectForSearchResult):
(WebCore::InspectorPageAgent::buildObjectForFrame):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
* inspector/InspectorPageAgent.h:
* inspector/InspectorReplayAgent.cpp:
(WebCore::buildInspectorObjectForPosition):
(WebCore::buildInspectorObjectForInput):
(WebCore::buildInspectorObjectForSession):
(WebCore::buildInspectorObjectForSegment):
(WebCore::InspectorReplayAgent::replayToPosition):
(WebCore::InspectorReplayAgent::getSessionData):
(WebCore::InspectorReplayAgent::getSegmentData):
* inspector/InspectorReplayAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForHeaders):
(WebCore::buildObjectForTiming):
(WebCore::buildObjectForResourceRequest):
(WebCore::buildObjectForResourceResponse):
(WebCore::buildObjectForCachedResource):
(WebCore::InspectorResourceAgent::willLoadXHR):
(WebCore::InspectorResourceAgent::buildInitiatorObject):
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
(WebCore::InspectorResourceAgent::didSendWebSocketFrame):
(WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
(WebCore::InspectorResourceAgent::loadResource):
(WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient): Deleted.
(WebCore::InspectorResourceAgent::didScheduleStyleRecalculation): Deleted.
(WebCore::InspectorResourceAgent::disable): Deleted.
(WebCore::InspectorResourceAgent::setCacheDisabled): Deleted.
* inspector/InspectorResourceAgent.h:
* inspector/InspectorStyleSheet.cpp:
(ParsedStyleSheet::ruleSourceDataAt):
(WebCore::buildSourceRangeObject):
(WebCore::buildMediaObject):
(WebCore::asCSSRuleList):
(WebCore::fillMediaListChain):
(WebCore::InspectorStyle::create):
(WebCore::InspectorStyle::InspectorStyle):
(WebCore::InspectorStyle::buildObjectForStyle):
(WebCore::InspectorStyle::buildArrayForComputedStyle):
(WebCore::InspectorStyle::styleWithProperties):
(WebCore::InspectorStyle::extractSourceData):
(WebCore::InspectorStyleSheet::create):
(WebCore::InspectorStyleSheet::InspectorStyleSheet):
(WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
(WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
(WebCore::buildObjectForSelectorHelper):
(WebCore::selectorsFromSource):
(WebCore::InspectorStyleSheet::buildObjectForSelector):
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::buildObjectForStyle):
(WebCore::InspectorStyleSheet::toggleProperty):
(WebCore::InspectorStyleSheet::inspectorStyleForId):
(WebCore::InspectorStyleSheet::rememberInspectorStyle):
(WebCore::InspectorStyleSheet::buildArrayForRuleList):
(WebCore::InspectorStyleSheet::collectFlatRules):
(WebCore::InspectorStyleSheetForInlineStyle::create):
(WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
(WebCore::InspectorStyleSheetForInlineStyle::inspectorStyleForId):
* inspector/InspectorStyleSheet.h:
(WebCore::InspectorCSSId::InspectorCSSId):
(WebCore::InspectorCSSId::asProtocolValue):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::stopFromConsole):
(WebCore::InspectorTimelineAgent::addRecordToTimeline):
(WebCore::InspectorTimelineAgent::didCompleteRecordEntry):
(WebCore::InspectorTimelineAgent::appendRecord):
(WebCore::InspectorTimelineAgent::sendEvent):
(WebCore::InspectorTimelineAgent::createRecordEntry):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::sendMessageToWorker):
* inspector/InspectorWorkerAgent.h:
* inspector/NetworkResourcesData.cpp:
(WebCore::XHRReplayData::create):
(WebCore::XHRReplayData::XHRReplayData):
* inspector/NetworkResourcesData.h:
(WebCore::NetworkResourcesData::ResourceData::decoder):
(WebCore::NetworkResourcesData::ResourceData::setDecoder):
(WebCore::NetworkResourcesData::ResourceData::buffer):
(WebCore::NetworkResourcesData::ResourceData::setBuffer):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
(WebCore::TimelineRecordFactory::createBackgroundRecord):
(WebCore::TimelineRecordFactory::createGCEventData):
(WebCore::TimelineRecordFactory::createFunctionCallData):
(WebCore::TimelineRecordFactory::createConsoleProfileData):
(WebCore::TimelineRecordFactory::createProbeSampleData):
(WebCore::TimelineRecordFactory::createEventDispatchData):
(WebCore::TimelineRecordFactory::createGenericTimerData):
(WebCore::TimelineRecordFactory::createTimerInstallData):
(WebCore::TimelineRecordFactory::createXHRReadyStateChangeData):
(WebCore::TimelineRecordFactory::createXHRLoadData):
(WebCore::TimelineRecordFactory::createEvaluateScriptData):
(WebCore::TimelineRecordFactory::createTimeStampData):
(WebCore::TimelineRecordFactory::createScheduleResourceRequestData):
(WebCore::TimelineRecordFactory::createResourceSendRequestData):
(WebCore::TimelineRecordFactory::createResourceReceiveResponseData):
(WebCore::TimelineRecordFactory::createResourceFinishData):
(WebCore::TimelineRecordFactory::createReceiveResourceData):
(WebCore::TimelineRecordFactory::createLayoutData):
(WebCore::TimelineRecordFactory::createDecodeImageData):
(WebCore::TimelineRecordFactory::createResizeImageData):
(WebCore::TimelineRecordFactory::createMarkData):
(WebCore::TimelineRecordFactory::createParseHTMLData):
(WebCore::TimelineRecordFactory::createAnimationFrameData):
(WebCore::createQuad):
(WebCore::TimelineRecordFactory::createPaintData):
(WebCore::buildInspectorObject):
(WebCore::buildProfileInspectorObject):
(WebCore::TimelineRecordFactory::appendProfile):
* inspector/TimelineRecordFactory.h:
(WebCore::TimelineRecordFactory::createWebSocketCreateData):
(WebCore::TimelineRecordFactory::createGenericWebSocketData):
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::executionStopwatch):
* inspector/WorkerInspectorController.h:
* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::addMessage):
(WebCore::PageConsoleClient::messageWithTypeAndLevel):
(WebCore::PageConsoleClient::count):
(WebCore::PageConsoleClient::profileEnd):
(WebCore::PageConsoleClient::timeEnd):
(WebCore::PageConsoleClient::timeStamp):
* page/PageConsoleClient.h:
* replay/ReplayController.cpp:
(WebCore::ReplayController::switchSession):
(WebCore::ReplayController::createSegment):
(WebCore::ReplayController::completeSegment):
(WebCore::ReplayController::loadSegmentAtIndex):
* replay/ReplayInputCreationMethods.cpp:
(WebCore::InitialNavigation::createFromPage):
* workers/SharedWorkerGlobalScope.cpp:
(WebCore::SharedWorkerGlobalScope::logExceptionToConsole):
* workers/SharedWorkerGlobalScope.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::logExceptionToConsole):
(WebCore::WorkerGlobalScope::addMessage):
(WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
* workers/WorkerGlobalScope.h:
2015-01-07 Anders Carlsson <andersca@apple.com>
Annotate properties that start with "new" so they'll work under ARC
https://bugs.webkit.org/show_bug.cgi?id=140215
rdar://problem/19399153
Reviewed by Geoffrey Garen.
When encountering attributes that start with "new", also generate an additional getter method declaration that
has an NS_RETURNS_NOT_RETAINED annotation so ARC will know not to overrelease the property value.
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader):
2015-01-07 Beth Dakin <bdakin@apple.com>
Adopt delegate callbacks so that standardQuickLookMenuItem does not obscure the
link
https://bugs.webkit.org/show_bug.cgi?id=140206
-and corresponding-
rdar://problem/19300492
Reviewed by Tim Horton.
More delegate methods.
* platform/spi/mac/QuickLookMacSPI.h:
2015-01-07 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Negative raster shape height leads to crash
https://bugs.webkit.org/show_bug.cgi?id=136087
Reviewed by Zoltan Horvath.
This patch clamps the size of the margin box rect used to compute the
raster shape on a float so the width and height cannot be negative.
This makes it safe to use that rect to determine the size of the shape
intervals data structure.
Test: fast/shapes/shape-outside-floats/shape-outside-negative-height-crash.html
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createRasterShape): Add an assert to be explict about
the precondition.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::getShapeImageMarginRect): Clamp the marginRect's size.
2015-01-06 Sam Weinig <sam@webkit.org>
Modernize the SVGElement and MathMLElement factories
https://bugs.webkit.org/show_bug.cgi?id=140163
Reviewed by Dan Bernstein.
* dom/Element.cpp:
(WebCore::Element::create):
* dom/Element.h:
Change to return a Ref rather than a RefPtr.
* dom/make_names.pl:
(printConstructorSignature):
(printFactoryCppFile):
(printFactoryHeaderFile):
Change to unconditionally use Ref as the return type for element factories
now that HTML is not special cased.
* SVG and MathML element files elided *
Changed all SVG and MathML element's create functions to return a Ref.
2015-01-07 David Kilzer <ddkilzer@apple.com>
REGRESSION (r178028): iOS build broken due to unused parameters in GlyphPage::mayUseMixedFontDataWhenFilling()
Fixes the following build errors:
WebCore/platform/graphics/mac/GlyphPageMac.cpp:58:61: error: unused parameter 'buffer' [-Werror,-Wunused-parameter]
bool GlyphPage::mayUseMixedFontDataWhenFilling(const UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData)
^
WebCore/platform/graphics/mac/GlyphPageMac.cpp:58:78: error: unused parameter 'bufferLength' [-Werror,-Wunused-parameter]
bool GlyphPage::mayUseMixedFontDataWhenFilling(const UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData)
^
WebCore/platform/graphics/mac/GlyphPageMac.cpp:58:114: error: unused parameter 'fontData' [-Werror,-Wunused-parameter]
bool GlyphPage::mayUseMixedFontDataWhenFilling(const UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData)
^
3 errors generated.
* platform/graphics/mac/GlyphPageMac.cpp:
(WebCore::GlyphPage::mayUseMixedFontDataWhenFilling): Add
UNUSED_PARAM() as needed.
2015-01-07 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Content does not wrap with overflow: hidden and reference box different from margin-box
https://bugs.webkit.org/show_bug.cgi?id=138139
Reviewed by David Hyatt.
To determine how much an box needs to shink to avoid a float, the code
was only taking into account the first line of the box. This doesn't
work when the float has a shape, as it can make it seem like there is
more space on the line than there actually is. This patch changes the
calculations to take into account the entire height of the box that
needs to be shrunk, and thus computes the correct amount of space
available.
Test: fast/shapes/shape-outside-floats/shape-overflow-hidden-left-margin.html
fast/shapes/shape-outside-floats/shape-overflow-hidden-right-margin.html
fast/shapes/shape-outside-floats/shape-overflow-hidden.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
2015-01-07 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r178039.
https://bugs.webkit.org/show_bug.cgi?id=140187
Breaks ObjC Inspector Protocol (Requested by JoePeck on
#webkit).
Reverted changeset:
"Web Inspector: purge PassRefPtr from Inspector code and use
Ref for typed and untyped protocol objects"
https://bugs.webkit.org/show_bug.cgi?id=140053
http://trac.webkit.org/changeset/178039
2015-01-06 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: purge PassRefPtr from Inspector code and use Ref for typed and untyped protocol objects
https://bugs.webkit.org/show_bug.cgi?id=140053
Reviewed by Andreas Kling.
This patch replaces uses of PassRefPtr with uses of RefPtr&& and WTF::move() in code
related to Web Inspector. It also converts many uses of RefPtr to Ref where
references are always non-null. These two refactorings have been combined since
they tend to require similar changes to the code.
No new tests, no behavior changed.
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabase):
* dom/Document.cpp:
(WebCore::Document::logExceptionToConsole):
(WebCore::Document::addMessage):
* dom/Document.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::reportException):
* dom/ScriptExecutionContext.h:
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::generateViolationReport):
* inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::inspectImpl):
* inspector/CommandLineAPIHost.h:
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
(WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
(WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
(WebCore::InspectorCSSAgent::setStyleText):
(WebCore::InspectorCSSAgent::setPropertyText):
(WebCore::InspectorCSSAgent::toggleProperty):
(WebCore::InspectorCSSAgent::setRuleSelector):
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::forcePseudoState):
(WebCore::InspectorCSSAgent::getNamedFlowCollection):
(WebCore::InspectorCSSAgent::detectOrigin):
(WebCore::InspectorCSSAgent::buildObjectForRule):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
(WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
(WebCore::InspectorCSSAgent::buildArrayForRegions):
(WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
(WebCore::InspectorInstrumentation::consoleCount):
(WebCore::InspectorInstrumentation::stopConsoleTiming):
(WebCore::InspectorInstrumentation::consoleTimeStamp):
(WebCore::InspectorInstrumentation::stopProfiling):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::buildObjectForHighlightedNode):
(WebCore::InspectorController::executionStopwatch):
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::parseColor):
(WebCore::parseConfigColor):
(WebCore::InspectorDOMAgent::pushNodePathToFrontend):
(WebCore::InspectorDOMAgent::performSearch):
(WebCore::InspectorDOMAgent::setInspectModeEnabled):
(WebCore::InspectorDOMAgent::highlightRect):
(WebCore::InspectorDOMAgent::highlightQuad):
(WebCore::InspectorDOMAgent::innerHighlightQuad):
(WebCore::InspectorDOMAgent::highlightNode):
(WebCore::InspectorDOMAgent::highlightFrame):
(WebCore::InspectorDOMAgent::buildObjectForNode):
(WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
(WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
(WebCore::InspectorDOMAgent::processAccessibilityChildren):
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
(WebCore::InspectorDOMAgent::didCommitLoad):
(WebCore::InspectorDOMAgent::didInsertDOMNode):
(WebCore::InspectorDOMAgent::styleAttributeInvalidated):
(WebCore::InspectorDOMAgent::resolveNode):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
(WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
(WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
(WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
(WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
(WebCore::InspectorDOMStorageAgent::storageId):
(WebCore::InspectorDOMStorageAgent::findStorageArea):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp: Use Ref for all callbacks since they are
not nullable.
(WebCore::InspectorDatabaseAgent::executeSQL):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseInstrumentation.h:
(WebCore::InspectorInstrumentation::didOpenDatabase):
* inspector/InspectorDatabaseResource.cpp:
(WebCore::InspectorDatabaseResource::create):
(WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
(WebCore::InspectorDatabaseResource::bind):
* inspector/InspectorDatabaseResource.h:
(WebCore::InspectorDatabaseResource::setDatabase):
* inspector/InspectorFrontendHost.h:
(WebCore::InspectorFrontendHost::create):
* inspector/InspectorIndexedDBAgent.cpp: Use Ref for all callbacks since they are
not nullable.
(WebCore::InspectorIndexedDBAgent::requestDatabaseNames):
(WebCore::InspectorIndexedDBAgent::requestDatabase):
(WebCore::InspectorIndexedDBAgent::requestData):
(WebCore::ClearObjectStoreListener::create):
(WebCore::ClearObjectStoreListener::ClearObjectStoreListener):
(WebCore::ClearObjectStore::create):
(WebCore::ClearObjectStore::ClearObjectStore):
(WebCore::InspectorIndexedDBAgent::clearObjectStore):
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willLoadXHRImpl):
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::consoleCountImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
(WebCore::InspectorInstrumentation::consoleTimeStampImpl):
(WebCore::InspectorInstrumentation::stopProfilingImpl):
(WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
(WebCore::InspectorInstrumentation::sessionCreatedImpl):
(WebCore::InspectorInstrumentation::sessionLoadedImpl):
(WebCore::InspectorInstrumentation::sessionModifiedImpl):
(WebCore::InspectorInstrumentation::segmentCreatedImpl):
(WebCore::InspectorInstrumentation::segmentCompletedImpl):
(WebCore::InspectorInstrumentation::segmentLoadedImpl):
(WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl): Deleted.
(WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl): Deleted.
(WebCore::InspectorInstrumentation::startProfilingImpl): Deleted.
(WebCore::InspectorInstrumentation::didDispatchDOMStorageEventImpl): Deleted.
(WebCore::InspectorInstrumentation::willEvaluateWorkerScript): Deleted.
(WebCore::InspectorInstrumentation::captureStoppedImpl): Deleted.
(WebCore::InspectorInstrumentation::playbackStartedImpl): Deleted.
(WebCore::InspectorInstrumentation::playbackPausedImpl): Deleted.
(WebCore::InspectorInstrumentation::playbackHitPositionImpl): Deleted.
(WebCore::InspectorInstrumentation::playbackFinishedImpl): Deleted.
(WebCore::InspectorInstrumentation::networkStateChangedImpl): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willLoadXHR):
(WebCore::InspectorInstrumentation::sessionCreated):
(WebCore::InspectorInstrumentation::sessionLoaded):
(WebCore::InspectorInstrumentation::sessionModified):
(WebCore::InspectorInstrumentation::segmentCreated):
(WebCore::InspectorInstrumentation::segmentCompleted):
(WebCore::InspectorInstrumentation::segmentLoaded):
(WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): Deleted.
(WebCore::InspectorInstrumentation::didSendWebSocketFrame): Deleted.
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
(WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForPoint):
(WebCore::buildObjectForRect):
(WebCore::buildArrayForQuad):
(WebCore::buildObjectForHighlight):
(WebCore::buildObjectForRegionHighlight):
(WebCore::buildObjectForCSSRegionsHighlight):
(WebCore::buildObjectForSize):
(WebCore::buildObjectForCSSRegionContentClip):
(WebCore::InspectorOverlay::drawPaintRects):
(WebCore::buildObjectForRendererFragments):
(WebCore::buildObjectForShapeOutside):
(WebCore::buildObjectForElementInfo):
(WebCore::InspectorOverlay::buildObjectForHighlightedNode):
(WebCore::InspectorOverlay::reset):
(WebCore::InspectorOverlay::evaluateInOverlay):
* inspector/InspectorOverlay.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::createXHRTextDecoder):
(WebCore::buildObjectForCookie):
(WebCore::buildArrayForCookies):
(WebCore::buildObjectForSearchResult):
(WebCore::InspectorPageAgent::buildObjectForFrame):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
* inspector/InspectorPageAgent.h:
* inspector/InspectorReplayAgent.cpp:
(WebCore::buildInspectorObjectForPosition):
(WebCore::buildInspectorObjectForInput):
(WebCore::buildInspectorObjectForSession):
(WebCore::buildInspectorObjectForSegment):
(WebCore::InspectorReplayAgent::replayToPosition):
(WebCore::InspectorReplayAgent::getSessionData):
(WebCore::InspectorReplayAgent::getSegmentData):
* inspector/InspectorReplayAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForHeaders):
(WebCore::buildObjectForTiming):
(WebCore::buildObjectForResourceRequest):
(WebCore::buildObjectForResourceResponse):
(WebCore::buildObjectForCachedResource):
(WebCore::InspectorResourceAgent::willLoadXHR):
(WebCore::InspectorResourceAgent::buildInitiatorObject):
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
(WebCore::InspectorResourceAgent::didSendWebSocketFrame):
(WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
(WebCore::InspectorResourceAgent::loadResource):
(WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient): Deleted.
(WebCore::InspectorResourceAgent::didScheduleStyleRecalculation): Deleted.
(WebCore::InspectorResourceAgent::disable): Deleted.
(WebCore::InspectorResourceAgent::setCacheDisabled): Deleted.
* inspector/InspectorResourceAgent.h:
* inspector/InspectorStyleSheet.cpp:
(ParsedStyleSheet::ruleSourceDataAt):
(WebCore::buildSourceRangeObject):
(WebCore::buildMediaObject):
(WebCore::asCSSRuleList):
(WebCore::fillMediaListChain):
(WebCore::InspectorStyle::create):
(WebCore::InspectorStyle::InspectorStyle):
(WebCore::InspectorStyle::buildObjectForStyle):
(WebCore::InspectorStyle::buildArrayForComputedStyle):
(WebCore::InspectorStyle::styleWithProperties):
(WebCore::InspectorStyle::extractSourceData):
(WebCore::InspectorStyleSheet::create):
(WebCore::InspectorStyleSheet::InspectorStyleSheet):
(WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
(WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
(WebCore::buildObjectForSelectorHelper):
(WebCore::selectorsFromSource):
(WebCore::InspectorStyleSheet::buildObjectForSelector):
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::buildObjectForStyle):
(WebCore::InspectorStyleSheet::toggleProperty):
(WebCore::InspectorStyleSheet::inspectorStyleForId):
(WebCore::InspectorStyleSheet::rememberInspectorStyle):
(WebCore::InspectorStyleSheet::buildArrayForRuleList):
(WebCore::InspectorStyleSheet::collectFlatRules):
(WebCore::InspectorStyleSheetForInlineStyle::create):
(WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
(WebCore::InspectorStyleSheetForInlineStyle::inspectorStyleForId):
* inspector/InspectorStyleSheet.h:
(WebCore::InspectorCSSId::InspectorCSSId):
(WebCore::InspectorCSSId::asProtocolValue):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::stopFromConsole):
(WebCore::InspectorTimelineAgent::addRecordToTimeline):
(WebCore::InspectorTimelineAgent::didCompleteRecordEntry):
(WebCore::InspectorTimelineAgent::appendRecord):
(WebCore::InspectorTimelineAgent::sendEvent):
(WebCore::InspectorTimelineAgent::createRecordEntry):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::sendMessageToWorker):
* inspector/InspectorWorkerAgent.h:
* inspector/NetworkResourcesData.cpp:
(WebCore::XHRReplayData::create):
(WebCore::XHRReplayData::XHRReplayData):
* inspector/NetworkResourcesData.h:
(WebCore::NetworkResourcesData::ResourceData::decoder):
(WebCore::NetworkResourcesData::ResourceData::setDecoder):
(WebCore::NetworkResourcesData::ResourceData::buffer):
(WebCore::NetworkResourcesData::ResourceData::setBuffer):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
(WebCore::TimelineRecordFactory::createBackgroundRecord):
(WebCore::TimelineRecordFactory::createGCEventData):
(WebCore::TimelineRecordFactory::createFunctionCallData):
(WebCore::TimelineRecordFactory::createConsoleProfileData):
(WebCore::TimelineRecordFactory::createProbeSampleData):
(WebCore::TimelineRecordFactory::createEventDispatchData):
(WebCore::TimelineRecordFactory::createGenericTimerData):
(WebCore::TimelineRecordFactory::createTimerInstallData):
(WebCore::TimelineRecordFactory::createXHRReadyStateChangeData):
(WebCore::TimelineRecordFactory::createXHRLoadData):
(WebCore::TimelineRecordFactory::createEvaluateScriptData):
(WebCore::TimelineRecordFactory::createTimeStampData):
(WebCore::TimelineRecordFactory::createScheduleResourceRequestData):
(WebCore::TimelineRecordFactory::createResourceSendRequestData):
(WebCore::TimelineRecordFactory::createResourceReceiveResponseData):
(WebCore::TimelineRecordFactory::createResourceFinishData):
(WebCore::TimelineRecordFactory::createReceiveResourceData):
(WebCore::TimelineRecordFactory::createLayoutData):
(WebCore::TimelineRecordFactory::createDecodeImageData):
(WebCore::TimelineRecordFactory::createResizeImageData):
(WebCore::TimelineRecordFactory::createMarkData):
(WebCore::TimelineRecordFactory::createParseHTMLData):
(WebCore::TimelineRecordFactory::createAnimationFrameData):
(WebCore::createQuad):
(WebCore::TimelineRecordFactory::createPaintData):
(WebCore::buildInspectorObject):
(WebCore::buildProfileInspectorObject):
(WebCore::TimelineRecordFactory::appendProfile):
* inspector/TimelineRecordFactory.h:
(WebCore::TimelineRecordFactory::createWebSocketCreateData):
(WebCore::TimelineRecordFactory::createGenericWebSocketData):
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::executionStopwatch):
* inspector/WorkerInspectorController.h:
* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::addMessage):
(WebCore::PageConsoleClient::messageWithTypeAndLevel):
(WebCore::PageConsoleClient::count):
(WebCore::PageConsoleClient::profileEnd):
(WebCore::PageConsoleClient::timeEnd):
(WebCore::PageConsoleClient::timeStamp):
* page/PageConsoleClient.h:
* replay/ReplayController.cpp:
(WebCore::ReplayController::switchSession):
(WebCore::ReplayController::createSegment):
(WebCore::ReplayController::completeSegment):
(WebCore::ReplayController::loadSegmentAtIndex):
* replay/ReplayInputCreationMethods.cpp:
(WebCore::InitialNavigation::createFromPage):
* workers/SharedWorkerGlobalScope.cpp:
(WebCore::SharedWorkerGlobalScope::logExceptionToConsole):
* workers/SharedWorkerGlobalScope.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::logExceptionToConsole):
(WebCore::WorkerGlobalScope::addMessage):
(WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
* workers/WorkerGlobalScope.h:
2015-01-07 Chris Fleizach <cfleizach@apple.com>
AX: Crash: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse + 149
https://bugs.webkit.org/show_bug.cgi?id=139929
Reviewed by Darin Adler.
When a frame is replaced, there were instances when it was not clearing its associated nodes in the accessibility text marker -> Node cache.
This caused dead Nodes to be left in the cache which would eventually be accessed when the cache was cleaned out at a later time.
To fix this we should be clearing out the cache in Document::prepareForDestruction, instead of Frame::disconnectOwnerElement.
While working on this, it also exposed a problem where when a frame goes away, it doesn't inform its parent to update its children,
which causes an ASSERT to be hit with this test as well.
Tests: accessibility/frame-disconnect-textmarker-cache-crash.html
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
* page/Frame.cpp:
(WebCore::Frame::disconnectOwnerElement):
Remove cache management from here since it is superceded by code in Document::prepareForDestruction
* page/FrameView.cpp:
(WebCore::FrameView::removeFromAXObjectCache):
2015-01-07 Zan Dobersek <zdobersek@igalia.com>
Unreviewed fix for the CoordinatedGraphics builds after r178034.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::setChildren): Add back the setChildren()
variant that receives a reference to the Vector of TextureMapperLayer
objects. This is still used by the CoordinatedGraphics code that still
constructs a separate Vector object each time the layer's children change.
* platform/graphics/texmap/TextureMapperLayer.h:
2015-01-07 Zan Dobersek <zdobersek@igalia.com>
[TexMap] Use std::sort instead of qsort in TextureMapperLayer::sortByZOrder()
https://bugs.webkit.org/show_bug.cgi?id=136212
Reviewed by Darin Adler.
Use std::sort() instead of qsort() to sort the TextureMapperLayer objects
by their z-order. A lambda expression can be used to compare the m_centerZ
member variables of any two TextureMapperLayers.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::sortByZOrder):
(WebCore::TextureMapperLayer::compareGraphicsLayersZValue): Deleted.
* platform/graphics/texmap/TextureMapperLayer.h:
2015-01-06 Zan Dobersek <zdobersek@igalia.com>
[TexMap] Avoid constructing Vector when setting new children of TextureMapperLayer
https://bugs.webkit.org/show_bug.cgi?id=137265
Reviewed by Brent Fulgham.
Instead of constructing a vector object and populating it with TextureMapperLayers
every time the children of a GraphicsLayer change, the children vector is now passed
directly to TextureMapperLayer::setChildren(), which properly downcasts GraphicsLayers
and adds the new TextureMapperLayer children.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::toTextureMapperLayerVector): Deleted.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::setChildren):
* platform/graphics/texmap/TextureMapperLayer.h:
2015-01-07 Zan Dobersek <zdobersek@igalia.com>
[TexMap] m_layer member in GraphicsLayerTextureMapper is always non-null
https://bugs.webkit.org/show_bug.cgi?id=140135
Reviewed by Darin Adler.
Since the TextureMapperLayer member in the GraphicsLayerTextureMapper class
is always non-null, we don't need to keep it in a std::unique_ptr<>.
GraphicsLayerTextureMapper::layer() now returns a reference to the m_layer member.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
(WebCore::toTextureMapperLayerVector):
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::GraphicsLayerTextureMapper::flushCompositingState):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
(WebCore::GraphicsLayerTextureMapper::setFilters):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2015-01-07 Byungseon Shin <sun.shin@lge.com>
Fix Border-radius clipping issue on a composited descendants
https://bugs.webkit.org/show_bug.cgi?id=138551
Reviewed by Simon Fraser.
Fix clipping compositing descendants of an accelerated layer having
border radius and clip overflow issue by using layer corner-radius
or a CAShapeLayer mask on Mac, and setting up a separate mask layer
on the childContainmentLayer on other platforms.
This patch is extracted from following Blink revisions:
<http://src.chromium.org/viewvc/blink?view=revision&revision=162463>
<http://src.chromium.org/viewvc/blink?view=revision&revision=158258>
by <rosca@adobe.com>
Clip accelerated descendants of an accelerated layer having border radius and clip overflow.
Large canvas does not honor containing div's border radius.
and <http://src.chromium.org/viewvc/blink?view=revision&revision=160578>
by <junov@chromium.org>
Fix for CSS clip-path with accelerated 2D canvas.
* WebCore.exp.in:
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::dumpProperties):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::applyClippingBorder):
(WebCore::GraphicsLayer::clearClippingBorder):
(WebCore::GraphicsLayer::needsClippingMaskLayer):
* platform/graphics/GraphicsLayerClient.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::applyClippingBorder):
(WebCore::GraphicsLayerCA::clearClippingBorder):
* platform/graphics/ca/GraphicsLayerCA.h:
* rendering/PaintPhase.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintClippingMask):
* rendering/RenderBox.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintChildClippingMaskForFragments):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::~RenderLayerBacking):
(WebCore::RenderLayerBacking::destroyGraphicsLayers):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::updateChildClippingStrategy):
(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
(WebCore::RenderLayerBacking::paintIntoLayer):
(WebCore::RenderLayerBacking::paintContents):
(WebCore::RenderLayerBacking::backingStoreMemoryEstimate):
* rendering/RenderLayerBacking.h:
2015-01-06 Antti Koivisto <antti@apple.com>
Use HashMap instead of CFDictionary for composite font reference map
https://bugs.webkit.org/show_bug.cgi?id=140150
Reviewed by Geoff Garen.
Use WebKit types. Also use USE(APPKIT) consistently for this feature.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
The whole desctructor gets handled implicitly.
* platform/graphics/SimpleFontData.h:
* platform/graphics/mac/GlyphPageMac.cpp:
(WebCore::GlyphPage::mayUseMixedFontDataWhenFilling):
(WebCore::GlyphPage::fill):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::compositeFontReferenceFontData):
(WebCore::SimpleFontData::getCompositeFontReferenceFontData): Deleted.
2015-01-07 Mihnea Ovidenie <mihnea@adobe.com>
ASSERTION FAILED: rareData->m_flowThreadContainingBlock.value() == RenderBox::locateFlowThreadContainingBlock() in WebCore::RenderBlock::locateFlowThreadContainingBlock
https://bugs.webkit.org/show_bug.cgi?id=139390
Reviewed by Andrei Bucur.
When a block level element is inserted into an inline element, the inline element is split
in order to make sure that all the inline element children are properly wrapped inside
anonymous block elements. If the inline element is inside a pagination context, we have
to invalidate the cached flow thread containing block for the split inline element and its descendants.
Test: fast/multicol/newmulticol/block-split-inline-in-multicol.html
* rendering/RenderInline.cpp:
(WebCore::RenderInline::splitInlines):
2015-01-06 Chris Dumez <cdumez@apple.com>
Move 'content' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140169
Reviewed by Sam Weinig.
Move 'content' CSS property to the new StyleBuilder.
* css/CSSPropertyNames.in:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialContent):
(WebCore::StyleBuilderCustom::applyInheritContent):
(WebCore::StyleBuilderCustom::applyValueContent):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2015-01-06 Chris Dumez <cdumez@apple.com>
Move 'webkit-mask-image' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140168
Reviewed by Sam Weinig.
Move 'webkit-mask-image' CSS property to the new StyleBuilder.
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertMaskImageOperations):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitMaskImage):
(WebCore::StyleBuilderCustom::applyInheritWebkitMaskImage):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::createMaskImageOperations): Deleted.
* css/StyleResolver.h:
2015-01-06 Chris Dumez <cdumez@apple.com>
Drop ResourceResponseBase::connectionID and connectionReused members
https://bugs.webkit.org/show_bug.cgi?id=140158
Reviewed by Sam Weinig.
Drop ResourceResponseBase::connectionID and connectionReused members.
Those were needed by the Chromium port but are no longer used.
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForResourceResponse):
* page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::connectEnd):
* page/PerformanceResourceTiming.h:
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::connectStart):
(WebCore::PerformanceTiming::connectEnd):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::ResourceResponseBase):
(WebCore::ResourceResponseBase::connectionReused): Deleted.
(WebCore::ResourceResponseBase::setConnectionReused): Deleted.
(WebCore::ResourceResponseBase::connectionID): Deleted.
(WebCore::ResourceResponseBase::setConnectionID): Deleted.
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::encode):
(WebCore::ResourceResponseBase::decode):
2015-01-06 Chris Dumez <cdumez@apple.com>
Move the 'alt' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140129
Reviewed by Darin Adler.
Move the 'alt' CSS property to the new StyleBuilder.
* css/CSSPropertyNames.in:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueAlt):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/style/RenderStyle.h:
2015-01-06 Chris Dumez <cdumez@apple.com>
Move '-webkit-text-size-adjust' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140157
Reviewed by Darin Adler.
Move '-webkit-text-size-adjust' CSS property to the new StyleBuilder.
* css/CSSPropertyNames.in:
* css/StyleBuilderCustom.h:
(WebCore::applyValueWebkitTextSizeAdjust):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2015-01-06 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Masking][CSS Shapes] Large corner radii use with inset() clip-path are not properly constrained
https://bugs.webkit.org/show_bug.cgi?id=140127
Reviewed by Darin Adler.
Constrain large corner radii for inset() clip-path in the same way
that border-radii are constrained.
Test: fast/masking/clip-path-inset-large-radii.html
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeInset::path): Add radii constraint. Also reformat
code a little to shut the style bot up.
2015-01-06 Chris Dumez <cdumez@apple.com>
Only throttle DOM timers if they change CSS properties that cannot cause non-descendant elements to become visible
https://bugs.webkit.org/show_bug.cgi?id=140142
Reviewed by Darin Adler.
Only throttle DOM timers if they change CSS properties that cannot cause
non-descendant elements to become visible. For example, a DOM timer may
change the height of an element that is outside the viewport. However,
changing its height may causes elements inside the viewport to move. As
such, we should NOT throttle such DOM timer.
With this patch, we only mark a repeating timer as candidate for
throttling if it is updating one of the following CSS properties:
left, right, top, bottom, webkit-transform, opacity.
Test: fast/dom/timer-height-change-no-throttling.html
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::propertyChangeMayRepaintNonDescendants):
(WebCore::JSCSSStyleDeclaration::putDelegate):
* page/DOMTimer.cpp:
(WebCore::DOMTimer::scriptDidCauseElementRepaint):
* page/DOMTimer.h:
2015-01-06 Chris Dumez <cdumez@apple.com>
Add utility method on FrameView that resumes animated images and unthrottles DOM timers
https://bugs.webkit.org/show_bug.cgi?id=140151
Reviewed by Darin Adler.
Add utility method on FrameView that resumes animated images and
unthrottles DOM timers.
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::viewportContentsChanged):
(WebCore::FrameView::scrollPositionChanged):
(WebCore::FrameView::performPostLayoutTasks):
* page/FrameView.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
2015-01-06 Chris Dumez <cdumez@apple.com>
Do not attempt to revalidate cached main resource on back/forward navigation
https://bugs.webkit.org/show_bug.cgi?id=139263
Reviewed by Darin Adler.
Do not attempt to revalidate cached main resource on back/forward
navigation, as allowed by RFC2616 & newer RFC7234 which distinguish
history mechanisms and caches, stating:
The freshness model (Section 4.2) does not necessarily apply to
history mechanisms. That is, a history mechanism can display a
previous representation even if it has expired.
Previously, we would bypass revalidation on back/forward navigation
only for sub-resources. This patch extends this policy to the main
resource as well.
This behavior is also consistent with IE10+ and Chrome. It makes it more
likely we return cached content to the user on back/forward navigation
and avoids making network requests in this case.
Test: http/tests/cache/history-navigation-no-resource-revalidation.html
* loader/cache/CacheValidation.cpp:
(WebCore::redirectChainAllowsReuse):
* loader/cache/CacheValidation.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::redirectChainAllowsReuse):
Add a "ReuseExpiredRedirectionOrNot" flag argument because in the case
of an HistoryBuffer navigation, we don't mind reuse an expired
redirection. However, we still need to make sure that the redirection
is actually cached before reusing it.
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
- Do the redirectChainAllowsReuse() check *before* checking if the cache
policy is CachePolicyHistoryBuffer. This is needed because
redirectChainAllowsReuse() will return false if the redirection is not
cached. Loading from the cache in this case will cause us to load the
wrong resource (the one before the redirection). This case is covered
by http/tests/navigation/redirect-on-reload-updates-history-item.html.
- Do not use the cached main resource if it has "cache-control: no-store",
even if it is a history navigation (cachePolicy is
CachePolicyHistoryBuffer). This maintains the previous behavior, and
some layout tests rely on this. We now have to be explicit about it
because cachePolicy() can now return CachePolicyHistoryBuffer for the
main resource (not just sub-resources). This difference in behavior
on history navigation for the main resource and sub-resources is not
great. However, I chose to maintain this pre-existing behavior in this
patch to do one behavior change at a time. We can harmonize this later.
Previously, the order was not an issue because the main resource was
always revalidated on back/forward navigation.
(WebCore::CachedResourceLoader::cachePolicy):
Return CachePolicyHistoryBuffer for the main resource in case of
history navigation, instead of CachePolicyVerify so that we don't
attempt to revalidate.
2015-01-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177988.
https://bugs.webkit.org/show_bug.cgi?id=140159
mysteriously broke 2 tests (Requested by kling on #webkit).
Reverted changeset:
"Pack WebCore::RuleData better."
https://bugs.webkit.org/show_bug.cgi?id=140109
http://trac.webkit.org/changeset/177988
2015-01-06 Chris Dumez <cdumez@apple.com>
Setting '-webkit-filter' to 'brightness(calc(10% * 2))' does not work
https://bugs.webkit.org/show_bug.cgi?id=140149
Reviewed by Darin Adler.
Setting '-webkit-filter' to 'brightness(calc(10% * 2))' was not working
because the CSS parser did not handle calculated values inside
brightness(). This patch addresses the issue.
Test: fast/css/webkit-filter-calc.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseBuiltinFilterArguments):
2015-01-06 Zalan Bujtas <zalan@apple.com>
Assertion in RenderGeometryMap::mapToContainer with LayoutUnit overflow.
https://bugs.webkit.org/show_bug.cgi?id=108619
rdar://problem/19391214
Use only FloatQuad in RenderGeometryMap::mapToContainer.
Due to the difference in the internal representation of FloatRect and FloatQuad,
with certain float values, converting FloatRect to FloatQuad and back
to FloatRect could produce a slightly different rect.
Reviewed by Simon Fraser.
Test: fast/block/geometry-map-assertion-with-tall-content.html
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::mapToContainer):
2015-01-06 Sam Weinig <sam@webkit.org>
Allow MathML in dashboard compatibility mode
https://bugs.webkit.org/show_bug.cgi?id=140153
Reviewed by Alexey Proskuryakov.
In what seems like an accident due to the way we used to disable SVG in
dashboard, MathML has been disable in dashboard compatibility mode. There
does not seem to be any reason to keep this accidental quirk.
Test: mathml/mathml-in-dashboard.html
* dom/make_names.pl:
(printFactoryCppFile):
2015-01-06 Simon Fraser <simon.fraser@apple.com>
Some composting reflections tests are broken
https://bugs.webkit.org/show_bug.cgi?id=139889
Reviewed by Tim Horton.
When creating layer clones for reflections, we'd clobber the layer background
color via resetting the custom appearance on the clone. Fix by having
PlatformCALayerMac::updateCustomAppearance() only do work when the appearance changes.
Some other drive-by nullptr changes, and include layer IDs in debug layer names.
Covered by existing pixel tests.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setName):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::updateCustomAppearance):
(PlatformCALayerMac::tiledBacking):
2015-01-04 Sam Weinig <sam@webkit.org>
Modernize the HTMLElement factory
https://bugs.webkit.org/show_bug.cgi?id=140063
Reviewed by Darin Adler.
Make the HTMLElement (and derived classes) create functions
and HTMLElementFactory return Refs rather than RefPtr/PassRefPtr.
* Files elided *
2015-01-06 Alexey Proskuryakov <ap@apple.com>
ADDRESS_SANITIZER macro is overloaded
https://bugs.webkit.org/show_bug.cgi?id=140130
Reviewed by Anders Carlsson.
* platform/RefCountedSupplement.h:
* platform/Supplementable.h:
Change the conditional to ENABLE(SECURITY_ASSERTIONS). These checks will be used
in debug builds, and also when one explicitly passes -DENABLE_SECURITY_ASSERTIONS.
2015-01-06 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: pass parameters to inspector agents by reference where possible
https://bugs.webkit.org/show_bug.cgi?id=140002
Reviewed by Andreas Kling.
Pass parameters by-reference from inspector instrumentation entry
points to inspector agents. If the event doesn't make sense with null
arguments, perform null checks before calling agent methods.
No new tests, no behavior changed.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::didCreateNamedFlow):
(WebCore::InspectorCSSAgent::willRemoveNamedFlow):
(WebCore::InspectorCSSAgent::didChangeRegionOverset):
(WebCore::InspectorCSSAgent::didRegisterNamedFlowContentElement):
(WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
(WebCore::InspectorCSSAgent::forcePseudoState):
* inspector/InspectorCSSAgent.h: Reorder methods to match instrumentation.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::handleTouchEvent):
(WebCore::InspectorDOMAgent::didInsertDOMNode):
(WebCore::InspectorDOMAgent::didRemoveDOMNode):
(WebCore::InspectorDOMAgent::willModifyDOMAttr):
(WebCore::InspectorDOMAgent::didModifyDOMAttr):
(WebCore::InspectorDOMAgent::didRemoveDOMAttr):
(WebCore::InspectorDOMAgent::characterDataModified):
(WebCore::InspectorDOMAgent::didInvalidateStyleAttr):
(WebCore::InspectorDOMAgent::didPushShadowRoot):
(WebCore::InspectorDOMAgent::willPopShadowRoot):
* inspector/InspectorDOMAgent.h: Reorder methods to match instrumentation.
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
(WebCore::InspectorDOMDebuggerAgent::didInsertDOMNode):
(WebCore::InspectorDOMDebuggerAgent::didRemoveDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
(WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
(WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
(WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
(WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
(WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
(WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
(WebCore::InspectorInstrumentation::didRemoveDOMAttrImpl):
(WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
(WebCore::InspectorInstrumentation::didPushShadowRootImpl):
(WebCore::InspectorInstrumentation::willPopShadowRootImpl):
(WebCore::InspectorInstrumentation::didCreateNamedFlowImpl): Add null check.
(WebCore::InspectorInstrumentation::willRemoveNamedFlowImpl): Add null check.
(WebCore::InspectorInstrumentation::didChangeRegionOversetImpl):
(WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElementImpl):
(WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElementImpl):
(WebCore::InspectorInstrumentation::handleTouchEventImpl):
(WebCore::InspectorInstrumentation::forcePseudoStateImpl):
(WebCore::InspectorInstrumentation::characterDataModifiedImpl):
(WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
(WebCore::InspectorInstrumentation::didEvaluateScriptImpl):
(WebCore::InspectorInstrumentation::didInvalidateLayoutImpl):
(WebCore::InspectorInstrumentation::willLayoutImpl):
(WebCore::InspectorInstrumentation::willPaintImpl):
(WebCore::InspectorInstrumentation::willScrollLayerImpl):
(WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl):
(WebCore::InspectorInstrumentation::applyEmulatedMediaImpl):
(WebCore::InspectorInstrumentation::willSendRequestImpl): Add null check.
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl): Add null checks.
(WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl): Add null check.
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl): Add null check.
(WebCore::InspectorInstrumentation::didFinishLoadingImpl): Add null check.
(WebCore::InspectorInstrumentation::didFailLoadingImpl): Add null check.
(WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
(WebCore::InspectorInstrumentation::loadEventFiredImpl): Add null check.
(WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl): Add null checks.
(WebCore::InspectorInstrumentation::loaderDetachedFromFrameImpl):
(WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl):
(WebCore::InspectorInstrumentation::startConsoleTimingImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
(WebCore::InspectorInstrumentation::consoleTimeStampImpl):
(WebCore::InspectorInstrumentation::didCreateWebSocketImpl): Add null check.
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl): Add null check.
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl): Add null check.
(WebCore::InspectorInstrumentation::didCloseWebSocketImpl): Add null check.
(WebCore::InspectorInstrumentation::renderLayerDestroyedImpl):
(WebCore::InspectorInstrumentation::pseudoElementDestroyedImpl):
(WebCore::InspectorInstrumentation::scriptsEnabledImpl): Deleted.
(WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl): Deleted.
(WebCore::InspectorInstrumentation::frameStartedLoadingImpl): Deleted.
(WebCore::InspectorInstrumentation::willWriteHTMLImpl): Deleted.
(WebCore::InspectorInstrumentation::startProfilingImpl): Deleted.
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::renderLayerDestroyed):
(WebCore::InspectorLayerTreeAgent::pseudoElementDestroyed):
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::frameDetached):
(WebCore::InspectorPageAgent::loaderDetachedFromFrame):
(WebCore::InspectorPageAgent::applyEmulatedMedia):
* inspector/InspectorPageAgent.h:
* inspector/InspectorReplayAgent.cpp:
(WebCore::InspectorReplayAgent::frameDetached):
* inspector/InspectorReplayAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::didReceiveResponse):
(WebCore::InspectorResourceAgent::didFinishLoading):
(WebCore::InspectorResourceAgent::didFailLoading):
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorResourceAgent::willDestroyCachedResource):
(WebCore::InspectorResourceAgent::didScheduleStyleRecalculation):
(WebCore::InspectorResourceAgent::mainFrameNavigated):
* inspector/InspectorResourceAgent.h: Reorder methods to match instrumentation.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didInvalidateLayout):
(WebCore::InspectorTimelineAgent::willLayout):
(WebCore::InspectorTimelineAgent::willPaint):
(WebCore::InspectorTimelineAgent::willScroll):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::InspectorTimelineAgent::didEvaluateScript):
(WebCore::InspectorTimelineAgent::didTimeStamp):
(WebCore::InspectorTimelineAgent::time):
(WebCore::InspectorTimelineAgent::timeEnd):
(WebCore::InspectorTimelineAgent::didMarkDOMContentEvent):
(WebCore::InspectorTimelineAgent::didMarkLoadEvent):
* inspector/InspectorTimelineAgent.h: Reorder methods to match instrumentation.
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::didCreateMainWorldContext):
(WebCore::PageRuntimeAgent::didCreateIsolatedContext): Deleted. It has no callers.
* inspector/PageRuntimeAgent.h:
* replay/ReplayController.cpp:
(WebCore::ReplayController::frameDetached):
* replay/ReplayController.h:
2015-01-06 Anders Carlsson <andersca@apple.com>
Remove an old workaround for an old unsupported plug-in
https://bugs.webkit.org/show_bug.cgi?id=140141
Reviewed by Brent Fulgham.
The old, pre-Vista(!) plug-in is no longer available so we don't need to have this workaround in place.
(If for some bizarre reason we'd ever want to bring it back it should be a flag that the plug-in code sets on the timer,
the shared timer code shouldn't know about plug-ins at all).
* platform/win/SharedTimerWin.cpp:
(WebCore::TimerWindowWndProc):
2015-01-06 Andreas Kling <akling@apple.com>
Pack WebCore::RuleData better.
<https://webkit.org/b/140109>
Reviewed by Benjamin Poulain.
Shrink RuleData by 8 bytes per instance by reordering members so that
the CSS JIT compilation status fits into the bitfield.
* css/RuleSet.h:
(WebCore::RuleData::compilationStatus):
* cssjit/SelectorCompiler.h:
(WebCore::SelectorCompilationStatus::SelectorCompilationStatus):
2015-01-06 Anders Carlsson <andersca@apple.com>
Add a WebKit1 database provider
https://bugs.webkit.org/show_bug.cgi?id=140126
Reviewed by Sam Weinig.
Use a Ref instead of a RefPtr since the database provider can never be null now.
* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::indexedDB):
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::databaseProvider):
2015-01-06 Antti Koivisto <antti@apple.com>
REGRESSION (r177876): 35% regression in Parser/html5-full-render
https://bugs.webkit.org/show_bug.cgi?id=140123
Followup fix.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::systemFallbackFontDataForCharacter):
The code failed to pass isForPlatformFont boolean.
2015-01-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177963.
https://bugs.webkit.org/show_bug.cgi?id=140136
Caused lots of crashes (Requested by smfr on #webkit).
Reverted changeset:
"Add a WebKit1 database provider"
https://bugs.webkit.org/show_bug.cgi?id=140126
http://trac.webkit.org/changeset/177963
2015-01-06 Antti Koivisto <antti@apple.com>
REGRESSION (r177876): 35% regression in Parser/html5-full-render
https://bugs.webkit.org/show_bug.cgi?id=140123
Reviewed by Darin Adler.
Resolving system fallbacks is extremely slow. GlyphPageTree used to cache them globally.
This patch brings back a simple global cache for system fallbacks.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::~SimpleFontData):
(WebCore::systemFallbackCache):
(WebCore::SimpleFontData::systemFallbackFontDataForCharacter):
(WebCore::SimpleFontData::removeFromSystemFallbackCache):
* platform/graphics/SimpleFontData.h:
2015-01-06 Antti Koivisto <antti@apple.com>
Rename SimpleFontData::AdditionalFontData to SimpleFontData::SVGData
https://bugs.webkit.org/show_bug.cgi?id=140124
Reviewed by Anders Carlsson.
The current name is vague and confusing (as AdditionalFontData is not a FontData).
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::glyphDataForCharacter):
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::SimpleFontData):
(WebCore::SimpleFontData::~SimpleFontData):
(WebCore::fillGlyphPage):
(WebCore::SimpleFontData::createScaledFontData):
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::widthForGlyph):
* rendering/svg/SVGTextLayoutEngineSpacing.cpp:
(WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning):
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::svgFontAndFontFaceElementForFontData):
* svg/SVGFontData.h:
2015-01-06 Timothy Horton <timothy_horton@apple.com>
Make explicit which TextIndicator animations are driven manually, and which run automatically
https://bugs.webkit.org/show_bug.cgi?id=140113
<rdar://problem/19383425>
Reviewed by Darin Adler.
* page/TextIndicator.cpp:
(WebCore::TextIndicator::wantsManualAnimation):
Add wantsManualAnimation(). The old transitions (Bounce and BounceAndCrossfade)
run automatically, and the new ones (FadeIn and Crossfade) are driven manually.
* page/TextIndicator.h:
Add a comment explaining which animations are manual and which are not.
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView present]):
Make use of wantsManualAnimation(). The previous (wantsFadeIn || wantsCrossfade)
was wrong, because it was true for BounceAndCrossfade, and would cause
BounceAndCrossfade animations (which aren't driven manually) to stall at progress=0.
2015-01-06 Anders Carlsson <andersca@apple.com>
Give empty pages a valid database provider.
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
2015-01-06 Myles C. Maxfield <mmaxfield@apple.com>
Fix iOS build after r177955 and r177952.
Unreviewed.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::insertPhoneNumberLink):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2015-01-06 Anders Carlsson <andersca@apple.com>
Remove now unused IndexedDB code
https://bugs.webkit.org/show_bug.cgi?id=140128
Reviewed by Darin Adler.
* CMakeLists.txt:
Remove files.
* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
Don't include PageGroupIndexedDatabase.h.
* Modules/indexeddb/IDBFactoryBackendInterface.cpp: Removed.
Remove this file, it just had one function calling through to the database strategy.
* Modules/indexeddb/IDBFactoryBackendInterface.h:
Remove the create function.
* Modules/indexeddb/PageGroupIndexedDatabase.cpp: Removed.
* Modules/indexeddb/PageGroupIndexedDatabase.h: Removed.
The backend is now per page, not per page group.
* WebCore.exp.in:
Remove an exported symbol.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Remove files.
* page/PageGroup.h:
PageGroup is no longer supplementable.
* platform/DatabaseStrategy.cpp:
(WebCore::DatabaseStrategy::createIDBFactoryBackend): Deleted.
* platform/DatabaseStrategy.h:
Remove a header.
2015-01-06 Anders Carlsson <andersca@apple.com>
Try to fix the Windows build.
* WebCore.vcxproj/copyForwardingHeaders.cmd:
2015-01-06 Chris Dumez <cdumez@apple.com>
Regression(r176212): Carousel on mbusa.com is choppy
https://bugs.webkit.org/show_bug.cgi?id=139543
<rdar://problem/19209406>
Reviewed by Antti Koivisto.
A repeating DOM timer changing the style of an element that has
overflowing content that is visible would get throttled in the
case where the overflowing content has its own layer. This is
because the repaint rect returned by
RenderObject::absoluteClippedOverflowRect() does not take into
consideration descendants with their own self-painting layer when
accounting for the overflow.
Until I can find a relatively cheap way of computing the overflow
in this case, this patch takes the conservative approach and
assumes we may repaint inside the viewport if the element does not
have a layer or if any of its descendants has its own layer.
This patch also renames isInsideViewport() function to
mayCauseRepaintInsideViewport() for clarity.
Tests: fast/dom/repeating-timer-element-overflow-hidden-throttling.html
fast/dom/repeating-timer-element-overflowing-child-own-layer-throttling.html
* dom/Element.cpp:
(WebCore::Element::mayCauseRepaintInsideViewport):
(WebCore::Element::isInsideViewport): Deleted.
* dom/Element.h:
* page/DOMTimer.cpp:
(WebCore::DOMTimer::scriptDidCauseElementRepaint):
(WebCore::DOMTimer::updateThrottlingStateAfterViewportChange):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::mayCauseRepaintInsideViewport):
(WebCore::RenderElement::isInsideViewport): Deleted.
* rendering/RenderElement.h:
2015-01-06 Anders Carlsson <andersca@apple.com>
Add a WebKit1 database provider
https://bugs.webkit.org/show_bug.cgi?id=140126
Reviewed by Sam Weinig.
Use a Ref instead of a RefPtr since the database provider can never be null now.
* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::indexedDB):
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::databaseProvider):
2015-01-06 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix after r177952.
Remove double class namespace in appendToAttributeValue.
* html/parser/HTMLToken.h:
(WebCore::HTMLToken::appendToAttributeValue): Added,
(WebCore::HTMLToken::HTMLToken::appendToAttributeValue): Deleted.
2015-01-05 Anders Carlsson <andersca@apple.com>
Add a DatabaseProvider subclass in WebKit2 and use it for IndexedDB
https://bugs.webkit.org/show_bug.cgi?id=140108
Reviewed by Darin Adler.
* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::indexedDB):
Get the IDBFactoryBackendInterface from the database provider.
* page/DatabaseProvider.cpp:
(WebCore::DatabaseProvider::idbFactoryBackend):
Change this to return a pointer.
* page/Page.h:
(WebCore::Page::databaseProvider):
Add a getter.
2015-01-06 Brent Fulgham <bfulgham@apple.com>
[Win] Another build fix attempt.
Reorder function declarations to avoid confusing compiler. Add explicit namespace for
out copied functions to avoid attempting to link against bindings version of these files.
* plugins/PluginPackage.cpp:
(WebCore::makeSource):
(WebCore::NPN_Evaluate):
(WebCore::NPN_Invoke):
(WebCore::PluginPackage::initializeBrowserFuncs):
2015-01-06 Chris Dumez <cdumez@apple.com>
Move '-webkit-scroll-snap-*' CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140112
Reviewed by Darin Adler.
Move '-webkit-scroll-snap-*' CSS properties to the new StyleBuilder.
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::parseSnapCoordinate):
(WebCore::StyleBuilderConverter::convertScrollSnapPoints):
(WebCore::StyleBuilderConverter::convertSnapCoordinatePair):
(WebCore::StyleBuilderConverter::convertScrollSnapCoordinates):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::parseSnapCoordinate): Deleted.
(WebCore::StyleResolver::parseSnapCoordinatePair): Deleted.
(WebCore::StyleResolver::parseSnapPoints): Deleted.
* css/StyleResolver.h:
2015-01-06 Antti Koivisto <antti@apple.com>
Resolve mirroring and variant in Font instead of FontGlyphs
https://bugs.webkit.org/show_bug.cgi?id=140079
Reviewed by Darin Adler.
Make FontGlyphs more focused. It doesn't need to know about resolving variants and mirroring.
* platform/graphics/Font.cpp:
(WebCore::Font::glyphDataForCharacter):
* platform/graphics/Font.h:
(WebCore::Font::glyphDataForCharacter): Deleted.
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::glyphDataForCharacter):
* platform/graphics/FontGlyphs.h:
2015-01-06 Shivakumar JM <shiva.jm@samsung.com>
Fix Unused parameter warning in Webcore bindings.
https://bugs.webkit.org/show_bug.cgi?id=140118
Reviewed by Gyuyoung Kim.
remove the Unused parameter from createScriptInstanceForWidget() function
No new tests, no behavior changed.
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::createScriptInstanceForWidget):
2015-01-05 Antti Koivisto <antti@apple.com>
Font::primaryFontData() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=140081
Reviewed by Darin Adler.
It is not null.
Also rename primaryFont() -> primaryFontData().
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(AXAttributeStringSetStyle):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetStyle):
* bindings/objc/DOM.mm:
(-[DOMElement _font]):
* editing/cocoa/HTMLConverter.mm:
(_font):
(WebCore::editingAttributedStringFromRange):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::fontForSelection):
(WebCore::Editor::fontAttributesForSelectionStart):
* editing/mac/EditorMac.mm:
(WebCore::Editor::fontForSelection):
(WebCore::Editor::fontAttributesForSelectionStart):
* platform/graphics/Font.cpp:
(WebCore::Font::fastAverageCharWidthIfAvailable):
* platform/graphics/Font.h:
(WebCore::Font::fontMetrics):
(WebCore::Font::spaceWidth):
(WebCore::Font::tabWidth):
(WebCore::Font::primaryFontData):
(WebCore::Font::primaryFont): Deleted.
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::primaryFontHasGlyphForCharacter):
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::determinePitch):
(WebCore::FontGlyphs::glyphDataForSystemFallback):
(WebCore::FontGlyphs::glyphDataForCharacter):
* platform/graphics/FontGlyphs.h:
(WebCore::FontGlyphs::primaryFontData):
(WebCore::FontGlyphs::primarySimpleFontData):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::advance):
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
* platform/graphics/mac/ComplexTextController.h:
(WebCore::ComplexTextController::ComplexTextRun::create):
(WebCore::ComplexTextController::ComplexTextRun::fontData):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::primaryFontDataIsSystemFont):
* platform/graphics/opentype/OpenTypeMathData.cpp:
* platform/graphics/opentype/OpenTypeMathData.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::requiresIdeographicBaseline):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::constructTextRun):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustLogicalLeftOffsetForLine):
(WebCore::RenderBlock::adjustLogicalRightOffsetForLine):
(WebCore::constructTextRunInternal):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
* rendering/RenderThemeIOS.mm:
(WebCore::adjustInputElementButtonStyle):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::ascentAndDescentForBox):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack):
(WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):
(WebCore::RenderMathMLOperator::findStretchyData):
(WebCore::RenderMathMLOperator::trailingSpaceError):
* rendering/mathml/RenderMathMLRadicalOperator.cpp:
(WebCore::RenderMathMLRadicalOperator::stretchTo):
(WebCore::RenderMathMLRadicalOperator::computePreferredLogicalWidths):
(WebCore::RenderMathMLRadicalOperator::computeLogicalHeight):
(WebCore::RenderMathMLRadicalOperator::paint):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::updateStyle):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::constructTextRun):
* rendering/svg/SVGTextLayoutEngineSpacing.cpp:
(WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning):
* rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::constructTextRun):
(WebCore::SVGTextMetrics::SVGTextMetrics):
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::missingGlyphForFont):
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2015-01-06 Chris Dumez <cdumez@apple.com>
Move '-webkit-filter' / '-webkit-backdrop-filter' to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140111
Reviewed by Darin Adler.
Move '-webkit-filter' / '-webkit-backdrop-filter' to the new
StyleBuilder.
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::createFilterOperations):
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertFilterOperations):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::createFilterOperations):
* css/StyleResolver.h:
2015-01-05 Darin Adler <darin@apple.com>
Modernize and streamline HTMLToken and AtomicHTMLToken
https://bugs.webkit.org/show_bug.cgi?id=140046
Reviewed by Andreas Kling.
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendDocumentType): Added code to properly
handle empty strings for systemId and publicId, rather than treating them
the same as missing systemId and publicId.
* html/parser/AtomicHTMLToken.h: Removed unneeded includes.
Moved function bodies out of the class so it's easier to see the contents of
the class. Renamed the isAll8BitData function to charactersIsAll8BitData
to make it clear that it is correct only for AtomicHTMLToken::characters.
Made more things private. Moved the findAttributeInVector function here
and renamed it to just findAttribute. Use unsigned instead of int and
size_t as appropriate. Changed the constructor that makes a fake one of
these to move the Vector of attributes in rather than copying it.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertDoctype): Moved the code to create
a string from here into AtomicHTMLToken.
(WebCore::HTMLConstructionSite::createElementFromSavedToken): Updated
to construct the Vector explicitly because all other call sites pass
ownership of the Vector in to the AtomicHTMLToken.
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpTokenizer): Check for an uninitialized
token without using a special function just for this purpose.
(WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Ditto.
* html/parser/HTMLParserIdioms.h: Removed the version of
stripLeadingAndTrailingHTMLSpaces that takes a character vector. Instead
the caller can make a string. Later we might want this to work with
a StringView, or a StringView/String combination.
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::scan): Updated to not use HTMLToken::data.
(WebCore::TokenPreloadScanner::updatePredictedBaseURL): Updated to not use
HTMLToken::getAttributeItem and to not require a special overload of the
stripLeadingAndTrailingHTMLSpaces function.
* html/parser/HTMLSourceTracker.cpp:
(WebCore::HTMLSourceTracker::end): Updated to call the token-ending
function by its new name, setEndOffset.
(WebCore::HTMLSourceTracker::sourceForToken): Updated since we no
longer have a startIndex function that already returns 0. Instead just
call length. Also use unsigned instead of size_t.
* html/parser/HTMLStackItem.h:
(WebCore::HTMLStackItem::getAttributeItem): Updated for name change.
* html/parser/HTMLToken.h: Removed the many unneeded includes,
including the self-include! Turned DoctypeData into a normal struct
without m_ prefixes on its member names. Turned HTMLToken::Attribute and
HTMLToken::Attribute::Range into normal structs. Moved function
bodies out of the class so it's easier to see the contents of
the class. Removed a few now-unneeded functions.
* html/parser/HTMLTokenizer.cpp: Removed the AtomicHTMLToken function
members that used to be here. None are needed any more; they are now all
just inlined at the call site. If we need any non-inline functions, then
we sould probably create an AtomicHTMLToken.cpp file instead.
(WebCore::HTMLTokenizer::processEntity): Use the new bufferASCIICharacter
function in all the cases where we know a character is ASCII to cut down
on the amount of 8-bit checking we have to do.
(WebCore::HTMLTokenizer::nextToken): Ditto.
* html/parser/HTMLTokenizer.h: Added a new bufferASCIICharacter function
so we don't have to do 8-bit checks on so many characters as we buffer
them. Also removed the call to ensureIsCharacterToken, since appendToCharacter
now does that. Also deleted overloads of bufferCharacter so we remember to
call bufferASCIICharacter instead.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
Updated for change in AtomicHTMLToken function names.
(WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto.
(WebCore::hasAttribute): Added.
(WebCore::HTMLTreeBuilder::processTokenInForeignContent): Use hasAtttribute.
* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::insertFakePreElement): Move the attributes in
rather than copying them in.
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::filterCharacterToken): Use clear so we don't have to
have an eraseCharacters function. Use a local variable to avoid overloading
ambiguity.
(WebCore::XSSAuditor::decodedSnippetForAttribute): Fixed a typo and the types
of some local variables.
2015-01-05 Darin Adler <darin@apple.com>
Revert mistake in yesterday's HTMLDocumentParser refactor.
https://bugs.webkit.org/show_bug.cgi?id=140041
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser): Pass the parser content policy
from the parserContentPolicy function, not the raw policy that was passed in. This
restores the behavior from before r177883.
2015-01-05 Chris Dumez <cdumez@apple.com>
Using calc() for -webkit-filter does not work
https://bugs.webkit.org/show_bug.cgi?id=140106
Reviewed by Darin Adler.
Using calc() for -webkit-filter did not work because the CSS parser did
not handle it properly. This patch addresses the issue.
Test: fast/css/webkit-filter-calc.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseBuiltinFilterArguments):
2015-01-05 Chris Dumez <cdumez@apple.com>
Allow HTTPS + 'Cache-control: no-cache' pages into the page cache
https://bugs.webkit.org/show_bug.cgi?id=139251
Reviewed by Darin Adler.
Allow HTTPS + 'Cache-control: no-cache' pages into the page cache as
IE10+ and Google Chrome do, and as allowed by RFC2616 & newer RFC7234
(both RFCs distinguish history mechanisms and caches).
Pages over HTTPs using 'Cache-control: no-store' still don't go into
the page cache for now.
Test: http/tests/navigation/https-in-page-cache.html
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* platform/FeatureCounterKeys.h:
2015-01-05 Chris Dumez <cdumez@apple.com>
Using calc() in repeat() for -webkit-grid-template-rows does not work
https://bugs.webkit.org/show_bug.cgi?id=140094
Reviewed by Darin Adler.
Using calc() in repeat() for -webkit-grid-template-rows was not working
because the CSS parser was not handling this case properly. This patch
addresses the issue.
Test: fast/css-grid-layout/grid-repeat-calc.html
* css/CSSCalculationValue.h:
(WebCore::CSSCalcValue::isPositive):
Add isPositive() method as it is needed by
CSSParser::validateCalculationUnit().
* css/CSSParser.cpp:
(WebCore::CSSParser::validateCalculationUnit):
Add support for FPositiveInteger, similarly to what was done in
validateUnit(). This would cause us to consider calc(1 + 1) as invalid
if a FPositiveInteger was requested.
(WebCore::CSSParser::parseGridTrackRepeatFunction):
Do not access fValue directly and call parsedDouble() instead as it
correctly handles calculation values.
2015-01-05 Chris Dumez <cdumez@apple.com>
calc() cannot be used in steps() for -webkit-animation-timing-function
https://bugs.webkit.org/show_bug.cgi?id=140091
Reviewed by Darin Adler.
calc() could not be used in steps() for -webkit-animation-timing-function
CSS property because the CSS parser did not handle this case properly.
This patch addresses the issue.
Test: fast/css/animation-steps-calculated-value.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseAnimationTimingFunction):
2015-01-05 Brent Fulgham <bfulgham@apple.com>
[Win] One more build fix for r177937.
* plugins/PluginPackage.cpp: Provide forward declaration for local NPN_Evaluate
implementation to avoid linker error.
2015-01-05 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix after r177937.
Add the missing #include and namespace declarations to get a clean build.
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::JSWebGLRenderingContext::getAttachedShaders):
* plugins/PluginPackage.cpp:
(WebCore::getListFromVariantArgs):
(WebCore::NPN_Invoke):
(WebCore::makeSource):
(WebCore::NPN_Evaluate):
2015-01-05 Anders Carlsson <andersca@apple.com>
Remove PluginViewNone.cpp
https://bugs.webkit.org/show_bug.cgi?id=140107
Reviewed by Andreas Kling.
* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformWin.cmake:
* WebCore.xcodeproj/project.pbxproj:
* plugins/PluginViewNone.cpp: Removed.
2015-01-05 Anders Carlsson <andersca@apple.com>
Stop including PluginView.h from cross platform WebCore code
https://bugs.webkit.org/show_bug.cgi?id=140105
Reviewed by Andreas Kling.
Instead, include PluginViewBase.h. This will allow us to move the old plug-in implementation to WebKit.
* bindings/js/ScriptController.cpp:
* bridge/NP_jsobject.cpp:
(_NPN_Evaluate):
* inspector/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused):
* loader/FrameLoaderClient.h:
* page/Page.cpp:
* plugins/PluginViewBase.h:
(WebCore::PluginViewBase::setJavaScriptPaused):
2015-01-05 Anders Carlsson <andersca@apple.com>
Introduce a per-page database provider class
https://bugs.webkit.org/show_bug.cgi?id=140102
Reviewed by Sam Weinig.
This class will replace DatabaseStrategy and allow for different providers per page.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* page/DatabaseProvider.cpp: Added.
(WebCore::DatabaseProvider::~DatabaseProvider):
(WebCore::DatabaseProvider::idbFactoryBackend):
* page/DatabaseProvider.h: Added.
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
* page/PageConfiguration.cpp:
* page/PageConfiguration.h:
2015-01-05 Anders Carlsson <andersca@apple.com>
Add copies of NPN_Evaluate and NPN_Invoke on Windows
https://bugs.webkit.org/show_bug.cgi?id=140103
Reviewed by Andreas Kling.
While this is unfortunate, it will allow us to get rid of PluginView.h and PluginViewNone.cpp
from the cross platform WebCore code and then move the plug-in code to WebKit/win (which is the only client of this plug-in implementation).
* plugins/PluginPackage.cpp:
(WebCore::NPN_Invoke):
(WebCore::NPN_Evaluate):
(WebCore::PluginPackage::initializeBrowserFuncs):
2015-01-05 Andreas Kling <akling@apple.com>
Purge PassRefPtr from Page.
<https://webkit.org/b/140089>
Reviewed by Anders Carlsson.
Use Ref or RefPtr instead of PassRefPtr as appropriate in WebCore::Page.
* page/Page.cpp:
(WebCore::Page::rangeOfString):
(WebCore::Page::setSessionStorage):
* page/Page.h:
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):
2015-01-05 Chris Dumez <cdumez@apple.com>
Regression(r163928): Animated images are not resumed on window resizing
https://bugs.webkit.org/show_bug.cgi?id=139714
<rdar://problem/18855285>
Reviewed by Darin Adler.
After r163928, animated images were not resumed if they became visible
after resizing the window. This patch calls resumes animated images if
necessary in FrameView::setFrameRect() to handle this case properly.
Tests: fast/images/animated-gif-window-resizing.html
fast/images/animated-gif-zooming.html
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
2015-01-01 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: pass parameters to inspector instrumentation by reference where possible
https://bugs.webkit.org/show_bug.cgi?id=139981
Reviewed by Andreas Kling.
Clean up inspector instrumentation entry points throughout WebCore. In particular, make
parameters pass-by-reference if they are not nullable. Also standardize quirky parameter
orders and do other small cleanups in InspectorInstrumentation and at callsites.
Inspector agents still take the pertinent parameters by pointer even when they could be
passed by reference. This will be addressed in a follow-up change.
No new tests, no behavior changed.
* WebCore.exp.in:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
* css/PropertySetCSSStyleDeclaration.cpp:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::matchesFocusPseudoClass):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForElement):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::elementIsActive):
(WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
(WebCore::SelectorCompiler::elementIsHovered):
(WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
* dom/CharacterData.cpp:
(WebCore::CharacterData::dispatchModifiedEvent): Remove unnecessary ENABLE guard.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeBetween):
(WebCore::ContainerNode::appendChild):
(WebCore::dispatchChildRemovalEvents):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildNodeInsertionNotifier::notify): Remove unnecessary ENABLE guard.
* dom/Document.cpp:
(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::recalcStyle):
(WebCore::Document::finishedParsing): This is safe because we checked the argument.
* dom/Element.cpp:
(WebCore::Element::addShadowRoot):
(WebCore::Element::removeShadowRoot): This is safe because we checked the argument.
(WebCore::Element::willModifyAttribute): Remove unnecessary ENABLE guard.
(WebCore::Element::didAddAttribute):
(WebCore::Element::didModifyAttribute):
(WebCore::Element::didRemoveAttribute):
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners): This is safe because the type test would fail if null.
* dom/NamedFlowCollection.cpp: Pass by reference since code already assumes non-null.
(WebCore::NamedFlowCollection::ensureFlowWithName):
(WebCore::NamedFlowCollection::discardNamedFlow):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::~PseudoElement):
* dom/StyledElement.cpp:
(WebCore::StyledElement::styleAttributeChanged):
(WebCore::StyledElement::inlineStyleChanged):
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
(WebCore::InspectorInstrumentation::consoleCount):
(WebCore::InspectorInstrumentation::startConsoleTiming):
(WebCore::InspectorInstrumentation::stopConsoleTiming):
(WebCore::InspectorInstrumentation::consoleTimeStamp):
(WebCore::InspectorInstrumentation::startProfiling):
(WebCore::InspectorInstrumentation::stopProfiling):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::didClearWindowObjectInWorld):
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
* inspector/InspectorController.h: Remove instrumentationForPage() in favor of using instrumentingAgentsForPage() directly.
* inspector/InspectorDatabaseInstrumentation.h:
(WebCore::InspectorInstrumentation::didOpenDatabase):
* inspector/InspectorInstrumentation.cpp: Add missing s_ prefix for global s_instrumentingAgentSets. Pass the instrumenting
agent by reference since it was already null-checked if we reached a slow path for instrumentation.
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
(WebCore::InspectorInstrumentation::isDebuggerPausedImpl):
(WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
(WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
(WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
(WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
(WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
(WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
(WebCore::InspectorInstrumentation::didRemoveDOMAttrImpl):
(WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
(WebCore::InspectorInstrumentation::frameWindowDiscardedImpl):
(WebCore::InspectorInstrumentation::mediaQueryResultChangedImpl):
(WebCore::InspectorInstrumentation::didPushShadowRootImpl):
(WebCore::InspectorInstrumentation::willPopShadowRootImpl):
(WebCore::InspectorInstrumentation::didCreateNamedFlowImpl):
(WebCore::InspectorInstrumentation::willRemoveNamedFlowImpl):
(WebCore::InspectorInstrumentation::didChangeRegionOversetImpl):
(WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElementImpl):
(WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElementImpl):
(WebCore::InspectorInstrumentation::mouseDidMoveOverElementImpl):
(WebCore::InspectorInstrumentation::didScrollImpl):
(WebCore::InspectorInstrumentation::handleTouchEventImpl):
(WebCore::InspectorInstrumentation::handleMousePressImpl):
(WebCore::InspectorInstrumentation::forcePseudoStateImpl):
(WebCore::InspectorInstrumentation::characterDataModifiedImpl):
(WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
(WebCore::InspectorInstrumentation::didScheduleResourceRequestImpl):
(WebCore::InspectorInstrumentation::didInstallTimerImpl):
(WebCore::InspectorInstrumentation::didRemoveTimerImpl):
(WebCore::InspectorInstrumentation::willCallFunctionImpl):
(WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEventImpl):
(WebCore::InspectorInstrumentation::willDispatchEventImpl):
(WebCore::InspectorInstrumentation::willHandleEventImpl):
(WebCore::InspectorInstrumentation::didHandleEventImpl): Add proper cookie guard and pass by reference.
(WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
(WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
(WebCore::InspectorInstrumentation::didEvaluateScriptImpl):
(WebCore::InspectorInstrumentation::scriptsEnabledImpl):
(WebCore::InspectorInstrumentation::didCreateIsolatedContextImpl): Removed, as there are no callers from WebCore. Possible V8 artifact.
(WebCore::InspectorInstrumentation::willFireTimerImpl):
(WebCore::InspectorInstrumentation::didFireTimerImpl): Add proper cookie guard and pass by reference.
(WebCore::InspectorInstrumentation::didInvalidateLayoutImpl):
(WebCore::InspectorInstrumentation::willLayoutImpl):
(WebCore::InspectorInstrumentation::willDispatchXHRLoadEventImpl):
(WebCore::InspectorInstrumentation::willPaintImpl):
(WebCore::InspectorInstrumentation::didPaintImpl):
(WebCore::InspectorInstrumentation::willScrollLayerImpl):
(WebCore::InspectorInstrumentation::didScrollLayerImpl):
(WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
(WebCore::InspectorInstrumentation::didRecalculateStyleImpl): Add proper cookie guard and pass by reference.
(WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl):
(WebCore::InspectorInstrumentation::applyEmulatedMediaImpl): Pass string by reference.
(WebCore::InspectorInstrumentation::willSendRequestImpl):
(WebCore::InspectorInstrumentation::continueAfterPingLoaderImpl):
(WebCore::InspectorInstrumentation::markResourceAsCachedImpl):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
(WebCore::InspectorInstrumentation::willReceiveResourceDataImpl):
(WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl): Add proper cookie guard and pass by reference.
(WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl):
(WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl):
(WebCore::InspectorInstrumentation::continueWithPolicyDownloadImpl):
(WebCore::InspectorInstrumentation::continueWithPolicyIgnoreImpl):
(WebCore::InspectorInstrumentation::didReceiveDataImpl):
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
(WebCore::InspectorInstrumentation::didFailLoadingImpl):
(WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl):
(WebCore::InspectorInstrumentation::willLoadXHRImpl):
(WebCore::InspectorInstrumentation::didFailXHRLoadingImpl):
(WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
(WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl):
(WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl):
(WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl):
(WebCore::InspectorInstrumentation::scriptImportedImpl):
(WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSPImpl):
(WebCore::InspectorInstrumentation::didReceiveScriptResponseImpl):
(WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl): Use Frame::isMainFrame().
(WebCore::InspectorInstrumentation::loadEventFiredImpl): Use Frame::isMainFrame().
(WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
(WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl):
(WebCore::InspectorInstrumentation::loaderDetachedFromFrameImpl):
(WebCore::InspectorInstrumentation::willRunJavaScriptDialogImpl):
(WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl): Use a range-based iterator.
(WebCore::InspectorInstrumentation::willWriteHTMLImpl):
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::consoleCountImpl):
(WebCore::InspectorInstrumentation::startConsoleTimingImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
(WebCore::InspectorInstrumentation::consoleTimeStampImpl):
(WebCore::InspectorInstrumentation::startProfilingImpl):
(WebCore::InspectorInstrumentation::stopProfilingImpl):
(WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
(WebCore::InspectorInstrumentation::didDispatchDOMStorageEventImpl):
(WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStartImpl):
(WebCore::InspectorInstrumentation::didStartWorkerGlobalScopeImpl):
(WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
(WebCore::InspectorInstrumentation::workerGlobalScopeTerminatedImpl):
(WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
(WebCore::InspectorInstrumentation::didCloseWebSocketImpl):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrameImpl):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrameErrorImpl):
(WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl):
(WebCore::InspectorInstrumentation::sessionCreatedImpl):
(WebCore::InspectorInstrumentation::sessionLoadedImpl):
(WebCore::InspectorInstrumentation::sessionModifiedImpl):
(WebCore::InspectorInstrumentation::segmentCreatedImpl):
(WebCore::InspectorInstrumentation::segmentCompletedImpl):
(WebCore::InspectorInstrumentation::segmentLoadedImpl):
(WebCore::InspectorInstrumentation::segmentUnloadedImpl):
(WebCore::InspectorInstrumentation::captureStartedImpl):
(WebCore::InspectorInstrumentation::captureStoppedImpl):
(WebCore::InspectorInstrumentation::playbackStartedImpl):
(WebCore::InspectorInstrumentation::playbackPausedImpl):
(WebCore::InspectorInstrumentation::playbackHitPositionImpl):
(WebCore::InspectorInstrumentation::playbackFinishedImpl):
(WebCore::InspectorInstrumentation::networkStateChangedImpl):
(WebCore::InspectorInstrumentation::updateApplicationCacheStatusImpl):
(WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
(WebCore::InspectorInstrumentation::cancelPauseOnNativeEvent):
(WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
(WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
(WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
(WebCore::InspectorInstrumentation::registerInstrumentingAgents):
(WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
(WebCore::InspectorInstrumentation::retrieveTimelineAgent):
(WebCore::InspectorInstrumentation::instrumentingAgentsForPage): Add by-reference version which contains the logic from instrumentationForPage().
(WebCore::InspectorInstrumentation::instrumentingAgentsForRenderer):
(WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
(WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
(WebCore::InspectorInstrumentation::layerTreeDidChangeImpl):
(WebCore::InspectorInstrumentation::renderLayerDestroyedImpl):
(WebCore::InspectorInstrumentation::pseudoElementDestroyedImpl):
(WebCore::InspectorInstrumentation::didCreateIsolatedContextImpl): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
(WebCore::InspectorInstrumentation::isDebuggerPaused):
(WebCore::InspectorInstrumentation::willInsertDOMNode):
(WebCore::InspectorInstrumentation::didInsertDOMNode):
(WebCore::InspectorInstrumentation::willRemoveDOMNode):
(WebCore::InspectorInstrumentation::didRemoveDOMNode):
(WebCore::InspectorInstrumentation::willModifyDOMAttr):
(WebCore::InspectorInstrumentation::didModifyDOMAttr):
(WebCore::InspectorInstrumentation::didRemoveDOMAttr):
(WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
(WebCore::InspectorInstrumentation::frameWindowDiscarded):
(WebCore::InspectorInstrumentation::mediaQueryResultChanged):
(WebCore::InspectorInstrumentation::didPushShadowRoot):
(WebCore::InspectorInstrumentation::willPopShadowRoot):
(WebCore::InspectorInstrumentation::didCreateNamedFlow):
(WebCore::InspectorInstrumentation::willRemoveNamedFlow):
(WebCore::InspectorInstrumentation::didChangeRegionOverset):
(WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElement):
(WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElement):
(WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
(WebCore::InspectorInstrumentation::handleTouchEvent):
(WebCore::InspectorInstrumentation::handleMousePress): Take Frame by reference instead of Page by pointer.
(WebCore::InspectorInstrumentation::forcePseudoState):
(WebCore::InspectorInstrumentation::characterDataModified):
(WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
(WebCore::InspectorInstrumentation::didScheduleResourceRequest):
(WebCore::InspectorInstrumentation::didInstallTimer):
(WebCore::InspectorInstrumentation::didRemoveTimer):
(WebCore::InspectorInstrumentation::willCallFunction):
(WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent):
(WebCore::InspectorInstrumentation::willDispatchEvent):
(WebCore::InspectorInstrumentation::willHandleEvent): Pass a const event reference.
(WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
(WebCore::InspectorInstrumentation::willEvaluateScript):
(WebCore::InspectorInstrumentation::didEvaluateScript):
(WebCore::InspectorInstrumentation::scriptsEnabled):
(WebCore::InspectorInstrumentation::willFireTimer):
(WebCore::InspectorInstrumentation::didInvalidateLayout):
(WebCore::InspectorInstrumentation::willLayout):
(WebCore::InspectorInstrumentation::didScroll):
(WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent):
(WebCore::InspectorInstrumentation::willPaint):
(WebCore::InspectorInstrumentation::didPaint):
(WebCore::InspectorInstrumentation::willScrollLayer):
(WebCore::InspectorInstrumentation::didScrollLayer):
(WebCore::InspectorInstrumentation::willRecalculateStyle):
(WebCore::InspectorInstrumentation::didScheduleStyleRecalculation):
(WebCore::InspectorInstrumentation::applyEmulatedMedia): Pass string by reference.
(WebCore::InspectorInstrumentation::willSendRequest):
(WebCore::InspectorInstrumentation::continueAfterPingLoader):
(WebCore::InspectorInstrumentation::markResourceAsCached):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
(WebCore::InspectorInstrumentation::willReceiveResourceData):
(WebCore::InspectorInstrumentation::willReceiveResourceResponse):
(WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
(WebCore::InspectorInstrumentation::continueWithPolicyDownload):
(WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
(WebCore::InspectorInstrumentation::didReceiveData):
(WebCore::InspectorInstrumentation::didFinishLoading):
(WebCore::InspectorInstrumentation::didFailLoading):
(WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): No need to go through
ScriptExecutionContext interface, as it's always a Document.
(WebCore::InspectorInstrumentation::willLoadXHR):
(WebCore::InspectorInstrumentation::didFailXHRLoading):
(WebCore::InspectorInstrumentation::didFinishXHRLoading):
(WebCore::InspectorInstrumentation::didReceiveXHRResponse):
(WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
(WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
(WebCore::InspectorInstrumentation::scriptImported):
(WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
(WebCore::InspectorInstrumentation::didReceiveScriptResponse):
(WebCore::InspectorInstrumentation::domContentLoadedEventFired):
(WebCore::InspectorInstrumentation::loadEventFired):
(WebCore::InspectorInstrumentation::frameDetachedFromParent):
(WebCore::InspectorInstrumentation::didCommitLoad):
(WebCore::InspectorInstrumentation::frameDocumentUpdated):
(WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
(WebCore::InspectorInstrumentation::willRunJavaScriptDialog):
(WebCore::InspectorInstrumentation::willDestroyCachedResource):
(WebCore::InspectorInstrumentation::willWriteHTML):
(WebCore::InspectorInstrumentation::didDispatchDOMStorageEvent):
(WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart):
(WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
(WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
(WebCore::InspectorInstrumentation::didCreateWebSocket):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorInstrumentation::didCloseWebSocket):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
(WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
(WebCore::InspectorInstrumentation::didSendWebSocketFrame):
(WebCore::InspectorInstrumentation::sessionCreated):
(WebCore::InspectorInstrumentation::sessionLoaded):
(WebCore::InspectorInstrumentation::sessionModified):
(WebCore::InspectorInstrumentation::segmentCreated):
(WebCore::InspectorInstrumentation::segmentCompleted):
(WebCore::InspectorInstrumentation::segmentLoaded):
(WebCore::InspectorInstrumentation::segmentUnloaded):
(WebCore::InspectorInstrumentation::captureStarted):
(WebCore::InspectorInstrumentation::captureStopped):
(WebCore::InspectorInstrumentation::playbackStarted):
(WebCore::InspectorInstrumentation::playbackPaused):
(WebCore::InspectorInstrumentation::playbackFinished):
(WebCore::InspectorInstrumentation::playbackHitPosition):
(WebCore::InspectorInstrumentation::networkStateChanged):
(WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
(WebCore::InspectorInstrumentation::didRequestAnimationFrame):
(WebCore::InspectorInstrumentation::didCancelAnimationFrame):
(WebCore::InspectorInstrumentation::willFireAnimationFrame):
(WebCore::InspectorInstrumentation::layerTreeDidChange):
(WebCore::InspectorInstrumentation::renderLayerDestroyed):
(WebCore::InspectorInstrumentation::pseudoElementDestroyed):
(WebCore::InspectorInstrumentation::instrumentingAgentsForFrame):
(WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
(WebCore::InspectorInstrumentation::didCreateIsolatedContext): Deleted.
* inspector/InspectorInstrumentationCookie.cpp: Take a reference, use default RefPtr constructor.
(WebCore::InspectorInstrumentationCookie::InspectorInstrumentationCookie):
* inspector/InspectorInstrumentationCookie.h: Fix misplaced ENABLE guard.
* inspector/InstrumentingAgents.cpp:
(WebCore::instrumentationForPage): Deleted.
(WebCore::instrumentationForWorkerGlobalScope): Deleted.
* inspector/InstrumentingAgents.h:
* inspector/WorkerInspectorController.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
(WebCore::DocumentLoader::continueAfterContentPolicy):
(WebCore::DocumentLoader::detachFromFrame):
* loader/DocumentThreadableLoader.cpp: Remove unnecessary ENABLE(INSPECTOR) guards, as these inlined calls
are boiled away by the compiler if !ENABLE(INSPECTOR).
(WebCore::DocumentThreadableLoader::didReceiveData):
(WebCore::DocumentThreadableLoader::didFinishLoading):
(WebCore::DocumentThreadableLoader::didFail):
(WebCore::DocumentThreadableLoader::preflightFailure):
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::detachFromParent):
(WebCore::FrameLoader::loadedResourceFromMemoryCache):
(WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
(WebCore::FrameLoader::dispatchDidCommitLoad):
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::notifyDidScheduleResourceRequest):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest): Remove unnecessary ENABLE guard.
* loader/appcache/ApplicationCacheGroup.cpp: Remove several unnecessary ENABLE guards.
(WebCore::ApplicationCacheGroup::didReceiveResponse):
(WebCore::ApplicationCacheGroup::didReceiveData):
(WebCore::ApplicationCacheGroup::didFinishLoading):
(WebCore::ApplicationCacheGroup::didFail):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::deleteIfPossible):
* page/Chrome.cpp:
(WebCore::Chrome::scroll):
(WebCore::Chrome::runBeforeUnloadConfirmPanel):
(WebCore::Chrome::runJavaScriptAlert):
(WebCore::Chrome::runJavaScriptConfirm):
(WebCore::Chrome::runJavaScriptPrompt):
(WebCore::Chrome::mouseDidMoveOverElement):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchLoadEvent):
(WebCore::DOMWindow::dispatchEvent):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleTouchEvent): Add a guard to make it safe to pass event target by-reference.
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::mediaType):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::addMessage):
(WebCore::PageConsoleClient::messageWithTypeAndLevel):
(WebCore::PageConsoleClient::count):
(WebCore::PageConsoleClient::profile):
(WebCore::PageConsoleClient::profileEnd):
(WebCore::PageConsoleClient::time):
(WebCore::PageConsoleClient::timeEnd):
(WebCore::PageConsoleClient::timeStamp):
* page/Settings.cpp:
(WebCore::Settings::setScriptEnabled):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerBecameNonComposited):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEventIfNeeded):
* replay/ReplayController.cpp:
(WebCore::ReplayController::switchSession):
(WebCore::ReplayController::createSegment):
(WebCore::ReplayController::completeSegment):
(WebCore::ReplayController::loadSegmentAtIndex):
(WebCore::ReplayController::unloadSegment):
(WebCore::ReplayController::startCapturing):
(WebCore::ReplayController::stopCapturing):
(WebCore::ReplayController::startPlayback):
(WebCore::ReplayController::pausePlayback):
(WebCore::ReplayController::cancelPlayback):
(WebCore::ReplayController::willDispatchInput):
* testing/Internals.cpp:
(WebCore::Internals::consoleMessageArgumentCounts):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::callReadyStateChangeListener):
2015-01-05 Dan Bernstein <mitz@apple.com>
Tried to fix the iOS build.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processCharacterBufferForInBody):
2015-01-05 Chris Dumez <cdumez@apple.com>
Get rid of some unnecessary custom StyleBuilder code
https://bugs.webkit.org/show_bug.cgi?id=140058
Reviewed by Darin Adler.
Get rid of some unnecessary custom StyleBuilder code. The generator is
now able to generate this code just fine.
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
(WebCore::StyleBuilderConverter::convertWordSpacing):
(WebCore::StyleBuilderConverter::convertPerspective):
(WebCore::StyleBuilderConverter::convertMarqueeIncrement):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::convertLineHeight):
(WebCore::StyleBuilderCustom::applyValueWebkitMarqueeIncrement): Deleted.
(WebCore::StyleBuilderCustom::csstoLengthConversionDataWithTextZoomFactor): Deleted.
(WebCore::StyleBuilderCustom::applyValueWordSpacing): Deleted.
(WebCore::StyleBuilderCustom::applyValueWebkitPerspective): Deleted.
2014-12-23 Brent Fulgham <bfulgham@apple.com>
[Mac] Cannot scroll when a non-scrollable iframe is contained inside a scrollable iframe
https://bugs.webkit.org/show_bug.cgi?id=139914
<rdar://problem/18750910>
Reviewed by Darin Adler.
Tests: platform/mac/fast/scrolling/scroll-nested-iframe.html
The latching logic was breaking down when a non-scrollable iframe was the closest target of
a wheel event. EventHandler would latch to the enclosing scrollable region (in this case, the
non-scrollable iframe) and would eat scroll events, preventing anything from working.
The fix is as follows:
1. Modify the logic to understand a stack of latched states, so that we can discared 'invalid'
latched states as we discover them.
2. Revise the latching logic so that it understands the case where the 'latched' node for wheel
events is in a parent frame of the current wheel event target. For example, when the mouse is over
an element in an unscrollable iframe that is contained within a scrollable iframe. We should
be latched to the scrollable iframe so events go to the right place.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent): Update to call new 'stack' versions of latch
state methods.
(WebCore::EventHandler::clearLatchedState): Ditto.
(WebCore::EventHandler::defaultWheelEventHandler): Ditto.
* page/MainFrame.cpp: Update to store a stack of latched states. Provide methods to control
the lifetime of the stack and its elements.
(WebCore::MainFrame::MainFrame):
(WebCore::MainFrame::latchingState):
(WebCore::MainFrame::pushNewLatchingState):
(WebCore::MainFrame::resetLatchingState):
(WebCore::MainFrame::popLatchingState):
* page/MainFrame.h:
* page/mac/EventHandlerMac.mm:
(WebCore::latchingIsLockedToParentOfThisFrame): Added helper function.
(WebCore::EventHandler::platformPrepareForWheelEvents): Update to use new 'stack' style latch
methods. Also, if we are latched to a frame that contains the frame we are currently evaluating,
don't replace the current event target with the latched targets because (1) they will be processed
in the enclosing scope when we leave this routine, and (2) if we do change targets to the latched
elements we create an infinite loop.
(WebCore::EventHandler::platformCompleteWheelEvent): We want to mark the element as having started
at the scroll limit regardless of what the wheel event handler returns as its success state.
(WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Revise to handle the new
stack-based latching methods.
2015-01-05 Darin Adler <darin@apple.com>
Quick follow-up to last check-in, addressing review comments.
* html/parser/HTMLStackItem.h:
(WebCore::HTMLStackItem::HTMLStackItem): Use rvalue reference for incoming Ref.
(WebCore::HTMLStackItem::create): Ditto.
2015-01-05 Darin Adler <darin@apple.com>
Modernize and streamline HTMLStackItem
https://bugs.webkit.org/show_bug.cgi?id=140056
Reviewed by Anders Carlsson.
* html/HTMLHtmlElement.cpp:
(WebCore::HTMLHtmlElement::create): Changed to return Ref.
* html/HTMLHtmlElement.h: Ditto.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::hasImpliedEndTag): Update to use reference instead of pointer.
(WebCore::causesFosterParenting): Moved here from HTMLStackItem.h.
(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): Update
for references instead of pointers.
(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody): Ditto.
(WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody): Ditto.
(WebCore::HTMLConstructionSite::insertComment): Ditto.
(WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement): Ditto.
(WebCore::HTMLConstructionSite::insertHTMLHeadElement): Ditto.
(WebCore::HTMLConstructionSite::insertHTMLBodyElement): Ditto.
(WebCore::HTMLConstructionSite::insertHTMLFormElement): Ditto.
(WebCore::HTMLConstructionSite::insertHTMLElement): Ditto.
(WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement): Ditto.
(WebCore::HTMLConstructionSite::insertFormattingElement): Ditto.
(WebCore::HTMLConstructionSite::insertScriptElement): Ditto.
(WebCore::HTMLConstructionSite::insertForeignElement): Ditto.
(WebCore::HTMLConstructionSite::insertTextNode): Ditto.
(WebCore::HTMLConstructionSite::reparent): Ditto.
(WebCore::HTMLConstructionSite::insertAlreadyParsedChild): Ditto.
(WebCore::HTMLConstructionSite::takeAllChildren): Ditto.
(WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode): Ditto.
(WebCore::HTMLConstructionSite::createElementFromSavedToken): Ditto.
(WebCore::HTMLConstructionSite::indexOfFirstUnopenFormattingElement): Ditto.
(WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements): Ditto.
(WebCore::HTMLConstructionSite::generateImpliedEndTagsWithExclusion): Ditto.
(WebCore::HTMLConstructionSite::findFosterSite): Ditto.
(WebCore::HTMLConstructionSite::shouldFosterParent): Removed unneeded
isElementNode check, since causesFosterParenting will return false for a
document fragment node.
* html/parser/HTMLConstructionSite.h: Updated to use references instead of
pointers. Also removed the unneeded currentElementRecord function.
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLNames::isRootNode): Updated to use references instead of pointers.
(WebCore::HTMLNames::isScopeMarker): Ditto.
(WebCore::HTMLNames::isListItemScopeMarker): Ditto.
(WebCore::HTMLNames::isTableScopeMarker): Ditto.
(WebCore::HTMLNames::isTableBodyScopeMarker): Ditto.
(WebCore::HTMLNames::isTableRowScopeMarker): Ditto.
(WebCore::HTMLNames::isForeignContentScopeMarker): Ditto.
(WebCore::HTMLNames::isButtonScopeMarker): Ditto.
(WebCore::HTMLNames::isSelectScopeMarker): Ditto.
(WebCore::HTMLElementStack::ElementRecord::replaceElement): Ditto.
(WebCore::HTMLElementStack::hasOnlyOneElement): Ditto.
(WebCore::HTMLElementStack::popHTMLHeadElement): Ditto.
(WebCore::HTMLElementStack::popHTMLBodyElement): Ditto.
(WebCore::HTMLElementStack::popAll): Ditto.
(WebCore::HTMLElementStack::pop): Ditto.
(WebCore::HTMLElementStack::popUntil): Ditto.
(WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped): Ditto.
(WebCore::HTMLElementStack::isMathMLTextIntegrationPoint): Ditto. Also removed
unneeded isElementNode check.
(WebCore::HTMLElementStack::isHTMLIntegrationPoint): Ditto.
(WebCore::HTMLElementStack::pushRootNode): Ditto.
(WebCore::HTMLElementStack::pushRootNodeCommon): Ditto.
(WebCore::HTMLElementStack::pushHTMLHeadElement): Ditto.
(WebCore::HTMLElementStack::pushHTMLBodyElement): Ditto.
(WebCore::HTMLElementStack::insertAbove): Ditto.
(WebCore::HTMLElementStack::topRecord): Ditto.
(WebCore::HTMLElementStack::oneBelowTop): Ditto.
(WebCore::HTMLElementStack::removeHTMLHeadElement): Ditto.
(WebCore::HTMLElementStack::remove): Ditto.
(WebCore::HTMLElementStack::find): Ditto.
(WebCore::HTMLElementStack::topmost): Ditto.
(WebCore::inScopeCommon): Ditto.
(WebCore::HTMLElementStack::hasNumberedHeaderElementInScope): Ditto.
(WebCore::HTMLElementStack::inScope): Ditto.
(WebCore::HTMLElementStack::htmlElement): Ditto.
(WebCore::HTMLElementStack::headElement): Ditto.
(WebCore::HTMLElementStack::bodyElement): Ditto.
(WebCore::HTMLElementStack::rootNode): Ditto.
(WebCore::HTMLElementStack::popCommon): Ditto.
(WebCore::HTMLElementStack::removeNonTopCommon): Ditto.
(WebCore::HTMLElementStack::furthestBlockForFormattingElement): Ditto.
(WebCore::HTMLElementStack::show): Ditto.
* html/parser/HTMLElementStack.h: Use reference instead of pointer.
* html/parser/HTMLFormattingElementList.cpp:
(WebCore::HTMLFormattingElementList::closestElementInScopeWithName): Update
to use references instead of pointer.
(WebCore::HTMLFormattingElementList::swapTo): Ditto.
(WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly): Ditto.
(WebCore::HTMLFormattingElementList::ensureNoahsArkCondition): Ditto.
(WebCore::HTMLFormattingElementList::show): Ditto.
* html/parser/HTMLFormattingElementList.h: Use reference instead of pointer
and a raw pointer instead of a RefPtr.
* html/parser/HTMLStackItem.h: Removed unneeded includes. Got rid of "type"
concept and simply overload the create functions and constructors for both
Element and DOcumentFragment. Renamed isElementNode and isDocumentFragmentNode
to remove the "Node" suffix. Removed unused getAttributeItem, hasLocalName, and
one of the overloads of matchesHTMLTag. Moved all the policy functions such as
causesFosterParenting out of this class into free functions or into other
source files. Got rid of m_isDocumentFragmentNode boolean. Moved function
bodies out of the class definition. Marked all data members const since they
are all initialized in the constructor and never touched again. Restructured
the isSpecialNode function to avoid the repeated checks of the namespace.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::isParsingTemplateContents): Use reference instead of
pointer and free functions instead of member functions.
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder): Ditto.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext): Ditto.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::contextElement): Ditto.
(WebCore::HTMLTreeBuilder::constructTree): Ditto.
(WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope): Ditto.
(WebCore::HTMLTreeBuilder::processCloseWhenNestedTag): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processTemplateStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processTemplateEndTag): Ditto.
(WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup): Ditto.
(WebCore::HTMLTreeBuilder::closeTheCell): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto.
(WebCore::HTMLTreeBuilder::processStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processBodyEndTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency): Ditto.
(WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInTableBody): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInRow): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInCell): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption): Ditto.
(WebCore::HTMLTreeBuilder::processTrEndTagForInRow): Ditto.
(WebCore::HTMLTreeBuilder::processTableEndTagForInTable): Ditto.
(WebCore::HTMLTreeBuilder::processEndTag): Ditto.
(WebCore::HTMLTreeBuilder::processCharacterBuffer): Ditto.
(WebCore::HTMLTreeBuilder::processEndOfFile): Ditto.
(WebCore::HTMLTreeBuilder::adjustedCurrentStackItem): Ditto.
(WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent): Ditto.
(WebCore::HTMLTreeBuilder::processTokenInForeignContent): Ditto.
2015-01-05 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Crash when font data pointer is null.
https://bugs.webkit.org/show_bug.cgi?id=139969
Reviewed by Darin Adler.
Added null pointer check.
Test: fonts/unicode-character-font-crash.html
* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::advance):
(WebCore::UniscribeController::shape):
2015-01-05 Michael Catanzaro <mcatanzaro@igalia.com>
[GStreamer] Disable gst-plugin-scanner if seccomp filters are enabled
https://bugs.webkit.org/show_bug.cgi?id=140069
Reviewed by Philippe Normand.
If seccomp filters are enabled, any child processes we create are doomed
if they try to use a trapped syscall: the child will receive SIGSYS and
dump core. There appears to be no way around this.
Fortunately, the gstreamer developers had mad prescience and provided
us with a way to move plugin scanning in-process, so we don't need the
helper binary at all.
No new tests because this is covered by existing tests when seccomp
filters are enabled.
* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::initializeGStreamer):
2015-01-04 Darin Adler <darin@apple.com>
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::parseXML):
Removed an incorrect assertion my last check-in added.
2015-01-04 Darin Adler <darin@apple.com>
Modernize and tighten up HTMLDocumentParser
https://bugs.webkit.org/show_bug.cgi?id=140041
Reviewed by Sam Weinig.
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::parseHTML): Pass a reference instead of
a pointer for the context element.
* html/FTPDirectoryDocument.cpp: Removed unneeded includes, made more
things in FTPDirectoryDocumentParser private. Use Ref instead of RefPtr
in a could places. Initialize in class instead of in constructor.
(WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser):
Less initialization here.
(WebCore::FTPDirectoryDocumentParser::createTDForFilename): More Ref here.
(WebCore::createTemplateDocumentData): Removed unneeded initialization
of RefPtr, which is initialized without explicitly asking for it.
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate): Reworded
comment slightly.
* html/parser/HTMLDocumentParser.cpp: Cut down on includes.
(WebCore::tokenizerStateForContextElement): Fixed URL. Changed argument
to be a reference rather than a pointer.
(WebCore::HTMLDocumentParser::inPumpSession):
(WebCore::HTMLDocumentParser::shouldDelayEnd):
(WebCore::HTMLDocumentParser::HTMLDocumentParser): Marked constructors
inline. Updated for data members that are now objects instead of pointers.
Removed explicit initialization for scalars that are now initialized in
the class definition.
(WebCore::HTMLDocumentParser::create): Moved the private creation
functions in here, out of the header file.
(WebCore::HTMLDocumentParser::~HTMLDocumentParser): Removed unused
m_haveBackgroundParser.
(WebCore::HTMLDocumentParser::prepareToStopParsing): Updated URL and
removed m_haveBackgroundParser reference.
(WebCore::HTMLDocumentParser::processingData): Removed a check of
m_haveBackgroundParser.
(WebCore::HTMLDocumentParser::resumeParsingAfterYield): Tweak comment.
(WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): Added
a null check of the result of takeScriptToProcess, since there really
is no guarantee it's non-null.
(WebCore::HTMLDocumentParser::canTakeNextToken): Removed assertion
that was for m_haveBackgroundParser cases only. Rewrapped comment.
(WebCore::HTMLDocumentParser::contextForParsingSession): Use nullptr.
(WebCore::HTMLDocumentParser::pumpTokenizer): Rework comments,
remove assertions that no longer make sense, use auto instead of
repeating a long type name, update to use m_token and m_tokenizer.
(WebCore::HTMLDocumentParser::hasInsertionPoint): Rewrapped comment.
(WebCore::HTMLDocumentParser::insert): Got rid of braces around a
single-line if body.
(WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd):
Removed comment about incorrect m_haveBackgroundParser assertion.
(WebCore::HTMLDocumentParser::isExecutingScript): Use && style instead
of early exit for a null check.
(WebCore::HTMLDocumentParser::textPosition): Tightened up code a little.
(WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution): Added
a Ref to protect the parser, as is already done in every other function
that calls pumpTokenizerIfPossible.
(WebCore::HTMLDocumentParser::parseDocumentFragment): Take a reference
instead of a pointer. Also use auto so we get a Ref instead of a RefPtr.
* html/parser/HTMLDocumentParser.h: Removed unneeded includes.
Made private inheritance explicit instead of just omitting public.
Moved function bodies out of the class, and in some cases, out of the
header entirely. Return a reference from tokenizer(). Marked most
virtual functions final. Made DocumentFragment version of the
constructor private rather than protected. Made the functions
suspendScheduledTasks() and resumeScheduledTasks() private, since
they are always called through a base class. Removed the private
token function since it is better to get at m_token directly.
Removed m_haveBackgroundParser, since we don't have that any more
and it's always false. Also removed forcePlaintextForTextDocument
since the tokenizer is exposed and can be used directly to do that.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder): Made the parser non-const.
It could only be const before because HTMLDocumentParser::tokenizer
took a const parser and returned a non-const tokenizer, but that doesn't
really make sense.
(WebCore::HTMLTreeBuilder::constructTree): Removed null check for
tokenizer, which was never null. Updated since tokenizer is a reference.
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto.
(WebCore::HTMLTreeBuilder::processEndTag): Ditto. Also fixed and removed
some assertions like the ones I did recently in the rest of this file.
(WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processScriptStartTag): Ditto.
* html/parser/HTMLTreeBuilder.h: Made HTMLDocumentParser& non-const.
* html/parser/TextDocumentParser.cpp: Removed unneeded include and
unneeded explicit destructor.
(WebCore::TextDocumentParser::TextDocumentParser): Updated since
treeBuilder() returns a reference now, and set the tokenizer state
directly since tokenizer() is exposed.
* html/parser/TextDocumentParser.h: Moved initialization of the
data member here instead of the constructor. Also removed unneeded
explicitly defined destructor.
2015-01-04 Antti Koivisto <antti@apple.com>
Remove GlyphPageTree
https://bugs.webkit.org/show_bug.cgi?id=140015
Follow-up to follow-up, fonts/font-fallback-prefers-pictographs.html is now failing.
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::glyphDataForVariant):
(WebCore::FontGlyphs::glyphDataForNormalVariant):
Make the loop again go one past the last fallback index, the pictograph special case depends on it.
2015-01-04 Antti Koivisto <antti@apple.com>
Remove GlyphPageTree
https://bugs.webkit.org/show_bug.cgi?id=140015
Follow-up to r177876 to fix mathml/opentype/munderover-layout-resize.html which is asserting.
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::glyphDataForVariant):
(WebCore::FontGlyphs::glyphDataForNormalVariant):
Always return system fallback if no glyph is found.
2015-01-04 Dan Bernstein <mitz@apple.com>
iOS build fix.
* platform/graphics/SimpleFontData.cpp:
(WebCore::createAndFillGlyphPage):
2015-01-02 Antti Koivisto <antti@apple.com>
Remove GlyphPageTree
https://bugs.webkit.org/show_bug.cgi?id=140015
Reviewed by Darin Adler.
GlyphPageTree is a global cache consisting of a tree of nodes that match SimpleFontData instances.
The tree levels correspond to font fallback lists so that higher levels fill holes (missing glyphs)
in the lower levels. This patch replaces it with a simpler and easier to understand caching scheme.
In particular the goal is to have clearer ownership relations and better control over mutability.
The new scheme looks like this:
SimpleFontData instances cache GlyphPages for themselves. These pages are immutable after construction
and may contain holes. This is a global cache (since SimpleFontDatas are cached globally) with the same
lifetime as the GlyphPageTree used to have.
FontGlyphs instances cache resolved GlyphPages for the normal font variant. These are build by traversing
the fallback list as necessary and collecting glyphs from SimpleFontDatas. As a common case case optimization
the page from the primary font is cached directly as long as it has the requested glyphs.
FontGlyphs are shared between sufficiently similar Font instances so this is a shared cache as well.
* CMakeLists.txt:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionFontDataCacheKey::makeFlagKey):
nonCJKGlyphOrientation matters for glyph selection too and needs to be part of the FontDescription cache key.
* platform/graphics/FontData.h:
(WebCore::FontData::FontData):
(WebCore::FontData::setMaxGlyphPageTreeLevel): Deleted.
(WebCore::FontData::maxGlyphPageTreeLevel): Deleted.
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::primaryFontHasGlyphForCharacter):
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::glyphDataForCJKCharacterWithoutSyntheticItalic):
(WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation):
(WebCore::FontGlyphs::glyphDataForSystemFallback):
(WebCore::FontGlyphs::glyphDataForVariant):
(WebCore::FontGlyphs::glyphDataForNormalCharacter):
Traverse the fallback list by using simple index instead of indirectly via GlyphPageTreeNode traversal.
(WebCore::pageFromFontData):
Fetch a page from the primary font and see if we can use it as-is.
Vertical fonts have special glyph selection and can't use this path.
(WebCore::FontGlyphs::createFlattenedGlyphPage):
Build a hole-free glyph page by pulling characters from the fallback list.
(WebCore::FontGlyphs::glyphDataForCharacter):
* platform/graphics/FontGlyphs.h:
(WebCore::FontGlyphs::primarySimpleFontData):
* platform/graphics/GlyphPage.h:
(WebCore::GlyphPage::createForMixedFontData):
(WebCore::GlyphPage::createCopyForMixedFontData):
Add copy version.
(WebCore::GlyphPage::createForSingleFontData):
Remove owner node field.
(WebCore::GlyphPage::~GlyphPage):
(WebCore::GlyphPage::count):
(WebCore::GlyphPage::GlyphPage):
(WebCore::GlyphPage::createCopiedSystemFallbackPage): Deleted.
(WebCore::GlyphPage::owner): Deleted.
* platform/graphics/GlyphPageTreeNode.cpp: Removed.
* platform/graphics/GlyphPageTreeNode.h: Removed.
* platform/graphics/SegmentedFontData.cpp:
(WebCore::SegmentedFontData::SegmentedFontData):
(WebCore::SegmentedFontData::~SegmentedFontData):
(WebCore::SegmentedFontData::simpleFontDataForCharacter):
Return null when there is no usable range so the client can tell the difference.
Rename for clarity.
(WebCore::SegmentedFontData::simpleFontDataForFirstRange):
Add a way to get the fallback font separately. This is always available.
(WebCore::SegmentedFontData::isLoading):
(WebCore::SegmentedFontData::fontDataForCharacter): Deleted.
* platform/graphics/SegmentedFontData.h:
(WebCore::SegmentedFontData::SegmentedFontData): Deleted.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::initCharWidths):
(WebCore::SimpleFontData::platformGlyphInit):
(WebCore::SimpleFontData::~SimpleFontData):
(WebCore::SimpleFontData::simpleFontDataForCharacter):
(WebCore::fillGlyphPage):
(WebCore::createAndFillGlyphPage):
Move code for initializing glyph pages here. The code is from GlyphPageTreeNode.
(WebCore::SimpleFontData::glyphPage):
Cache glyphs for this font. These pages may have holes.
(WebCore::SimpleFontData::glyphForCharacter):
(WebCore::SimpleFontData::glyphDataForCharacter):
(WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
Since the cache is now owned by the SimpleFontData all the custom pruning can go away.
The glyph page cache dies along with it owner.
(WebCore::SimpleFontData::fontDataForCharacter): Deleted.
* platform/graphics/SimpleFontData.h:
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(-[WebCascadeList objectAtIndex:]):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::fontDataForCombiningCharacterSequence):
* platform/graphics/mac/GlyphPageMac.cpp: Copied from Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp.
This was already misnamed.
(WebCore::GlyphPage::fill):
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Removed.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit):
* platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
* platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
* platform/graphics/win/SimpleFontDataCGWin.cpp:
(WebCore::SimpleFontData::platformInit):
* platform/mac/DragImageMac.mm:
Add missing FontCachePurgePreventer.
(WebCore::createDragImageForLink):
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::initializeFontData):
* svg/SVGFontElement.cpp:
2015-01-04 Anders Carlsson <andersca@apple.com>
Remove an unused function
https://bugs.webkit.org/show_bug.cgi?id=140055
Reviewed by Sam Weinig.
* Modules/webdatabase/DatabaseAuthorizer.cpp:
(WebCore::DatabaseAuthorizer::setReadOnly): Deleted.
* Modules/webdatabase/DatabaseAuthorizer.h:
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::DatabaseBackendBase::setAuthorizerReadOnly): Deleted.
* Modules/webdatabase/DatabaseBackendBase.h:
2015-01-04 Anders Carlsson <andersca@apple.com>
Modernize parts of the database code
https://bugs.webkit.org/show_bug.cgi?id=140054
Reviewed by Antti Koivisto.
* Modules/webdatabase/Database.cpp:
(WebCore::Database::runTransaction):
* Modules/webdatabase/Database.h:
* Modules/webdatabase/SQLStatement.cpp:
(WebCore::SQLStatement::SQLStatement):
* Modules/webdatabase/SQLStatement.h:
* Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::create):
(WebCore::SQLTransaction::SQLTransaction):
(WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
(WebCore::SQLTransaction::executeSQL):
* Modules/webdatabase/SQLTransaction.h:
(WebCore::SQLTransaction::database):
2015-01-03 Chris Dumez <cdumez@apple.com>
Move the CSS Grid properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140051
Reviewed by Sam Weinig.
Move the CSS Grid properties from StyleResolver to the new
StyleBuilder.
This patch adds support for "ConditionalConverter" parameter in
CSSPropertyNames.in to support cases where we only want to call the
property setter conditionally. The converter function is then expected
to return a boolean to indicate if the setter should be called by the
StyleBuilder or not.
2015-01-02 Chris Dumez <cdumez@apple.com>
Kill the DeprecatedStyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140034
Reviewed by Darin Adler.
Move FillLayer properties to the new StyleBuilder and get rid of the
DeprecatedStyleBuilder now that all its CSS properties have been ported
to the new StyleBuilder.
2015-01-02 Chris Dumez <cdumez@apple.com>
Move 'font-size' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140010
Reviewed by Darin Adler.
Move 'font-size' CSS property to the new StyleBuilder by using custom
code.
2015-01-02 Darin Adler <darin@apple.com>
Pass Document instead of ScriptExecutionContext to non-worker constructors
https://bugs.webkit.org/show_bug.cgi?id=140040
Reviewed by Sam Weinig.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
Generate code passing the document when ConstructorCallWith=Document is used.
Later, we could base this on whether the constructor is exposed to workers
or not, instead, but for now this seems a clean way to do it.
* bindings/scripts/IDLAttributes.txt: Allow ConstructorCallWith=Document.
* Modules/notifications/Notification.cpp:
(WebCore::Notification::create):
* Modules/notifications/Notification.h:
* Modules/notifications/Notification.idl:
* dom/Comment.cpp:
* dom/Comment.h:
* dom/Comment.idl:
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::nodeName): Use ASCIILiteral (just something
I noticed in passing).
* dom/DocumentFragment.h:
* dom/DocumentFragment.idl:
* dom/Range.cpp:
* dom/Range.h:
* dom/Range.idl:
* dom/Text.cpp:
* dom/Text.h:
* dom/Text.idl:
Change from ScriptExecutionContext to Document, and remove unneeded
overloads that were just casting. It's better to have the bindings
layer, which knows these are not ScriptExecutionContext, do the cast
than to have create functions that cast that are not in any position
to know the cast is safe.
2015-01-02 Darin Adler <darin@apple.com>
Re-land the HTMLTreeBuilder change with the assertion fixed.
https://bugs.webkit.org/show_bug.cgi?id=140032
Reviewed by Andreas Kling.
2015-01-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177859 and r177861.
https://bugs.webkit.org/show_bug.cgi?id=140042
Caused many assertion failures (Requested by ap on #webkit).
Reverted changesets:
"Modernize coding style of HTMLTreeBuilder"
https://bugs.webkit.org/show_bug.cgi?id=140032
http://trac.webkit.org/changeset/177859
"Tried to fix the iOS build."
http://trac.webkit.org/changeset/177861
2015-01-02 Dan Bernstein <mitz@apple.com>
Tried to fix the iOS build.
* html/parser/HTMLTreeBuilder.cpp:
2015-01-01 Darin Adler <darin@apple.com>
Rework code that hides characters in password fields to streamline a little
https://bugs.webkit.org/show_bug.cgi?id=140035
Reviewed by Sam Weinig.
* editing/InsertIntoTextNodeCommand.cpp:
(WebCore::InsertIntoTextNodeCommand::doApply): Pass the offset after the character
we want to reveal instead of the offset before. This is more future proof if we
ever want to handling surrogate pairs or combining marks, rather than hard
coding the likely incorrect rule of "go back by one code unit". Also got rid of
the isSecure check here, since RenderText can do that check inside the
momentarilyRevealLastTypedCharacter instead.
* rendering/RenderText.cpp: Tweaked the SecureTextTimer class: Marked it final
and made it derive from TimerBase privately. Made the constructor explicit and
made it take a reference rather than a pointer. Use initialization in the class
to set up the variable, and use 0 as the special value instead of -1 since we
now store the offset *after* the character to be revealed.
(WebCore::secureTextTimers): Use this function and NeverDestroyed rather than
a global variable gSecureTextTimers. Also use unique_ptr for the map so we
don't have to delete explicitly any more.
(WebCore::SecureTextTimer::SecureTextTimer): Moved out of the class definition
so the class ia a little easier to read.
(WebCore::SecureTextTimer::restart): Renamed since the function name doesn't
have to describe its argument; the function is only called in one place.
(WebCore::SecureTextTimer::takeOffsetAfterLastTypedCharacter): Changed name
and made this a one-shot that always zeroes the offset.
(WebCore::SecureTextTimer::fired): Moved out of line and tweaked as above.
(WebCore::RenderText::willBeDestroyed): Simplified now that the function
secureTextTimers() always returns a map and we can just remove since the
values in the map are unique_ptr, so take care of deletion.
(WebCore::RenderText::setRenderedText): Tweaked the code that calls secureText
to make the iOS case clearer.
(WebCore::RenderText::secureText): Rewrote the function. New version no
longer relies on a special String::fill function; it's kind of strange that
String had a built in concept of replacing a string with one that has the
same length but all with a masking character. This new approach is cleaner.
I had written a version that handles surrogate pairs and combining marks,
but then instead wrote a comment explaining why that's not needed/helpful.
(WebCore::RenderText::momentarilyRevealLastTypedCharacter): Added a check so
this does nothing if we are not securing the text. Also updated logic so that
this doesn't double hash any more and updated for other changes like using
a reference instead of a pointer.
* rendering/RenderText.h: Removed the unneeded isSecure function and updated
the argument name in momentarilyRevealLastTypedCharacter since it's now the
offset after the character, not before the character.
2015-01-01 Darin Adler <darin@apple.com>
Modernize coding style of HTMLTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=140032
Reviewed by Andreas Kling.
Changes include:
- Use references rather than pointers.
- Mark data members const that are fully set up in the constructor.
- Remove many unneeded includes and forward declarations.
- Fix conditionals to be consistent and correct.
- Merge some multi-line constructs into a single line.
- Update whatwg.org URLs; not sure we should keep these, though.
- Cut down on use of WTF_MAKE_NONCOPYABLE since for many classes it's
impossible to copy anyway due to references, or harmless to copy.
- Made more things private.
- Initialize scalars in the class definition rather than each constructor.
- Use Ref/RefPtr instead of PassRefPtr.
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser): Pass reference rather than pointer to
the context element.
(WebCore::HTMLDocumentParser::detach): Removed call to HTMLTreeBuilder::detach. This work
is instead done when the tree builder is destroyed.
(WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Pass reference rather than pointer.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::uninitializedPositionValue1): Marked this inline because it's trivial. It was
probably getting inlined already.
(WebCore::isCaptionColOrColgroupTag): Format on a single line.
(WebCore::isTableBodyContextTag): Ditto.
(WebCore::isNonAnchorFormattingTag): Ditto.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
Take reference instead of pointer.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemaining): Use makeString helper.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeading): Tweak formatting.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeading): Both of the above.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::makeString): Added.
(WebCore::HTMLTreeBuilder::isParsingTemplateContents): Moved the body of this function here,
since it's only used inside the class.
(WebCore::HTMLTreeBuilder::isParsingFragmentOrTemplateContents): Ditto.
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder): Get rid of dead code that handles a null context
element. The FIXME mentions a bug that is obsolete. Also reorder the data members to be a bit
more logical and set the new m_destructionProhibited to false at the end of the constructor,
to check if we accidentally destroy the tree builder while constructing it.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext): Updated to take
a reference and to let m_fragment get initialized in the class definition.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::fragment): Moved this here since it's only
used inside the class.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::contextElement): Ditto.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::contextElementStackItem): Ditto.
(WebCore::HTMLTreeBuilder::takeScriptToProcess): Changed return type to RefPtr instead of
PassRefPtr. Added code to handle m_scriptToProcess of null, since reading the code at the
single call site makes it clear that it's not guaranteed to be non-null! Added destruction-
related assertions since this is a public function.
(WebCore::HTMLTreeBuilder::constructTree): Updated for reference rather than pointer. Also
added destruction-related assertions since this is a public function.
(WebCore::HTMLTreeBuilder::processToken): Updated to take a reference.
(WebCore::HTMLTreeBuilder::processDoctypeToken): Ditto.
(WebCore::HTMLTreeBuilder::processFakeStartTag): Ditto. Also take an rvalue reference for
the vector of attributes that we will put into the token.
(WebCore::HTMLTreeBuilder::processFakeEndTag): Ditto.
(WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope): Ditto.
(WebCore::HTMLTreeBuilder::attributesForIsindexInput): Ditto.
(WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody): Ditto.
(WebCore::isLi): Ditto.
(WebCore::isDdOrDt): Ditto.
(WebCore::HTMLTreeBuilder::processCloseWhenNestedTag): Changed loop to use reference
rather than pointer for never-null stackItem. Also use auto and a for loop to make the
loop easier to read.
(WebCore::createCaseMap): Tweaked formatting.
(WebCore::adjustAttributes): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Use reference instead of pointer.
Set insertion mode directly instead of using a setInsertionMode function.
(WebCore::HTMLTreeBuilder::processTemplateStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processTemplateEndTag): Ditto.
(WebCore::HTMLTreeBuilder::processEndOfFileForInTemplateContents): Ditto.
(WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup): Ditto.
(WebCore::HTMLTreeBuilder::closeTheCell): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto.
(WebCore::HTMLTreeBuilder::processStartTag): Ditto. Tweaked assertions, so that we
assert what state we are in before we fall through to each case, rather than asserting
inside each case. The per-case assertions were sort of excessive and repetitive and
even a bit hard to understand.
(WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processBodyEndTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency): Ditto.
(WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInTableBody): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInRow): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInCell): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption): Ditto.
(WebCore::HTMLTreeBuilder::processTrEndTagForInRow): Ditto.
(WebCore::HTMLTreeBuilder::processTableEndTagForInTable): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInTable): Ditto.
(WebCore::HTMLTreeBuilder::processEndTag): Ditto.
(WebCore::HTMLTreeBuilder::processComment): Ditto.
(WebCore::HTMLTreeBuilder::processCharacter): Ditto.
(WebCore::HTMLTreeBuilder::insertPhoneNumberLink): Ditto.
(WebCore::HTMLTreeBuilder::processCharacterBuffer): Ditto.
(WebCore::HTMLTreeBuilder::processCharacterBufferForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processEndOfFile): Ditto.
(WebCore::HTMLTreeBuilder::defaultForInitial): Ditto.
(WebCore::HTMLTreeBuilder::defaultForBeforeHTML): Ditto.
(WebCore::HTMLTreeBuilder::defaultForBeforeHead): Ditto.
(WebCore::HTMLTreeBuilder::defaultForInHead): Ditto.
(WebCore::HTMLTreeBuilder::defaultForInHeadNoscript): Ditto.
(WebCore::HTMLTreeBuilder::defaultForAfterHead): Ditto.
(WebCore::HTMLTreeBuilder::defaultForInTableText): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInHead): Ditto.
(WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processScriptStartTag): Ditto.
(WebCore::HTMLTreeBuilder::adjustedCurrentStackItem): Made this return a reference.
(WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent): More of the same.
(WebCore::HTMLTreeBuilder::processTokenInForeignContent): Ditto.
(WebCore::HTMLTreeBuilder::finished): Changed m_isAttached assertion to !m_destroyed.
Also updated the comment.
(WebCore::HTMLTreeBuilder::parseError): Marked this empty function inline.
* html/parser/HTMLTreeBuilder.h: Removed most includes and forward declarations.
Changed the phone number functions conditional to be correct. Removed a non-helpful
FIXME about assertions we really don't need. Removed unneeded use of the inline keyword,
changed types to references rather than pointer. Removed unneeded public insertionMode
and setInsertionMode functions. Both are things that are only done inside this class and
m_insertionMode can be accessed directly instead. Added a destructor that implements
the destruction assertions. Asserted !m_destroyed at the start of all the public functions.
* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::insertFakePreElement): Use reference rather than pointer.
2015-01-02 Manuel Rego Casasnovas <rego@igalia.com>
[CSS Grid Layout] Remove stack from grid-auto-flow syntax
https://bugs.webkit.org/show_bug.cgi?id=134842
Reviewed by Sergio Villar Senin.
"stack" mode for grid-auto-flow property has been removed from the grid
layout spec. New syntax is:
[ row | column ] || dense
Modified parsing in order to adapt it to the new syntax.
Also the current behavior relying on "stack" has been updated following
the spec. Now it won't be possible to mimic the old "none" (or "stack")
unless you specify manually the grid-placement properties.
No new tests needed, updated current tests to adapt them to the new
behavior.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Adapt to new syntax.
* css/CSSParser.cpp:
(WebCore::isValidGridAutoFlowId): Remove "stack" from valid ids.
(WebCore::CSSParser::parseGridAutoFlow): Adapt to new syntax.
* css/CSSValueKeywords.in: Remove "stack".
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty): Adapt to new syntax.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::placeItemsOnGrid): Remove old "stack" code.
* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::resolveGridPositionsFromStyle): If we
cannot resolve positions, we have to run the auto-placement algorithm.
* rendering/style/RenderStyle.h: Remove "stack".
* rendering/style/RenderStyleConstants.h: Ditto.
2015-01-01 Sam Weinig <sam@webkit.org>
Remove GroupSettings
https://bugs.webkit.org/show_bug.cgi?id=140037
Reviewed by Dan Bernstein.
Nothing sets the values in GroupSettings and nothing uses them.
- The indexedDBDatabasePath is accessed and sent to the IndexedDB backend,
but the backend then proceeds to not use it.
* CMakeLists.txt:
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::getDatabaseNames):
(WebCore::IDBFactory::deleteDatabase):
* 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:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/DocumentStyleSheetCollection.cpp:
* page/CaptionUserPreferences.cpp:
* page/Frame.cpp:
* page/GroupSettings.cpp: Removed.
* page/GroupSettings.h: Removed.
* page/PageGroup.cpp:
(WebCore::PageGroup::PageGroup):
* page/PageGroup.h:
(WebCore::PageGroup::groupSettings): Deleted.
* platform/DatabaseStrategy.cpp:
(WebCore::DatabaseStrategy::createIDBFactoryBackend):
* platform/DatabaseStrategy.h:
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::create):
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
* workers/DedicatedWorkerGlobalScope.h:
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::create):
(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
* workers/DedicatedWorkerThread.h:
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
(WebCore::SharedWorkerProxy::groupSettings): Deleted.
* workers/SharedWorkerGlobalScope.cpp:
(WebCore::SharedWorkerGlobalScope::create):
(WebCore::SharedWorkerGlobalScope::SharedWorkerGlobalScope):
* workers/SharedWorkerGlobalScope.h:
* workers/SharedWorkerThread.cpp:
(WebCore::SharedWorkerThread::create):
(WebCore::SharedWorkerThread::SharedWorkerThread):
(WebCore::SharedWorkerThread::createWorkerGlobalScope):
* workers/SharedWorkerThread.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::groupSettings): Deleted.
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::workerThread):
* workers/WorkerThread.h:
2015-01-01 Dan Bernstein <mitz@apple.com>
Tried to fix the iOS build.
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):
2015-01-01 Darin Adler <darin@apple.com>
Fix itearator typo
https://bugs.webkit.org/show_bug.cgi?id=140027
Reviewed by Csaba Osztrogonác.
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::nextBreakablePosition): Spelling mistake.
2015-01-01 Alexey Proskuryakov <ap@apple.com>
Don't dereference end() in SimpleLineLayout::RunResolver::rangeForRenderer
https://bugs.webkit.org/show_bug.cgi?id=139951
rdar://problem/19339881
Reviewed by Darin Adler.
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::rangeForRenderer):
2015-01-01 Chris Dumez <cdumez@apple.com>
ASSERT that a null key is never used with FeatureCounter
https://bugs.webkit.org/show_bug.cgi?id=140030
Reviewed by Darin Adler.
* platform/FeatureCounter.cpp:
(WebCore::FeatureCounter::incrementKey):
(WebCore::FeatureCounter::setKey):
* platform/ios/FeatureCounter.mm:
(WebCore::FeatureCounter::incrementKey):
(WebCore::FeatureCounter::setKey):
2015-01-01 Chris Dumez <cdumez@apple.com>
[iOS] Fix memory leak in FeatureCounter
https://bugs.webkit.org/show_bug.cgi?id=140029
<rdar://problem/19255690>
Reviewed by Darin Adler.
Fix memory leak in FeatureCounter. The NSString for the counter key
was allocated but never released. The patch switches to using a
RetainPtr instead of a raw pointer to avoid the issue.
* platform/ios/FeatureCounter.mm:
(WebCore::FeatureCounter::incrementKey):
(WebCore::FeatureCounter::setKey):
2015-01-01 Jeff Miller <jeffm@apple.com>
Update user-visible copyright strings to include 2015
https://bugs.webkit.org/show_bug.cgi?id=139880
Reviewed by Darin Adler.
* Info.plist:
2014-12-31 Sam Weinig <sam@webkit.org>
Move scrolling code off of WTF::bind
https://bugs.webkit.org/show_bug.cgi?id=140019
Reviewed by Darin Adler.
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::tryToHandleWheelEvent):
(WebCore::ThreadedScrollingTree::invalidate):
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
(WebCore::ThreadedScrollingTree::handleWheelEventPhase):
(WebCore::derefScrollingCoordinator): Deleted.
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::invalidate):
(WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):
(WebCore::derefScrollingCoordinator): Deleted.
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::pageDestroyed):
(WebCore::ScrollingCoordinatorMac::handleWheelEvent):
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseMemory):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
2015-01-01 Antti Koivisto <antti@apple.com>
Remove FontData::containsCharacters
https://bugs.webkit.org/show_bug.cgi?id=140026
Reviewed by Dan Bernstein.
This virtual function has no clients.
* platform/graphics/FontData.h:
* platform/graphics/SegmentedFontData.cpp:
(WebCore::SegmentedFontData::containsCharacter): Deleted.
(WebCore::SegmentedFontData::containsCharacters): Deleted.
* platform/graphics/SegmentedFontData.h:
* platform/graphics/SimpleFontData.h:
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::containsCharacters): Deleted.
* platform/graphics/ios/SimpleFontDataIOS.mm:
(WebCore::SimpleFontData::containsCharacters): Deleted.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::containsCharacters): Deleted.
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::containsCharacters): Deleted.
2015-01-01 Darin Adler <darin@apple.com>
We often misspell identifier as "identifer"
https://bugs.webkit.org/show_bug.cgi?id=140025
Reviewed by Michael Saboff.
* html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseNPTFragment):
* html/parser/AtomicHTMLToken.h:
* html/parser/HTMLToken.h:
* html/shadow/SliderThumbElement.h:
* platform/graphics/ISOVTTCue.cpp:
(WebCore::ISOWebVTTCue::ISOWebVTTCue):
* platform/graphics/ISOVTTCue.h:
(WebCore::ISOWebVTTCue::id):
Fix mispellings.
2015-01-01 Zalan Bujtas <zalan@apple.com>
Saturated arithmetics: Incorrect float/double clamping.
https://bugs.webkit.org/show_bug.cgi?id=139888
rdar://problem/19330885
Reviewed by Simon Fraser.
Clamp float and double values correctly when applying saturated arithmetics.
Test: LayoutUnit test for float overflow.
* platform/LayoutUnit.h:
(WebCore::LayoutUnit::LayoutUnit):
2014-12-31 Dan Bernstein <mitz@apple.com>
Fixed the iOS build.
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::commitTreeState):
2014-12-31 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r177835.
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
(WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
2014-12-31 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176476.
https://bugs.webkit.org/show_bug.cgi?id=140021
Sadly, this didn't reduce media test crashiness (Requested by
ap on #webkit).
Reverted changeset:
"[Mac] Random crashes inside media libraries when creating
then destroying media quickly."
https://bugs.webkit.org/show_bug.cgi?id=138980
http://trac.webkit.org/changeset/176476
2014-12-31 Sam Weinig <sam@webkit.org>
Remove the remaining uses of OwnPtr from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=140017
Reviewed by Dan Bernstein.
* WebCore.exp.in:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::commit):
(WebCore::ScrollingStateTree::create): Deleted.
* page/scrolling/ScrollingStateTree.h:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitNewTreeState):
* page/scrolling/ScrollingTree.h:
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::commitNewTreeState):
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::commitNewTreeState):
* page/scrolling/ios/ScrollingTreeIOS.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::commitTreeState):
2014-12-31 Dan Bernstein <mitz@apple.com>
Don’t use AccessibilityAllInOne when building with Xcode
https://bugs.webkit.org/show_bug.cgi?id=139974
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj: Added all files included by AccessibilityAllInOne.cpp
to the WebCore target, and removed AccessibilityAllInOne.cpp from the project.
2014-12-30 Chris Dumez <cdumez@apple.com>
Move font-related CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140008
Reviewed by Darin Adler.
Move font-related CSS properties to the new StyleBuilder
by teaching makeprop.pl how to generate them.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyFont::applyInheritValue): Deleted.
(WebCore::ApplyPropertyFont::applyInitialValue): Deleted.
(WebCore::ApplyPropertyFont::applyValue): Deleted.
(WebCore::ApplyPropertyFont::createHandler): Deleted.
* css/makeprop.pl:
(generateInitialValueSetter):
(generateInheritValueSetter):
(generateValueSetter):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::initialItalic):
(WebCore::FontDescription::initialSmallCaps):
(WebCore::FontDescription::initialKerning):
(WebCore::FontDescription::initialFontSmoothing):
(WebCore::FontDescription::initialTextRenderingMode):
2014-12-30 Chris Dumez <cdumez@apple.com>
Move '-webkit-font-variant-ligature' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140007
Reviewed by Darin Adler.
Move '-webkit-font-variant-ligature' CSS property to the new StyleBuilder
by using custom code.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue): Deleted.
(WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue): Deleted.
(WebCore::ApplyPropertyFontVariantLigatures::applyValue): Deleted.
(WebCore::ApplyPropertyFontVariantLigatures::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitFontVariantLigatures):
(WebCore::StyleBuilderCustom::applyInheritWebkitFontVariantLigatures):
(WebCore::StyleBuilderCustom::applyValueWebkitFontVariantLigatures):
2014-12-29 Chris Dumez <cdumez@apple.com>
Move animation / transition CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139999
Reviewed by Darin Adler.
Move animation / transition CSS properties to the new StyleBuilder by
teaching makeprop.pl how to generate them.
2014-12-29 Anders Carlsson <andersca@apple.com>
Remove more dead code
https://bugs.webkit.org/show_bug.cgi?id=139998
Reviewed by Oliver Hunt.
* page/PageGroup.cpp:
(WebCore::PageGroup::localStorage): Deleted.
(WebCore::PageGroup::transientLocalStorage): Deleted.
* page/PageGroup.h:
(WebCore::PageGroup::hasLocalStorage): Deleted.
2014-12-29 Anders Carlsson <andersca@apple.com>
Remove unneeded StorageNamespace functions
https://bugs.webkit.org/show_bug.cgi?id=139997
Reviewed by Sam Weinig.
* loader/EmptyClients.cpp:
* storage/StorageNamespace.h:
(WebCore::StorageNamespace::closeIdleLocalStorageDatabases): Deleted.
2014-12-29 Anders Carlsson <andersca@apple.com>
Get rid of some PageGroup storage functions
https://bugs.webkit.org/show_bug.cgi?id=139996
Reviewed by Sam Weinig.
* WebCore.exp.in:
* page/PageGroup.cpp:
(WebCore::PageGroup::closeLocalStorage): Deleted.
(WebCore::PageGroup::clearLocalStorageForAllOrigins): Deleted.
(WebCore::PageGroup::clearLocalStorageForOrigin): Deleted.
(WebCore::PageGroup::closeIdleLocalStorageDatabases): Deleted.
(WebCore::PageGroup::syncLocalStorage): Deleted.
* page/PageGroup.h:
2014-12-29 Anders Carlsson <andersca@apple.com>
Move storage code from WebCore to WebKit
https://bugs.webkit.org/show_bug.cgi?id=139558
Reviewed by Darin Adler.
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/MemoryPressureHandler.cpp:
2014-12-29 Sebastian Dröge <sebastian@centricular.com>
[GStreamer] Rewrite MediaSource implementation
https://bugs.webkit.org/show_bug.cgi?id=139441
Reviewed by Philippe Normand.
This now is a clean reimplementation around appsrc that works good
enough for YouTube (except for seeking), but it still does not
implement the complete API correctly. Further work is required on
top of this and the Bugzilla ticket linked above contains some
further work in the right direction.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::doSeek):
(WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress):
(WebCore::MediaPlayerPrivateGStreamer::sourceChanged):
(WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(WebCore::MediaPlayerPrivateGStreamer::totalVideoFrames):
(WebCore::MediaPlayerPrivateGStreamer::droppedVideoFrames):
(WebCore::MediaPlayerPrivateGStreamer::corruptedVideoFrames):
(WebCore::MediaPlayerPrivateGStreamer::totalFrameDelay):
(WebCore::MediaPlayerPrivateGStreamer::isMediaSource):
* platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
(WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
(WebCore::MediaSourceGStreamer::addSourceBuffer):
(WebCore::MediaSourceGStreamer::durationChanged):
(WebCore::MediaSourceGStreamer::markEndOfStream):
(WebCore::MediaSourceGStreamer::unmarkEndOfStream):
(WebCore::MediaSourceGStreamer::readyState):
(WebCore::MediaSourceGStreamer::setReadyState):
(WebCore::MediaSourceGStreamer::waitForSeekCompleted):
(WebCore::MediaSourceGStreamer::seekCompleted):
* platform/graphics/gstreamer/MediaSourceGStreamer.h:
* platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer):
(WebCore::SourceBufferPrivateGStreamer::~SourceBufferPrivateGStreamer):
(WebCore::SourceBufferPrivateGStreamer::setClient):
(WebCore::SourceBufferPrivateGStreamer::append):
(WebCore::SourceBufferPrivateGStreamer::removedFromMediaSource):
(WebCore::SourceBufferPrivateGStreamer::readyState):
(WebCore::SourceBufferPrivateGStreamer::setReadyState):
(WebCore::SourceBufferPrivateGStreamer::flushAndEnqueueNonDisplayingSamples):
(WebCore::SourceBufferPrivateGStreamer::enqueueSample):
(WebCore::SourceBufferPrivateGStreamer::isReadyForMoreSamples):
(WebCore::SourceBufferPrivateGStreamer::setActive):
(WebCore::SourceBufferPrivateGStreamer::stopAskingForMoreSamples):
(WebCore::SourceBufferPrivateGStreamer::notifyClientWhenReadyForMoreSamples):
* platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h:
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
(webkit_media_src_class_init):
(webkit_media_src_init):
(webKitMediaSrcFinalize):
(webKitMediaSrcSetProperty):
(webKitMediaSrcGetProperty):
(webKitMediaSrcDoAsyncStart):
(webKitMediaSrcDoAsyncDone):
(webKitMediaSrcChangeState):
(webKitMediaSrcQueryWithParent):
(webKitMediaSrcGetUri):
(webKitMediaSrcSetUri):
(WebCore::MediaSourceClientGStreamer::MediaSourceClientGStreamer):
(WebCore::MediaSourceClientGStreamer::~MediaSourceClientGStreamer):
(WebCore::MediaSourceClientGStreamer::addSourceBuffer):
(WebCore::MediaSourceClientGStreamer::durationChanged):
(WebCore::MediaSourceClientGStreamer::append):
(WebCore::MediaSourceClientGStreamer::markEndOfStream):
(WebCore::MediaSourceClientGStreamer::removedFromMediaSource):
(WTF::adoptGRef):
(WTF::refGPtr<WebKitMediaSrc>):
(WTF::derefGPtr<WebKitMediaSrc>):
(webKitMediaSrcAddSrc): Deleted.
(webKitMediaVideoSrcStop): Deleted.
(webKitMediaAudioSrcStop): Deleted.
(webKitMediaVideoSrcStart): Deleted.
(webKitMediaAudioSrcStart): Deleted.
(webKitMediaVideoSrcNeedDataMainCb): Deleted.
(webKitMediaAudioSrcNeedDataMainCb): Deleted.
(webKitMediaVideoSrcNeedDataCb): Deleted.
(webKitMediaAudioSrcNeedDataCb): Deleted.
(webKitMediaVideoSrcEnoughDataMainCb): Deleted.
(webKitMediaAudioSrcEnoughDataMainCb): Deleted.
(webKitMediaVideoSrcEnoughDataCb): Deleted.
(webKitMediaAudioSrcEnoughDataCb): Deleted.
(webKitMediaVideoSrcSeekMainCb): Deleted.
(webKitMediaAudioSrcSeekMainCb): Deleted.
(webKitMediaVideoSrcSeekDataCb): Deleted.
(webKitMediaAudioSrcSeekDataCb): Deleted.
(webKitMediaSrcSetMediaPlayer): Deleted.
(webKitMediaSrcSetPlayBin): Deleted.
(MediaSourceClientGstreamer::MediaSourceClientGstreamer): Deleted.
(MediaSourceClientGstreamer::~MediaSourceClientGstreamer): Deleted.
(MediaSourceClientGstreamer::didReceiveDuration): Deleted.
(MediaSourceClientGstreamer::didReceiveData): Deleted.
(MediaSourceClientGstreamer::didFinishLoading): Deleted.
(MediaSourceClientGstreamer::didFail): Deleted.
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.h:
Rewrite MediaSource implementation for GStreamer. The old code was
overly complicated and did not work at all for anything I've tested
it with.
2014-12-28 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, additional build fix on win port since r177786.
* platform/graphics/opengl/Extensions3DOpenGLES.h: Change a constructor from *protected* to *public*.
2014-12-28 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, speculative build fix on win port since r177786.
Apply std::unique_ptr<> and std::make_unique<> to win files as well.
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::getExtensions):
* platform/graphics/win/GraphicsContextWin.cpp:
(WebCore::GraphicsContext::createWindowsBitmap):
2014-12-28 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Convert OwnPtr to std::unique_ptr in WebCore/graphics/
https://bugs.webkit.org/show_bug.cgi?id=139971
Reviewed by Darin Adler.
Use std::unique_ptr<> and std::make_unique<> instead of OwnPtr.
* platform/graphics/GlyphMetricsMap.h:
(WebCore::GlyphMetricsMap<T>::locatePageSlowCase):
* platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::getChild):
(WebCore::GlyphPageTreeNode::pruneCustomFontData):
(WebCore::GlyphPageTreeNode::pruneFontData):
* platform/graphics/GlyphPageTreeNode.h:
* platform/graphics/GraphicsContext.h:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/GraphicsContext3DPrivate.h:
* platform/graphics/GraphicsLayer.h:
* platform/graphics/MaskImageOperation.h:
* platform/graphics/ca/LayerPool.h:
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/TileCoverageMap.h:
* platform/graphics/ca/mac/WebTiledBackingLayer.h:
* platform/graphics/gpu/DrawingBuffer.h:
* platform/graphics/gpu/Texture.cpp:
(WebCore::Texture::Texture):
(WebCore::Texture::create):
* platform/graphics/gpu/Texture.h:
* platform/graphics/opengl/Extensions3DOpenGL.h:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::getExtensions):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::compileShader):
(WebCore::GraphicsContext3D::mappedSymbolName):
* platform/graphics/wayland/WaylandDisplay.cpp:
(WebCore::WaylandDisplay::createSharingGLContext):
* platform/graphics/wayland/WaylandDisplay.h:
* platform/graphics/wayland/WaylandSurface.cpp:
(WebCore::WaylandSurface::createGLContext):
* platform/graphics/wayland/WaylandSurface.h:
2014-12-28 Dan Bernstein <mitz@apple.com>
iOS build fix.
Reverted r177781, because it appears to trigger <http://webkit.org/b/139609> on iOS.
* WebCore.xcodeproj/project.pbxproj:
2014-12-28 Roland Takacs <rtakacs.u-szeged@partner.samsung.com>
Set relayoutChildren to 'true' only if size change happens in Table
https://bugs.webkit.org/show_bug.cgi?id=139676
Reviewed by Darin Adler.
Pass 'true' value for layoutPositionedObjects() in case of size change.
It helps to avoid unneccessary setChildNeedsLayout() and
setPreferredLogicalWidthsDirty() calls.
This is a backport of my fix in Blink: https://codereview.chromium.org/714933002/
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
2014-12-28 Dan Bernstein <mitz@apple.com>
Don’t use AccessibilityAllInOne when building with Xcode
https://bugs.webkit.org/show_bug.cgi?id=139974
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj: Added all files included by AccessibilityAllInOne.cpp
to the WebCore target, and removed AccessibilityAllInOne.cpp from the project.
2014-12-26 Andreas Kling <akling@apple.com>
Purge PassRefPtr from Element and ElementRareData.
<https://webkit.org/b/139949>
Reviewed by Anders Carlsson.
Make functions that used to take PassRefPtr now take Ref&& or RefPtr&&
instead depending on possible nullity of incoming values.
* dom/Element.cpp:
(WebCore::Element::addShadowRoot):
(WebCore::Element::setBeforePseudoElement):
(WebCore::Element::setAfterPseudoElement):
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::setShadowRoot):
(WebCore::ElementRareData::setBeforePseudoElement):
(WebCore::ElementRareData::setAfterPseudoElement):
* dom/PseudoElement.h:
* dom/ShadowRoot.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::setBeforeOrAfterPseudoElement):
(WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
2014-12-26 Dan Bernstein <mitz@apple.com>
<rdar://problem/19348208> REGRESSION (r177027): iOS builds use the wrong toolchain
https://bugs.webkit.org/show_bug.cgi?id=139950
Reviewed by David Kilzer.
* Configurations/Base.xcconfig: Only define TOOLCHAINS when building for OS X, doing so
in a manner that works with Xcode 5.1.1.
2014-12-25 Dhi Aurrahman <diorahman@rockybars.com>
Allow strings as argument to :lang()
https://bugs.webkit.org/show_bug.cgi?id=139678
Reviewed by Benjamin Poulain.
Allow strings as argument to :lang()[1]. The selector with empty string argument (e.g. :lang(""))
is handled as never matching.
[1] http://www.w3.org/blog/CSS/2014/12/11/minutes-telecon-231/
Test: fast/css/css-lang-selector-with-string-arguments-text.html
fast/selectors/lang-extended-filtering-with-string-arguments.html
* css/CSSGrammar.y.in:
* css/SelectorCheckerTestFunctions.h:
(WebCore::matchesLangPseudoClass):
2014-12-25 Andreas Kling <akling@apple.com>
DOM exception creator functions should return Ref.
<https://webkit.org/b/139947>
Reviewed by Chris Dumez.
Tweak all the FooException::create() to return Ref instead of
PassRefPtr since construction always succeeds.
Also add a toJS() overload for ImplType& to keep bindings building.
* Modules/indexeddb/IDBDatabaseException.h:
(WebCore::IDBDatabaseException::create):
* Modules/webdatabase/SQLException.h:
(WebCore::SQLException::create):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* dom/DOMCoreException.h:
(WebCore::DOMCoreException::create):
* dom/EventException.h:
(WebCore::EventException::create):
* dom/RangeException.h:
(WebCore::RangeException::create):
* fileapi/FileException.h:
(WebCore::FileException::create):
* svg/SVGException.h:
(WebCore::SVGException::create):
* xml/XMLHttpRequestException.h:
(WebCore::XMLHttpRequestException::create):
* xml/XPathException.h:
(WebCore::XPathException::create):
2014-12-25 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, fix build break on win debug build since r177737.
Partial revert some code in r177737 because it causes build error on win debug buildbot.
* dom/ElementIteratorAssertions.h:
(WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
2014-12-25 Dan Bernstein <mitz@apple.com>
Give extract-localizable-strings an option to treat warnings as errors
https://bugs.webkit.org/show_bug.cgi?id=139943
Reviewed by Darin Adler.
Add a --treat-warnings-as-errors option, which makes the script emit its warnings as errors
and exit with a non-0 return code if it emitted any warnings.
* extract-localizable-strings.pl:
Added $treatWarningsAsErrors variable, set to true if the option is passed in.
(emitWarning): Added. If $treatWarningsAsErrors is true, omits the "warning: " token from
the message, which makes it appear as an error in Xcode, and sets $sawError to 1.
Replaced all print statements that printed warnings with calls to emitWarning.
2014-12-25 Dan Bernstein <mitz@apple.com>
Bring the state of WEBCORE_EXPORT annotations closer to what the exports file specifies.
https://bugs.webkit.org/show_bug.cgi?id=136172
Reviewed by Darin Adler.
* bridge/NP_jsobject.cpp: Give functions from npruntime_impl.h defined in this file default
using a compiler pragma, in lieu of introducing WebCore-specific macros into that header.
* bridge/npruntime.cpp: Ditto.
* platform/mac/WebCoreSystemInterface.mm: Similarly for WebCoreSystemInterface.h.
Added or removed WEBCORE_EXPORT in these files as necessary to match what is currently in
the exports file:
* Modules/mediasource/SourceBuffer.h:
* bindings/js/JSDOMBinding.h:
* css/CSSComputedStyleDeclaration.h:
* dom/ContainerNode.h:
* dom/Document.h:
* dom/MouseEvent.h:
* dom/Range.h:
* dom/SecurityContext.h:
* editing/Editor.h:
* editing/mac/DictionaryLookup.h:
* loader/FrameLoaderClient.h:
* loader/LoaderStrategy.h:
* loader/icon/IconDatabaseBase.h:
* page/ChromeClient.h:
* page/EventHandler.h:
* page/FrameSnapshotting.h:
* page/Page.h:
* page/PageOverlay.h:
* page/PageOverlayController.h:
* page/TextIndicator.h:
* page/UserContentController.h:
* page/WheelEventDeltaTracker.h:
* page/mac/TextIndicatorWindow.h:
* platform/DatabaseStrategy.h:
* platform/ScrollableArea.h:
* platform/SuddenTermination.h:
* platform/URL.h:
* platform/animation/Animation.h:
* platform/cocoa/MachSendRight.h:
* platform/graphics/FloatRoundedRect.h:
* platform/graphics/GraphicsContext.h:
* platform/graphics/GraphicsLayer.h:
* platform/graphics/Path.h:
* platform/graphics/TextRun.h:
* platform/graphics/ca/TileController.h:
* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/mac/ColorMac.h:
* platform/mac/SoftLinking.h:
* platform/mac/WebCoreNSStringExtras.h:
* platform/mock/mediasource/MockMediaPlayerMediaSource.h:
* platform/network/BlobRegistry.h:
* platform/network/ResourceRequestBase.h:
* platform/network/ResourceResponseBase.h:
* rendering/HitTestResult.h:
* rendering/RenderInline.h:
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
* rendering/RenderView.h:
* storage/StorageNamespaceImpl.h:
* storage/StorageNamespaceProvider.h:
* testing/Internals.h:
2014-12-25 Chris Dumez <cdumez@apple.com>
[iOS] Log better using FeatureCounter why PageCache is failing due to pruned resources
https://bugs.webkit.org/show_bug.cgi?id=139921
Reviewed by Gavin Barraclough and Alexey Proskuryakov.
Log better using FeatureCounter why PageCache is failing due to pruned
resources. In particular, we now distinguish if the resource was pruned
due to:
- Memory pressure
- Page cache capacity reached
- WebProcess suspended (WK2)
* WebCore.exp.in:
* history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem):
* history/HistoryItem.h:
* history/PageCache.cpp:
(WebCore::PageCache::pruneToCapacityNow):
(WebCore::PageCache::setCapacity):
(WebCore::pruningReasonToFeatureCounterKey):
(WebCore::PageCache::add):
(WebCore::PageCache::take):
(WebCore::PageCache::get):
(WebCore::PageCache::prune):
* history/PageCache.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
* platform/FeatureCounterKeys.h:
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):
2014-12-25 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr<> in WebCore/dom, plugin, and graphics
https://bugs.webkit.org/show_bug.cgi?id=139938
Reviewed by Darin Adler.
Replace OwnPtr with std::unique_ptr<> and std::make_unique<>.
* dom/ElementIteratorAssertions.h:
(WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
* dom/MutationObserverRegistration.cpp:
(WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
(WebCore::MutationObserverRegistration::clearTransientRegistrations):
* dom/MutationObserverRegistration.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::rebuildPresentationAttributeStyle):
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::boundsForGlyph):
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
* plugins/PluginStream.cpp:
(WebCore::PluginStream::didReceiveData):
* plugins/PluginStream.h:
2014-12-25 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177712 and r177717.
https://bugs.webkit.org/show_bug.cgi?id=139944
Caused flaky assertion failures (Requested by ap on #webkit).
Reverted changesets:
"[iOS] Log better using FeatureCounter why PageCache is
failing due to pruned resources"
https://bugs.webkit.org/show_bug.cgi?id=139921
http://trac.webkit.org/changeset/177712
"Unreviewed, fix build warning after r177712"
http://trac.webkit.org/changeset/177717
2014-12-25 Andreas Kling <akling@apple.com>
Rebaseline bindings tests after r177733.
* bindings/scripts/test/JS/JSTestCallback.h:
(WebCore::JSTestCallback::create):
2014-12-24 Andreas Kling <akling@apple.com>
Convert more creator functions to return Ref instead of PassRefPtr.
<https://webkit.org/b/139939>
Reviewed by Darin Adler.
Convert a slew of functions to return Ref<T> instead of PassRefPtr<T>
where the result is guaranteed to never be null.
* Modules/geolocation/Coordinates.h:
(WebCore::Coordinates::create):
(WebCore::Coordinates::isolatedCopy):
* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::QuickTimePluginReplacement::isolatedWorld):
* Modules/webaudio/AnalyserNode.h:
(WebCore::AnalyserNode::create):
* Modules/webaudio/AudioBuffer.cpp:
(WebCore::AudioBuffer::create):
(WebCore::AudioBuffer::createFromAudioFileData):
* Modules/webaudio/AudioBuffer.h:
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::create):
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::create):
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioListener.h:
(WebCore::AudioListener::create):
* Modules/webaudio/AudioParam.h:
(WebCore::AudioParam::create):
* Modules/webaudio/BiquadFilterNode.h:
(WebCore::BiquadFilterNode::create):
* Modules/webaudio/ConvolverNode.h:
(WebCore::ConvolverNode::create):
* Modules/webaudio/DelayNode.h:
(WebCore::DelayNode::create):
* Modules/webaudio/DynamicsCompressorNode.h:
(WebCore::DynamicsCompressorNode::create):
* Modules/webdatabase/ChangeVersionWrapper.h:
(WebCore::ChangeVersionWrapper::create):
* Modules/webdatabase/DatabaseAuthorizer.cpp:
(WebCore::DatabaseAuthorizer::create):
* Modules/webdatabase/DatabaseAuthorizer.h:
* Modules/webdatabase/DatabaseThread.h:
(WebCore::DatabaseThread::create):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
(WebCore::createFromNode):
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::create):
* accessibility/AccessibilityARIAGrid.h:
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::create):
* accessibility/AccessibilityARIAGridCell.h:
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::create):
* accessibility/AccessibilityARIAGridRow.h:
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::create):
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityList.cpp:
(WebCore::AccessibilityList::create):
* accessibility/AccessibilityList.h:
* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::create):
* accessibility/AccessibilityListBox.h:
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::create):
* accessibility/AccessibilityListBoxOption.h:
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaControl::create):
(WebCore::AccessibilityMediaControlsContainer::create):
(WebCore::AccessibilityMediaTimeline::create):
(WebCore::AccessibilityMediaTimeDisplay::create):
* accessibility/AccessibilityMediaControls.h:
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::create):
* accessibility/AccessibilityMenuList.h:
* accessibility/AccessibilityMenuListOption.h:
* accessibility/AccessibilityMenuListPopup.h:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::create):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::create):
* accessibility/AccessibilityProgressIndicator.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::create):
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilitySVGRoot.cpp:
(WebCore::AccessibilitySVGRoot::create):
* accessibility/AccessibilitySVGRoot.h:
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::create):
* accessibility/AccessibilityScrollView.h:
* accessibility/AccessibilityScrollbar.cpp:
(WebCore::AccessibilityScrollbar::create):
* accessibility/AccessibilityScrollbar.h:
* accessibility/AccessibilitySearchFieldButtons.cpp:
(WebCore::AccessibilitySearchFieldCancelButton::create):
* accessibility/AccessibilitySearchFieldButtons.h:
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::create):
(WebCore::AccessibilitySliderThumb::create):
* accessibility/AccessibilitySlider.h:
* accessibility/AccessibilitySpinButton.cpp:
(WebCore::AccessibilitySpinButton::create):
(WebCore::AccessibilitySpinButtonPart::create):
* accessibility/AccessibilitySpinButton.h:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::create):
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::create):
* accessibility/AccessibilityTableCell.h:
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::create):
* accessibility/AccessibilityTableColumn.h:
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::create):
* accessibility/AccessibilityTableHeaderContainer.h:
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::create):
* accessibility/AccessibilityTableRow.h:
* bindings/js/CachedScriptSourceProvider.h:
(WebCore::CachedScriptSourceProvider::create):
* bindings/js/DOMWrapperWorld.h:
(WebCore::DOMWrapperWorld::create):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::getJSValue):
* bindings/objc/DOMCustomXPathNSResolver.h:
(WebCore::DOMCustomXPathNSResolver::create):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeader):
* bridge/c/c_instance.h:
(JSC::Bindings::CInstance::create):
* crypto/CryptoKeyPair.h:
(WebCore::CryptoKeyPair::create):
* crypto/keys/CryptoKeyAES.h:
* crypto/keys/CryptoKeyHMAC.h:
* crypto/keys/CryptoKeyRSA.h:
* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::generatePair):
* css/DOMWindowCSS.cpp:
(WebCore::DOMWindowCSS::create):
* css/DOMWindowCSS.h:
* css/DashboardRegion.h:
(WebCore::DashboardRegion::create):
* css/FontLoader.h:
* dom/DOMError.h:
(WebCore::DOMError::create):
* dom/DOMStringList.h:
(WebCore::DOMStringList::create):
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::createForCopyAndPaste):
(WebCore::DataTransfer::createForDragAndDrop):
* dom/DataTransfer.h:
* dom/DeviceMotionData.cpp:
(WebCore::DeviceMotionData::Acceleration::create):
(WebCore::DeviceMotionData::RotationRate::create):
(WebCore::DeviceMotionData::create):
* dom/DeviceMotionData.h:
* dom/DeviceOrientationData.cpp:
(WebCore::DeviceOrientationData::create):
* dom/DeviceOrientationData.h:
* dom/DocumentMarker.cpp:
(WebCore::DocumentMarkerDescription::create):
* editing/AlternativeTextController.cpp:
(WebCore::AutocorrectionAlternativeDetails::create):
(WebCore::DictationAlternativeDetails::create):
* editing/AlternativeTextController.h:
(WebCore::DictationMarkerDetails::create):
* editing/AppendNodeCommand.h:
(WebCore::AppendNodeCommand::create):
* editing/ApplyStyleCommand.h:
(WebCore::ApplyStyleCommand::create):
* editing/BreakBlockquoteCommand.h:
(WebCore::BreakBlockquoteCommand::create):
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::create):
* editing/CompositeEditCommand.h:
* editing/CreateLinkCommand.h:
(WebCore::CreateLinkCommand::create):
* editing/DeleteFromTextNodeCommand.h:
(WebCore::DeleteFromTextNodeCommand::create):
* editing/DeleteSelectionCommand.h:
(WebCore::DeleteSelectionCommand::create):
* editing/DictationCommand.cpp:
(WebCore::DictationMarkerSupplier::create):
* editing/DictationCommand.h:
(WebCore::DictationCommand::create):
* editing/EditingStyle.h:
(WebCore::EditingStyle::create):
* editing/Editor.cpp:
(WebCore::Editor::applyStyle):
(WebCore::Editor::applyParagraphStyle):
* editing/FormatBlockCommand.h:
(WebCore::FormatBlockCommand::create):
* editing/IndentOutdentCommand.h:
(WebCore::IndentOutdentCommand::create):
* editing/InsertIntoTextNodeCommand.h:
(WebCore::InsertIntoTextNodeCommand::create):
* editing/InsertLineBreakCommand.h:
(WebCore::InsertLineBreakCommand::create):
* editing/InsertNodeBeforeCommand.h:
(WebCore::InsertNodeBeforeCommand::create):
* editing/InsertParagraphSeparatorCommand.h:
(WebCore::InsertParagraphSeparatorCommand::create):
* editing/InsertTextCommand.h:
(WebCore::InsertTextCommand::create):
(WebCore::InsertTextCommand::createWithMarkerSupplier):
* editing/MergeIdenticalElementsCommand.h:
(WebCore::MergeIdenticalElementsCommand::create):
* editing/ModifySelectionListLevel.h:
(WebCore::IncreaseSelectionListLevelCommand::create):
(WebCore::DecreaseSelectionListLevelCommand::create):
* editing/MoveSelectionCommand.h:
(WebCore::MoveSelectionCommand::create):
* editing/RemoveCSSPropertyCommand.h:
(WebCore::RemoveCSSPropertyCommand::create):
* editing/RemoveFormatCommand.h:
(WebCore::RemoveFormatCommand::create):
* editing/RemoveNodeCommand.h:
(WebCore::RemoveNodeCommand::create):
* editing/RemoveNodePreservingChildrenCommand.h:
(WebCore::RemoveNodePreservingChildrenCommand::create):
* editing/ReplaceNodeWithSpanCommand.h:
(WebCore::ReplaceNodeWithSpanCommand::create):
* editing/ReplaceSelectionCommand.h:
(WebCore::ReplaceSelectionCommand::create):
* editing/SetNodeAttributeCommand.h:
(WebCore::SetNodeAttributeCommand::create):
* editing/SetSelectionCommand.h:
(WebCore::SetSelectionCommand::create):
* editing/SimplifyMarkupCommand.h:
(WebCore::SimplifyMarkupCommand::create):
* editing/SpellChecker.cpp:
(WebCore::SpellCheckRequest::create):
* editing/SpellChecker.h:
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionRecordUndoCommand::create):
* editing/SpellingCorrectionCommand.h:
(WebCore::SpellingCorrectionCommand::create):
* editing/SplitElementCommand.h:
(WebCore::SplitElementCommand::create):
* editing/SplitTextNodeCommand.h:
(WebCore::SplitTextNodeCommand::create):
* editing/SplitTextNodeContainingElementCommand.h:
(WebCore::SplitTextNodeContainingElementCommand::create):
* editing/TypingCommand.h:
(WebCore::TypingCommand::create):
* editing/UnlinkCommand.h:
(WebCore::UnlinkCommand::create):
* editing/WrapContentsInDummySpanCommand.h:
(WebCore::WrapContentsInDummySpanCommand::create):
* editing/ios/DictationCommandIOS.h:
(WebCore::DictationCommandIOS::create):
* fileapi/Blob.h:
(WebCore::Blob::create):
(WebCore::Blob::deserialize):
(WebCore::Blob::slice):
* fileapi/File.h:
* fileapi/FileList.h:
(WebCore::FileList::create):
* fileapi/FileReader.cpp:
(WebCore::FileReader::create):
* fileapi/FileReader.h:
* fileapi/FileReaderSync.h:
(WebCore::FileReaderSync::create):
* history/BackForwardList.h:
(WebCore::BackForwardList::create):
* history/HistoryItem.h:
(WebCore::HistoryItem::create):
* html/DOMURL.cpp:
(WebCore::DOMURL::create):
* html/DOMURL.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::plugInImageElementIsolatedWorld):
* html/canvas/CanvasGradient.h:
(WebCore::CanvasGradient::create):
* html/canvas/CanvasPattern.cpp:
(WebCore::CanvasPattern::create):
* html/canvas/CanvasPattern.h:
* html/canvas/DOMPath.h:
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::create):
* html/shadow/DetailsMarkerControl.h:
* html/track/AudioTrack.h:
* html/track/AudioTrackList.h:
* html/track/DataCue.h:
* inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::create):
* inspector/CommandLineAPIHost.h:
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::create):
* loader/FormState.cpp:
(WebCore::FormState::create):
* loader/FormState.h:
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* loader/FormSubmission.h:
* loader/TextResourceDecoder.h:
(WebCore::TextResourceDecoder::create):
* loader/ThreadableLoaderClientWrapper.h:
(WebCore::ThreadableLoaderClientWrapper::create):
* loader/WorkerThreadableLoader.h:
(WebCore::WorkerThreadableLoader::create):
* loader/appcache/ApplicationCache.h:
(WebCore::ApplicationCache::create):
* loader/appcache/ApplicationCacheResource.h:
(WebCore::ApplicationCacheResource::create):
* loader/appcache/DOMApplicationCache.h:
* loader/archive/ArchiveResource.cpp:
(WebCore::ArchiveResource::create):
* loader/archive/ArchiveResource.h:
* loader/icon/IconDatabaseBase.h:
(WebCore::EnumCallback::create):
(WebCore::ObjectCallback::create):
* loader/icon/IconRecord.h:
(WebCore::IconRecord::create):
* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::create):
* mathml/MathMLInlineContainerElement.h:
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::create):
* mathml/MathMLMathElement.h:
* mathml/MathMLMencloseElement.cpp:
(WebCore::MathMLMencloseElement::create):
* mathml/MathMLMencloseElement.h:
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::create):
* mathml/MathMLSelectElement.h:
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::create):
* mathml/MathMLTextElement.h:
* page/BarProp.h:
(WebCore::BarProp::create):
* page/Crypto.h:
(WebCore::Crypto::create):
* page/DOMSecurityPolicy.h:
(WebCore::DOMSecurityPolicy::create):
* page/DOMSelection.h:
(WebCore::DOMSelection::create):
* page/DOMWindow.h:
* page/DOMWindowExtension.h:
(WebCore::DOMWindowExtension::create):
* page/FrameView.cpp:
(WebCore::FrameView::create):
* page/FrameView.h:
* page/animation/CompositeAnimation.h:
(WebCore::CompositeAnimation::create):
* page/scrolling/AsyncScrollingCoordinator.h:
* platform/Cursor.h:
(WebCore::SharedCursor::create):
* platform/FileChooser.cpp:
(WebCore::FileChooser::create):
* platform/FileChooser.h:
* platform/animation/Animation.h:
(WebCore::Animation::create):
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::create):
(WebCore::AudioBus::createBufferFromRange):
(WebCore::AudioBus::createBySampleRateConverting):
(WebCore::AudioBus::createByMixingToMono):
* platform/audio/AudioBus.h:
* platform/audio/AudioHardwareListener.cpp:
(WebCore::AudioHardwareListener::create):
* platform/audio/AudioHardwareListener.h:
* platform/audio/mac/AudioHardwareListenerMac.cpp:
(WebCore::AudioHardwareListener::create):
(WebCore::AudioHardwareListenerMac::create):
* platform/audio/mac/AudioHardwareListenerMac.h:
* platform/graphics/AudioTrackPrivate.h:
(WebCore::AudioTrackPrivate::create):
* platform/graphics/BitmapImage.h:
* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/FontFeatureSettings.h:
(WebCore::FontFeatureSettings::create):
* platform/graphics/Image.cpp:
(WebCore::Image::nullImage):
* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::create):
* platform/graphics/filters/DistantLightSource.h:
(WebCore::DistantLightSource::create):
* platform/graphics/filters/FEBlend.cpp:
(WebCore::FEBlend::create):
* platform/graphics/filters/FEBlend.h:
* platform/graphics/filters/FEColorMatrix.cpp:
(WebCore::FEColorMatrix::create):
* platform/graphics/filters/FEColorMatrix.h:
* platform/graphics/filters/FEComponentTransfer.cpp:
(WebCore::FEComponentTransfer::create):
* platform/graphics/filters/FEComponentTransfer.h:
* platform/graphics/filters/FEComposite.cpp:
(WebCore::FEComposite::create):
* platform/graphics/filters/FEComposite.h:
* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::create):
* platform/graphics/filters/FEConvolveMatrix.h:
* platform/graphics/filters/FEDiffuseLighting.cpp:
(WebCore::FEDiffuseLighting::create):
* platform/graphics/filters/FEDiffuseLighting.h:
* platform/graphics/filters/FEDisplacementMap.cpp:
(WebCore::FEDisplacementMap::create):
* platform/graphics/filters/FEDisplacementMap.h:
* platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::create):
* platform/graphics/filters/FEDropShadow.h:
* platform/graphics/filters/FEFlood.cpp:
(WebCore::FEFlood::create):
* platform/graphics/filters/FEFlood.h:
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::create):
* platform/graphics/filters/FEGaussianBlur.h:
* platform/graphics/filters/FEMerge.cpp:
(WebCore::FEMerge::create):
* platform/graphics/filters/FEMerge.h:
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::create):
* platform/graphics/filters/FEMorphology.h:
* platform/graphics/filters/FEOffset.cpp:
(WebCore::FEOffset::create):
* platform/graphics/filters/FEOffset.h:
* platform/graphics/filters/FESpecularLighting.cpp:
(WebCore::FESpecularLighting::create):
* platform/graphics/filters/FESpecularLighting.h:
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::create):
* platform/graphics/filters/FETile.h:
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::create):
* platform/graphics/filters/FETurbulence.h:
* platform/graphics/ios/DisplayRefreshMonitorIOS.h:
(WebCore::DisplayRefreshMonitorIOS::create):
* platform/graphics/mac/ComplexTextController.h:
(WebCore::ComplexTextController::ComplexTextRun::create):
* platform/network/BlobData.h:
(WebCore::RawData::create):
(WebCore::BlobData::create):
* platform/network/BlobDataFileReference.h:
(WebCore::BlobDataFileReference::create):
* platform/network/cf/FormDataStreamCFNet.cpp:
* platform/text/BidiContext.cpp:
(WebCore::BidiContext::createUncached):
(WebCore::BidiContext::create):
* platform/text/BidiContext.h:
* plugins/DOMMimeType.h:
(WebCore::DOMMimeType::create):
* plugins/DOMMimeTypeArray.cpp:
(WebCore::DOMMimeTypeArray::item):
(WebCore::DOMMimeTypeArray::namedItem):
* plugins/DOMMimeTypeArray.h:
(WebCore::DOMMimeTypeArray::create):
* plugins/DOMPlugin.cpp:
(WebCore::DOMPlugin::item):
(WebCore::DOMPlugin::namedItem):
* plugins/DOMPlugin.h:
(WebCore::DOMPlugin::create):
* plugins/DOMPluginArray.cpp:
(WebCore::DOMPluginArray::item):
(WebCore::DOMPluginArray::namedItem):
* plugins/DOMPluginArray.h:
(WebCore::DOMPluginArray::create):
* plugins/PluginData.h:
(WebCore::PluginData::create):
* rendering/ClipPathOperation.h:
* rendering/CounterNode.cpp:
(WebCore::CounterNode::create):
* rendering/CounterNode.h:
* rendering/style/BasicShapes.h:
* rendering/style/CursorList.h:
(WebCore::CursorList::create):
* replay/CapturingInputCursor.cpp:
(WebCore::CapturingInputCursor::create):
* replay/CapturingInputCursor.h:
* storage/Storage.cpp:
(WebCore::Storage::create):
* storage/Storage.h:
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::create):
* storage/StorageAreaImpl.h:
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::create):
* storage/StorageAreaSync.h:
* storage/StorageMap.cpp:
(WebCore::StorageMap::create):
* storage/StorageMap.h:
* storage/StorageSyncManager.cpp:
(WebCore::StorageSyncManager::create):
* storage/StorageSyncManager.h:
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::create):
* workers/DedicatedWorkerGlobalScope.h:
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::create):
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
* workers/DedicatedWorkerThread.h:
* workers/DefaultSharedWorkerRepository.cpp:
* workers/SharedWorkerGlobalScope.cpp:
(WebCore::SharedWorkerGlobalScope::create):
* workers/SharedWorkerGlobalScope.h:
* workers/SharedWorkerThread.cpp:
(WebCore::SharedWorkerThread::create):
(WebCore::SharedWorkerThread::createWorkerGlobalScope):
* workers/SharedWorkerThread.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::importScripts):
* workers/WorkerLocation.h:
(WebCore::WorkerLocation::create):
* workers/WorkerScriptLoader.h:
(WebCore::WorkerScriptLoader::create):
* workers/WorkerThread.h:
* xml/DOMParser.h:
(WebCore::DOMParser::create):
* xml/NativeXPathNSResolver.h:
(WebCore::NativeXPathNSResolver::create):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::create):
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent):
* xml/XMLSerializer.h:
(WebCore::XMLSerializer::create):
* xml/XPathEvaluator.h:
(WebCore::XPathEvaluator::create):
* xml/XPathResult.h:
(WebCore::XPathResult::create):
* xml/XSLStyleSheet.h:
* xml/XSLTProcessor.h:
(WebCore::XSLTProcessor::create):
2014-12-24 Benjamin Poulain <bpoulain@apple.com>
Small cleanup of RenderBlock::paint()
https://bugs.webkit.org/show_bug.cgi?id=139849
Reviewed by Daniel Bates.
Remove a couple of instructions by putting variable in the right scope.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint):
2014-12-24 Dan Bernstein <mitz@apple.com>
[Cocoa] WebCoreSystemInterface.h declares two unused symbols
https://bugs.webkit.org/show_bug.cgi?id=139937
Reviewed by Tim Horton.
* platform/graphics/FontPlatformData.h: Removed unused typedefs.
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData): Stop passing always-zero containerRef parameter to
FontCustomPlatformData constructor.
* platform/graphics/mac/FontCustomPlatformData.h: Removed unused typedefs.
(WebCore::FontCustomPlatformData::FontCustomPlatformData): Removed unused container
parameter and m_atsContainer member variable.
* platform/mac/WebCoreSystemInterface.h: Removed unused typedefs and symbols.
2014-12-23 Chris Dumez <cdumez@apple.com>
Simplify RenderStyle::invalidColor() function
https://bugs.webkit.org/show_bug.cgi?id=139898
Reviewed by Andreas Kling.
Simplify RenderStyle::invalidColor() function by getting rid of the
static variable. The default constructor for Color is very cheap
anyway.
* rendering/style/RenderStyle.h:
2014-12-23 Jaehun Lim <ljaehun.lim@samsung.com>
Unreviewed, fix build warning after r177712
../../Source/WebCore/history/PageCache.cpp: In function ‘const char* WebCore::pruningReasonToFeatureCounterKey(WebCore::PruningReason)’:
../../Source/WebCore/history/PageCache.cpp:449:1: error: control reaches end of non-void function [-Werror=return-type]
No new tests, no behavior changes.
* history/PageCache.cpp:
(WebCore::pruningReasonToFeatureCounterKey):
2014-12-23 Chris Dumez <cdumez@apple.com>
[iOS] Log better using FeatureCounter why PageCache is failing due to pruned resources
https://bugs.webkit.org/show_bug.cgi?id=139921
<rdar://problem/19255690>
Reviewed by Gavin Barraclough.
Log better using FeatureCounter why PageCache is failing due to pruned
resources. In particular, we now distinguish if the resource was pruned
due to:
- Memory pressure
- Page cache capacity reached
- WebProcess suspended (WK2)
* WebCore.exp.in:
* history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem):
* history/HistoryItem.h:
* history/PageCache.cpp:
(WebCore::PageCache::pruneToCapacityNow):
(WebCore::PageCache::setCapacity):
(WebCore::pruningReasonToFeatureCounterKey):
(WebCore::PageCache::add):
(WebCore::PageCache::take):
(WebCore::PageCache::get):
(WebCore::PageCache::prune):
* history/PageCache.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
* platform/FeatureCounterKeys.h:
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):
2014-12-23 Andreas Kling <akling@apple.com>
[Mac] Fix nullptr dereference in EventHandler::platformPrepareForWheelEvents().
<https://webkit.org/b/139923>
<rdar://problem/19182531>
Reviewed by Chris Dumez.
Don't dereference 'wheelEventTarget' until we know it's non-null.
This manifested as a crash in Node::renderBox() with some versions of LLVM.
The compiler was free to assume that the ContainerNode* 'candidate' in
findEnclosingScrollableContainer() would always be non-null on the first
iteration of the loop.
I suspect that we can get here with a null 'wheelEventTarget' during the
rubberbanding phase of a wheel scroll; if the cursor is sitting over the
exposed "gutter" area.
* page/mac/EventHandlerMac.mm:
(WebCore::findEnclosingScrollableContainer):
(WebCore::EventHandler::platformPrepareForWheelEvents):
2014-12-23 Timothy Horton <timothy_horton@apple.com>
Install a TextIndicator for link immediate actions
https://bugs.webkit.org/show_bug.cgi?id=139897
<rdar://problem/19333076>
Reviewed by Anders Carlsson.
* platform/spi/mac/QuickLookMacSPI.h:
Add a new piece of SPI.
2014-12-23 Sam Weinig <sam@webkit.org>
Rename WebContext to WebProcessPool
https://bugs.webkit.org/show_bug.cgi?id=139909
Rubber-stamped by Anders Carlsson.
Merge SessionID and SessionIDHash into one file to make auto-generation of
HashMaps with SessionIDs easier.
* WebCore.xcodeproj/project.pbxproj:
* loader/cache/MemoryCache.h:
* page/SessionID.h:
(WTF::SessionIDHash::hash):
(WTF::SessionIDHash::equal):
(WTF::HashTraits<WebCore::SessionID>::emptyValue):
(WTF::HashTraits<WebCore::SessionID>::constructDeletedValue):
(WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
* page/SessionIDHash.h: Removed.
2014-12-23 Myles C. Maxfield <mmaxfield@apple.com>
platform/mac/editing/input/devanagari-ligature.html is flaky on Yosemite, ligature fails to form
https://bugs.webkit.org/show_bug.cgi?id=138683
Reviewed by Darin Adler.
This patch changes how we check fonts for equality. In particular, this patch adds a
objectForEqualityCheck() to Cocoa's FontPlatformData, and callers should pass this object
to CFEqual() to determine if two platform fonts are equal. This patch also migrates all
call sites to using this function.
I don't want to implement operator==() because there are many cases where the same font
is compared against many others, and this solution is cleaner than caching a comparison
object inside the font object itself.
No new tests because this is covered by platform/mac/editing/input/devanagari-ligature.html.
* platform/graphics/FontPlatformData.h:
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::objectForEqualityCheck):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::GlyphPage::fill):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
* platform/spi/cocoa/CoreTextSPI.h:
2014-12-23 Myles C. Maxfield <mmaxfield@apple.com>
[SVG -> OTF Converter] Make Placeholder a move-only type
https://bugs.webkit.org/show_bug.cgi?id=139870
Reviewed by Anders Carlsson.
No new tests because there is no behavior change.
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::Placeholder::Placeholder):
(WebCore::SVGToOTFFontConverter::Placeholder::populate):
(WebCore::SVGToOTFFontConverter::Placeholder::~Placeholder):
2014-12-23 Chris Dumez <cdumez@apple.com>
Move color CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139898
Reviewed by Antti Koivisto.
Move color CSS properties to the new StyleBuilder by teaching the
StyleBuilder generator how to handle them.
* css/CSSPropertyNames.in:
- Move color properties to the new StyleBuilder.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::defaultInitialColor): Deleted.
(WebCore::ApplyPropertyColor::applyInheritValue): Deleted.
(WebCore::ApplyPropertyColor::applyInitialValue): Deleted.
(WebCore::ApplyPropertyColor::applyValue): Deleted.
(WebCore::ApplyPropertyColor::applyColorValue): Deleted.
(WebCore::ApplyPropertyColor::createHandler): Deleted.
- Drop color properties support from the DeprecatedStyleBuilder.
* css/makeprop.pl:
- Teach the StyleBuilder generator how to handle color properties.
- Use a class for StyleBuilderFunctions instead of a namespace so
that it can be made a friend of RenderStyle class.
* rendering/style/RenderStyle.h:
- Mark StyleBuilderFunctions class as friend as its functions
can set RenderStyle members directly. This is similar to what
is already done for StyleBuilderCustom class. The new color
properties handling calls private methods on RenderStyle.
- Mark invalidColor() method as static as it does not require
an instance.
2014-12-23 Zalan Bujtas <zalan@apple.com>
Incorrect dashed and dotted border painting.
https://bugs.webkit.org/show_bug.cgi?id=139872
rdar://problem/18024205
Reviewed by Simon Fraser.
This patch makes dashed/dotted border painting symmetric and consistent.
It also works with subpixel positioning.
Tests: fast/borders/border-painting-correctness-dashed.html
fast/borders/border-painting-correctness-dotted.html
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLine):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
2014-12-22 Chris Dumez <cdumez@apple.com>
[iOS] Log which type of resources are commonly loaded using FeatureCounter
https://bugs.webkit.org/show_bug.cgi?id=139890
Reviewed by Darin Adler.
Log which type of resources are commonly loaded using FeatureCounter
(e.g. stylesheets, scripts, fonts, images, ...).
* loader/SubresourceLoader.cpp:
(WebCore::logResourceLoadedUsingFeatureCounter):
(WebCore::SubresourceLoader::didFinishLoading):
* platform/FeatureCounterKeys.h:
2014-12-22 Chris Dumez <cdumez@apple.com>
[iOS] Log using FeatureCounter when a PacheCache fails due to memory pressure
https://bugs.webkit.org/show_bug.cgi?id=139874
<rdar://problem/19255690>
Reviewed by Darin Adler.
Log using FeatureCounter when a PacheCache fails due to memory
pressure. To detect this, a flag is added to HistoryItem to mark
items that are no longer in the page becaused they were pruned
(either because of a low memory handling or because the page cache
reached its maximum capacity).
* history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem):
* history/HistoryItem.h:
* history/PageCache.cpp:
(WebCore::PageCache::add):
(WebCore::PageCache::take):
(WebCore::PageCache::get):
(WebCore::PageCache::prune):
* platform/FeatureCounterKeys.h:
2014-12-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177658.
https://bugs.webkit.org/show_bug.cgi?id=139900
Caused many assertion failures (Requested by ap on #webkit).
Reverted changeset:
"Incorrect dashed and dotted border painting."
https://bugs.webkit.org/show_bug.cgi?id=139872
http://trac.webkit.org/changeset/177658
2014-12-22 Jaehun Lim <ljaehun.lim@samsung.com>
Unreviewed build fix after r177661 and r177662
* dom/SecurityOriginPolicy.cpp: Modify #include path.
2014-12-22 Mark Rowe <mrowe@apple.com>
[Mac] Engineering builds of WebCore on OS X 10.8 and 10.9 shouldn't build with -gline-tables-only
<https://webkit.org/b/139883> / <rdar://problem/19297261>
Reviewed by Alexey Proskuryakov.
* Configurations/DebugRelease.xcconfig: Override the setting using conditional settings
so that they take precedence over the conditional settings in Base.xcconfig.
2014-12-22 Alexey Proskuryakov <ap@apple.com>
Unreviewed build fix.
* WebCore.exp.in: Move SQLiteDatabaseTracker::setClient export out of PLATFORM(IOS) section.
2014-12-22 Anders Carlsson <andersca@apple.com>
Remove two functions from SecurityOrigin
https://bugs.webkit.org/show_bug.cgi?id=139885
Reviewed by Andreas Kling.
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::canAccessPasswordManager): Deleted.
(WebCore::SecurityOrigin::canAccessFileSystem): Deleted.
2014-12-22 Chris Dumez <cdumez@apple.com>
[iOS] Log using FeatureCounter user-triggered zooming
https://bugs.webkit.org/show_bug.cgi?id=139879
<rdar://problem/19329130>
Reviewed by Benjamin Poulain.
Log using FeatureCounter user-triggered zooming on iOS.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/FeatureCounter.h:
* platform/FeatureCounterKeys.h:
2014-12-22 Benjamin Poulain <bpoulain@apple.com>
Form elements should match :valid and :invalid based on their associated elements
https://bugs.webkit.org/show_bug.cgi?id=139850
Reviewed by Darin Adler.
In the latest HTML spec, form elements can match :valid or :invalid based
on their associated element.
The tricky part is that object lifetime is a mess. When elements are associated
with forms by the parser, the form is set by the constructor of HTMLFormControlElement.
At that point, the real object has not been initialized yet which
makes it impossible to find its validity.
To work around the lifetime problem, the code of HTMLFormControlElement::didChangeForm()
uses m_willValidateInitialized and m_willValidate direclty instead
of invoking willValidate(). That way we don't try to validate an incomplete object.
When the object really validates, HTMLFormControlElement::setNeedsWillValidateCheck()
takes care of updating the form.
Tests: fast/css/pseudo-invalid-form-and-fieldset-basics.html
fast/css/pseudo-invalid-form-basics.html
fast/css/pseudo-invalid-form-dynamically-created-basics.html
fast/css/pseudo-invalid-form-invalidation-optimization.html
fast/css/pseudo-valid-form-and-fieldset-basics.html
fast/css/pseudo-valid-form-basics.html
fast/css/pseudo-valid-form-dynamically-created-basics.html
fast/css/pseudo-valid-form-invalidation-optimization.html
fast/selectors/invalid-form-style-update-1.html
fast/selectors/invalid-form-style-update-2.html
fast/selectors/invalid-form-style-update-3.html
fast/selectors/valid-form-style-update-1.html
fast/selectors/valid-form-style-update-2.html
fast/selectors/valid-form-style-update-3.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithControl):
(WebCore::StyleResolver::canShareStyleWithElement):
HTMLFormElement is not a FormControl, we have to generalize the test
for :valid/:invalid with style sharing.
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::~HTMLFormControlElement):
Since we now have willChangeForm(), didChangeForm(), we have to null
the form ourself, as documented by FormAssociatedElement.
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
(WebCore::HTMLFormControlElement::willChangeForm):
(WebCore::HTMLFormControlElement::didChangeForm):
(WebCore::HTMLFormControlElement::updateValidity):
Update the owner form when any of the associated form element changes
to invalid.
* html/HTMLFormControlElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
(WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
(WebCore::HTMLFormElement::matchesValidPseudoClass):
(WebCore::HTMLFormElement::matchesInvalidPseudoClass):
This is very similar to the code of fieldset, but we have much weaker
invariants due to the insane way FormAssociatedElement initializes.
* html/HTMLFormElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::initializeInputType):
For completeness, we should always validate when changing the type.
The code was only doing that when the element was inserted into the tree,
that was too fragile.
2014-12-22 Anders Carlsson <andersca@apple.com>
Try to fix the Windows build.
* dom/DOMAllInOne.cpp:
2014-12-22 Anders Carlsson <andersca@apple.com>
Add a SecurityOriginPolicy class
https://bugs.webkit.org/show_bug.cgi?id=139875
Reviewed by Sam Weinig.
This is the first step towards making SecurityOrigin immutable. SecurityOriginPolicy will hold a
SecurityOrigin and will handle things that would otherwise mutate SecurityOrigin.
* CMakeLists.txt:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
(WebCore::DOMImplementation::createHTMLDocument):
* dom/Document.cpp:
(WebCore::Document::create):
(WebCore::Document::open):
(WebCore::Document::cloneDataFromDocument):
(WebCore::Document::initSecurityContext):
* dom/ScriptExecutionContext.h:
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::setSecurityOriginPolicy):
(WebCore::SecurityContext::securityOrigin):
(WebCore::SecurityContext::isSecureTransitionTo):
(WebCore::SecurityContext::enforceSandboxFlags):
(WebCore::SecurityContext::setSecurityOrigin): Deleted.
* dom/SecurityContext.h:
(WebCore::SecurityContext::securityOriginPolicy):
(WebCore::SecurityContext::securityOrigin): Deleted.
* dom/SecurityOriginPolicy.cpp: Added.
(WebCore::SecurityOriginPolicy::create):
(WebCore::SecurityOriginPolicy::SecurityOriginPolicy):
(WebCore::SecurityOriginPolicy::~SecurityOriginPolicy):
* dom/SecurityOriginPolicy.h: Added.
(WebCore::SecurityOriginPolicy::origin):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::begin):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseXML):
* xml/XMLTreeViewer.cpp:
(WebCore::XMLTreeViewer::transformDocumentToTreeView):
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource):
2014-12-22 Zalan Bujtas <zalan@apple.com>
Incorrect dashed and dotted border painting.
https://bugs.webkit.org/show_bug.cgi?id=139872
rdar://problem/18024205
Reviewed by Simon Fraser.
This patch makes dashed/dotted border painting symmetric and consistent.
It also works with subpixel positioning.
Tests: fast/borders/border-painting-correctness-dashed.html
fast/borders/border-painting-correctness-dotted.html
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLine):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
2014-12-22 Timothy Horton <timothy_horton@apple.com>
TextIndicatorWindow is larger than it needs to be, especially when not bouncing
https://bugs.webkit.org/show_bug.cgi?id=139876
<rdar://problem/19311017>
Reviewed by Sam Weinig.
* page/TextIndicator.cpp:
(WebCore::TextIndicator::wantsBounce):
(WebCore::TextIndicator::wantsContentCrossfade):
(WebCore::TextIndicator::wantsFadeIn):
* page/TextIndicator.h:
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
(-[WebTextIndicatorView _animationDuration]):
(-[WebTextIndicatorView present]):
(WebCore::TextIndicatorWindow::setTextIndicator):
(-[WebTextIndicatorView _textIndicatorWantsBounce]): Deleted.
(-[WebTextIndicatorView _textIndicatorWantsContentCrossfade]): Deleted.
(-[WebTextIndicatorView _textIndicatorWantsFadeIn]): Deleted.
Move the various switches over TextIndicatorPresentationTransition into TextIndicator.
Adjust the margin; only inflate by the shadow if we're not bouncing.
If we are bouncing, fix the math to more tightly fit the bounce.
Previously we were inflating by way too much, and even when we didn't need to.
2014-12-22 Chris Dumez <cdumez@apple.com>
[iOS] Log using FeatureCounter when a PacheCache entry is not reused because it expired
https://bugs.webkit.org/show_bug.cgi?id=139869
<rdar://problem/19255690>
Reviewed by Darin Adler.
Log using FeatureCounter when a PacheCache entry is not reused because
it expired.
* history/PageCache.cpp:
(WebCore::PageCache::take):
(WebCore::PageCache::get):
* history/PageCache.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/HistoryController.cpp:
(WebCore::HistoryController::invalidateCurrentItemCachedPage):
* platform/FeatureCounterKeys.h:
2014-12-22 Antti Koivisto <antti@apple.com>
Try to fix the windows build.
* platform/graphics/win/SimpleFontDataCGWin.cpp:
2014-12-22 Timothy Horton <timothy_horton@apple.com>
Adjust TextIndicator shadow parameters
https://bugs.webkit.org/show_bug.cgi?id=139871
<rdar://problem/19283300>
Reviewed by Sam Weinig.
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
Slightly adjust the shadow and bounce size.
2014-12-22 Chris Dumez <cdumez@apple.com>
Consistently use "FeatureCounter*Key" naming for FeatureCounter keys
https://bugs.webkit.org/show_bug.cgi?id=139867
Reviewed by Darin Adler.
Consistently use "FeatureCounter*Key" naming for FeatureCounter keys.
* loader/FrameLoader.cpp:
(WebCore::logNavigationWithFeatureCounter):
* platform/FeatureCounterKeys.h:
2014-12-22 Antti Koivisto <antti@apple.com>
Generic font code should not know about SVG font missing glyph
https://bugs.webkit.org/show_bug.cgi?id=139864
Reviewed by Andreas Kling and Myles Maxfield.
The defined missing glyph is an SVG font concept and should be handled in SVG code.
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::glyphDataForSystemFallback):
(WebCore::FontGlyphs::glyphDataForVariant):
Return null glyph instead of the missing glyph (the missing glyph was already a null glyph in all non-svg-font cases).
Use early return style.
* platform/graphics/FontGlyphs.h:
* platform/graphics/SegmentedFontData.cpp:
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::platformGlyphInit):
* platform/graphics/SimpleFontData.h:
Remove the missingGlyph member.
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):
Explicitly skip over null glyphs. Before they had non-null fontData and would get skipped implicitly.
* platform/graphics/mac/SimpleFontDataMac.mm:
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::missingGlyphForFont):
Get the missing glyph from the SVG font element.
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
Return the missing glyph if the normal lookup didn't produce results.
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::initializeFontData):
2014-12-22 Chris Dumez <cdumez@apple.com>
Move "Auto" CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139858
Reviewed by Antti Koivisto.
Move "Auto" CSS properties from DeprecatedStyleBuilder to the new
StyleBuilder, by adding support in the generator for using hasAutoXXX()
/ setHasAutoXXX() methods on RenderStyle.
No new tests, no web-exposed behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyAuto::setValue): Deleted.
(WebCore::ApplyPropertyAuto::value): Deleted.
(WebCore::ApplyPropertyAuto::hasAuto): Deleted.
(WebCore::ApplyPropertyAuto::setAuto): Deleted.
(WebCore::ApplyPropertyAuto::applyInheritValue): Deleted.
(WebCore::ApplyPropertyAuto::applyInitialValue): Deleted.
(WebCore::ApplyPropertyAuto::applyValue): Deleted.
(WebCore::ApplyPropertyAuto::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialColumnGap):
(WebCore::StyleBuilderCustom::applyInheritColumnGap):
(WebCore::StyleBuilderCustom::applyValueColumnGap):
* css/makeprop.pl:
(getNameForMethods):
(getAutoGetter):
(getAutoSetter):
(generateInitialValueSetter):
(generateInheritValueSetter):
(generateValueSetter):
2014-12-21 Shivakumar JM <shiva.jm@samsung.com>
HTMLSelectElement add() should support adding group of options element (HTMLOptGroupElement).
https://bugs.webkit.org/show_bug.cgi?id=139806
Reviewed by Darin Adler.
HTMLSelectElement add() should support adding group of options (optgroup) element.
Test: fast/dom/HTMLSelectElement/select-add-optgroup.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::add):
2014-12-21 Chris Dumez <cdumez@apple.com>
Fix missing assertion in r177623.
https://bugs.webkit.org/show_bug.cgi?id=139334
Reviewed by Darin Adler.
ValueWithCalculation::setCalculation() was meant to include an
"isCalculation()" assertion but I inadvertently omitted the
ASSERT() around the statement.
* css/CSSParser.h:
(WebCore::CSSParser::ValueWithCalculation::setCalculation):
2014-12-21 Gabor Rapcsanyi <rgabor@webkit.org>
AX: Hidden aria table crash
https://bugs.webkit.org/show_bug.cgi?id=139856
Reviewed by Chris Fleizach.
Change axCaption to pointer and check it's value because
AXObjectCache::getOrCreate() can return with nullptr.
Test: accessibility/aria-hidden-crash.html
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):
2014-12-20 Chris Dumez <cdumez@apple.com>
Get rid of error-prone ReleaseParsedCalcValueCondition argument in CSSParser
https://bugs.webkit.org/show_bug.cgi?id=139334
Reviewed by Darin Adler.
Get rid of error-prone ReleaseParsedCalcValueCondition argument in
CSSParser that determines the the m_parsedCalculation member should
be released.
Instead, introduce a new ValueWithCalculation type which wraps a
CSSParserValue and an optional parsed calculation value. This way,
the parsed calculation value is now associated with its CSSParserValue.
This makes it very difficult to use a parsed calculation value for the
wrong CSSParserValue. The API is also easier to use as developers no
longer need to explicitly indicate if the calculation value should be
released or not.
No new tests, no web-behavior change.
2014-12-20 Eric Carlson <eric.carlson@apple.com>
[iOS] add optimized fullscreen API
https://bugs.webkit.org/show_bug.cgi?id=139833
<rdar://problem/18844486>
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig: Add ENABLE_VIDEO_PRESENTATION_MODE.
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::optimizedFullscreenSupported): Deleted.
(WebCore::MediaControlsHost::fullscreenMode): Deleted.
* Modules/mediacontrols/MediaControlsHost.h:
* Modules/mediacontrols/MediaControlsHost.idl:
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.addVideoListeners): Listen for 'webkitpresentationmodechanged'.
(ControllerIOS.prototype.removeVideoListeners): Stop listening for 'webkitpresentationmodechanged'.
(ControllerIOS.prototype.configureInlineControls): Call video element instead of using the now
removed host property.
(ControllerIOS.prototype.updateControls): Ditto.
(ControllerIOS.prototype.presentationMode): New, return webkitPresentationMode when possible.
(ControllerIOS.prototype.handleFullscreenButtonClicked): Use webkitSetPresentationMode when possible.
(ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): Use video element instead of
using the now removed host method.
(ControllerIOS.prototype.handlePresentationModeChange): New, react to presentation mode changes.
(ControllerIOS.prototype.handleFullscreenChange): Call handlePresentationModeChange.
* dom/EventNames.h: Add webkitpresentationmodechanged.
* html/HTMLAttributeNames.in: Add onwebkitpresentationmodechanged.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen): Early return when asked to change to the current
mode. Call fullscreenModeChanged() instead of whacking the instance variable directly.
(WebCore::HTMLMediaElement::exitFullscreen): Ditto.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::fullscreenModeChanged): Make virtual.
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::parseAttribute): Deal with onwebkitpresentationmodechange.
(WebCore::presentationModeFullscreen): New.
(WebCore::presentationModeOptimized): Ditto.
(WebCore::presentationModeInline): Ditto.
(WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Ditto.
(WebCore::HTMLVideoElement::webkitSetPresentationMode): Ditto.
(WebCore::HTMLVideoElement::webkitPresentationMode): Ditto.
(WebCore::HTMLVideoElement::fullscreenModeChanged): Ditto.
* html/HTMLVideoElement.h:
* html/HTMLVideoElement.idl:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setIsOptimized): Simplify the logic a bit. Don't report
a mode change when
2014-12-20 David Kilzer <ddkilzer@apple.com>
Switch from using PLATFORM_NAME to SDK selectors in WebCore, WebInspectorUI, WebKit, WebKit2
<http://webkit.org/b/139463>
Reviewed by Mark Rowe.
Also remove all uses of SQLITE3_HEADER_SEARCH_PATHS and
WEBCORE_SQLITE3_HEADER_SEARCH_PATHS which were phased out in
r132859 and needed for Leopard.
* Configurations/Base.xcconfig:
- Only set GCC_ENABLE_OBJC_GC, GCC_MODEL_TUNING and TOOLCHAINS
on OS X.
- Set GCC_OPTIMIZATION_LEVEL_normal based on SDK.
- Simplify SQLITE3_HEADER_SEARCH_PATHS.
* Configurations/DebugRelease.xcconfig:
- Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.
* Configurations/Version.xcconfig:
- Set SYSTEM_VERSION_PREFIX separately for iOS and OS X.
* Configurations/WebCore.xcconfig:
- Set EXPORTED_SYMBOLS_FILE_i386, EXPORTED_SYMBOLS_FILE_x86_64,
FRAMEWORK_SEARCH_PATHS, INSTALL_PATH, DYLIB_INSTALL_NAME_BASE,
OTHER_LDFLAGS, SECTORDER_FLAGS, NORMAL_WEBCORE_FRAMEWORKS_DIR,
WEBCORE_FRAMEWORKS_DIR, NORMAL_PRODUCTION_FRAMEWORKS_DIR,
PRODUCTION_FRAMEWORKS_DIR,
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production and
EXCLUDED_SOURCE_FILE_NAMES based on SDK.
- Make sure DYLIB_INSTALL_NAME_BASE and OTHER_LDFLAGS are
overrideable by WebCoreTestSupport.xcconfig.
* Configurations/WebCoreTestSupport.xcconfig:
- Set PRIVATE_HEADERS_FOLDER_PATH_Production and
INSTALL_PATH_Production based on SDK.
- Override SECT_ORDER_FLAGS from WebCore.xcconfig.
2014-12-19 Myles C. Maxfield <mmaxfield@apple.com>
[SVG -> OTF Converter] Make placeholders more robust
https://bugs.webkit.org/show_bug.cgi?id=139836
Reviewed by Dan Bernstein.
This patch creates a Placeholder object which hides the complexity of
populating offsets to subtables.
No new tests because there is no behavior change.
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::Placeholder::Placeholder):
(WebCore::SVGToOTFFontConverter::Placeholder::populate):
(WebCore::SVGToOTFFontConverter::Placeholder::~Placeholder):
(WebCore::SVGToOTFFontConverter::appendArabicReplacementSubtable):
(WebCore::SVGToOTFFontConverter::appendGSUBTable):
2014-12-19 Chris Dumez <cdumez@apple.com>
Fix initial / inherit support for '-webkit-perspective-origin' CSS property
https://bugs.webkit.org/show_bug.cgi?id=139843
Reviewed by Simon Fraser.
Fix initial / inherit support for '-webkit-perspective-origin' CSS
property. These previously had no effect.
This patch updates the code to be consistent with
'-webkit-transform-origin' and gets rid of the code in
DeprecatedStyleBuilder as it isn't used.
Test: fast/css/perspective-origin-initial-inherit.html
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyPerspectiveOrigin::applyInheritValue): Deleted.
(WebCore::ApplyPropertyPerspectiveOrigin::applyInitialValue): Deleted.
(WebCore::ApplyPropertyPerspectiveOrigin::applyValue): Deleted.
(WebCore::ApplyPropertyPerspectiveOrigin::createHandler): Deleted.
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
(WebCore::StyleProperties::asText):
* css/StylePropertyShorthand.cpp:
(WebCore::webkitPerspectiveOriginShorthand):
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2014-12-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177599.
https://bugs.webkit.org/show_bug.cgi?id=139846
this breaks so many things (Requested by thorton_ on #webkit).
Reverted changeset:
"TextIndicator's window can be pushed down if it intersects
the menu bar"
https://bugs.webkit.org/show_bug.cgi?id=139841
http://trac.webkit.org/changeset/177599
2014-12-19 Timothy Horton <timothy_horton@apple.com>
TextIndicator's window can be pushed down if it intersects the menu bar
https://bugs.webkit.org/show_bug.cgi?id=139841
<rdar://problem/19311017>
Reviewed by Anders Carlsson.
* page/mac/TextIndicatorWindow.mm:
(WebCore::TextIndicatorWindow::setTextIndicator):
Ensure that the textIndicatorWindow sits above the menubar, and re-set
its frame so that it moves under the menubar if required.
2014-12-19 Anders Carlsson <andersca@apple.com>
Use WebCore::MachSendRights for the compositing render server port
https://bugs.webkit.org/show_bug.cgi?id=139834
Reviewed by Tim Horton.
* WebCore.exp.in:
2014-12-19 Chris Dumez <cdumez@apple.com>
[iOS] Log how often media element playback happens using FeatureCounter
https://bugs.webkit.org/show_bug.cgi?id=139819
<rdar://problem/19309988>
Reviewed by Eric Carlson.
Log using FeatureCounter how often we start loading for audio / video
elements, and how often they end up being played.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
Add flag to identify when a media element starts playing for the first
time.
(WebCore::HTMLMediaElement::loadResource):
Log when a media element starts loading.
(WebCore::HTMLMediaElement::updatePlayState):
Log when a media element starts playing for the first time.
* html/HTMLMediaElement.h:
Add flag to identify when a media element starts playing for the first
time.
* platform/FeatureCounterKeys.h:
Add FeatureCounter keys for HTMLMediaElement loading / playback.
2014-12-19 Andreas Kling <akling@apple.com>
Ref-ify TextIterator API.
<https://webkit.org/b/139823>
Reviewed by Antti Koivisto.
Change TextIterator functions that always return Range objects to return
Ref<Range> instead of PassRefPtr<Range>.
One API (rangeFromLocationAndLength) may return nullptr, so its return type
is now RefPtr<Range>.
* editing/TextIterator.cpp:
(WebCore::TextIterator::range):
(WebCore::TextIterator::node):
(WebCore::SimplifiedBackwardsTextIterator::range):
(WebCore::CharacterIterator::range):
(WebCore::characterSubrange):
(WebCore::BackwardsCharacterIterator::range):
(WebCore::TextIterator::subrange):
(WebCore::TextIterator::rangeFromLocationAndLength):
(WebCore::TextIterator::getLocationAndLengthFromRange):
(WebCore::collapsedToBoundary):
(WebCore::findPlainText):
* editing/TextIterator.h:
2014-12-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: CRASH in inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html
https://bugs.webkit.org/show_bug.cgi?id=139792
Reviewed by Timothy Hatcher.
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::removeListener):
When removing listeners, we could be during WorkerGlobalObject shutdown
and WorkerGlobalObject::script may be null.
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
This postTask may happen after m_pageInspector has been cleared, so
only execute it if m_pageInspector is still valid.
2014-12-19 Chris Dumez <cdumez@apple.com>
Drop useless HTMLMediaElement::m_previousProgress member
https://bugs.webkit.org/show_bug.cgi?id=139822
Reviewed by Eric Carlson.
Drop HTMLMediaElement::m_previousProgress member and it is not used or
even initialized.
* html/HTMLMediaElement.h:
2014-12-19 Chris Dumez <cdumez@apple.com>
[iOS] Log how successful the memory cache is using FeatureCounter
https://bugs.webkit.org/show_bug.cgi?id=139802
Reviewed by Andreas Kling.
Log how successful the memory cache is using FeatureCounter and why we
choose not to use the resource in the memory cache when it is present.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
* platform/FeatureCounterKeys.h:
2014-12-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177574.
https://bugs.webkit.org/show_bug.cgi?id=139821
"Broke Production builds by installing
libWebCoreTestSupport.dylib in the wrong directory" (Requested
by ddkilzer on #webkit).
Reverted changeset:
"Switch from using PLATFORM_NAME to SDK selectors in WebCore,
WebInspectorUI, WebKit, WebKit2"
https://bugs.webkit.org/show_bug.cgi?id=139463
http://trac.webkit.org/changeset/177574
2014-12-19 Said Abou-Hallawa <sabouhallawa@apple.com>
Only when the SVG is inline and only when a shape is referenced before it is defined, this shape will not be drawn.
https://bugs.webkit.org/show_bug.cgi?id=139451.
Reviewed by Antti Koivisto.
Tests: svg/in-html/defs-after-use.html.
When parsing the children of an SVG element is finished, we need to notify the
other SVG elements which have incomplete shadow trees because of early referencing
to this element. The referencing elements need to rebuild their shadow trees and
make new copies of the this element and its sub-tree.
This is the case where a <use> tag references target elements before these target
elements are defined. Updating the shadow DOM tree of a <use> element should update
the corresponding shadow render tree as well.
* svg/SVGElement.cpp:
(WebCore::SVGElement::finishParsingChildren):
Invalidate all the referencing elements of a target element whose sub-tree has
just finished parsing.
2014-12-19 David Kilzer <ddkilzer@apple.com>
Switch from using PLATFORM_NAME to SDK selectors in WebCore, WebInspectorUI, WebKit, WebKit2
<http://webkit.org/b/139463>
Reviewed by Mark Rowe.
Also remove all uses of SQLITE3_HEADER_SEARCH_PATHS and
WEBCORE_SQLITE3_HEADER_SEARCH_PATHS which were phased out in
r132859 and needed for Leopard.
* Configurations/Base.xcconfig:
- Only set GCC_ENABLE_OBJC_GC, GCC_MODEL_TUNING and TOOLCHAINS
on OS X.
- Set GCC_OPTIMIZATION_LEVEL_normal based on SDK.
- Simplify SQLITE3_HEADER_SEARCH_PATHS.
* Configurations/DebugRelease.xcconfig:
- Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.
* Configurations/Version.xcconfig:
- Set SYSTEM_VERSION_PREFIX separately for iOS and OS X.
* Configurations/WebCore.xcconfig:
- Set EXPORTED_SYMBOLS_FILE_i386, EXPORTED_SYMBOLS_FILE_x86_64,
FRAMEWORK_SEARCH_PATHS, INSTALL_PATH, DYLIB_INSTALL_NAME_BASE,
OTHER_LDFLAGS, SECTORDER_FLAGS, NORMAL_WEBCORE_FRAMEWORKS_DIR,
WEBCORE_FRAMEWORKS_DIR, NORMAL_PRODUCTION_FRAMEWORKS_DIR,
PRODUCTION_FRAMEWORKS_DIR,
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production and
EXCLUDED_SOURCE_FILE_NAMES based on SDK.
- Make sure DYLIB_INSTALL_NAME_BASE and OTHER_LDFLAGS are
overrideable by WebCoreTestSupport.xcconfig.
* Configurations/WebCoreTestSupport.xcconfig:
- Set PRIVATE_HEADERS_FOLDER_PATH_Production and
INSTALL_PATH_Production based on SDK.
- Override SECT_ORDER_FLAGS from WebCore.xcconfig.
2014-12-19 Chris Dumez <cdumez@apple.com>
Clean up StyleBuilderCustom and DeprecatedStyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139807
Reviewed by Antti Koivisto.
Clean up StyleBuilderCustom and DeprecatedStyleBuilder.
* css/DeprecatedStyleBuilder.cpp:
- Remove unnecessary header includes.
(WebCore::ApplyPropertyPerspectiveOrigin::applyInheritValue):
(WebCore::ApplyPropertyPerspectiveOrigin::applyInitialValue):
(WebCore::ApplyPropertyPerspectiveOrigin::applyValue):
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyExpanding::applyInheritValue): Deleted.
(WebCore::ApplyPropertyExpanding::applyInitialValue): Deleted.
(WebCore::ApplyPropertyExpanding::applyValue): Deleted.
(WebCore::ApplyPropertyExpanding::createHandler): Deleted.
- Rename ApplyPropertyExpanding to ApplyPropertyPerspectiveOrigin as
PerspectiveOrigin is the only remaining user of this class. This also
allows us to simplify the implementation a lot.
(WebCore::ApplyPropertyDefaultBase::setValue): Deleted.
(WebCore::ApplyPropertyDefaultBase::value): Deleted.
(WebCore::ApplyPropertyDefaultBase::initial): Deleted.
(WebCore::ApplyPropertyDefaultBase::applyInheritValue): Deleted.
(WebCore::ApplyPropertyDefaultBase::applyInitialValue): Deleted.
(WebCore::ApplyPropertyDefaultBase::applyValue): Deleted.
- There is no longer any user of this templated class.
* css/StyleBuilderCustom.h:
- Introduce a macro that declares all 3 handlers (inherit, initial and
value) in the StyleBuilderCustom class. This greatly reduces the
number of lines in this class.
- Also alphabetize the handlers.
2014-12-18 Jeremy Jones <jeremyj@apple.com>
dispatch to main thread before accessing playerController() in WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse
https://bugs.webkit.org/show_bug.cgi?id=139809
Reviewed by Dan Bernstein.
This prevents a race in playerController().
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse):
2014-12-18 Jessie Berlin <jberlin@webkit.org>
More speculative build fixing.
* WebCore.exp.in:
2014-12-18 Andreas Kling <akling@apple.com>
Ref-ify various Document-related things.
<https://webkit.org/b/139796>
Reviewed by Anders Carlsson.
* bindings/objc/DOMHTML.mm:
(-[DOMHTMLDocument createDocumentFragmentWithText:]):
* dom/CDATASection.cpp:
(WebCore::CDATASection::create):
(WebCore::CDATASection::virtualCreate):
* dom/CDATASection.h:
* dom/Comment.cpp:
(WebCore::Comment::create):
* dom/Comment.h:
* dom/Document.cpp:
(WebCore::Document::create):
(WebCore::Document::createDocumentFragment):
(WebCore::Document::createTextNode):
(WebCore::Document::createComment):
(WebCore::Document::createEditingTextNode):
(WebCore::Document::createCSSStyleDeclaration):
(WebCore::Document::createElement):
(WebCore::Document::createRange):
(WebCore::Document::createParser):
(WebCore::Document::cloneNodeInternal):
(WebCore::Document::cloneDocumentWithoutChildren):
* dom/Document.h:
(WebCore::Document::create):
(WebCore::Document::createXHTML):
(WebCore::Document::createNonRenderedPlaceholder):
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::create):
* dom/DocumentFragment.h:
* dom/DocumentType.h:
* dom/EntityReference.cpp:
(WebCore::EntityReference::create):
* dom/EntityReference.h:
* dom/Text.cpp:
(WebCore::Text::create):
(WebCore::Text::createEditingText):
(WebCore::Text::splitText):
(WebCore::Text::virtualCreate):
(WebCore::Text::createWithLengthLimit):
* dom/Text.h:
* editing/markup.cpp:
(WebCore::replaceChildrenWithText):
* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocument::createParser):
* html/FTPDirectoryDocument.h:
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::createParser):
(WebCore::HTMLDocument::cloneDocumentWithoutChildren):
* html/HTMLDocument.h:
(WebCore::HTMLDocument::create):
(WebCore::HTMLDocument::createSynthesizedDocument):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::createParser):
* html/ImageDocument.h:
* html/MediaDocument.cpp:
(WebCore::MediaDocument::createParser):
* html/MediaDocument.h:
* html/PluginDocument.cpp:
(WebCore::PluginDocument::createParser):
* html/PluginDocument.h:
* html/TextDocument.cpp:
(WebCore::TextDocument::createParser):
* html/TextDocument.h:
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertTextNode):
* html/parser/HTMLDocumentParser.h:
(WebCore::HTMLDocumentParser::create):
* loader/SinkDocument.cpp:
(WebCore::SinkDocument::createParser):
* loader/SinkDocument.h:
* svg/SVGDocument.cpp:
(WebCore::SVGDocument::cloneDocumentWithoutChildren):
* svg/SVGDocument.h:
* xml/parser/XMLDocumentParser.h:
(WebCore::XMLDocumentParser::create):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLParserContext::createStringParser):
(WebCore::XMLParserContext::createMemoryParser):
2014-12-18 Anders Carlsson <andersca@apple.com>
Use MachSendRight in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139800
Reviewed by Tim Horton.
* WebCore.exp.in:
* platform/cocoa/MachSendRight.h:
(WebCore::MachSendRight::MachSendRight):
(WebCore::MachSendRight::sendRight):
* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::createFromSendRight):
(IOSurface::createFromMachPort): Deleted.
2014-12-18 Gavin Barraclough <barraclough@apple.com>
Add strong typing to RefCounter interface, return value as a bool.
https://bugs.webkit.org/show_bug.cgi?id=139776
Reviewed by Geoff Garen.
Currently all token vended by a RefCounter have the same type - Ref<RefCounter::Count>.
This means there is no compile time type checking to prevent mistakes. Update the count()
method to token<>(), templated on type used to identify the token being returned.
Calls to token<T>() will return a result of type RefCounter::Token<T>.
There are a few problems with the fact the counter will return you an exact count of the
number of outstanding tokens:
- It is desirable to only fire the callback on zero-edge changes; it is more consistent
to do so if the value is only readable as a boolean.
- It is desirable to provide the value as an argument to the callback, however to make
this useful for integer values it is also necessary to indicate the direction of change
(0->1 is often interesting where 2->1 is not).
- There is a mismatch between the precision of returning a count, and the inherent
imprecision of a token based mechanism, where it may be difficult to guarantee
absolutely no unnecessary refcount churn, and thus unintentional counter values.
* page/PageThrottler.cpp:
(WebCore::m_mediaActivityCounter):
(WebCore::m_pageLoadActivityCounter):
- lambdas now passed the value.
(WebCore::PageThrottler::mediaActivityToken):
(WebCore::PageThrottler::pageLoadActivityToken):
- count() -> token<>().
* page/PageThrottler.h:
- specify tpoken type for PageActivityAssertionToken.
2014-12-18 Benjamin Poulain <bpoulain@apple.com>
HTMLFormControlElement and HTMLObjectElement need not to look for an ancestor on construction
https://bugs.webkit.org/show_bug.cgi?id=139791
Reviewed by Alexey Proskuryakov.
The objects are being constructed, they have not been inserted into the tree yet.
There is not chance of finding the owner form at this point,
that is done when inserting the node into the tree.
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::HTMLFormControlElement):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::HTMLObjectElement):
2014-12-18 Chris Fleizach <cfleizach@apple.com>
AX: Recursive crash at WebCore::accessibleNameForNode
https://bugs.webkit.org/show_bug.cgi?id=139616
Reviewed by Mario Sanchez Prada.
An image that uses aria-labelledby to reference its own parent can lead to a recursion crash.
There needs to be some information we can pass through these methods to ensure we don't hit this case.
Test: accessibility/accessibility-description-crash.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeText):
(WebCore::AccessibilityNodeObject::textUnderElement):
(WebCore::accessibleNameForNode):
(WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityTextUnderElementMode::AccessibilityTextUnderElementMode):
2014-12-18 Chris Fleizach <cfleizach@apple.com>
AX: Heuristic: Avoid exposing an element as clickable if mouse event delegation is handled on an element with any explicit ARIA role, including presentation.
https://bugs.webkit.org/show_bug.cgi?id=133613
Reviewed by Mario Sanchez Prada.
This adds a heuristic to avoid a problem we have where too many objects that say they respond to press actions for accessibility.
It results from people installing click handlers on container nodes and then lots of static text objects are "clickable" in the eyes of VoiceOver.
What we can do is avoid this determination if the element is presentational.
Test: platform/mac/accessibility/press-action-for-presentational-descendants.html
* accessibility/AccessibilityObject.cpp:
(WebCore::nodeHasPresentationRole):
(WebCore::AccessibilityObject::supportsPressAction):
* accessibility/AccessibilityObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityActionNames]):
2014-12-18 Chris Fleizach <cfleizach@apple.com>
AX: event.target should sometimes be a descendant element on AXPress-triggered mouse clicks
https://bugs.webkit.org/show_bug.cgi?id=135689
Reviewed by Mario Sanchez Prada.
When trying to find the right sub-node to target, we need to go back up the parent chain to find
an Element, in case we land on a Text node for example.
Test: accessibility/press-target-uses-text-descendant-node.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
2014-12-16 Sam Weinig <sam@webkit.org>
Unify the Mac and iOS implementations of FontPlatformData a bit
https://bugs.webkit.org/show_bug.cgi?id=139721
Reviewed by Anders Carlsson.
This is a first pass of unifying the Mac and iOS implementations of FontPlatformData.
Notable changes:
- Change the storage of the platform font to be CTFontRef across the board. Adds NSFont
setter/getter/constructor as a temporary measures during the transition away from NSFont.
- Removes duplicate code that only differed by whether the type was NSFont or CTFontRef.
- Reduces the number of #ifdefs.
* platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::operator=):
(WebCore::FontPlatformData::openTypeTable): Deleted.
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::nsFont):
(WebCore::FontPlatformData::setNSFont):
(WebCore::FontPlatformData::hash):
(WebCore::FontPlatformData::operator==):
(WebCore::FontPlatformData::isHashTableDeletedValue):
(WebCore::toCTFontRef): Deleted.
(WebCore::FontPlatformData::font): Deleted.
(WebCore::FontPlatformData::roundsGlyphAdvances): Deleted.
(WebCore::FontPlatformData::cgFont): Deleted.
(WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
* platform/graphics/SimpleFontData.h:
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::~FontPlatformData):
(WebCore::FontPlatformData::platformDataInit):
(WebCore::FontPlatformData::platformDataAssign):
(WebCore::FontPlatformData::setFont):
(WebCore::FontPlatformData::roundsGlyphAdvances):
(WebCore::FontPlatformData::allowsLigatures):
(WebCore::FontPlatformData::ctFont):
(WebCore::FontPlatformData::openTypeTable):
(WebCore::FontPlatformData::loadFont): Deleted.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::drawGlyphs):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::getCompositeFontReferenceFontData):
(WebCore::SimpleFontData::platformInit):
(WebCore::SimpleFontData::platformCreateScaledFontData):
(WebCore::SimpleFontData::containsCharacters):
(WebCore::SimpleFontData::determinePitch):
(WebCore::SimpleFontData::renderingStyle):
(WebCore::SimpleFontData::advanceForColorBitmapFont):
2014-12-18 Anders Carlsson <andersca@apple.com>
Build fix.
* platform/cocoa/MachSendRight.cpp:
2014-12-18 Timothy Horton <timothy_horton@apple.com>
Change page preview loading order, and add a TextIndicator
https://bugs.webkit.org/show_bug.cgi?id=139793
<rdar://problem/19288547>
Reviewed by Beth Dakin.
* WebCore.exp.in:
* platform/spi/mac/NSPopoverSPI.h:
Add an export and some SPI.
2014-12-18 Anders Carlsson <andersca@apple.com>
Clean up MachSendRight and add a copySendRight member function
https://bugs.webkit.org/show_bug.cgi?id=139788
Reviewed by Tim Horton.
* platform/cocoa/MachSendRight.cpp:
(WebCore::retainSendRight):
(WebCore::releaseSendRight):
Use mach_error_string.
(WebCore::MachSendRight::copySendRight):
Create a new send right with the given mach port.
(WebCore::MachSendRight::leakSendRight):
Use std::exchange.
* platform/cocoa/MachSendRight.h:
2014-12-18 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ASSERT seen closing/opening multiple inspectors
https://bugs.webkit.org/show_bug.cgi?id=139783
Reviewed by Timothy Hatcher.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::nodeForObjectId):
2014-12-18 Anders Carlsson <andersca@apple.com>
Add a MachSendRight class to WebCore and use it in IOSurface
https://bugs.webkit.org/show_bug.cgi?id=139787
Reviewed by Tim Horton.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/MachSendRight.cpp: Added.
(WebCore::retainSendRight):
(WebCore::releaseSendRight):
(WebCore::MachSendRight::adopt):
(WebCore::MachSendRight::create):
(WebCore::MachSendRight::MachSendRight):
(WebCore::MachSendRight::~MachSendRight):
(WebCore::MachSendRight::operator=):
(WebCore::MachSendRight::leakSendRight):
* platform/cocoa/MachSendRight.h: Added.
* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::createSendRight):
(IOSurface::createMachPort): Deleted.
2014-12-18 Andreas Kling <akling@apple.com>
Ref-ify DOMSettableTokenList.
<https://webkit.org/b/139785>
Reviewed by Chris Dumez.
Make DOMSettableTokenList::create() return a Ref, and have its two client
elements store it in a Ref instead of a RefPtr (and fix their getter API
to return references.)
* html/DOMSettableTokenList.cpp:
(WebCore::DOMSettableTokenList::create): Deleted.
* html/DOMSettableTokenList.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::sizes): Deleted.
* html/HTMLLinkElement.h:
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::htmlFor): Deleted.
* html/HTMLOutputElement.h:
2014-12-18 Andreas Kling <akling@apple.com>
Ref-ify ClientRectList.
<https://webkit.org/b/139780>
Reviewed by Anders Carlsson.
Make the ClientRectList::create() helpers return Ref, along with a bunch
of other functions that always return non-null ClientRectLists.
Also make ClientRectList store a Vector<Ref<ClientRect>> internally since
entries in the Vector are never null.
* dom/ClientRectList.cpp:
(WebCore::ClientRectList::item):
* dom/ClientRectList.h:
(WebCore::ClientRectList::create):
* dom/Element.cpp:
(WebCore::Element::getClientRects):
* dom/Element.h:
* dom/Range.cpp:
(WebCore::Range::getClientRects):
* dom/Range.h:
* page/Page.cpp:
(WebCore::Page::nonFastScrollableRects):
* page/Page.h:
* testing/Internals.cpp:
(WebCore::Internals::inspectorHighlightRects):
(WebCore::Internals::nonFastScrollableRects):
* testing/Internals.h:
2014-12-18 Andreas Kling <akling@apple.com>
Ref-ify ClientRect.
<https://webkit.org/b/139777>
Reviewed by Anders Carlsson.
Make the ClientRect::create() helpers return Ref, along with a bunch
of other functions that always return non-null ClientRects.
* dom/ClientRect.h:
(WebCore::ClientRect::create):
* dom/Element.cpp:
(WebCore::Element::getBoundingClientRect):
* dom/Element.h:
* dom/Range.cpp:
(WebCore::Range::getBoundingClientRect):
* dom/Range.h:
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::displayLastTextTrackCueBox):
* testing/Internals.cpp:
(WebCore::Internals::absoluteCaretBounds):
(WebCore::Internals::boundingBox):
(WebCore::Internals::selectionBounds):
* testing/Internals.h:
2014-12-18 Chris Dumez <cdumez@apple.com>
[iOS] Log navigation types using FeatureCounter API
https://bugs.webkit.org/show_bug.cgi?id=139753
Reviewed by Darin Adler.
Log navigation types using FeatureCounter API.
No new tests, no behavior change other than additional feature
counting.
* loader/FrameLoader.cpp:
(WebCore::logNavigationWithFeatureCounter):
(WebCore::FrameLoader::loadWithDocumentLoader):
* platform/FeatureCounterKeys.h:
2014-12-18 Chris Dumez <cdumez@apple.com>
Move 'font-weight' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139765
Reviewed by Antti Koivisto.
Move 'font-weight' CSS property to the new StyleBuilder by using
custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyFontWeight::applyValue): Deleted.
(WebCore::ApplyPropertyFontWeight::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialFontWeight):
(WebCore::StyleBuilderCustom::applyInheritFontWeight):
(WebCore::StyleBuilderCustom::applyValueFontWeight):
2014-12-18 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Internals methods return 0 instead of false when they fail
https://bugs.webkit.org/show_bug.cgi?id=139766
Reviewed by Darin Adler.
Some Internals method explicitly return 0 although
they expect boolean value.
No new tests, no behavior change.
* testing/Internals.cpp:
(WebCore::Internals::hasSpellingMarker):
(WebCore::Internals::hasAutocorrectedMarker):
(WebCore::Internals::isOverwriteModeEnabled):
(WebCore::Internals::hasGrammarMarker):
Return false instead of 0.
2014-12-18 Chris Dumez <cdumez@apple.com>
[iOS] Log why cached resources are being revalidated using FeatureCounter API
https://bugs.webkit.org/show_bug.cgi?id=139759
<rdar://problem/19288177>
Reviewed by Antti Koivisto.
Log why cached resources are being revalidated using FeatureCounter API.
Also log if revalidation is successful or not.
No new tests, no behavior change.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest):
(WebCore::SubresourceLoader::didReceiveResponse):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::mustRevalidateDueToCacheHeaders):
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::failBeforeStarting):
(WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::loader):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
* platform/FeatureCounterKeys.h:
2014-12-18 Antti Koivisto <antti@apple.com>
Remove alwaysUseBaselineOfPrimaryFont setting
https://bugs.webkit.org/show_bug.cgi?id=139770
Reviewed by Anders Carlsson.
"FIXME: This is unneeded and should be removed."
This iOS-only setting has no clients anymore.
* page/Settings.in:
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::ascentAndDescentForBox):
2014-12-18 Radu Stavila <stavila@adobe.com>
[SVG Masking] Enable the use of <mask> elements for -webkit-mask-image
https://bugs.webkit.org/show_bug.cgi?id=139294
Reviewed by Simon Fraser.
This patch links together all parts required for the functionality which improves
the -webkit-mask-image property by allowing it to reference a <mask> element defined
in an inline or external SVG document.
Support for this new functionality has been added in a previous patch, under issue
https://bugs.webkit.org/show_bug.cgi?id=139092. A more detailed description of how
the new functionality works can be found in the ChangeLog for that commit.
The containsSVGDocument in ScrollView has been removed because it was added in the
previous patch but is no longer required.
Tests: css3/masking/mask-base64.html
css3/masking/mask-multiple-values.html
css3/masking/mask-svg-clipped-fragmentId.html
css3/masking/mask-svg-fragmentId.html
css3/masking/mask-svg-inline-fragmentId.html
css3/masking/mask-svg-inline-invalid-fragmentId.html
css3/masking/mask-svg-invalid-fragmentId.html
css3/masking/mask-svg-no-fragmentId-tiled.html
css3/masking/mask-svg-no-fragmentId.html
css3/masking/mask-svg-script-entire-svg-to-mask.html
css3/masking/mask-svg-script-mask-to-entire-svg.html
css3/masking/mask-svg-script-mask-to-none.html
css3/masking/mask-svg-script-mask-to-png.html
css3/masking/mask-svg-script-none-to-mask.html
css3/masking/mask-svg-script-none-to-png.html
css3/masking/mask-svg-script-png-to-mask.html
css3/masking/mask-svg-script-png-to-none.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parseFillProperty):
(WebCore::CSSParser::parseMaskImage):
* css/CSSParser.h:
* css/CSSValue.h:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustStyleForMaskImages):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::loadPendingSVGDocuments):
(WebCore::StyleResolver::createMaskImageOperations):
(WebCore::StyleResolver::loadPendingImages):
* css/StyleResolver.h:
* page/FrameView.cpp:
(WebCore::FrameView::containsSVGDocument): Deleted.
* page/FrameView.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::MaskImagePropertyWrapper::MaskImagePropertyWrapper):
(WebCore::MaskImagePropertyWrapper::equals):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* platform/ScrollView.h:
(WebCore::ScrollView::containsSVGDocument): Deleted.
* platform/graphics/MaskImageOperation.cpp:
(WebCore::MaskImageOperation::~MaskImageOperation):
(WebCore::MaskImageOperation::operator==):
* platform/graphics/MaskImageOperation.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::maskClipRect):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateFillTileSize):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::~RenderElement):
(WebCore::RenderElement::updateFillImages):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerMaskImageInfo.cpp:
(WebCore::RenderLayer::MaskImageInfo::~MaskImageInfo):
(WebCore::RenderLayer::MaskImageInfo::updateMaskImageClients):
(WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients):
* rendering/RenderLayerMaskImageInfo.h:
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::hasImage):
* rendering/style/FillLayer.h:
(WebCore::FillLayer::image):
(WebCore::FillLayer::imageOrMaskImage): Deleted.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setMaskImage):
* rendering/style/RenderStyle.h:
2014-12-18 Antti Koivisto <antti@apple.com>
Stop returning GlyphPage from various Font functions
https://bugs.webkit.org/show_bug.cgi?id=139627
Reviewed by Darin Adler.
Make all
std::pair<GlyphData, GlyphPage*> glyphDataAndPage*(...)
style functions to just return GlyphData only. The GlyphPage value was only used for an obscure SVG fallback case.
* platform/graphics/Font.h:
(WebCore::Font::glyphDataForCharacter):
(WebCore::Font::glyphDataAndPageForCharacter): Deleted.
* platform/graphics/FontGlyphs.cpp:
(WebCore::glyphDataForCJKCharacterWithoutSyntheticItalic):
(WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation):
(WebCore::FontGlyphs::glyphDataForSystemFallback):
(WebCore::FontGlyphs::glyphDataForVariant):
(WebCore::FontGlyphs::glyphDataForCharacter):
(WebCore::glyphDataAndPageForCJKCharacterWithoutSyntheticItalic): Deleted.
(WebCore::glyphDataAndPageForNonCJKCharacterWithGlyphOrientation): Deleted.
(WebCore::FontGlyphs::glyphDataAndPageForSystemFallback): Deleted.
(WebCore::FontGlyphs::glyphDataAndPageForVariant): Deleted.
(WebCore::FontGlyphs::glyphDataAndPageForCharacter): Deleted.
* platform/graphics/FontGlyphs.h:
(WebCore::FontGlyphs::GlyphPagesStateSaver::GlyphPagesStateSaver): Deleted.
(WebCore::FontGlyphs::GlyphPagesStateSaver::~GlyphPagesStateSaver): Deleted.
No longer needed.
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
Simplify by not trying to resolve fallbacks in case context sensitive (based on lang attribute etc)
glyph selection fails. Instead just fall back to a default font. This behavior is not specified
anywhere as far as I can see. (normal non-context sensitive fallbacks will still work fine).
This removes the need to hackishly mutate glyph pages.
Also fix a bug where we didn't use the specified missing glyph when context sensitive selection failed.
2014-12-18 Chris Dumez <cdumez@apple.com>
Move 'list-style-image' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139763
Reviewed by Antti Koivisto.
Move 'list-style-image' CSS property to the new StyleBuilder
by reusing an existing Converter helper and renaming it for
clarity.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyStyleImage::applyValue): Deleted.
(WebCore::ApplyPropertyStyleImage::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertStyleImage):
(WebCore::StyleBuilderConverter::convertBorderImageSource): Deleted.
2014-12-17 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r177452.
https://bugs.webkit.org/show_bug.cgi?id=139752
* CMakeLists.txt:
2014-12-17 Andreas Kling <akling@apple.com>
Ref-ify Range::create().
<https://webkit.org/b/139755>
Reviewed by Anders Carlsson.
* dom/Document.cpp:
(WebCore::acceptsEditingFocus):
* dom/Element.cpp:
(WebCore::Element::innerText):
* dom/Range.cpp:
(WebCore::Range::create):
(WebCore::Range::cloneRange):
(WebCore::rangeOfContents):
* dom/Range.h:
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::applyAlternativeTextToRange):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
* editing/VisibleUnits.cpp:
(WebCore::charactersAroundPosition):
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::renderedText):
* page/FocusController.cpp:
(WebCore::relinquishesEditingFocus):
2014-12-17 Dan Bernstein <mitz@apple.com>
<rdar://problem/19282508> WebKitLegacy is unusable due to bad dylib identifier
https://bugs.webkit.org/show_bug.cgi?id=139760
Reviewed by Anders Carlsson.
* Configurations/WebCore.xcconfig:
2014-12-17 Anders Carlsson <andersca@apple.com>
Get rid of FrameLoader::defaultObjectContentType
https://bugs.webkit.org/show_bug.cgi?id=139758
Reviewed by Geoffrey Garen.
Move the FrameLoader::defaultObjectContentType implementation to its only caller in WebKit/win.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::defaultObjectContentType): Deleted.
* loader/FrameLoader.h:
2014-12-17 peavo@outlook.com <peavo@outlook.com>
[Curl] Compile error, setWasCached method has been removed.
https://bugs.webkit.org/show_bug.cgi?id=139737
Reviewed by Alex Christensen.
The ResourceResponseBase::setWasCached() method has been replaced
with ResourceResponseBase::setSource().
* platform/network/curl/CurlCacheEntry.cpp:
(WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
2014-12-17 Chris Dumez <cdumez@apple.com>
[iOS] Make it possible to toggle FeatureCounter support at runtime
https://bugs.webkit.org/show_bug.cgi?id=139688
<rdar://problem/19266254>
Reviewed by Andreas Kling.
Make it possible to toggle FeatureCounter support at runtime by adding
a setting (disabled by default) and moving the API to a new
FeatureCounter class under WebCore/plattorm which only logs if the
setting is enabled. For privacy reasons, FeatureCounter logging is also
disabled for private / ephemeral sessions.
No new tests, no behavior change.
* CMakeLists.txt:
* Configurations/WebCore.xcconfig:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::logCanCachePageDecision):
* page/Settings.in:
* platform/FeatureCounter.cpp: Renamed from Source/WTF/wtf/FeatureCounter.cpp.
(WebCore::FeatureCounter::shouldUseForPage):
(WebCore::FeatureCounter::incrementKey):
(WebCore::FeatureCounter::setKey):
* platform/FeatureCounter.h: Renamed from Source/WTF/wtf/FeatureCounter.h.
* platform/FeatureCounterKeys.h:
* platform/ios/FeatureCounter.mm: Renamed from Source/WTF/wtf/ios/FeatureCounter.mm.
(WebCore::FeatureCounter::incrementKey):
(WebCore::FeatureCounter::setKey):
2014-12-17 Anders Carlsson <andersca@apple.com>
Get rid of PluginPackageNone.cpp
https://bugs.webkit.org/show_bug.cgi?id=139735
Reviewed by Andreas Kling.
* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformWin.cmake:
* plugins/PluginPackageNone.cpp: Removed.
2014-12-17 Andreas Kling <akling@apple.com>
Purge PassRefPtr from Frame.
<https://webkit.org/b/139731>
Reviewed by Anders Carlsson.
Remove all use of PassRefPtr from the Frame class, instead using
Ref or RefPtr as appropriate.
* WebCore.exp.in:
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::begin):
* page/Frame.cpp:
(WebCore::Frame::create):
(WebCore::Frame::setView):
(WebCore::Frame::setDocument):
(WebCore::Frame::rangeForPoint):
(WebCore::Frame::createView):
* page/Frame.h:
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource):
2014-12-17 Myles C. Maxfield <mmaxfield@apple.com>
Test fix after r177444.
Unreviewed.
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySliderThumb::elementRect):
2014-12-16 Myles C. Maxfield <mmaxfield@apple.com>
Addressing more post-review comments in r177035
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySliderThumb::elementRect):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setupDateTimeChooserParameters):
2014-12-17 Zan Dobersek <zdobersek@igalia.com>
[TexMap] Sprinkle range-based for-loops where still possible
https://bugs.webkit.org/show_bug.cgi?id=138752
Reviewed by Chris Dumez.
Apply range-based for-loops where possible in the TextureMapper,
TextureMapperGL and TextureMapperTiledBackingStore classes.
Also prettify the loop in SharedGLData destructor and return
nullptr instead of explicitly constructing the empty PassRefPtr
object in TextureMapperTiledBackingStore::texture().
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::BitmapTexturePool::acquireTexture):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::SharedGLData::~SharedGLData):
(WebCore::TextureMapperGLData::~TextureMapperGLData):
* platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
(WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
(WebCore::TextureMapperTiledBackingStore::drawBorder):
(WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
(WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded):
(WebCore::TextureMapperTiledBackingStore::updateContents):
(WebCore::TextureMapperTiledBackingStore::texture):
2014-12-17 Radu Stavila <stavila@adobe.com>
The SVGDocument of an SVGImage should not perform any additional actions when the SVGImage is being destroyed
https://bugs.webkit.org/show_bug.cgi?id=139644
Reviewed by Antti Koivisto.
When an SVGImage is destroyed, having its SVGDocument perform style recalc and dispatching events is not only
useless but can also cause problems, such as re-entrancy in StyleResolver::loadPendingResources.
No new tests required, existing tests cover this change.
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore::Document::isBeingDestroyed):
(WebCore::Document::setIsBeingDestroyed):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::closeURL):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::~SVGImage):
2014-12-17 Chris Dumez <cdumez@apple.com>
Drop useless 'clipToContents' argument for windowClipRect()
https://bugs.webkit.org/show_bug.cgi?id=139722
Reviewed by Darin Adler.
Drop useless 'clipToContents' argument for windowClipRect(). This
argument is never used.
No new tests, no behavior change.
* page/FrameView.cpp:
(WebCore::FrameView::windowClipRect):
* page/FrameView.h:
* platform/ScrollView.h:
2014-12-16 Shivakumar JM <shiva.jm@samsung.com>
text node should not be created, On setting document.title to the empty string.
https://bugs.webkit.org/show_bug.cgi?id=139121
Reviewed by Darin Adler.
Do not create text node, On setting document.title to the empty string as in spec.
I have confirmed this matches the behavior of Firefox and Chrome.
Test: fast/dom/Document/document-set-title-no-child.html
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::setText):
2014-12-16 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move WebCore/platform/graphics/surfaces to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=139641
Reviewed by Andreas Kling.
Replace OwnPtr|PassOwnPtr with std::make_unique<>|std::unique_ptr<>.
* platform/graphics/GLContext.cpp:
(WebCore::GLContext::sharingContext):
(WebCore::GLContext::createContextForWindow):
(WebCore::GLContext::createOffscreenContext):
* platform/graphics/GLContext.h:
* platform/graphics/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
* platform/graphics/GraphicsContext3DPrivate.h:
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::createWindowContext):
(WebCore::GLContextEGL::createPbufferContext):
(WebCore::GLContextEGL::createPixmapContext):
(WebCore::GLContextEGL::createContext):
* platform/graphics/egl/GLContextEGL.h:
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::createWindowContext):
(WebCore::GLContextGLX::createPbufferContext):
(WebCore::GLContextGLX::createPixmapContext):
(WebCore::GLContextGLX::createContext):
* platform/graphics/glx/GLContextGLX.h:
* platform/graphics/surfaces/GLTransportSurface.cpp:
(WebCore::GLTransportSurface::createTransportSurface):
(WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
* platform/graphics/surfaces/GLTransportSurface.h:
* platform/graphics/surfaces/GraphicsSurface.h:
* platform/graphics/surfaces/GraphicsSurfaceToken.h:
* platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
* platform/graphics/surfaces/egl/EGLSurface.cpp:
(WebCore::EGLTransportSurface::createTransportSurface):
(WebCore::EGLTransportSurface::createTransportSurfaceClient):
(WebCore::EGLTransportSurface::EGLTransportSurface):
* platform/graphics/surfaces/egl/EGLSurface.h:
* platform/graphics/surfaces/egl/EGLXSurface.cpp:
(WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
* platform/graphics/surfaces/egl/EGLXSurface.h:
* platform/graphics/surfaces/glx/GLXSurface.cpp:
(WebCore::GLXTransportSurface::GLXTransportSurface):
(WebCore::GLXOffScreenSurface::initialize):
* platform/graphics/surfaces/glx/GLXSurface.h:
2014-12-16 Timothy Horton <timothy_horton@apple.com>
Implement and adopt two new TextIndicator presentation animations
https://bugs.webkit.org/show_bug.cgi?id=139715
<rdar://problem/19237945>
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Adjust one symbol and export another.
* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithSelectionInFrame):
Take a blue-highlight snapshot if we're doing a crossfade without a bounce.
* page/TextIndicator.h:
(WebCore::TextIndicator::presentationTransition):
Add FadeIn and Crossfade transition types.
* page/mac/TextIndicatorWindow.h:
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
(createBounceAnimation):
(createContentCrossfadeAnimation):
(createShadowFadeAnimation):
(createFadeInAnimation):
(-[WebTextIndicatorView _textIndicatorWantsBounce]):
(-[WebTextIndicatorView _textIndicatorWantsContentCrossfade]):
(-[WebTextIndicatorView _textIndicatorWantsFadeIn]):
Factor out the animation construction.
(-[WebTextIndicatorView _animationDuration]):
Factor out the duration computation.
(-[WebTextIndicatorView present]):
(-[WebTextIndicatorView setAnimationProgress:]):
Implement FadeIn and Crossfade transitions.
They can be driven externally and then continue from where they
left off when the progress reaches 100%.
FadeIn changes the opacity of the whole bubble, Crossfade
crossfades the content (from blue to yellow).
(WebCore::TextIndicatorWindow::TextIndicatorWindow):
(WebCore::TextIndicatorWindow::~TextIndicatorWindow):
Don't immediately destroy the window if it is crossfades or fades in.
Fade it out, instead.
(WebCore::TextIndicatorWindow::setAnimationProgress):
Drive the paused animation manually. If progress hits 100%,
start running it automatically from where it last left off.
(WebCore::TextIndicatorWindow::setTextIndicator):
(WebCore::TextIndicatorWindow::startFadeOut):
(-[WebTextIndicatorView presentWithCompletionHandler:]): Deleted.
(WebCore::TextIndicatorWindow::startFadeOutTimerFired): Deleted.
Remove the completion block from -present.
* platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
Add some SPI.
2014-12-16 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move WebCore/platform/image-decoders to std::unique_ptr<>
https://bugs.webkit.org/show_bug.cgi?id=139668
Reviewed by Andreas Kling.
As a step to use std::unique_ptr<>, this patch replaces OwnPtr|PassOwnPtr with
std::unique_ptr<> | std::make_unique<>.
* platform/image-decoders/bmp/BMPImageDecoder.cpp:
(WebCore::BMPImageDecoder::setFailed):
(WebCore::BMPImageDecoder::decode):
(WebCore::BMPImageDecoder::decodeHelper):
* platform/image-decoders/bmp/BMPImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::setFailed):
(WebCore::GIFImageDecoder::gifComplete):
(WebCore::GIFImageDecoder::decode):
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/gif/GIFImageReader.cpp:
(GIFFrameContext::decode):
(GIFImageReader::addFrameIfNecessary):
* platform/image-decoders/gif/GIFImageReader.h:
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::decode):
(WebCore::ICOImageDecoder::decodeAtIndex):
* platform/image-decoders/ico/ICOImageDecoder.h:
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageDecoder::setFailed):
(WebCore::JPEGImageDecoder::decode):
* platform/image-decoders/jpeg/JPEGImageDecoder.h:
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::setFailed):
(WebCore::PNGImageDecoder::decode):
* platform/image-decoders/png/PNGImageDecoder.h:
2014-12-16 Andreas Kling <akling@apple.com>
Use Ref for SecurityOrigin.
<https://webkit.org/b/139710>
Reviewed by Anders Carlsson.
Make SecurityOrigin::create*() return Ref<SecurityOrigin>.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::origin):
* loader/DocumentLoadTiming.cpp:
(WebCore::DocumentLoadTiming::addRedirect):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
* loader/PingLoader.cpp:
(WebCore::PingLoader::sendPing):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::isApplicationCacheBlockedForRequest):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::getOriginsWithCache):
* page/ContentSecurityPolicy.cpp:
(WebCore::stripURLForUseInReport):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::crossDomainAccessErrorMessage):
* page/SecurityOrigin.cpp:
(WebCore::getCachedOrigin):
(WebCore::SecurityOrigin::create):
(WebCore::SecurityOrigin::createUnique):
(WebCore::SecurityOrigin::isolatedCopy):
(WebCore::SecurityOrigin::canRequest):
(WebCore::SecurityOrigin::createFromString):
(WebCore::SecurityOrigin::maybeCreateFromDatabaseIdentifier):
(WebCore::SecurityOrigin::createFromDatabaseIdentifier):
* page/SecurityOrigin.h:
* page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::isAccessToURLWhiteListed):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::deleteOriginWithIdentifier):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::DefaultSharedWorkerRepository::connectToWorker):
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
2014-12-16 Chris Dumez <cdumez@apple.com>
Move 'cursor' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139660
Reviewed by Benjamin Poulain.
Move 'cursor' CSS property to the new StyleBuilder by using
custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyCursor::applyInheritValue): Deleted.
(WebCore::ApplyPropertyCursor::applyInitialValue): Deleted.
(WebCore::ApplyPropertyCursor::applyValue): Deleted.
(WebCore::ApplyPropertyCursor::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialCursor):
(WebCore::StyleBuilderCustom::applyInheritCursor):
(WebCore::StyleBuilderCustom::applyValueCursor):
2014-12-16 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Animating HTML elements leaves trails when embedded to a subpxiel positioned iframe.
https://bugs.webkit.org/show_bug.cgi?id=139691
rdar://problem/19078958
Reviewed by Simon Fraser.
This patch ensures that repaint rect and actual paint coordinate calculations are in sync.
RenderWidget painting still snaps final coordinates to integral positions. We need to
mimic the same snapping behaviour when the repaint rects are being calculated so that
they are in sync with the final repaint rects. This is a workaround until after
widgets get pushed to device pixel positions.
Test: fast/repaint/hidpi-content-inside-iframe-leaves-trails.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewRectangle):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paintContents):
2014-12-16 Beth Dakin <bdakin@apple.com>
REGRESSION: Preview popovers obscure the link, look wrong
https://bugs.webkit.org/show_bug.cgi?id=139711
-and corresponding-
rdar://problem/19271854
Reviewed by Tim Horton.
New SPI.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/NSPopoverSPI.h: Added.
2014-12-16 Myles C. Maxfield <mmaxfield@apple.com>
[iOS] Cherokee language is drawn as boxes
https://bugs.webkit.org/show_bug.cgi?id=139706
Reviewed by Simon Fraser.
Test: platform/ios-simulator/fast/text/cherokee.html
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::languageSpecificFallbackFont):
2014-12-16 Enrica Casucci <enrica@apple.com>
Fix iOS builders for 8.0
https://bugs.webkit.org/show_bug.cgi?id=139495
Reviewed by Jer Noble
* WebCore.exp.in:
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController enterFullscreen:mode:]):
(-[WebVideoFullscreenController requestHideAndExitFullscreen]):
(-[WebVideoFullscreenController enterFullscreen:]): Deleted.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2014-12-16 Myles C. Maxfield <mmaxfield@apple.com>
Ruby overhang uses ints instead of floats
https://bugs.webkit.org/show_bug.cgi?id=139624
Reviewed by Dave Hyatt.
Simply change the type.
Updated existing tests.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::setMarginsForRubyRun):
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::getOverhang):
* rendering/RenderRubyRun.h:
* rendering/line/LineWidth.cpp:
(WebCore::LineWidth::applyOverhang):
2014-12-16 Gavin Barraclough <barraclough@apple.com>
Move Mac process suppression from WebCore to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139705
Reviewed by Geoff Garen.
Currently PageThrottler constructs the PageActivityState, holds a copy of the ViewState,
and an optional UserActivity.
Instead, still construct the PageActivityState but just pass this out via the Page to WebPage.
Logic From PageThrottler::updateUserActivity merged into WebPage::updateUserActivity.
* WebCore.exp.in:
- removed createUserActivity.
* page/ChromeClient.h:
(WebCore::ChromeClient::setPageActivityState):
- added to propagate PageActivityState to WebPage.
* page/Page.cpp:
(WebCore::Page::Page):
- PageThrottler constructor now takes a Page&.
(WebCore::Page::setViewState):
- no longer necessary to pass this to PageThrottler.
(WebCore::Page::setPageActivityState):
- added to propagate PageActivityState to WebPage.
(WebCore::Page::enablePageThrottler): Deleted.
- PageThrottler no longer has a UserActivity.
* page/Page.h:
(WebCore::Page::pageThrottler):
- added setPageActivityState, removed enablePageThrottler.
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
- removed m_viewState, added m_page.
(WebCore::PageThrottler::setActivityFlag):
- propagate PageActivityState via Page to WebPage.
(WebCore::PageThrottler::createUserActivity): Deleted.
(WebCore::PageThrottler::updateUserActivity): Deleted.
(WebCore::PageThrottler::setViewState): Deleted.
- removed; PageThrottler no longer has a PageThrottler or UserActivity.
* page/PageThrottler.h:
- removed createUserActivity, setViewState, m_viewState, m_activity; added m_page.
2014-12-16 Jer Noble <jer.noble@apple.com>
Unreviewed build fix after r177375; explicitly cast to NSUInteger.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions):
(WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions):
2014-12-16 peavo@outlook.com <peavo@outlook.com>
[Win] Compiling WebCore fails because of invalid project file.
https://bugs.webkit.org/show_bug.cgi?id=139686
Reviewed by Alex Christensen.
A WebCore project file contains illegal characters.
* WebCore.vcxproj/WebCore.vcxproj.filters:
2014-12-16 Gavin Barraclough <barraclough@apple.com>
Introduce PageActivityState
https://bugs.webkit.org/show_bug.cgi?id=139687
Reviewed by Anders Carlsson.
Add a bitfield to track each of the activities on the page separately.
Split the hysteresis & counters so we can track these separately.
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
- initialze new hysteresis, counters; closures call setActivityFlag.
(WebCore::PageThrottler::mediaActivityToken):
(WebCore::PageThrottler::pageLoadActivityToken):
- split m_pageActivityCounter -> m_mediaActivityCounter, m_pageLoadActivityCounter.
(WebCore::PageThrottler::updateUserActivity):
- use m_activityState to check for activity.
(WebCore::PageThrottler::setActivityFlag):
- helper to clear/set a bit in m_activityState, and call updateUserActivity as necessary.
* page/PageThrottler.h:
(WebCore::PageThrottler::didReceiveUserInput):
(WebCore::PageThrottler::pluginDidEvaluateWhileAudioIsPlaying):
- split m_hysteresis -> m_userInputHysteresis, m_audiblePluginHysteresis
2014-12-16 Myles C. Maxfield <litherum@gmail.com>
Ruby does not preserve expansion opportunities from enclosing context
https://bugs.webkit.org/show_bug.cgi?id=139618
Reviewed by David Hyatt.
There is currently no sharing of expansion opportunity information between
ruby bases and the text surrounding the ruby. This patch adds a bit on
RenderText, m_contentIsKnownToFollow, which affects how expansion
opportunities are handled at paint-time, as well as a bit on RenderRubyBase,
m_isAfterExpansion, which affects how expansions are calculated when laying
out a line. This patch also adds a field to RenderRubyBase which represents
the base's starting position within a ruby. This field is necessary because
an expansion from a line might occur at the very beginning of a ruby base,
so we have to remember some state from expansion time to RenderRubyBase
layout time.
Added more tests to fast/ruby/ruby-justification.html.
* rendering/InlineBox.h:
(WebCore::InlineBox::setExpansionWithoutGrowing):
(WebCore::InlineBox::expansion):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::removeChild): Keep the bit on InlineTextBox up to
date.
(WebCore::InlineFlowBox::placeBoxRangeInInlineDirection): Set expansion
information in InlineFlowBoxes so the total expansion for a whole line
is held in the RootInlineBox's expansion.
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::expansionBehavior):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::updateRubyForJustifiedText):
updateRubyForJustifiedText() had a bunch of problems with it. First of all,
it didn't actually set the InlineBoxes as dirty, so the second layout pass
sometimes wouldn't perform any updates. Secondarily, it didn't take
overhangs into account. Thirdly, it didn't mark the ruby base and text as
needing layout so that subsequent layouts would actually traverse into them.
(WebCore::RenderBlockFlow::computeExpansionForJustifiedText):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
This nested if triangle is super nasty, but I'm not sure of a better way to
write it.
(WebCore::updateRubyForJustifiedText): Deleted.
(WebCore::computeExpansionForJustifiedText): Deleted.
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::RenderRubyBase):
(WebCore::RenderRubyBase::adjustInlineDirectionLineBounds):
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::layout):
* rendering/RenderText.cpp:
(WebCore::RenderText::RenderText):
* rendering/RenderText.h:
(WebCore::RenderText::contentIsKnownToFollow):
(WebCore::RenderText::setContentIsKnownToFollow):
2014-12-16 Jer Noble <jer.noble@apple.com>
[iOS] Crash in WebKit::WebPageProxy::dispatchViewStateChange() tapping a link from another app while playing a video
https://bugs.webkit.org/show_bug.cgi?id=139550
Reviewed by Anders Carlsson.
The existing "dispatch to WebThread, then release" model is insufficient and still
can result in RefPtr race conditions between the main thread and the web thread.
Make WebVideoFullscreenInterfaceAVKit a thread-safe ref-counted class, which
eliminates the necessity of disptaching back to the web thread before releasing.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setDuration): Use a strongThis model.
(WebVideoFullscreenInterfaceAVKit::setCurrentTime): Ditto.
(WebVideoFullscreenInterfaceAVKit::setRate): Ditto.
(WebVideoFullscreenInterfaceAVKit::setVideoDimensions): Ditto.
(WebVideoFullscreenInterfaceAVKit::setSeekableRanges): Ditto.
(mediaSelectionOptions): Return a RetainPtr object.
(WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): Use a strongThis model.
(WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): Ditto.
(WebVideoFullscreenInterfaceAVKit::setExternalPlayback): Ditto.
(WebVideoFullscreenInterfaceAVKit::setupFullscreen): Ditto.
(WebVideoFullscreenInterfaceAVKit::enterFullscreen): Ditto.
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): Ditto.
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): Ditto.
(WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Added utility
function. Lets us use the implied this pointer rather than an explicit
strongThis.
(WebVideoFullscreenInterfaceAVKit::enterFullscreenOptimized): Ditto.
(WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard): Ditto.
(WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal): Ditto.
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Ditto.
(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Use a strongThis model.
2014-12-16 Ryosuke Niwa <rniwa@webkit.org>
Nested template contents are not cloned by document.importNode
https://bugs.webkit.org/show_bug.cgi?id=137619
Reviewed by Andreas Kling.
The bug was caused by Document.importNode not cloning HTMLTemplateElement's content.
Fixed the bug by sharing code between Document::importNode and Node::cloneNode by
generalizing Node::cloneNodeInternal, added in r177314, by taking the owner document
as an argument. The most of code changes are the result of adding this argument.
Document::importNode is the only function in which the actual logic changes.
Note that the code to import TEXT_NODE, CDATA_SECTION_NODE, ENTITY_REFERENCE_NODE,
PROCESSING_INSTRUCTION_NODE and COMMENT_NODE nodes are identical to that of cloneNode.
This patch removes the call to hasValidNamespaceForElements in ELEMENT_NODE but this
should not introduce an observable behavior change since all instantiated elements
should have a valid namespace in the first place.
Because DOCUMENT_NODE and DOCUMENT_TYPE_NODE cannot be imported and DOCUMENT_TYPE_NODE
can only appear as a direct child of DOCUMENT_NODE, neither nodes nor unimplemented
XPATH_NAMESPACE_NODE and XPATH_NAMESPACE_NODE can appear inside the recursive calls
for ELEMENT_NODE and DOCUMENT_FRAGMENT_NODE nodes.
While importNode behaves differently from cloneNode for ATTRIBUTE_NODE, namely that
it merges all of its child nodes, this behavior isn't present when recursing inside
ELEMENT_NODE and DOCUMENT_FRAGMENT_NODE since we are using cloneDataFromElement.
Thus there should be no observable behavior changes for DOCUMENT_FRAGMENT_NODE and
ELEMENT_NODE nodes either.
Test: fast/dom/HTMLTemplateElement/importNode-nested-templates.html
* dom/Attr.cpp:
(WebCore::Attr::cloneNodeInternal):
* dom/Attr.h:
* dom/CDATASection.cpp:
(WebCore::CDATASection::cloneNodeInternal):
* dom/CDATASection.h:
* dom/Comment.cpp:
(WebCore::Comment::cloneNodeInternal):
* dom/Comment.h:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::cloneChildNodes):
* dom/Document.cpp:
(WebCore::Document::importNode):
(WebCore::Document::cloneNodeInternal):
* dom/Document.h:
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::cloneNodeInternal):
* dom/DocumentFragment.h:
* dom/DocumentType.cpp:
(WebCore::DocumentType::cloneNodeInternal):
* dom/DocumentType.h:
* dom/Element.cpp:
(WebCore::Element::cloneNodeInternal):
(WebCore::Element::cloneElementWithChildren):
(WebCore::Element::cloneElementWithoutChildren):
(WebCore::Element::cloneElementWithoutAttributesAndChildren):
* dom/Element.h:
* dom/EntityReference.cpp:
(WebCore::EntityReference::cloneNodeInternal):
* dom/EntityReference.h:
* dom/Node.h:
(WebCore::Node::cloneNode):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::cloneNodeInternal):
* dom/ProcessingInstruction.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::cloneNodeInternal):
* dom/ShadowRoot.h:
* dom/Text.cpp:
(WebCore::Text::cloneNodeInternal):
* dom/Text.h:
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
(WebCore::ApplyStyleCommand::applyInlineStyleChange):
* editing/BreakBlockquoteCommand.cpp:
(WebCore::BreakBlockquoteCommand::doApply):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock):
(WebCore::InsertParagraphSeparatorCommand::doApply):
* editing/ModifySelectionListLevel.cpp:
(WebCore::IncreaseSelectionListLevelCommand::doApply):
* editing/SplitElementCommand.cpp:
(WebCore::SplitElementCommand::doApply):
* editing/markup.cpp:
(WebCore::createFragmentFromText):
* html/HTMLKeygenElement.cpp:
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::cloneElementWithoutAttributesAndChildren):
* html/HTMLScriptElement.h:
* html/HTMLTemplateElement.cpp:
(WebCore::HTMLTemplateElement::cloneNodeInternal):
* html/HTMLTemplateElement.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren):
* html/shadow/SliderThumbElement.h:
* html/track/WebVTTElement.cpp:
(WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren):
* html/track/WebVTTElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::cloneElementWithoutAttributesAndChildren):
* svg/SVGScriptElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::buildShadowTree):
(WebCore::SVGUseElement::expandUseElementsInShadowTree):
2014-12-16 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
Document.contentType implementation
https://bugs.webkit.org/show_bug.cgi?id=132269
Reviewed by Darin Adler.
Chromium merge from https://codereview.chromium.org/151653004
Tests: fast/dom/document-contentType-DOMParser.html
fast/dom/document-contentType-createDocument.html
fast/dom/document-contentType-data-uri.html
fast/xsl/xslt-contentType.html
http/tests/dom/document-contentType-meta.html
http/tests/dom/document-contentType-xhr.html
http/tests/dom/document-contentType.html
* dom/Document.cpp:
(WebCore::Document::overrideMIMEType):
(WebCore::Document::contentType):
(WebCore::Document::cloneDataFromDocument):
* dom/Document.h:
* dom/Document.idl:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::currentContentType):
* loader/DocumentLoader.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseXML):
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource):
2014-12-16 Anders Carlsson <andersca@apple.com>
Put some common code in StorageNamespaceProvider
https://bugs.webkit.org/show_bug.cgi?id=139682
Reviewed by Tim Horton.
We have code in two places that gets the local storage area from a given document,
choosing either the local storage namespace or the transient local storage namespace.
Move it to StorageNamespaceProvider::localStorageArea.
* bindings/js/ScriptController.cpp:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::findStorageArea):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::localStorage):
* page/Navigator.cpp:
* storage/StorageNamespaceProvider.cpp:
(WebCore::StorageNamespaceProvider::localStorageArea):
(WebCore::StorageNamespaceProvider::localStorageNamespace):
* storage/StorageNamespaceProvider.h:
2014-12-16 Anders Carlsson <andersca@apple.com>
Add FeatureCounterKeys.h to the Xcode project.
* WebCore.xcodeproj/project.pbxproj:
2014-12-16 Chris Dumez <cdumez@apple.com>
REGRESSION (r163928): Animated GIFs are not resumed when translated into view using -webkit-transform
https://bugs.webkit.org/show_bug.cgi?id=139672
<rdar://problem/19260797>
Reviewed by Antti Koivisto.
After r163928, animated GIFs were not resumed when translated into view
using '-webkit-transform' CSS property.
This broke animated gifs on the mobile version of weibo.com (which is
one of the most popular blogging sites in China) on iPhone. e.g.
http://m.weibo.cn/page/tpl?containerid=1005052150182731_-_WEIBO_SECOND_PROFILE_WEIBO&itemid=&title=全部微博
This patch calls FrameView::resumeVisibleImageAnimationsIncludingSubframes()
after style recalc so that we resume animated images if they become visible
after the style has changed. Doing so after layout wouldn't work because
no layout happens in this case.
Test: fast/images/animated-gif-webkit-transform.html
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
2014-12-16 Sebastian Dröge <sebastian@centricular.com>
[GStreamer] Fix deadlock when shutting down AudioDestination
https://bugs.webkit.org/show_bug.cgi?id=139496
Reviewed by Philippe Normand.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcLoop):
(webKitWebAudioSrcChangeState):
Sometimes we would wait forever for the task to shut down. This
was happening because of a bug in GStreamer that caused joining
a paused task to deadlock.
2014-12-15 Dhi Aurrahman <diorahman@rockybars.com>
Extend :lang()'s selector checker to handle ranges with '*' properly and perform matching within the ASCII range
https://bugs.webkit.org/show_bug.cgi?id=139340
Reviewed by Benjamin Poulain.
Asterisk is considered as a valid subtag of a language range to express wildcard matching
in :lang()'s extended filtering procedure. The matching rules introduced by language
range with '*' is outlined in [1].
The matching of subtags is performed case-insensitively within the ASCII range[2].
[1] www.ietf.org/rfc/rfc4647.txt
[2] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo
Test: fast/selectors/lang-equal-ignoring-case.html
fast/selectors/lang-valid-extended-filtering.html
* css/SelectorCheckerTestFunctions.h:
(WebCore::equalIgnoringCaseWithinASCIIRange): Handle matching case-insensitively within the ASCII range.
(WebCore::containslanguageSubtagMatchingRange):
(WebCore::matchesLangPseudoClass):
2014-12-15 Chris Dumez <cdumez@apple.com>
[iOS] Add feature counting support
https://bugs.webkit.org/show_bug.cgi?id=139652
<rdar://problem/19255690>
Reviewed by Gavin Barraclough.
Use FeatureCounter API to log PageCache failure reasons
as well as its success rate.
No new tests, no behavior change.
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::logCanCachePageDecision):
(WebCore::PageCache::canCache):
* platform/FeatureCounterKeys.h: Added.
2014-12-15 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* platform/spi/mac/LookupSPI.h:
2014-12-15 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* platform/spi/mac/LookupSPI.h:
2014-12-15 Jer Noble <jer.noble@apple.com>
Switching src of <video> with clipping layer results in empty black square.
https://bugs.webkit.org/show_bug.cgi?id=139650
Reviewed by Simon Fraser.
Test: compositing/video-clip-change-src.html
When the contentsLayer changes after a contentsClippingLayer has already been created, make sure to parent the
new contentsLayer, as updateRects() will only reparent when first creating a contentsClippingLayer.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
2014-12-15 Beth Dakin <bdakin@apple.com>
Make lookup an immediate action instead of an action menu item
https://bugs.webkit.org/show_bug.cgi?id=139661
-and corresponding-
rdar://problem/19198414
Reviewed by Tim Horton.
New SPI.
* platform/spi/mac/LookupSPI.h:
2014-12-12 Anders Carlsson <andersca@apple.com>
Get rid of the DONT_FINALIZE_ON_MAIN_THREAD #define
https://bugs.webkit.org/show_bug.cgi?id=139613
Reviewed by Sam Weinig.
* WebCore.exp.in:
Update symbols.
* WebCore.xcodeproj/project.pbxproj:
Remove -Wno-deprecated-declarations from the WebCoreObjCExtras.mm build flags.
* platform/mac/WebCoreObjCExtras.h:
If OBJC_NO_GC is defined to 1, just make WebCoreObjCFinalizeOnMainThread a no-op inline function.
* platform/mac/WebCoreObjCExtras.mm:
(WebCoreObjCFinalizeOnMainThread):
Move this to the .h file for easier inlining.
(WebCoreObjCScheduleDeallocateOnMainThread):
Use a lambda.
2014-12-15 Gavin Barraclough <barraclough@apple.com>
Separate counted and hysteresis activities in PageThrottler
https://bugs.webkit.org/show_bug.cgi?id=139657
Reviewed by Sam Weinig.
Currently all activities funnel into a common hysteresis mechanism, the result of
which is combined with the visually idle state, the result of which in turn drives
a UserActivity::Impl.
This is a first refactoring towards moving the UserActivity out to WebKit2. Use
m_hysteresis only of the impulse activities (plugin evaluation, user input), and
flatten the three types of activities (impulse, counted, ViewState) to all directly
control a UserActivity. Switch from a UserActivity::Impl to a UserActivity since
this will provide hysteresis for media activity.
* page/PageThrottler.cpp:
(WebCore::m_pageActivityCounter):
- when the RefCounter changes just call updateUserActivity directly, removeed redundant call to updateUserActivity.
(WebCore::PageThrottler::createUserActivity):
- m_activity is now a UserActivity.
(WebCore::PageThrottler::updateUserActivity):
- previously just checked m_hysteresis for activity; now check m_pageActivityCounter too.
(WebCore::PageThrottler::pageActivityCounterValueDidChange): Deleted.
- no longer needed; when the RefCounter changes just call updateUserActivity directly.
* page/PageThrottler.h:
- removed pageActivityCounterValueDidChange, m_activity is now a UserActivity.
2014-12-15 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177284.
https://bugs.webkit.org/show_bug.cgi?id=139658
"Breaks API tests and LayoutTests on Yosemite Debug"
(Requested by msaboff on #webkit).
Reverted changeset:
"Make sure range based iteration of Vector<> still receives
bounds checking"
https://bugs.webkit.org/show_bug.cgi?id=138821
http://trac.webkit.org/changeset/177284
2014-12-15 Ryosuke Niwa <rniwa@webkit.org>
cloneNode(true) does not clone nested template elements' contents
https://bugs.webkit.org/show_bug.cgi?id=137755
Reviewed by Darin Adler.
The bug was caused by cloneChildNodes not copying template element's content.
Fixed the bug by adding the third behavior (CloneContent) to the polymorphic
cloneNodeInternal, which copies template element's content but not its children,
in addition to the existing CloneSelf (deep=false) and CloneChildren (deep=true).
Test: fast/dom/HTMLTemplateElement/cloneNode-nested-templates.html
* dom/Attr.cpp:
(WebCore::Attr::cloneNodeInternal): Renamed from cloneNode.
* dom/Attr.h:
* dom/CDATASection.cpp:
(WebCore::CDATASection::cloneNodeInternal): Renamed from cloneNode.
* dom/CDATASection.h:
* dom/Comment.cpp:
(WebCore::Comment::cloneNodeInternal): Renamed from cloneNode.
* dom/Comment.h:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::cloneChildNodes): Calls cloneNode with CloneContent.
* dom/Document.cpp:
(WebCore::Document::cloneNodeInternal): Renamed from cloneNode.
* dom/Document.h:
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::cloneNodeInternal): Renamed from cloneNode.
* dom/DocumentFragment.h:
* dom/DocumentType.cpp:
(WebCore::DocumentType::cloneNodeInternal): Renamed from cloneNode.
* dom/DocumentType.h:
* dom/Element.cpp:
(WebCore::Element::cloneNodeInternal): Renamed from cloneNode.
* dom/Element.h:
* dom/EntityReference.cpp:
(WebCore::EntityReference::cloneNodeInternal): Renamed from cloneNode.
* dom/EntityReference.h:
* dom/Node.h:
(WebCore::Node::cloneNode): Added. It calls cloneNodeInternal with CloneSelf or CloneChildren.
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::cloneNodeInternal): Renamed from cloneNode.
* dom/ProcessingInstruction.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::cloneNodeInternal): Renamed from cloneNode. Also moved from ShadowRoot.h.
* dom/ShadowRoot.h:
* dom/Text.cpp:
(WebCore::Text::cloneNodeInternal): Renamed from cloneNode.
* dom/Text.h:
* html/HTMLTemplateElement.cpp:
(WebCore::HTMLTemplateElement::cloneNodeInternal): Renamed from cloneNode. This is the only
function in which CloneContent results in a different behavior from CloneSelf.
* html/HTMLTemplateElement.h:
2014-12-15 Benjamin Poulain <bpoulain@apple.com>
Unify the various serialization of selector list
https://bugs.webkit.org/show_bug.cgi?id=139606
Reviewed by Andreas Kling.
There were code in various place to build a string from the selectors contained
in a selecor list.
This patch adds a single function to do that: buildSelectorsText(). All the call sites
were modified to use it.
The serialization of :-webkit-any() gets fixed as a result.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
(WebCore::appendSelectorList): Deleted.
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::selectorsText):
(WebCore::CSSSelectorList::buildSelectorsText):
* css/CSSSelectorList.h:
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::generateSelectorText):
* css/WebKitCSSRegionRule.cpp:
(WebCore::WebKitCSSRegionRule::cssText):
2014-12-15 Antti Koivisto <antti@apple.com>
Try to fix iOS build.
* WebCore.exp.in:
2014-12-15 Javier Fernandez <jfernandez@igalia.com>
Floats Don't Overhang Their Block Formatting Contex
https://bugs.webkit.org/show_bug.cgi?id=139476
Reviewed by David Hyatt.
From Blink r172530 by <robhogan@gmail.com>
Floats Don't Overhang Their Block Formatting Context Per
http://www.w3.org/TR/CSS2/visuren.html#float-position: "References
to [the elements] in the [rules that govern the behaviour of
floats] refer only to other elements in the same block formatting
context as the float."
This means we don't need to look for intruding or overhanging
floats in boxes that establish a new block formatting
context. Even that we don't have a test breaking this rule it
seems we are doing unnecessary work in
rebuildFloatsFromIntruding() so make sure we avoid adding floats
from different block formatting contexts.
Test:
fast/block/float/floats-do-not-overhang-from-block-formatting-context.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::addIntrudingFloats):
2014-12-15 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewed build fix after r177301
* html/ColorInputType.cpp:
(WebCore::ColorInputType::elementRectRelativeToRootView):
2014-12-15 Timothy Horton <timothy_horton@apple.com>
Implement Data Detectors immediate actions for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139617
<rdar://problem/19198539>
Reviewed by Beth Dakin.
* platform/spi/mac/DataDetectorsSPI.h:
Add some new SPI.
2014-12-12 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r168217): Images are cropped out during animation at jetblue.com
https://bugs.webkit.org/show_bug.cgi?id=136410
rdar://problem/18188533
Reviewed by Dean Jackson.
During GraphicsLayer flushing, for tiled layers we can compute a visible rect using
the current state of an animation, which is obtained via the AnimationController.
If that animation was running in a subframe, AnimationController could use a stale
beginAnimationUpdateTime since no-one called its beginAnimationUpdate(). That
resulted in an incorrect computation of the visible rect, resulting in missing tiles.
There are two parts to this fix. First, add an assertion that beginAnimationUpdateTime()
is being called inside an animation update block. This required moving m_beginAnimationUpdateCount
into AnimationControllerPrivate, and changes to endAnimationUpdate().
The second is adding a AnimationUpdateBlock to getAnimatedStyleForRenderer(), which
can be called outside of style resolution. We also need some in other API functions.
Testing revealed that layout can call via layoutOverflowRectForPropagation(), suggesting
that we should have an animation batch inside FrameView::layout(). In addition, a single
resolveStyle/layout should use the same animationBeginTime, so we add a batch to
updateLayoutAndStyleIfNeededRecursive().
Identical to the patch that was rolled out in r177269 with the addition of a
Ref<Frame> protector(m_frame) in AnimationControllerPrivate::animationTimerFired()
that ensures that the AnimationControllerPrivate is kept alive for the scope of
the AnimationPrivateUpdateBlock, when a transitionEnd event destroys an iframe.
No test because it's timing-dependent. Existing tests exercise the new assertion.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computeRenderStyleForProperty):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
* page/animation/AnimationController.cpp:
(WebCore::AnimationPrivateUpdateBlock::AnimationPrivateUpdateBlock):
(WebCore::AnimationPrivateUpdateBlock::~AnimationPrivateUpdateBlock):
(WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
(WebCore::AnimationControllerPrivate::animationTimerFired):
(WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
(WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
(WebCore::AnimationControllerPrivate::beginAnimationUpdate):
(WebCore::AnimationControllerPrivate::endAnimationUpdate):
(WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
(WebCore::AnimationController::AnimationController):
(WebCore::AnimationController::notifyAnimationStarted):
(WebCore::AnimationController::pauseAnimationAtTime):
(WebCore::AnimationController::pauseTransitionAtTime):
(WebCore::AnimationController::resumeAnimationsForDocument):
(WebCore::AnimationController::startAnimationsIfNotSuspended):
(WebCore::AnimationController::beginAnimationUpdate):
(WebCore::AnimationController::endAnimationUpdate):
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
2014-12-12 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r168217): Images are cropped out during animation at jetblue.com
https://bugs.webkit.org/show_bug.cgi?id=136410
Reviewed by Dean Jackson.
We were hitting the new assertion under Page::setPageScaleFactor(), which
calls recalcStyle(), so move the AnimationUpdateBlock from updateStyleIfNeeded()
to recalcStyle().
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::updateStyleIfNeeded):
2014-12-15 Myles C. Maxfield <mmaxfield@apple.com>
Addressing post-review comments in r177035
https://bugs.webkit.org/show_bug.cgi?id=139557
Reviewed by Darin Adler.
This patch deletes the helper functions rendererBoundingBox() and rendererAnchorRect() and
migrates callers to using renderers directly.
It also improves the comment in RenderElement.h regarding RenderElement::anchorRect().
No new tests because this is simply refactoring.
* WebCore.exp.in: Delete exported symbol for rendererBoundingBox()
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySliderThumb::elementRect): Migrate off rendererBoundingBox()
* dom/ContainerNode.cpp:
(WebCore::rendererAnchorRect): Deleted.
* dom/ContainerNode.h:
* dom/Node.cpp:
(WebCore::rendererBoundingBox): Deleted.
* dom/Node.h:
* html/ColorInputType.cpp:
(WebCore::ColorInputType::elementRectRelativeToRootView): Migrate off rendererBoundingBox().
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::buildBubbleTree): Ditto.
* page/FrameView.cpp:
(WebCore::FrameView::scrollElementToRect): Migrate off rendererAnchorRect().
(WebCore::FrameView::scrollToAnchor): Ditto.
* page/SpatialNavigation.cpp:
(WebCore::nodeRectInAbsoluteCoordinates): Migrate off rendererBoundingBox().
* rendering/RenderElement.h:
2014-12-15 Myles C. Maxfield <mmaxfield@apple.com>
Delete Notation because we don't use it
https://bugs.webkit.org/show_bug.cgi?id=139171
Reviewed by Kent Tamura.
No tests because this is un-exposing something that never gets instantiated.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.exp.in:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/WebKitDOMNodeFilter.h:
* bindings/gobject/WebKitDOMNodeFilter.symbols:
* bindings/gobject/WebKitDOMPrivate.cpp:
(WebKit::wrap):
* bindings/gobject/webkitdom.symbols:
* bindings/js/JSNodeCustom.cpp:
(WebCore::createWrapperInline):
* bindings/objc/DOM.mm:
(kitClass):
* bindings/objc/DOMCore.h:
* bindings/objc/PublicDOMInterfaces.h:
* dom/DOMAllInOne.cpp:
* dom/Document.cpp:
(WebCore::Document::importNode):
(WebCore::Document::adoptNode):
(WebCore::Document::childTypeAllowed):
(WebCore::Document::canReplaceChild):
* dom/Node.cpp:
(WebCore::Node::dumpStatistics):
(WebCore::Node::isDefaultNamespace):
(WebCore::Node::lookupPrefix):
(WebCore::Node::lookupNamespaceURI):
(WebCore::appendTextContent):
(WebCore::Node::setTextContent):
* dom/Node.h:
* dom/Node.idl:
* dom/NodeFilter.h:
* dom/NodeFilter.idl:
* dom/Notation.cpp: Removed.
* dom/Notation.h: Removed.
* dom/Notation.idl: Removed.
* dom/Range.cpp:
(WebCore::lengthOfContentsInNode):
(WebCore::Range::processContentsBetweenOffsets):
(WebCore::Range::insertNode):
(WebCore::Range::checkNodeWOffset):
(WebCore::Range::checkNodeBA):
(WebCore::Range::selectNode):
(WebCore::Range::selectNodeContents):
(WebCore::Range::surroundContents):
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendStartMarkup):
* xml/XPathUtil.cpp:
(WebCore::XPath::isValidContextNode):
2014-12-15 Gavin Barraclough <barraclough@apple.com>
Change HysteresisActivity to use a lambda
https://bugs.webkit.org/show_bug.cgi?id=139636
Reviewed by Darin Adler.
The current implementation provides notifications via callbacks to a delegate. Using a delegate
with callbacks is limiting a number of ways. The callback names are very ambiguous, the callbacks
must either be on a separate object (more boilerplate), or the callback must be public for
HysteresisActivity to call them, or friends get involved. Without the boilerplate of extra
delegate objects it's hard to scale use of these objects - a single object can't serve as a
delegate for multiple HysteresisActivity members.
Instead, make HysteresisActivity take a lambda to callback on state change. To simplify, changed
HysteresisState to only track Started/Stopped states (removed WillStopPendingTimeout).
* WebCore.exp.in:
- removed exports of deleted functions.
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
- m_hysteresis lambda calls updateUserActivity.
(WebCore::PageThrottler::pageActivityCounterValueDidChange):
- ASSERT updated due to removal of WillStopPendingTimeout state.
(WebCore::PageThrottler::started): Deleted.
(WebCore::PageThrottler::stopped): Deleted.
- functionality replaced by lambda.
* page/PageThrottler.h:
- HysteresisActivity is no longer templated on delegate type, removed function declarations & friend.
* platform/HysteresisActivity.h:
(WebCore::HysteresisActivity::HysteresisActivity):
- HysteresisActivity takes a lambda, not a delegate.
(WebCore::HysteresisActivity::start):
- delegate call -> callback.
(WebCore::HysteresisActivity::state):
- simplified to remove WillStopPendingTimeout.
(WebCore::HysteresisActivity::hysteresisTimerFired):
- delegate call -> callback.
* platform/UserActivity.cpp:
(WebCore::UserActivity::UserActivity):
- HysteresisActivity lambda calls hysteresisUpdated.
(WebCore::UserActivity::hysteresisUpdated):
(WebCore::UserActivity::started): Deleted.
(WebCore::UserActivity::stopped): Deleted.
- started/stopped -> hysteresisUpdated.
* platform/UserActivity.h:
- started/stopped -> hysteresisUpdated, removed friend.
2014-12-15 Antti Koivisto <antti@apple.com>
WebKit level persistent caching
https://bugs.webkit.org/show_bug.cgi?id=30322
Reviewed by Sam Weinig.
Test: http/tests/cache/disk-cache-validation.html
* WebCore.exp.in:
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForResourceResponse):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::ResourceResponseBase):
(WebCore::ResourceResponseBase::source):
(WebCore::ResourceResponseBase::setSource):
(WebCore::ResourceResponseBase::wasCached): Deleted.
(WebCore::ResourceResponseBase::setWasCached): Deleted.
Replace wasCached bit with Source enum.
This is useful for testing.
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::containsCertificateInfo):
(WebCore::ResourceResponseBase::encode):
(WebCore::ResourceResponseBase::decode):
* testing/Internals.cpp:
(WebCore::Internals::xhrResponseSource):
(WebCore::Internals::clearMemoryCache):
* testing/Internals.h:
* testing/Internals.idl:
Testing support.
* xml/XMLHttpRequest.h:
2014-12-15 Andreas Kling <akling@apple.com>
Purge PassRefPtr from FocusEvent code.
<https://webkit.org/b/139647>
Reviewed by Anders Carlsson.
Convert FocusEvent-related code from using PassRefPtr to using RefPtr&& instead.
* dom/Document.cpp:
(WebCore::Document::setFocusedElement):
* dom/Element.cpp:
(WebCore::Element::dispatchFocusInEvent):
(WebCore::Element::dispatchFocusOutEvent):
(WebCore::Element::dispatchFocusEvent):
(WebCore::Element::dispatchBlurEvent):
* dom/Element.h:
* dom/FocusEvent.cpp:
(WebCore::FocusEvent::FocusEvent):
* dom/FocusEvent.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchBlurEvent):
* html/HTMLFormControlElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::dispatchFocusEvent):
(WebCore::HTMLSelectElement::dispatchBlurEvent):
* html/HTMLSelectElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
(WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
* html/HTMLTextFormControlElement.h:
* page/FocusController.cpp:
(WebCore::dispatchEventsOnWindowAndFocusedElement):
2014-12-15 Myles C. Maxfield <mmaxfield@apple.com>
[iOS] Codepoints not associated with languages are drawn as boxes
https://bugs.webkit.org/show_bug.cgi?id=138906
Reviewed by Darin Adler.
Use SPI CTFontCreateForCharacters(), but only if we don't already know what to do
with the characters.
Test: platform/ios-simulator/fast/text/non-language-font-fallback.html
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/spi/cocoa/CoreTextSPI.h:
2014-12-15 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Fix StyleBuilder code to use CSSValueNone to match spec and other code
https://bugs.webkit.org/show_bug.cgi?id=139601
Reviewed by Chris Dumez.
Change the code to properly use CSSValueNone instead of CSSValueAuto.
Asserts have been added to catch similar errors in the future.
In doing this change, it became apparent that there is nothing
special about the shape-outside property that requires custom code, so
it was changed to use a standard converter function.
No change observable via LayoutTests.
* css/CSSPropertyNames.in: Use a converter instead of custom code.
* css/StyleBuilderConverter.h:
(WebCore::isImageShape): Helper function so that isImageSetValue can
be properly guarded.
(WebCore::StyleBuilderConverter::convertShapeValue): Format as a
converter instead of custom code.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueWebkitShapeOutside): Deleted.
2014-12-15 Oliver Hunt <oliver@apple.com>
Make sure range based iteration of Vector<> still receives bounds checking
https://bugs.webkit.org/show_bug.cgi?id=138821
Reviewed by Mark Lam.
Update to deal with different iterator type.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::deserializeString):
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::isBadMatch):
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::buildSelectionHighlight):
* platform/graphics/SegmentedFontData.cpp:
(WebCore::SegmentedFontData::fontDataForCharacter):
(WebCore::SegmentedFontData::containsCharacter):
(WebCore::SegmentedFontData::isLoading):
* platform/graphics/WOFFFileFormat.cpp:
(WebCore::convertWOFFToSfnt):
* platform/graphics/cairo/GradientCairo.cpp:
(WebCore::Gradient::platformGradient):
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::clearFrameBufferCache):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintFillLayers):
* rendering/style/GridResolvedPosition.cpp:
(WebCore::firstNamedGridLineBeforePosition):
(WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
* svg/SVGFontElement.cpp:
(WebCore::kerningForPairOfStringsAndGlyphs):
* svg/SVGPathByteStream.h:
(WebCore::SVGPathByteStream::append):
* xml/XPathNodeSet.h:
(WebCore::XPath::NodeSet::begin):
(WebCore::XPath::NodeSet::end):
2014-12-15 Chris Dumez <cdumez@apple.com>
Move '-webkit-text-decoration-skip' to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139633
Reviewed by Darin Adler.
Move '-webkit-text-decoration-skip' to the new StyleBuilder by
introducing a new TextDecorationSkip converter.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::valueToDecorationSkip): Deleted.
(WebCore::ApplyPropertyTextDecorationSkip::applyValue): Deleted.
(WebCore::ApplyPropertyTextDecorationSkip::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::valueToDecorationSkip):
(WebCore::StyleBuilderConverter::convertTextDecorationSkip):
2014-12-15 Bartlomiej Gajda <b.gajda@samsung.com>
[MSE] Prevent SourceBuffer monitoring algorithm from triggering a HAVE_NOTHING to HAVE_METADATA transition.
https://bugs.webkit.org/show_bug.cgi?id=139444
Reviewed by Jer Noble.
In case of 2 SourceBuffers, there can be transition to HaveMetadata from monitorSourceBuffers,
even though second SourceBuffer did not receive init segment - we can't query for it's metadata
such as width/height (if second one was video), so we shouldn't fire the event.
W3 Bug reference : https://www.w3.org/Bugs/Public/show_bug.cgi?id=27542
Test: media/media-source/media-source-loadedmetada-with-two-sourcebuffers.html
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::monitorSourceBuffers):
* Modules/mediasource/SourceBuffer.h:
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::mimeTypeCache):
2014-12-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move WebCore/platform/text to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=139395
Reviewed by Darin Adler.
As a step to use std::unique_ptr<>, this patch replaces OwnPtr|PassOwnPtr with
std::unique_ptr<> | std::make_unique<>.
* dom/Document.h:
* platform/text/LineBreakIteratorPoolICU.h:
(WebCore::LineBreakIteratorPool::LineBreakIteratorPool):
(WebCore::LineBreakIteratorPool::create): Deleted.
* platform/text/LocaleICU.cpp:
(WebCore::Locale::create):
(WebCore::LocaleICU::createLabelVector):
(WebCore::createFallbackMonthLabels):
(WebCore::createFallbackAMPMLabels):
(WebCore::LocaleICU::initializeDateTimeFormat):
(WebCore::LocaleICU::shortMonthLabels):
(WebCore::LocaleICU::create): Deleted.
(WebCore::LocaleICU::standAloneMonthLabels): Deleted.
(WebCore::LocaleICU::shortStandAloneMonthLabels): Deleted.
* platform/text/LocaleICU.h:
* platform/text/LocaleNone.cpp:
(WebCore::Locale::create):
* platform/text/PlatformLocale.h:
(WebCore::Locale::createDefault):
* platform/text/TextCodecLatin1.cpp:
* platform/text/TextCodecUTF16.cpp:
* platform/text/TextEncoding.cpp:
* platform/text/mac/LocaleMac.h:
* platform/text/mac/LocaleMac.mm:
(WebCore::Locale::create):
(WebCore::LocaleMac::create):
* platform/text/mac/TextCodecMac.cpp:
* platform/text/win/LocaleWin.cpp:
(WebCore::Locale::create):
(WebCore::LocaleWin::create):
* platform/text/win/LocaleWin.h:
* platform/text/win/TextCodecWin.cpp:
(WebCore::newTextCodecWin):
2014-12-15 Xavier Claessens <xavier.claessens@collabora.com>
[GStreamer] the webkitwebsrc element can stale
https://bugs.webkit.org/show_bug.cgi?id=138425
Reviewed by Philippe Normand.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(removeTimeoutSources):
(webKitWebSrcStart):
(webKitWebSrcChangeState):
2014-12-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[GTK] Remove GamepadDeviceGtk::create()
https://bugs.webkit.org/show_bug.cgi?id=139637
Reviewed by Carlos Garcia Campos.
std::make_unique<> can replace GamepadDeviceGtk::create() factory function.
* platform/gtk/GamepadsGtk.cpp: Add "explicit" to GamepadsGtk constructor.
(WebCore::GamepadsGtk::registerDevice):
(WebCore::GamepadDeviceGtk::create): Deleted.
2014-12-15 Chris Dumez <cdumez@apple.com>
Move 'counter-increment' / 'counter-reset' to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139635
Reviewed by Antti Koivisto.
Move 'counter-increment' / 'counter-reset' to the new StyleBuilder by
using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyCounter::emptyFunction): Deleted.
(WebCore::ApplyPropertyCounter::applyInheritValue): Deleted.
(WebCore::ApplyPropertyCounter::applyValue): Deleted.
(WebCore::ApplyPropertyCounter::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialCounterIncrement):
(WebCore::StyleBuilderCustom::applyInitialCounterReset):
(WebCore::StyleBuilderCustom::applyInheritCounter):
(WebCore::StyleBuilderCustom::applyValueCounter):
(WebCore::StyleBuilderCustom::applyInheritCounterIncrement):
(WebCore::StyleBuilderCustom::applyValueCounterIncrement):
(WebCore::StyleBuilderCustom::applyInheritCounterReset):
(WebCore::StyleBuilderCustom::applyValueCounterReset):
2014-12-14 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177238 and r177244.
https://bugs.webkit.org/show_bug.cgi?id=139632
Introduced memory corruption (Requested by ap on #webkit).
Reverted changesets:
"REGRESSION (r168217): Images are cropped out during animation
at jetblue.com"
https://bugs.webkit.org/show_bug.cgi?id=136410
http://trac.webkit.org/changeset/177238
https://bugs.webkit.org/show_bug.cgi?id=139596
http://trac.webkit.org/changeset/177244
2014-12-14 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177223 and r177226.
https://bugs.webkit.org/show_bug.cgi?id=139631
Multiple tests are flakily asserting in
StyleResolver::loadPendingResources (Requested by ap_ on
#webkit).
Reverted changesets:
"[SVG Masking] Enable the use of <mask> elements for -webkit-
mask-image"
https://bugs.webkit.org/show_bug.cgi?id=139294
http://trac.webkit.org/changeset/177223
"animations/cross-fade-webkit-mask-image.html is flaky"
https://bugs.webkit.org/show_bug.cgi?id=139590
http://trac.webkit.org/changeset/177226
2014-12-14 Andreas Kling <akling@apple.com>
Event construction helpers should return Ref instead of PassRefPtr.
<https://webkit.org/b/139625>
Reviewed by Antti Koivisto.
Change all the FooEvent::create() construction helpers to return Ref<FooEvent>
instead of PassRefPtr<FooEvent>.
This allows the compiler to omit null checks at each call site, since we know
that these functions always return valid objects.
* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
(WebCore::WebKitPlaybackTargetAvailabilityEvent::create):
* Modules/encryptedmedia/MediaKeyMessageEvent.h:
(WebCore::MediaKeyMessageEvent::create):
* Modules/encryptedmedia/MediaKeyNeededEvent.h:
(WebCore::MediaKeyNeededEvent::create):
* Modules/gamepad/GamepadEvent.h:
(WebCore::GamepadEvent::create):
* Modules/indexeddb/IDBVersionChangeEvent.h:
(WebCore::IDBVersionChangeEvent::create):
* Modules/indieui/UIRequestEvent.cpp:
(WebCore::UIRequestEvent::create):
* Modules/indieui/UIRequestEvent.h:
* Modules/mediastream/MediaStreamEvent.cpp:
(WebCore::MediaStreamEvent::create):
* Modules/mediastream/MediaStreamEvent.h:
* Modules/mediastream/MediaStreamTrackEvent.cpp:
(WebCore::MediaStreamTrackEvent::create):
* Modules/mediastream/MediaStreamTrackEvent.h:
* Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
(WebCore::RTCDTMFToneChangeEvent::create):
* Modules/mediastream/RTCDTMFToneChangeEvent.h:
* Modules/mediastream/RTCDataChannelEvent.cpp:
(WebCore::RTCDataChannelEvent::create):
* Modules/mediastream/RTCDataChannelEvent.h:
* Modules/mediastream/RTCIceCandidateEvent.cpp:
(WebCore::RTCIceCandidateEvent::create):
* Modules/mediastream/RTCIceCandidateEvent.h:
* Modules/speech/SpeechSynthesisEvent.cpp:
(WebCore::SpeechSynthesisEvent::create):
* Modules/speech/SpeechSynthesisEvent.h:
* Modules/webaudio/AudioProcessingEvent.cpp:
(WebCore::AudioProcessingEvent::create):
* Modules/webaudio/AudioProcessingEvent.h:
* Modules/webaudio/OfflineAudioCompletionEvent.cpp:
(WebCore::OfflineAudioCompletionEvent::create):
* Modules/webaudio/OfflineAudioCompletionEvent.h:
* Modules/websockets/CloseEvent.h:
(WebCore::CloseEvent::create):
* dom/AnimationEvent.h:
* dom/AutocompleteErrorEvent.h:
* dom/BeforeLoadEvent.h:
* dom/BeforeTextInsertedEvent.h:
* dom/BeforeUnloadEvent.h:
* dom/ClipboardEvent.h:
* dom/CompositionEvent.h:
* dom/CustomEvent.h:
* dom/DeviceMotionEvent.h:
* dom/DeviceOrientationEvent.h:
* dom/ErrorEvent.h:
* dom/Event.h:
(WebCore::Event::create):
* dom/FocusEvent.h:
* dom/HashChangeEvent.h:
* dom/KeyboardEvent.h:
* dom/MessageEvent.h:
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
(WebCore::SimulatedMouseEvent::create):
* dom/MouseEvent.h:
(WebCore::MouseEvent::create):
* dom/MutationEvent.h:
* dom/OverflowEvent.h:
* dom/PageTransitionEvent.h:
* dom/PopStateEvent.cpp:
(WebCore::PopStateEvent::create):
* dom/PopStateEvent.h:
* dom/ProgressEvent.h:
(WebCore::ProgressEvent::create):
* dom/TextEvent.cpp:
(WebCore::TextEvent::create):
(WebCore::TextEvent::createForPlainTextPaste):
(WebCore::TextEvent::createForFragmentPaste):
(WebCore::TextEvent::createForDrop):
(WebCore::TextEvent::createForDictation):
* dom/TextEvent.h:
* dom/TouchEvent.h:
* dom/TransitionEvent.h:
* dom/UIEvent.h:
(WebCore::UIEvent::create):
* dom/WebKitAnimationEvent.h:
* dom/WebKitTransitionEvent.h:
* dom/WheelEvent.h:
* html/MediaKeyEvent.h:
* html/canvas/WebGLContextEvent.h:
* html/track/TrackEvent.h:
* storage/StorageEvent.cpp:
(WebCore::StorageEvent::create):
* storage/StorageEvent.h:
* svg/SVGZoomEvent.h:
(WebCore::SVGZoomEvent::create):
* xml/XMLHttpRequestProgressEvent.h:
(WebCore::XMLHttpRequestProgressEvent::create):
2014-12-14 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r160182): Fragment parser doesn't close a form element with a close tag
https://bugs.webkit.org/show_bug.cgi?id=139561
Reviewed by Darin Adler.
The bug was caused by us not setting the form pointer in insertHTMLFormElement.
Since we already avoid associating a form inside HTMLConstructionSite::createHTMLElement,
we didn't need this code at all.
Fixed the bug by partially reverting r160182.
Test: fast/dom/dom-parse-close-form.html
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertHTMLFormElement):
(WebCore::HTMLConstructionSite::insideTemplateElement): Deleted.
* html/parser/HTMLConstructionSite.h:
2014-12-14 Andreas Kling <akling@apple.com>
Fix build even more. Not a strong performance here.
* platform/graphics/Font.cpp:
(WebCore::FontGlyphsCacheEntry::FontGlyphsCacheEntry):
(WebCore::retrieveOrAddCachedFontGlyphs):
2014-12-14 Andreas Kling <akling@apple.com>
Fix build. :-|
* css/CSSFunctionValue.cpp:
(WebCore::CSSFunctionValue::CSSFunctionValue):
* css/CSSFunctionValue.h:
2014-12-14 Andreas Kling <akling@apple.com>
Minor follow-up tweaks suggested by Darin on bug 139587.
* css/CSSFunctionValue.h:
(WebCore::CSSFunctionValue::create):
* platform/graphics/Font.cpp:
(WebCore::retrieveOrAddCachedFontGlyphs):
(WebCore::FontGlyphsCacheEntry::FontGlyphsCacheEntry): Deleted.
* rendering/RenderScrollbarPart.h:
2014-12-14 Andreas Kling <akling@apple.com>
Replace PassRef with Ref/Ref&& across the board.
<https://webkit.org/b/139587>
Reviewed by Darin Adler.
* Modules/battery/BatteryManager.cpp:
(WebCore::BatteryManager::create):
* Modules/battery/BatteryManager.h:
* Modules/battery/BatteryStatus.cpp:
(WebCore::BatteryStatus::create):
* Modules/battery/BatteryStatus.h:
* Modules/gamepad/GamepadButton.h:
(WebCore::GamepadButton::create):
* Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::gamepadFromPlatformGamepad):
* Modules/gamepad/NavigatorGamepad.h:
* Modules/gamepad/deprecated/GamepadList.h:
(WebCore::GamepadList::create):
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::create):
* Modules/geolocation/Geolocation.h:
(WebCore::Geolocation::GeoNotifier::create):
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::setPrivateAndOpen):
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::create):
(WebCore::SourceBuffer::SourceBuffer):
* Modules/mediasource/SourceBuffer.h:
* Modules/mediastream/UserMediaClient.h:
* Modules/mediastream/UserMediaController.h:
(WebCore::UserMediaController::requestPermission):
* Modules/notifications/Notification.cpp:
(WebCore::Notification::create):
* Modules/notifications/Notification.h:
* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::create):
* Modules/notifications/NotificationCenter.h:
* Modules/plugins/PluginReplacement.h:
* Modules/plugins/QuickTimePluginReplacement.h:
* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::QuickTimePluginReplacement::createElementRenderer):
* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::YouTubePluginReplacement::createElementRenderer):
* Modules/plugins/YouTubePluginReplacement.h:
* Modules/proximity/DeviceProximityEvent.h:
(WebCore::DeviceProximityEvent::create):
* WebCore.exp.in:
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):
(WebCore::basicShapeForValue):
* css/BasicShapeFunctions.h:
* css/CSSAspectRatioValue.h:
(WebCore::CSSAspectRatioValue::create):
* css/CSSBorderImage.cpp:
(WebCore::createBorderImageValue):
* css/CSSBorderImage.h:
* css/CSSBorderImageSliceValue.h:
(WebCore::CSSBorderImageSliceValue::create):
* css/CSSCalculationValue.cpp:
(WebCore::determineCategory):
* css/CSSCalculationValue.h:
(WebCore::CSSCalcValue::CSSCalcValue):
(WebCore::CSSCalcValue::createCalculationValue):
* css/CSSCanvasValue.h:
(WebCore::CSSCanvasValue::create):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForImageSliceSide):
(WebCore::valueForNinePieceImageSlice):
(WebCore::valueForNinePieceImageQuad):
(WebCore::valueForNinePieceImageRepeat):
(WebCore::valueForNinePieceImage):
(WebCore::zoomAdjustedPixelValue):
(WebCore::zoomAdjustedNumberValue):
(WebCore::zoomAdjustedPixelValueForLength):
(WebCore::valueForReflection):
(WebCore::createPositionListForLayer):
(WebCore::percentageOrZoomAdjustedValue):
(WebCore::autoOrZoomAdjustedValue):
(WebCore::getBorderRadiusCornerValues):
(WebCore::getBorderRadiusCornerValue):
(WebCore::getBorderRadiusShorthandValue):
(WebCore::matrixTransformValue):
(WebCore::computedTransform):
(WebCore::adjustLengthForZoom):
(WebCore::ComputedStyleExtractor::valueForShadow):
(WebCore::ComputedStyleExtractor::valueForFilter):
(WebCore::specifiedValueForGridTrackBreadth):
(WebCore::specifiedValueForGridTrackSize):
(WebCore::valueForGridTrackList):
(WebCore::valueForGridPosition):
(WebCore::createTransitionPropertyValue):
(WebCore::getTransitionPropertyValue):
(WebCore::scrollSnapDestination):
(WebCore::scrollSnapPoints):
(WebCore::scrollSnapCoordinates):
(WebCore::getDelayValue):
(WebCore::getDurationValue):
(WebCore::createTimingFunctionValue):
(WebCore::getTimingFunctionValue):
(WebCore::createLineBoxContainValue):
(WebCore::valueForFamily):
(WebCore::renderTextDecorationFlagsToCSSValue):
(WebCore::renderTextDecorationStyleFlagsToCSSValue):
(WebCore::renderTextDecorationSkipFlagsToCSSValue):
(WebCore::renderEmphasisPositionFlagsToCSSValue):
(WebCore::fillRepeatToCSSValue):
(WebCore::fillSourceTypeToCSSValue):
(WebCore::fillSizeToCSSValue):
(WebCore::altTextToCSSValue):
(WebCore::contentToCSSValue):
(WebCore::fontFamilyFromStyle):
(WebCore::lineHeightFromStyle):
(WebCore::fontSizeFromStyle):
(WebCore::fontStyleFromStyle):
(WebCore::fontVariantFromStyle):
(WebCore::fontWeightFromStyle):
(WebCore::CSSComputedStyleDeclaration::copyProperties):
(WebCore::shapePropertyValue):
(WebCore::ComputedStyleExtractor::copyProperties):
(WebCore::ComputedStyleExtractor::copyPropertiesInSet):
* css/CSSComputedStyleDeclaration.h:
* css/CSSCrossfadeValue.h:
(WebCore::CSSCrossfadeValue::create):
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::CSSCursorImageValue):
* css/CSSCursorImageValue.h:
(WebCore::CSSCursorImageValue::create):
* css/CSSFilterImageValue.h:
(WebCore::CSSFilterImageValue::create):
* css/CSSFontFaceSrcValue.h:
(WebCore::CSSFontFaceSrcValue::create):
(WebCore::CSSFontFaceSrcValue::createLocal):
* css/CSSFontFeatureValue.h:
(WebCore::CSSFontFeatureValue::create):
* css/CSSFontValue.h:
(WebCore::CSSFontValue::create):
* css/CSSFunctionValue.h:
(WebCore::CSSFunctionValue::create):
* css/CSSGradientValue.h:
(WebCore::CSSLinearGradientValue::create):
(WebCore::CSSLinearGradientValue::clone):
(WebCore::CSSRadialGradientValue::create):
(WebCore::CSSRadialGradientValue::clone):
* css/CSSGridTemplateAreasValue.h:
(WebCore::CSSGridTemplateAreasValue::create):
* css/CSSImageSetValue.h:
(WebCore::CSSImageSetValue::create):
* css/CSSImageValue.h:
(WebCore::CSSImageValue::create):
* css/CSSInheritedValue.h:
(WebCore::CSSInheritedValue::create):
* css/CSSInitialValue.h:
(WebCore::CSSInitialValue::createExplicit):
(WebCore::CSSInitialValue::createImplicit):
* css/CSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::StyleKeyframe):
* css/CSSKeyframeRule.h:
(WebCore::StyleKeyframe::create):
* css/CSSKeyframesRule.h:
(WebCore::StyleRuleKeyframes::create):
(WebCore::StyleRuleKeyframes::copy):
* css/CSSLineBoxContainValue.h:
(WebCore::CSSLineBoxContainValue::create):
* css/CSSParser.cpp:
(WebCore::createPrimitiveValuePair):
(WebCore::CSSParser::parseInlineStyleDeclaration):
(WebCore::CSSParser::parseDeclaration):
(WebCore::CSSParser::createStyleProperties):
(WebCore::CSSParser::createPrimitiveNumericValue):
(WebCore::CSSParser::createPrimitiveStringValue):
(WebCore::CSSParser::addFillValue):
(WebCore::CSSParser::addAnimationValue):
* css/CSSParser.h:
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::formatNumberValue):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::createIdentifier):
(WebCore::CSSPrimitiveValue::createParserOperator):
(WebCore::CSSPrimitiveValue::createColor):
(WebCore::CSSPrimitiveValue::create):
(WebCore::CSSPrimitiveValue::createAllowingMarginQuirk):
* css/CSSReflectValue.h:
(WebCore::CSSReflectValue::create):
* css/CSSShadowValue.h:
(WebCore::CSSShadowValue::create):
* css/CSSStyleDeclaration.h:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::create):
(WebCore::CSSStyleSheet::createInline):
(WebCore::CSSStyleSheet::CSSStyleSheet):
* css/CSSStyleSheet.h:
* css/CSSTimingFunctionValue.h:
(WebCore::CSSCubicBezierTimingFunctionValue::create):
(WebCore::CSSStepsTimingFunctionValue::create):
* css/CSSUnicodeRangeValue.h:
(WebCore::CSSUnicodeRangeValue::create):
* css/CSSValue.cpp:
(WebCore::TextCloneCSSValue::create):
* css/CSSValueList.h:
(WebCore::CSSValueList::createCommaSeparated):
(WebCore::CSSValueList::createSpaceSeparated):
(WebCore::CSSValueList::createSlashSeparated):
(WebCore::CSSValueList::createFromParserValueList):
(WebCore::CSSValueList::append):
(WebCore::CSSValueList::prepend):
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createIdentifierValue):
(WebCore::CSSValuePool::createColorValue):
(WebCore::CSSValuePool::createValue):
(WebCore::CSSValuePool::createFontFamilyValue):
* css/CSSValuePool.h:
(WebCore::CSSValuePool::createInheritedValue):
(WebCore::CSSValuePool::createImplicitInitialValue):
(WebCore::CSSValuePool::createExplicitInitialValue):
(WebCore::CSSValuePool::createValue):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::copyProperties):
* css/PropertySetCSSStyleDeclaration.h:
* css/StyleProperties.cpp:
(WebCore::ImmutableStyleProperties::create):
(WebCore::StyleProperties::immutableCopyIfNeeded):
(WebCore::StyleProperties::copyBlockProperties):
(WebCore::StyleProperties::mutableCopy):
(WebCore::StyleProperties::copyPropertiesInSet):
(WebCore::MutableStyleProperties::create):
* css/StyleProperties.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::setStyle):
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::defaultStyleForElement):
* css/StyleResolver.h:
(WebCore::StyleResolver::State::takeStyle):
(WebCore::StyleResolver::State::setParentStyle):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::copy):
(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::create):
(WebCore::StyleRulePage::StyleRulePage):
(WebCore::StyleRuleFontFace::StyleRuleFontFace):
(WebCore::StyleRuleGroup::wrapperInsertRule):
(WebCore::StyleRuleViewport::StyleRuleViewport):
* css/StyleRule.h:
(WebCore::StyleRule::create):
(WebCore::StyleRule::copy):
(WebCore::StyleRuleFontFace::create):
(WebCore::StyleRuleFontFace::copy):
(WebCore::StyleRulePage::create):
(WebCore::StyleRulePage::copy):
(WebCore::StyleRuleMedia::create):
(WebCore::StyleRuleMedia::copy):
(WebCore::StyleRuleSupports::create):
(WebCore::StyleRuleSupports::copy):
(WebCore::StyleRuleRegion::create):
(WebCore::StyleRuleRegion::copy):
(WebCore::StyleRuleViewport::create):
(WebCore::StyleRuleViewport::copy):
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::create):
* css/StyleRuleImport.h:
* css/StyleSheetContents.h:
(WebCore::StyleSheetContents::create):
(WebCore::StyleSheetContents::copy):
* css/WebKitCSSFilterValue.h:
(WebCore::WebKitCSSFilterValue::create):
* css/WebKitCSSResourceValue.h:
(WebCore::WebKitCSSResourceValue::create):
* css/WebKitCSSTransformValue.h:
(WebCore::WebKitCSSTransformValue::create):
* dom/ChildNodeList.h:
* dom/ClassNodeList.cpp:
(WebCore::ClassNodeList::create):
* dom/ClassNodeList.h:
* dom/Document.cpp:
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
* dom/Document.h:
* dom/DocumentSharedObjectPool.cpp:
(WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
* dom/DocumentSharedObjectPool.h:
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::addAuthorSheet):
(WebCore::DocumentStyleSheetCollection::addUserSheet):
* dom/DocumentStyleSheetCollection.h:
* dom/Element.cpp:
(WebCore::Element::createElementRenderer):
* dom/Element.h:
* dom/ElementData.cpp:
(WebCore::ShareableElementData::createWithAttributes):
(WebCore::UniqueElementData::create):
(WebCore::ElementData::makeUniqueCopy):
(WebCore::UniqueElementData::makeShareableCopy):
* dom/ElementData.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::setComputedStyle):
* dom/NameNodeList.h:
* dom/NamedFlowCollection.cpp:
(WebCore::NamedFlowCollection::ensureFlowWithName):
* dom/NamedFlowCollection.h:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::ensureChildNodeList):
(WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
(WebCore::NodeListsNodeData::addCacheWithAtomicName):
(WebCore::NodeListsNodeData::addCacheWithQualifiedName):
(WebCore::NodeListsNodeData::addCachedCollection):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didRecalcStyle):
* dom/QualifiedName.h:
(WebCore::QualifiedName::QualifiedNameImpl::create):
* dom/TagNodeList.h:
* html/BaseButtonInputType.cpp:
(WebCore::BaseButtonInputType::createInputRenderer):
* html/BaseButtonInputType.h:
* html/FileInputType.cpp:
(WebCore::FileInputType::createInputRenderer):
* html/FileInputType.h:
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::create):
* html/HTMLAllCollection.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::createElementRenderer):
* html/HTMLAppletElement.h:
* html/HTMLBRElement.cpp:
(WebCore::HTMLBRElement::createElementRenderer):
* html/HTMLBRElement.h:
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::createElementRenderer):
* html/HTMLButtonElement.h:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createElementRenderer):
* html/HTMLCanvasElement.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::create):
* html/HTMLCollection.h:
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::createElementRenderer):
* html/HTMLDetailsElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createElementRenderer):
* html/HTMLElement.h:
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::createElementRenderer):
* html/HTMLFieldSetElement.h:
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::create):
* html/HTMLFormControlsCollection.h:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::createElementRenderer):
* html/HTMLFrameElement.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::createElementRenderer):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::createElementRenderer):
* html/HTMLIFrameElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::createElementRenderer):
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::createElementRenderer):
* html/HTMLInputElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::createElementRenderer):
* html/HTMLMeterElement.h:
* html/HTMLNameCollection.h:
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::create):
* html/HTMLOptionsCollection.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::createElementRenderer):
* html/HTMLPlugInElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::createElementRenderer):
* html/HTMLPlugInImageElement.h:
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::createElementRenderer):
* html/HTMLProgressElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::createElementRenderer):
* html/HTMLSelectElement.h:
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::createElementRenderer):
* html/HTMLSummaryElement.h:
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::create):
* html/HTMLTableRowsCollection.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::createElementRenderer):
* html/HTMLTextAreaElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::createElementRenderer):
* html/HTMLVideoElement.h:
* html/HTMLWBRElement.cpp:
(WebCore::HTMLWBRElement::createElementRenderer):
* html/HTMLWBRElement.h:
* html/HiddenInputType.cpp:
(WebCore::HiddenInputType::createInputRenderer):
* html/HiddenInputType.h:
* html/ImageInputType.cpp:
(WebCore::ImageInputType::createInputRenderer):
* html/ImageInputType.h:
* html/InputType.cpp:
(WebCore::InputType::createInputRenderer):
* html/InputType.h:
* html/LabelsNodeList.h:
* html/RadioNodeList.h:
* html/RangeInputType.cpp:
(WebCore::RangeInputType::createInputRenderer):
* html/RangeInputType.h:
* html/SearchInputType.cpp:
(WebCore::SearchInputType::createInputRenderer):
* html/SearchInputType.h:
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createInputRenderer):
* html/TextFieldInputType.h:
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::createElementRenderer):
* html/shadow/DetailsMarkerControl.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineContainerElement::createElementRenderer):
(WebCore::MediaControlVolumeSliderContainerElement::createElementRenderer):
(WebCore::MediaControlTextTrackContainerElement::createElementRenderer):
* html/shadow/MediaControlElements.h:
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterInnerElement::createElementRenderer):
* html/shadow/MeterShadowElement.h:
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressInnerElement::createElementRenderer):
* html/shadow/ProgressShadowElement.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderThumb::RenderSliderThumb):
(WebCore::SliderThumbElement::createElementRenderer):
(WebCore::SliderContainerElement::createElementRenderer):
* html/shadow/SliderThumbElement.h:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerContainer::createElementRenderer):
(WebCore::TextControlInnerTextElement::createElementRenderer):
* html/shadow/TextControlInnerElements.h:
* html/shadow/mac/ImageControlsButtonElementMac.cpp:
(WebCore::RenderImageControlsButton::RenderImageControlsButton):
(WebCore::ImageControlsButtonElementMac::createElementRenderer):
* html/shadow/mac/ImageControlsButtonElementMac.h:
* html/shadow/mac/ImageControlsRootElementMac.cpp:
(WebCore::RenderImageControls::RenderImageControls):
(WebCore::ImageControlsRootElementMac::createElementRenderer):
* html/shadow/mac/ImageControlsRootElementMac.h:
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::createElementRenderer):
* html/track/VTTCue.h:
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::saveParsedStyleSheet):
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedResourceLoader.h:
(WebCore::CachedResourceLoader::create):
* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::createElementRenderer):
* mathml/MathMLInlineContainerElement.h:
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::createElementRenderer):
* mathml/MathMLMathElement.h:
* mathml/MathMLMencloseElement.cpp:
(WebCore::MathMLMencloseElement::createElementRenderer):
* mathml/MathMLMencloseElement.h:
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::createElementRenderer):
* mathml/MathMLSelectElement.h:
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::createElementRenderer):
* mathml/MathMLTextElement.h:
* page/Page.cpp:
(WebCore::Page::setStorageNamespaceProvider):
(WebCore::Page::setVisitedLinkStore):
* page/Page.h:
* page/UserMessageHandler.h:
(WebCore::UserMessageHandler::create):
* page/UserMessageHandlersNamespace.h:
(WebCore::UserMessageHandlersNamespace::create):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::addElementChangeToDispatch):
(WebCore::AnimationController::updateAnimations):
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::animate):
* page/animation/CompositeAnimation.h:
* platform/CalculationValue.cpp:
(WebCore::CalculationValue::create):
* platform/CalculationValue.h:
* platform/Length.cpp:
(WebCore::CalculationValueMap::insert):
(WebCore::Length::Length):
* platform/Length.h:
* platform/graphics/Font.cpp:
(WebCore::FontGlyphsCacheEntry::FontGlyphsCacheEntry):
(WebCore::retrieveOrAddCachedFontGlyphs):
* platform/graphics/FontGlyphs.h:
(WebCore::FontGlyphs::create):
(WebCore::FontGlyphs::createForPlatformFont):
* platform/graphics/Gradient.h:
(WebCore::Gradient::create):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::setStrokePattern):
(WebCore::GraphicsContext::setFillPattern):
(WebCore::GraphicsContext::setStrokeGradient):
(WebCore::GraphicsContext::setFillGradient):
* platform/graphics/GraphicsContext.h:
* platform/graphics/MediaSourcePrivateClient.h:
* platform/graphics/Pattern.cpp:
(WebCore::Pattern::create):
* platform/graphics/Pattern.h:
* platform/mac/SerializedPlatformRepresentationMac.h:
* platform/mac/SerializedPlatformRepresentationMac.mm:
(WebCore::SerializedPlatformRepresentationMac::create):
* platform/mock/UserMediaClientMock.h:
(WebCore::UserMediaClientRequestNotifier::UserMediaClientRequestNotifier):
* rendering/ClipPathOperation.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::RenderBlockFlow):
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::RenderBox):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::RenderBoxModelObject):
* rendering/RenderBoxModelObject.h:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::RenderButton):
* rendering/RenderButton.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::RenderDetailsMarker):
* rendering/RenderDetailsMarker.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
(WebCore::RenderElement::createFor):
(WebCore::RenderElement::setStyle):
* rendering/RenderElement.h:
(WebCore::RenderElement::setStyleInternal):
(WebCore::RenderElement::setAnimatableStyle):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
(WebCore::RenderEmbeddedObject::createForApplet):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::RenderFieldset):
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::RenderFileUploadControl):
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::RenderFlexibleBox):
* rendering/RenderFlexibleBox.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::createFlowThreadStyle):
* rendering/RenderFlowThread.h:
* rendering/RenderFrame.cpp:
(WebCore::RenderFrame::RenderFrame):
* rendering/RenderFrame.h:
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::RenderFrameBase):
* rendering/RenderFrameBase.h:
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::RenderFrameSet):
* rendering/RenderFrameSet.h:
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::RenderFullScreen):
(WebCore::createFullScreenStyle):
(WebCore::RenderFullScreen::createPlaceholder):
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::RenderGrid):
* rendering/RenderGrid.h:
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::RenderHTMLCanvas):
* rendering/RenderHTMLCanvas.h:
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::RenderIFrame):
* rendering/RenderIFrame.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::RenderImage):
* rendering/RenderImage.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::RenderInline):
* rendering/RenderInline.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::RenderLayerModelObject):
* rendering/RenderLayerModelObject.h:
* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::RenderLineBreak):
* rendering/RenderLineBreak.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
* rendering/RenderListBox.h:
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::RenderListItem):
* rendering/RenderListItem.h:
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::RenderListMarker):
* rendering/RenderListMarker.h:
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::RenderMedia):
* rendering/RenderMedia.h:
* rendering/RenderMediaControlElements.cpp:
(WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
(WebCore::RenderMediaControlTimelineContainer::RenderMediaControlTimelineContainer):
(WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement):
* rendering/RenderMediaControlElements.h:
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::RenderMenuList):
* rendering/RenderMenuList.h:
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::RenderMeter):
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderMultiColumnSpannerPlaceholder.cpp:
(WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder):
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::RenderNamedFlowFragment):
(WebCore::RenderNamedFlowFragment::createStyle):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::RenderProgress):
* rendering/RenderProgress.h:
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::RenderQuote):
* rendering/RenderQuote.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
* rendering/RenderRegion.h:
* rendering/RenderRegionSet.cpp:
(WebCore::RenderRegionSet::RenderRegionSet):
* rendering/RenderRegionSet.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::RenderReplaced):
* rendering/RenderReplaced.h:
* rendering/RenderReplica.cpp:
(WebCore::RenderReplica::RenderReplica):
* rendering/RenderReplica.h:
* rendering/RenderRuby.cpp:
(WebCore::RenderRubyAsInline::RenderRubyAsInline):
(WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
* rendering/RenderRuby.h:
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::RenderRubyBase):
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::RenderRubyRun):
* rendering/RenderRubyRun.h:
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::RenderRubyText):
* rendering/RenderRubyText.h:
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::RenderScrollbarPart):
* rendering/RenderScrollbarPart.h:
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::RenderSearchField):
* rendering/RenderSearchField.h:
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::RenderSlider):
* rendering/RenderSlider.h:
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
* rendering/RenderSnapshottedPlugIn.h:
* rendering/RenderTable.cpp:
(WebCore::RenderTable::RenderTable):
* rendering/RenderTable.h:
* rendering/RenderTableCaption.cpp:
(WebCore::RenderTableCaption::RenderTableCaption):
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::RenderTableCell):
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::RenderTableCol):
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::RenderTableRow):
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::RenderTableSection):
* rendering/RenderTableSection.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
(WebCore::RenderTextControlMultiLine::createInnerTextStyle):
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
(WebCore::RenderTextControlSingleLine::createInnerTextStyle):
(WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
* rendering/RenderTextControlSingleLine.h:
* rendering/RenderVTTCue.cpp:
(WebCore::RenderVTTCue::RenderVTTCue):
* rendering/RenderVTTCue.h:
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::RenderVideo):
* rendering/RenderVideo.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
* rendering/RenderView.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::RenderWidget):
* rendering/RenderWidget.h:
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::RenderMathMLBlock):
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::RenderMathMLFenced):
* rendering/mathml/RenderMathMLFenced.h:
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::RenderMathMLFraction):
* rendering/mathml/RenderMathMLFraction.h:
* rendering/mathml/RenderMathMLMath.cpp:
(WebCore::RenderMathMLMath::RenderMathMLMath):
* rendering/mathml/RenderMathMLMath.h:
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::RenderMathMLMenclose):
* rendering/mathml/RenderMathMLMenclose.h:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::RenderMathMLOperator):
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRadicalOperator.cpp:
(WebCore::RenderMathMLRadicalOperator::RenderMathMLRadicalOperator):
* rendering/mathml/RenderMathMLRadicalOperator.h:
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::RenderMathMLRoot):
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::RenderMathMLRow):
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::RenderMathMLScripts):
* rendering/mathml/RenderMathMLScripts.h:
* rendering/mathml/RenderMathMLSpace.cpp:
(WebCore::RenderMathMLSpace::RenderMathMLSpace):
* rendering/mathml/RenderMathMLSpace.h:
* rendering/mathml/RenderMathMLSquareRoot.cpp:
(WebCore::RenderMathMLSquareRoot::RenderMathMLSquareRoot):
* rendering/mathml/RenderMathMLSquareRoot.h:
* rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::RenderMathMLToken):
* rendering/mathml/RenderMathMLToken.h:
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver):
* rendering/mathml/RenderMathMLUnderOver.h:
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeCircle::blend):
(WebCore::BasicShapeEllipse::blend):
(WebCore::BasicShapePolygon::blend):
(WebCore::BasicShapeInset::blend):
* rendering/style/BasicShapes.h:
* rendering/style/DataRef.h:
(WebCore::DataRef::DataRef):
* rendering/style/NinePieceImage.cpp:
(WebCore::NinePieceImageData::copy):
* rendering/style/NinePieceImage.h:
(WebCore::NinePieceImageData::create):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::create):
(WebCore::RenderStyle::createDefaultStyle):
(WebCore::RenderStyle::createAnonymousStyleWithDisplay):
(WebCore::RenderStyle::clone):
(WebCore::RenderStyle::createStyleInheritingFromPseudoStyle):
* rendering/style/RenderStyle.h:
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::createDefaultStyle):
(WebCore::SVGRenderStyle::copy):
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::create):
* rendering/style/SVGRenderStyleDefs.cpp:
(WebCore::StyleFillData::copy):
(WebCore::StyleStrokeData::copy):
(WebCore::StyleStopData::copy):
(WebCore::StyleTextData::copy):
(WebCore::StyleMiscData::copy):
(WebCore::StyleShadowSVGData::copy):
(WebCore::StyleResourceData::copy):
(WebCore::StyleInheritedResourceData::copy):
(WebCore::StyleLayoutData::copy):
* rendering/style/SVGRenderStyleDefs.h:
(WebCore::StyleFillData::create):
(WebCore::StyleStrokeData::create):
(WebCore::StyleStopData::create):
(WebCore::StyleTextData::create):
(WebCore::StyleMiscData::create):
(WebCore::StyleShadowSVGData::create):
(WebCore::StyleResourceData::create):
(WebCore::StyleInheritedResourceData::create):
(WebCore::StyleLayoutData::create):
* rendering/style/StyleBackgroundData.cpp:
(WebCore::StyleBackgroundData::copy):
* rendering/style/StyleBackgroundData.h:
(WebCore::StyleBackgroundData::create):
* rendering/style/StyleBoxData.cpp:
(WebCore::StyleBoxData::copy):
* rendering/style/StyleBoxData.h:
(WebCore::StyleBoxData::create):
* rendering/style/StyleDeprecatedFlexibleBoxData.cpp:
(WebCore::StyleDeprecatedFlexibleBoxData::copy):
* rendering/style/StyleDeprecatedFlexibleBoxData.h:
(WebCore::StyleDeprecatedFlexibleBoxData::create):
* rendering/style/StyleFilterData.cpp:
(WebCore::StyleFilterData::copy):
* rendering/style/StyleFilterData.h:
(WebCore::StyleFilterData::create):
* rendering/style/StyleFlexibleBoxData.cpp:
(WebCore::StyleFlexibleBoxData::copy):
* rendering/style/StyleFlexibleBoxData.h:
(WebCore::StyleFlexibleBoxData::create):
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::StyleGeneratedImage):
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StyleGridData.cpp:
(WebCore::StyleGridData::copy):
* rendering/style/StyleGridData.h:
(WebCore::StyleGridData::create):
* rendering/style/StyleGridItemData.cpp:
(WebCore::StyleGridItemData::copy):
* rendering/style/StyleGridItemData.h:
(WebCore::StyleGridItemData::create):
* rendering/style/StyleInheritedData.cpp:
(WebCore::StyleInheritedData::copy):
* rendering/style/StyleInheritedData.h:
(WebCore::StyleInheritedData::create):
* rendering/style/StyleMarqueeData.cpp:
(WebCore::StyleMarqueeData::copy):
* rendering/style/StyleMarqueeData.h:
(WebCore::StyleMarqueeData::create):
* rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::copy):
* rendering/style/StyleMultiColData.h:
(WebCore::StyleMultiColData::create):
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::copy):
* rendering/style/StyleRareInheritedData.h:
(WebCore::StyleRareInheritedData::create):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::copy):
* rendering/style/StyleRareNonInheritedData.h:
(WebCore::StyleRareNonInheritedData::create):
* rendering/style/StyleScrollSnapPoints.cpp:
(WebCore::StyleScrollSnapPoints::copy):
* rendering/style/StyleScrollSnapPoints.h:
(WebCore::StyleScrollSnapPoints::create):
* rendering/style/StyleSurroundData.cpp:
(WebCore::StyleSurroundData::copy):
* rendering/style/StyleSurroundData.h:
(WebCore::StyleSurroundData::create):
* rendering/style/StyleTransformData.cpp:
(WebCore::StyleTransformData::copy):
* rendering/style/StyleTransformData.h:
(WebCore::StyleTransformData::create):
* rendering/style/StyleVisualData.cpp:
(WebCore::StyleVisualData::copy):
* rendering/style/StyleVisualData.h:
(WebCore::StyleVisualData::create):
* rendering/svg/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::RenderSVGBlock):
* rendering/svg/RenderSVGBlock.h:
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::RenderSVGContainer):
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGEllipse.cpp:
(WebCore::RenderSVGEllipse::RenderSVGEllipse):
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::RenderSVGForeignObject):
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::RenderSVGGradientStop):
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGHiddenContainer.cpp:
(WebCore::RenderSVGHiddenContainer::RenderSVGHiddenContainer):
* rendering/svg/RenderSVGHiddenContainer.h:
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::RenderSVGImage):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::RenderSVGInline):
* rendering/svg/RenderSVGInline.h:
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::RenderSVGModelObject):
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::RenderSVGPath):
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::RenderSVGRect):
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::RenderSVGResourceClipper):
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::RenderSVGResourceFilter):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
(WebCore::RenderSVGResourceFilterPrimitive::RenderSVGResourceFilterPrimitive):
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::RenderSVGResourceGradient::RenderSVGResourceGradient):
* rendering/svg/RenderSVGResourceGradient.h:
* rendering/svg/RenderSVGResourceLinearGradient.cpp:
(WebCore::RenderSVGResourceLinearGradient::RenderSVGResourceLinearGradient):
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.cpp:
(WebCore::RenderSVGResourceMarker::RenderSVGResourceMarker):
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::RenderSVGResourceMasker):
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::RenderSVGResourcePattern):
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.cpp:
(WebCore::RenderSVGResourceRadialGradient::RenderSVGResourceRadialGradient):
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::RenderSVGRoot):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::RenderSVGShape):
* rendering/svg/RenderSVGShape.h:
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::RenderSVGText):
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTextPath.cpp:
(WebCore::RenderSVGTextPath::RenderSVGTextPath):
* rendering/svg/RenderSVGTextPath.h:
* rendering/svg/RenderSVGTransformableContainer.cpp:
(WebCore::RenderSVGTransformableContainer::RenderSVGTransformableContainer):
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.cpp:
(WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer):
* rendering/svg/RenderSVGViewportContainer.h:
* rendering/svg/SVGTextRunRenderingContext.h:
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
* style/StyleResolveForDocument.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::styleForElement):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::createElementRenderer):
* svg/SVGAElement.h:
* svg/SVGAltGlyphElement.cpp:
(WebCore::SVGAltGlyphElement::createElementRenderer):
* svg/SVGAltGlyphElement.h:
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::createElementRenderer):
* svg/SVGCircleElement.h:
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::createElementRenderer):
* svg/SVGClipPathElement.h:
* svg/SVGColor.h:
(WebCore::SVGColor::createFromString):
(WebCore::SVGColor::createFromColor):
(WebCore::SVGColor::createCurrentColor):
* svg/SVGDefsElement.cpp:
(WebCore::SVGDefsElement::createElementRenderer):
* svg/SVGDefsElement.h:
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::createElementRenderer):
* svg/SVGEllipseElement.h:
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::createElementRenderer):
* svg/SVGFilterElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::createElementRenderer):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontFaceNameElement.cpp:
(WebCore::SVGFontFaceNameElement::srcValue):
* svg/SVGFontFaceNameElement.h:
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::srcValue):
* svg/SVGFontFaceUriElement.h:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::createElementRenderer):
* svg/SVGForeignObjectElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::createElementRenderer):
* svg/SVGGElement.h:
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::createElementRenderer):
* svg/SVGGraphicsElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::createElementRenderer):
* svg/SVGImageElement.h:
* svg/SVGLength.cpp:
(WebCore::SVGLength::toCSSPrimitiveValue):
* svg/SVGLength.h:
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::createElementRenderer):
* svg/SVGLinearGradientElement.h:
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::createElementRenderer):
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::createElementRenderer):
* svg/SVGMaskElement.h:
* svg/SVGPaint.h:
(WebCore::SVGPaint::createUnknown):
(WebCore::SVGPaint::createNone):
(WebCore::SVGPaint::createCurrentColor):
(WebCore::SVGPaint::createColor):
(WebCore::SVGPaint::createURI):
(WebCore::SVGPaint::createURIAndColor):
(WebCore::SVGPaint::createURIAndNone):
(WebCore::SVGPaint::create):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::createElementRenderer):
* svg/SVGPathElement.h:
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::createElementRenderer):
* svg/SVGPatternElement.h:
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::createElementRenderer):
* svg/SVGRadialGradientElement.h:
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::createElementRenderer):
* svg/SVGRectElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::createElementRenderer):
* svg/SVGSVGElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::createElementRenderer):
* svg/SVGStopElement.h:
* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::createElementRenderer):
* svg/SVGSwitchElement.h:
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::createElementRenderer):
* svg/SVGSymbolElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefTargetEventListener::create):
(WebCore::SVGTRefElement::createElementRenderer):
* svg/SVGTRefElement.h:
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::createElementRenderer):
* svg/SVGTSpanElement.h:
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::createElementRenderer):
* svg/SVGTextElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::createElementRenderer):
* svg/SVGTextPathElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::createElementRenderer):
* svg/SVGUseElement.h:
2014-12-13 Zalan Bujtas <zalan@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=139597
rdar://problem/19237334
Fixed positioned pseudo content does not get composited.
Reviewed by Simon Fraser.
This patch ensures that adjustRenderStyle() can access to settings even when Element* is null.
Test: compositing/fixed-positioned-pseudo-content-no-compositing.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
2014-12-12 Mark Rowe <mrowe@apple.com>
[Mac] Work around a bug in dsymutil on older OS versions
<https://webkit.org/b/139609> / <rdar://problem/16045763>
Older versions of dsymutil are unable to write out more than 2GB of symbols per architecture.
WebCore has recently passed that threshold. To work around this we will reduce the level of
symbols included in the dSYM bundles on the affected OS versions.
Reviewed by Geoff Garen.
* Configurations/Base.xcconfig: Include line tables only in the debug symbols for production
builds on OS X 10.8 and 10.9.
* Configurations/DebugRelease.xcconfig: Include full symbols in debug and release builds since they
do not make use of dSYMs.
2014-12-12 Beth Dakin <bdakin@apple.com>
Need a fake mouse move after hiding data detectors UI
https://bugs.webkit.org/show_bug.cgi?id=139608
-and corresponding-
rdar://problem/19221935
Reviewed by Tim Horton.
* WebCore.exp.in:
2014-12-12 Dean Jackson <dino@apple.com>
[Media iOS] Inline video controls have an outlined scrubber
https://bugs.webkit.org/show_bug.cgi?id=139602
<rdar://problem/19184212>
Reviewed by Eric Carlson.
This is another change similar to https://bugs.webkit.org/show_bug.cgi?id=138378
where the specificity of pseduo elements had changed, and thus iOS
was inheriting some of the UA styles.
The fix is to add some more style rules to ensure that the timeline track
is drawn in white.
* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-timeline): Border rules not needed here.
(video::-webkit-media-controls-timeline::-webkit-slider-runnable-track): But are needed
here, along with some other things.
(audio::-webkit-media-controls-timeline::-webkit-slider-thumb): Now that the runnable
track has some style, we need to account for the change.
2014-12-12 Anders Carlsson <andersca@apple.com>
Remove a workaround for a bug that was fixed in Mountain Lion
https://bugs.webkit.org/show_bug.cgi?id=139605
Reviewed by Sam Weinig.
* WebCorePrefix.h:
(move): Deleted.
2014-12-12 Zalan Bujtas <zalan@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=139596
Subpixel rendering: REGRESSION (r163272): Fixed positioned pseudo content leaves trails while scrolling.
rdar://problem/18697851
Reviewed by Simon Fraser.
Final repaint rect at FrameView::scrollContentsFastPath needs to be pixel aligned (as opposed to snap to int).
However we can't pixelsnap it until after ScrollView finished transitioning to Float/LayoutRect.
Use enclosing int rect for now to ensure scrolling does not leave trails.
Unable to test. Apparently scrolling clears trails in dumprendertree. (repaint rects are not useful either with scrolling)
* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsFastPath):
2014-12-12 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r168217): Images are cropped out during animation at jetblue.com
https://bugs.webkit.org/show_bug.cgi?id=136410
Reviewed by Dean Jackson.
We were hitting the new assertion under Page::setPageScaleFactor(), which
calls recalcStyle(), so move the AnimationUpdateBlock from updateStyleIfNeeded()
to recalcStyle().
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::updateStyleIfNeeded):
2014-12-12 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r168217): Images are cropped out during animation at jetblue.com
https://bugs.webkit.org/show_bug.cgi?id=136410
rdar://problem/18188533
Reviewed by Dean Jackson.
During GraphicsLayer flushing, for tiled layers we can compute a visible rect using
the current state of an animation, which is obtained via the AnimationController.
If that animation was running in a subframe, AnimationController could use a stale
beginAnimationUpdateTime since no-one called its beginAnimationUpdate(). That
resulted in an incorrect computation of the visible rect, resulting in missing tiles.
There are two parts to this fix. First, add an assertion that beginAnimationUpdateTime()
is being called inside an animation update block. This required moving m_beginAnimationUpdateCount
into AnimationControllerPrivate, and changes to endAnimationUpdate().
The second is adding a AnimationUpdateBlock to getAnimatedStyleForRenderer(), which
can be called outside of style resolution. We also need some in other API functions.
Testing revealed that layout can call via layoutOverflowRectForPropagation(), suggesting
that we should have an animation batch inside FrameView::layout(). In addition, a single
resolveStyle/layout should use the same animationBeginTime, so we add a batch to
updateLayoutAndStyleIfNeededRecursive().
No test because it's timing-dependent. Existing tests exercise the new assertion.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computeRenderStyleForProperty):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
* page/animation/AnimationController.cpp:
(WebCore::AnimationPrivateUpdateBlock::AnimationPrivateUpdateBlock):
(WebCore::AnimationPrivateUpdateBlock::~AnimationPrivateUpdateBlock):
(WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
(WebCore::AnimationControllerPrivate::animationTimerFired):
(WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
(WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
(WebCore::AnimationControllerPrivate::beginAnimationUpdate):
(WebCore::AnimationControllerPrivate::endAnimationUpdate):
(WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
(WebCore::AnimationController::AnimationController):
(WebCore::AnimationController::notifyAnimationStarted):
(WebCore::AnimationController::pauseAnimationAtTime):
(WebCore::AnimationController::pauseTransitionAtTime):
(WebCore::AnimationController::resumeAnimationsForDocument):
(WebCore::AnimationController::startAnimationsIfNotSuspended):
(WebCore::AnimationController::beginAnimationUpdate):
(WebCore::AnimationController::endAnimationUpdate):
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
2014-12-12 Roger Fong <roger_fong@apple.com>
[Win] Unreviewed build fix following r177235.
* WebCore.vcxproj/WebCore.vcxproj:
2014-12-12 Roger Fong <roger_fong@apple.com>
Implement EXT_blend_minmax as a WebGL 1 extension.
https://bugs.webkit.org/show_bug.cgi?id=128974.
<rdar://problem/19195535>
Reviewed by Dean Jackson.
Tested by:
webgl/1.0.3/conformance/extensions/ext-blend-minmax.html
fast/canvas/webgl/constants.html
Specifications for this extension:
https://www.khronos.org/registry/webgl/extensions/EXT_blend_minmax/
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* html/canvas/EXTBlendMinMax.cpp: Added.
(WebCore::EXTBlendMinMax::EXTBlendMinMax):
(WebCore::EXTBlendMinMax::~EXTBlendMinMax):
(WebCore::EXTBlendMinMax::getName):
* html/canvas/EXTBlendMinMax.h: Added.
* html/canvas/EXTBlendMinMax.idl: Added.
* html/canvas/WebGLExtension.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
(WebCore::WebGLRenderingContext::validateBlendEquation):
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLRenderingContext.idl:
* platform/graphics/Extensions3D.h:
2014-12-12 Benjamin Poulain <bpoulain@apple.com>
Remove the concept of simple selector from the parser
https://bugs.webkit.org/show_bug.cgi?id=139575
Reviewed by Mark Lam.
We have complete support for nested selector list, we no longer
need the old concept of simple selector.
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::isSimple): Deleted.
* css/CSSParserValues.h:
2014-12-12 Antti Koivisto <antti@apple.com>
FontGlyphs::glyphDataAndPageForCharacter cleanups
https://bugs.webkit.org/show_bug.cgi?id=139584
Reviewed by Andreas Kling.
Split it up and use helper functions.
* WebCore.exp.in:
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::determinePitch):
(WebCore::FontGlyphs::realizeFontDataAt):
(WebCore::FontGlyphs::glyphDataAndPageForSystemFallback):
(WebCore::FontGlyphs::glyphDataAndPageForVariant):
Add private helpers.
(WebCore::FontGlyphs::glyphDataAndPageForCharacter):
Do the m_pages cache lookup only once and use the pointer reference afterwards.
* platform/graphics/FontGlyphs.h:
(WebCore::FontGlyphs::fontSelector):
(WebCore::FontGlyphs::widthCache):
(WebCore::FontGlyphs::primaryFontData):
(WebCore::FontGlyphs::isFixedPitch):
(WebCore::FontGlyphs::primarySimpleFontData):
Also removed the mutable attribute from the fields (almost everything was marked mutable) and made the inteface
non-const. The FontGlyphs member of Font is already mutable so this is not needed.
2014-12-12 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for StyleRuleBase subclasses
https://bugs.webkit.org/show_bug.cgi?id=139571
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for StyleRuleBase subclasses for safety and
consistency.
No new tests, no behavior change.
* css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::reattach):
* css/CSSKeyframesRule.h:
(isType):
* css/CSSPageRule.cpp:
(WebCore::CSSPageRule::reattach):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::reattach):
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::insertRule):
* css/RuleSet.cpp:
(WebCore::RuleSet::addRegionRule):
(WebCore::RuleSet::addChildRules):
* css/StyleInvalidationAnalysis.cpp:
(WebCore::shouldDirtyAllStyle):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy):
(WebCore::StyleRuleBase::createCSSOMWrapper):
* css/StyleRule.h:
(isType):
(WebCore::toStyleRule): Deleted.
* css/StyleRuleImport.h:
(isType):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parserAppendRule):
(WebCore::StyleSheetContents::wrapperInsertRule):
(WebCore::StyleSheetContents::addSubresourceStyleURLs):
(WebCore::childRulesHaveFailedOrCanceledSubresources):
* css/WebKitCSSViewportRule.cpp:
(WebCore::WebKitCSSViewportRule::reattach):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2014-12-12 Jer Noble <jer.noble@apple.com>
[MSE] Add support for SourceBuffer.mode.
https://bugs.webkit.org/show_bug.cgi?id=139265
Reviewed by Eric Carlson.
Support setting SourceBuffer's mode property, and add support for "sequence" mode. Prior
to this change, "segments" mode was implied.
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::addSourceBuffer):
(WebCore::MediaSource::regenerateActiveSourceBuffers):
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::segmentsKeyword):
(WebCore::SourceBuffer::sequenceKeyword):
(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::setTimestampOffset):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
(WebCore::SourceBuffer::setMode):
* Modules/mediasource/SourceBuffer.h:
* Modules/mediasource/SourceBuffer.idl:
2014-12-12 Radu Stavila <stavila@adobe.com>
[SVG Masking] Enable the use of <mask> elements for -webkit-mask-image
https://bugs.webkit.org/show_bug.cgi?id=139294
Reviewed by Simon Fraser.
This patch links together all parts required for the functionality which improves
the -webkit-mask-image property by allowing it to reference a <mask> element defined
in an inline or external SVG document.
Support for this new functionality has been added in a previous patch, under issue
https://bugs.webkit.org/show_bug.cgi?id=139092. A more detailed description of how
the new functionality works can be found in the ChangeLog for that commit.
The containsSVGDocument in ScrollView has been removed because it was added in the
previous patch but is no longer required.
Tests: css3/masking/mask-base64.html
css3/masking/mask-multiple-values.html
css3/masking/mask-svg-clipped-fragmentId.html
css3/masking/mask-svg-fragmentId.html
css3/masking/mask-svg-inline-fragmentId.html
css3/masking/mask-svg-inline-invalid-fragmentId.html
css3/masking/mask-svg-invalid-fragmentId.html
css3/masking/mask-svg-no-fragmentId-tiled.html
css3/masking/mask-svg-no-fragmentId.html
css3/masking/mask-svg-script-entire-svg-to-mask.html
css3/masking/mask-svg-script-mask-to-entire-svg.html
css3/masking/mask-svg-script-mask-to-none.html
css3/masking/mask-svg-script-mask-to-png.html
css3/masking/mask-svg-script-none-to-mask.html
css3/masking/mask-svg-script-none-to-png.html
css3/masking/mask-svg-script-png-to-mask.html
css3/masking/mask-svg-script-png-to-none.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parseFillProperty):
(WebCore::CSSParser::parseMaskImage):
* css/CSSParser.h:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustStyleForMaskImages):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::loadPendingSVGDocuments):
(WebCore::StyleResolver::createMaskImageOperations):
(WebCore::StyleResolver::loadPendingImages):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::MaskImagePropertyWrapper::MaskImagePropertyWrapper):
(WebCore::MaskImagePropertyWrapper::equals):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* platform/graphics/MaskImageOperation.cpp:
(WebCore::MaskImageOperation::~MaskImageOperation):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::maskClipRect):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateFillTileSize):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::~RenderElement):
(WebCore::RenderElement::updateFillImages):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/style/FillLayer.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setMaskImage):
* rendering/style/RenderStyle.h:
2014-12-12 Csaba Osztrogonác <ossy@webkit.org>
Fix the !ENABLE(SVG_FONTS) build after r177078
https://bugs.webkit.org/show_bug.cgi?id=139578
Reviewed by Martin Robinson.
* platform/graphics/cairo/FontCairo.cpp:
(WebCore::Font::dashesForIntersectionsWithRect):
2014-12-12 Zalan Bujtas <zalan@apple.com>
Simple line layout: Add 16bit support.
https://bugs.webkit.org/show_bug.cgi?id=139469
Reviewed by Antti Koivisto.
This patch adds the 16bit support to simple line layout.
Test: fast/inline/simple-line-layout-16bit-content.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::nextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
(WebCore::SimpleLineLayout::findNextNonWhitespace):
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::textWidth):
(WebCore::SimpleLineLayout::FlowContents::runWidth):
* rendering/SimpleLineLayoutFlowContents.h:
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):
2014-12-12 ChangSeok Oh <changseok.oh@collabora.com>
Implement MemoryPressureHandler for Linux system
https://bugs.webkit.org/show_bug.cgi?id=123532
Reviewed by Sergio Villar Senin.
This is an initial implementation to support MemoryPressureHandler for linux system.
The patch is based on Tomeu's last patch and improved on top of it.
Most of current linux distributions support cgroup, so that we use the memory.pressure_level
mechanism of cgroup to get notifications when an application reaches the 'low' memory
pressure level.
No new tests since no engine behavior changed.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::MemoryPressureHandler):
* platform/MemoryPressureHandler.h:
* platform/linux/MemoryPressureHandlerLinux.cpp: Added.
(WebCore::nextToken):
(WebCore::MemoryPressureHandler::~MemoryPressureHandler):
(WebCore::MemoryPressureHandler::waitForMemoryPressureEvent): run in a seperated thread
to listen 'low' level event.
(WebCore::MemoryPressureHandler::logErrorAndCloseFDs):
(WebCore::MemoryPressureHandler::install):
(WebCore::MemoryPressureHandler::uninstall):
(WebCore::MemoryPressureHandler::holdOffTimerFired):
(WebCore::MemoryPressureHandler::holdOff):
(WebCore::MemoryPressureHandler::respondToMemoryPressure):
(WebCore::MemoryPressureHandler::platformReleaseMemory):
(WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): read /proc/self/status
to get VM amount used by current process.
2014-12-12 Simon Fraser <simon.fraser@apple.com>
Layer borders on contentsLayers don't correctly toggle with the rest of the borders
https://bugs.webkit.org/show_bug.cgi?id=139570
rdar://problem/18007746
Reviewed by Tim Horton.
The "Show Debug Borders" toggle didn't cleanly remove layer borders from
content layers (image, video), nor did it deal with cloned layers (reflections).
Fix by making updateDebugBorder() update the layer borders on the contents
layer and cloned layers, moving some code around to avoid having colors
in more than one place. If the borders are hidden, send an invalid color
to PlatformCALayer::setBorderColor(), which now knows to remove the color
property on the layer (to avoid leaving transparent border color properties
on CALayers).
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::setLayerDebugBorder):
(WebCore::contentsLayerDebugBorderColor):
(WebCore::cloneLayerDebugBorderColor):
(WebCore::GraphicsLayerCA::updateDebugBorder):
(WebCore::GraphicsLayerCA::setDebugBorder):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::setBorderColor):
2014-12-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Crash when trying to inspect LocalStorage
https://bugs.webkit.org/show_bug.cgi?id=139573
Reviewed by Anders Carlsson.
Move away from PageGroup::localStorage and instead to StorageNamespaceProvider.
This matches what DOMWindow::localStorage does to get the StorageArea for a document.
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::findStorageArea):
2014-12-11 Simon Fraser <simon.fraser@apple.com>
Transform-style should not kill position:fixed
https://bugs.webkit.org/show_bug.cgi?id=138122
Reviewed by Dean Jackson.
Various bits of rendering code checked RenderObject::hasTransform() for various
reasons. Confusingly, this meant "has transform, or preserve-3d, or perspective".
This patch teases those behaviors apart to produce the following behavior:
1. "transform" acts as containing block for fixed position (no behavior change).
2. "transform" acts as containing block for absolute/relative position (no behavior change).
3. "perspective" does not act as containing block for fixed position (no behavior change).
4. "perspective" acts as containing block for absolute/relative position (no behavior change).
5. "preserve-3d" does not act as containing block for fixed position (behavior change).
6. "preserve-3d" acts as containing block for absolute/relative position. This is not a
behavior change, but seems like incorrect behavior (https://www.w3.org/Bugs/Public/show_bug.cgi?id=27566).
However, we may be forced to keep it for compatibility.
The gist of the change is to rename RenderObject::hasTransform() to RenderObject::hasTransformRelatedProperty(),
and add hasTransform() with the more restrictive meaning. All call sites of hasTransform() were examined
and fixed to produce the desired behaviors.
Tests: transforms/2d/perspective-not-fixed-container.html
transforms/2d/preserve3d-not-fixed-container.html
transforms/perspective-is-containing-block-for-absolute.html
transforms/preserve3d-is-containing-block-for-absolute.html
transforms/transform-is-containing-block-for-absolute.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computedTransform): Now we can just test hasTransform().
* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject): For now, this
can just use hasTransformRelatedProperty(), but if we change [6] above this will have
to change (as documented in the comment). Also FIXME comments about sharing code.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateFromStyle):
(WebCore::RenderBox::mapLocalToContainer): Can just use hasTransform() now.
(WebCore::RenderBox::pushMappingToContainer): Ditto.
(WebCore::RenderBox::mapAbsoluteToLocalPoint): Ditto.
(WebCore::RenderBox::layoutOverflowRectForPropagation): Ditto.
* rendering/RenderBox.h: All transform-related properties create RenderLayers.
* rendering/RenderBoxModelObject.h: Ditto.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange):
* rendering/RenderGeometryMap.cpp:
(WebCore::canMapBetweenRenderersViaLayers): Rename to clarify. We need to not map via
layers if we have a perspective (since we need to generate a perspective matrix). It's
OK with preserve-3d though.
(WebCore::RenderGeometryMap::pushMappingsToAncestor):
(WebCore::canMapBetweenRenderers): Deleted.
* rendering/RenderInline.cpp:
(WebCore::RenderInline::updateFromStyle):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateTransform): Can just check hasTransform().
(WebCore::RenderLayer::updateLayerPosition): Avoid calling parent() and enclosingPositionedAncestor() twice.
(WebCore::RenderLayer::perspectiveTransform): Do the fast bit check hasTransformRelatedProperty() first.
(WebCore::RenderLayer::perspectiveOrigin): Ditto.
(WebCore::isContainerForPositioned): This code has to now have different behavior for absolute and fixed
position. Changed it to call existing functions, rather than having a 3rd place that has to know about
containing block rules.
(WebCore::RenderLayer::enclosingAncestorForPosition): Call isContainerForPositioned() now.
(WebCore::accumulateOffsetTowardsAncestor): Call enclosingAncestorForPosition().
(WebCore::RenderLayer::createLocalTransformState):
(WebCore::RenderLayer::calculateClipRects):
(WebCore::isPositionedContainer): Deleted.
(WebCore::isFixedPositionedContainer): Deleted.
(WebCore::RenderLayer::enclosingPositionedAncestor): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleDidChange):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::shouldUseTransformFromContainer): Can just check hasTransform() now.
(WebCore::RenderObject::container):
* rendering/RenderObject.h:
(WebCore::RenderObject::hasTransformRelatedProperty):
(WebCore::RenderObject::hasTransform):
(WebCore::RenderObject::setHasTransformRelatedProperty):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
(WebCore::RenderObject::setHasTransform): Deleted.
* rendering/RenderTableRow.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer): nullptr goodness.
(WebCore::RenderView::pushMappingToContainer): Ditto.
(WebCore::RenderView::mapAbsoluteToLocalPoint): Ditto.
2014-12-11 Rich Tibbett <rich.tibbett@gmail.com>
[iOS] Normalize iOS DeviceOrientation beta/gamma per spec.
https://bugs.webkit.org/show_bug.cgi?id=137134
<radr://problem/9414459>
Reviewed by Benjamin Poulain.
Normalize DeviceOrientation beta and gamma on iOS to match the
conventions defined in the W3C DeviceOrientation Events specification.
beta values are returned in the range [-180, 180). gamma values are
returned in the range [-90, 90).
* platform/ios/WebCoreMotionManager.mm:
2014-12-11 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r177081.
https://bugs.webkit.org/show_bug.cgi?id=139569
broke iOS video playback (Requested by eric_carlson on
#webkit).
Reverted changeset:
"Fix iOS builders for 8.0"
https://bugs.webkit.org/show_bug.cgi?id=139495
http://trac.webkit.org/changeset/177081
2014-12-11 Roger Fong <roger_fong@apple.com>
Unreviewed. Fix to build fix in r177134.
* html/canvas/WebGLDrawBuffers.cpp: iOS should query the system for GL extension availability.
2014-12-10 Roger Fong <roger_fong@apple.com>
Implement frag depth as a WebGL 1 extension.
https://bugs.webkit.org/show_bug.cgi?id=133635.
<rdar://problem/19195381>
Reviewed by Dean Jackson.
Test:
webgl/1.0.3/conformance/extensions/ext-frag-depth.html
Spec for this extension outlined here:
http://www.khronos.org/registry/webgl/extensions/EXT_frag_depth/
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* html/canvas/EXTFragDepth.cpp: Added.
(WebCore::EXTFragDepth::EXTFragDepth):
(WebCore::EXTFragDepth::~EXTFragDepth):
(WebCore::EXTFragDepth::getName):
* html/canvas/EXTFragDepth.h: Added.
* html/canvas/EXTFragDepth.idl: Added.
* html/canvas/WebGLExtension.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
* html/canvas/WebGLRenderingContext.h:
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::supportsExtension):
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::ensureEnabled):
2014-12-11 Chris Dumez <cdumez@apple.com>
Optimize RenderElement::rendererForRootBackground() a bit
https://bugs.webkit.org/show_bug.cgi?id=139527
Reviewed by Andreas Kling.
Optimize RenderElement::rendererForRootBackground() a bit by not
calling Document::body(). We are only interested in the child element
with a <body> tag. However, Document::body() first checks if a
<frameset> child is present.
No new tests, no behavior change.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::rendererForRootBackground):
2014-12-11 Brendan Long <b.long@cablelabs.com>
Remove DataCue "text" attribute
https://bugs.webkit.org/show_bug.cgi?id=139461
Reviewed by Eric Carlson.
* html/track/DataCue.cpp:
* html/track/DataCue.h:
* html/track/DataCue.idl:
2014-12-11 Alexey Proskuryakov <ap@apple.com>
Initialize m_ownsGeneratedFile when decoding a FormDataElement
https://bugs.webkit.org/show_bug.cgi?id=139566
Reviewed by Tim Horton.
No tests, because it's random, and I couldn't reproduce an assertion failure in
controlled circumstances.
* platform/network/FormData.h: (WebCore::FormDataElement::decode): A newly created
FormDataElement by definition doesn't own the file.
2014-12-11 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2014-12-11 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
2014-12-11 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
2014-12-11 Timothy Horton <timothy_horton@apple.com>
Move the preview popover to WKImmediateActionController
https://bugs.webkit.org/show_bug.cgi?id=139560
<rdar://problem/19208291>
Reviewed by Beth Dakin.
* platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
Add some requisite SPI.
2014-12-11 Jer Noble <jer.noble@apple.com>
[Mac] Crash in -[WebVideoFullscreenHUDWindowController playing] in WK1 clients without FULLSCREEN_API enabled.
https://bugs.webkit.org/show_bug.cgi?id=139546
Reviewed by Eric Carlson.
Finish the work started by r173230 and rename mediaElement -> videoElement in WebVideoFullscreenHUDWindowController.
* platform/mac/WebVideoFullscreenHUDWindowController.h:
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController endScrubbing]):
(-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]):
(-[WebVideoFullscreenHUDWindowController currentTime]):
(-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
(-[WebVideoFullscreenHUDWindowController duration]):
(-[WebVideoFullscreenHUDWindowController decrementVolume]):
(-[WebVideoFullscreenHUDWindowController incrementVolume]):
(-[WebVideoFullscreenHUDWindowController volume]):
(-[WebVideoFullscreenHUDWindowController setVolume:]):
(-[WebVideoFullscreenHUDWindowController playing]):
(-[WebVideoFullscreenHUDWindowController setPlaying:]):
(-[WebVideoFullscreenHUDWindowController remainingTimeText]):
(-[WebVideoFullscreenHUDWindowController elapsedTimeText]):
(-[WebVideoFullscreenHUDWindowController rewind:]):
(-[WebVideoFullscreenHUDWindowController fastForward:]):
2014-12-11 Anders Carlsson <andersca@apple.com>
Fix iOS build.
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::syncDeleteAllOrigins):
2014-12-11 Anders Carlsson <andersca@apple.com>
Stop using SQLiteFileSystem in the storage code
https://bugs.webkit.org/show_bug.cgi?id=139549
Reviewed by Sam Weinig.
Just inline the SQLiteFileSystem calls into their respective call sites.
This is more preparation for moving the old storage code into WebKit proper.
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::deleteEmptyDatabase):
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::trackerDatabasePath):
(WebCore::ensureDatabaseFileExists):
(WebCore::StorageTracker::openTrackerDatabase):
(WebCore::truncateDatabaseFile):
(WebCore::StorageTracker::syncDeleteAllOrigins):
(WebCore::StorageTracker::syncDeleteOrigin):
(WebCore::StorageTracker::diskUsageForOrigin):
2014-12-11 Alexey Proskuryakov <ap@apple.com>
Unreviewed, rolling out r177155.
Caused crashes on webarchive tests.
Reverted changeset:
"[SVG Masking] Enable the use of <mask> elements for -webkit-
mask-image"
https://bugs.webkit.org/show_bug.cgi?id=139294
http://trac.webkit.org/changeset/177155
2014-12-11 Anders Carlsson <andersca@apple.com>
Call StorageThread::releaseFastMallocFreeMemoryInAllThreads from WebKit
https://bugs.webkit.org/show_bug.cgi?id=139547
Reviewed by Sam Weinig.
This is another step towards moving StorageThread (and friends) to WebKit.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseMemory):
2014-12-11 Said Abou-Hallawa <sabouhallawa@apple.com>
ASSERTION FAILED: animatedTypes[0].properties.size() == 1 in WebCore::SVGAnimatedTypeAnimator::constructFromBaseValue.
https://bugs.webkit.org/show_bug.cgi?id=139046.
Reviewed by Dirk Schulze.
Test: svg/animations/unsupported-animate-element-attributes.svg.
The SVG base animator element should not animate an attribute if it is not
supported by the target SVG element. Besides the CSS presentation attributes,
every SVG element defines which attributes can be animated by including them
between BEGIN_DECLARE_ANIMATED_PROPERTIES and END_DECLARE_ANIMATED_PROPERTIES
in the definition of the class. This definition builds attribute-properties map.
When restarting the animation, the animator looks for all the attributes that
match the animated attribute name. If the supported attribute-properties map
does not include the animated attribute name, an empty element-properties list
should be returned. When getting an empty element-properties list, the animator
should not start any animation for the unsupported attribute.
Do not start the animation if the animated attribute is not supported by
the target SVG element.
* svg/SVGAnimateElementBase.cpp:
(WebCore::SVGAnimateElementBase::resetAnimatedType):
Return an empty element-properties list if the animated attribute is not
supported by the target SVG element.
* svg/SVGAnimatedTypeAnimator.cpp:
(WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
2014-12-10 Dean Jackson <dino@apple.com>
InstancedArray crashes attempting to draw out of bounds
https://bugs.webkit.org/show_bug.cgi?id=139521
Reviewed by Simon Fraser.
We were not doing index validation correctly for instancing.
Test: fast/canvas/webgl/angle-instanced-arrays-out-of-bounds.html
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateVertexAttributes): We need to check
the number of instances drawn against the amount of instance data that has
been provided, taking into account the number of repeats (the divisor).
(WebCore::WebGLRenderingContext::drawArrays): Added some whitespace to make it more clear.
(WebCore::WebGLRenderingContext::validateDrawElements): This needs to take a primcount
parameter so that it can correctly validate the call (when used from drawElementsInstanced).
(WebCore::WebGLRenderingContext::drawElements): New signature to validate.
(WebCore::WebGLRenderingContext::drawArraysInstanced): Rearrange this a bit. The
primcount validation is already being done by the validateDrawArrays call. Also, there
was a bogus UNUSED_PARAM hanging around.
(WebCore::WebGLRenderingContext::drawElementsInstanced): Similar rearrangement. Use
the primcount parameter.
* html/canvas/WebGLRenderingContext.h:
2014-12-11 Radu Stavila <stavila@adobe.com>
[SVG Masking] Enable the use of <mask> elements for -webkit-mask-image
https://bugs.webkit.org/show_bug.cgi?id=139294
Reviewed by Simon Fraser.
This patch links together all parts required for the functionality which improves
the -webkit-mask-image property by allowing it to reference a <mask> element defined
in an inline or external SVG document.
Support for this new functionality has been added in a previous patch, under issue
https://bugs.webkit.org/show_bug.cgi?id=139092. A more detailed description of how
the new functionality works can be found in the ChangeLog for that commit.
The containsSVGDocument in ScrollView has been removed because it was added in the
previous patch but is no longer required.
Tests: css3/masking/mask-base64.html
css3/masking/mask-multiple-values.html
css3/masking/mask-svg-clipped-fragmentId.html
css3/masking/mask-svg-fragmentId.html
css3/masking/mask-svg-inline-fragmentId.html
css3/masking/mask-svg-inline-invalid-fragmentId.html
css3/masking/mask-svg-invalid-fragmentId.html
css3/masking/mask-svg-no-fragmentId-tiled.html
css3/masking/mask-svg-no-fragmentId.html
css3/masking/mask-svg-script-entire-svg-to-mask.html
css3/masking/mask-svg-script-mask-to-entire-svg.html
css3/masking/mask-svg-script-mask-to-none.html
css3/masking/mask-svg-script-mask-to-png.html
css3/masking/mask-svg-script-none-to-mask.html
css3/masking/mask-svg-script-none-to-png.html
css3/masking/mask-svg-script-png-to-mask.html
css3/masking/mask-svg-script-png-to-none.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parseFillProperty):
(WebCore::CSSParser::parseMaskImage):
* css/CSSParser.h:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustStyleForMaskImages):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::loadPendingSVGDocuments):
(WebCore::StyleResolver::createMaskImageOperations):
(WebCore::StyleResolver::loadPendingImages):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::MaskImagePropertyWrapper::MaskImagePropertyWrapper):
(WebCore::MaskImagePropertyWrapper::equals):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* platform/graphics/MaskImageOperation.cpp:
(WebCore::MaskImageOperation::~MaskImageOperation):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::maskClipRect):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateFillTileSize):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::~RenderElement):
(WebCore::RenderElement::updateFillImages):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/style/FillLayer.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setMaskImage):
* rendering/style/RenderStyle.h:
2014-12-09 Jeremy Jones <jeremyj@apple.com>
Restore interface state when stopping optimized fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=139465
Reviewed by Simon Fraser.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController fullscreenMayReturnToInline:]): add empty implementation.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h: add declaration
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::enterFullscreen): restore interface context when optimized mode ends.
(WebVideoFullscreenInterfaceAVKit::setIsOptimized): restore interface context when optimized mode ends.
2014-12-11 Anders Carlsson <andersca@apple.com>
Remove unused storage header includes
https://bugs.webkit.org/show_bug.cgi?id=139540
Reviewed by Antti Koivisto.
* storage/StorageAreaImpl.cpp:
* storage/StorageAreaSync.cpp:
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::localStorageNamespace): Deleted.
(WebCore::StorageNamespaceImpl::sessionStorageNamespace): Deleted.
(WebCore::StorageNamespaceImpl::transientLocalStorageNamespace): Deleted.
* storage/StorageNamespaceImpl.h:
* storage/StorageSyncManager.cpp:
* storage/StorageThread.cpp:
* storage/StorageTracker.cpp:
2014-12-11 Alexey Proskuryakov <ap@apple.com>
REGRESSION (Async Text Input): Text input method state is not reset when reloading a page
https://bugs.webkit.org/show_bug.cgi?id=139504
rdar://problem/19034674
Reviewed by Enrica Casucci.
Explicitly notify EditorClient when a composition is voluntarily canceled by WebCore.
These are almost certainly not all the places where this happens, but this fixes the bug,
and lays the groundwork for using this new client call instead of didChangeSelection
hacks.
* editing/Editor.cpp:
(WebCore::Editor::clear):
(WebCore::Editor::cancelComposition):
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::willTransitionToCommitted):
* page/EditorClient.h:
2014-12-10 Anders Carlsson <andersca@apple.com>
Get rid of the storage strategy
https://bugs.webkit.org/show_bug.cgi?id=139519
Reviewed by Antti Koivisto.
* CMakeLists.txt:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::localStorage):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
(WebCore::Page::sessionStorage):
(WebCore::Page::setStorageNamespaceProvider):
* page/Page.h:
(WebCore::Page::storageNamespaceProvider):
* page/PageGroup.cpp:
(WebCore::PageGroup::localStorage):
(WebCore::PageGroup::transientLocalStorage):
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::PlatformStrategies):
(WebCore::PlatformStrategies::storageStrategy): Deleted.
* storage/StorageNamespace.cpp: Removed.
* storage/StorageNamespace.h:
* storage/StorageStrategy.cpp: Removed.
* storage/StorageStrategy.h: Removed.
2014-12-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move click counter logic back to WebKitWebViewBase
https://bugs.webkit.org/show_bug.cgi?id=137685
Reviewed by Martin Robinson.
Remove GtkClickCounter.
* PlatformGTK.cmake:
* platform/gtk/GtkClickCounter.cpp: Removed.
* platform/gtk/GtkClickCounter.h: Removed.
2014-12-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Implement sizes attribute for link tag
https://bugs.webkit.org/show_bug.cgi?id=125775
Reviewed by Martin Robinson.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_link_element_set_sizes): Add custom setter implementation.
* bindings/gobject/WebKitDOMCustomUnstable.h:
* bindings/js/JSHTMLLinkElementCustom.cpp:
(WebCore::JSHTMLLinkElement::sizes): Remove custom getter implementation.
* bindings/scripts/CodeGeneratorGObject.pm:
(HasUnstableCustomAPI): Mark WebKitDOMHTMLLinkElement as having custom unstable API.
* html/HTMLLinkElement.idl: Mark sizes attribute as CustomSetter
instead of Custom, since the getter can be autogenerated, and make
it available to the GObject DOM bindings too.
2014-12-10 Chris Dumez <cdumez@apple.com>
http://omfgdogs.info/ only animates when you resize the window
https://bugs.webkit.org/show_bug.cgi?id=139435
<rdar://problem/19190493>
Reviewed by Simon Fraser.
After r163928, we would fail to animate a gif if:
- it is used as a background image of a 0-height html element
- it is used as a background image of a 0-height body element whose
background is delegated to the root (because the root has no
background).
This is because in such cases, shouldRepaintForImageAnimation()
should use the background rect instead of the renderer's overflow
rect to determine if the image is inside the viewport. Both cases
are addressed in this patch.
Tests: fast/images/animated-gif-body-delegated-background-image.html
fast/images/animated-gif-body-outside-viewport.html
fast/images/animated-gif-html-background-image.html
* rendering/RenderElement.cpp:
(WebCore::shouldRepaintForImageAnimation):
* testing/Internals.cpp:
(WebCore::Internals::hasPausedImageAnimations):
* testing/Internals.h:
* testing/Internals.idl:
2014-12-10 Timothy Horton <timothy_horton@apple.com>
Fix the build.
* html/canvas/WebGLDrawBuffers.cpp:
Yosemite is 101000, not 10100.
Also, __MAC_OS_X_VERSION_MIN_REQUIRED is only defined for PLATFORM(MAC).
2014-12-10 Zalan Bujtas <zalan@apple.com>
Continuously repainting large parts of Huffington Post.
https://bugs.webkit.org/show_bug.cgi?id=139468
Reviewed by Antti Koivisto.
This patch eliminates redundant repaint requests for inlines when neither the parent
block flow nor any of the inline children are dirty.
Previously,
1. simple line layout always recalculated inline content positions regardless of whether
the content needed relayout at all; as a result, it always triggered full repaint.
2. inline tree layout ignored the needslayout flag on the last line and treated it dirty
(unless it broke cleanly (<div>foo<br></div>)).
This was an ancient workaround for an editing/insert use case, but it seems not to be the case anymore.
Tests: fast/repaint/implicitly-positioned-block-repaint-complex-line-layout.html
fast/repaint/implicitly-positioned-block-repaint-simple-line-layout.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::layoutSimpleLines): Check if we need to trigger layout at all.
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::determineStartPosition): Remove the last line dirty hack. If it
happens to introduce regression, we should fix it at the caller site to make the line dirty.
2014-12-10 Anders Carlsson <andersca@apple.com>
Add an empty storage namespace provider
https://bugs.webkit.org/show_bug.cgi?id=139520
Reviewed by Tim Horton.
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
2014-12-10 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
2014-12-10 Beth Dakin <bdakin@apple.com>
WK2: Add initial support for immediate actions
https://bugs.webkit.org/show_bug.cgi?id=139511
Reviewed by Tim Horton.
SPI needed for immediate actions.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h: Added.
2014-12-10 Martin Hock <mhock@apple.com>
[iOS] Add setting to ignore viewport scaling constraints
https://bugs.webkit.org/show_bug.cgi?id=139466
<rdar://problem/19200328>
Reviewed by Benjamin Poulain.
* WebCore.exp.in:
* page/Settings.in: Add setting to ignore viewport scaling constraints.
* page/ViewportConfiguration.cpp: Ignore viewport scaling constraints based on preference.
(WebCore::ViewportConfiguration::initialScale):
(WebCore::ViewportConfiguration::minimumScale):
(WebCore::ViewportConfiguration::allowsUserScaling):
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::setIgnoreScalingConstraints):
(WebCore::ViewportConfiguration::allowsUserScaling): Moved to cpp.
2014-12-10 Andreas Kling <akling@apple.com>
Speculative fix for assertion "frame().view() == this"
<rdar://problem/18419449>
Rubber-stamped by Anders Carlsson.
I have not reproduced this issue, but we can safely ignore animation
notifications for cached pages.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::newImageAnimationFrameAvailable):
2014-12-10 Anders Carlsson <andersca@apple.com>
Add session storage handling to StorageNamespaceProvider
https://bugs.webkit.org/show_bug.cgi?id=139507
Reviewed by Tim Horton.
* page/Page.cpp:
(WebCore::Page::sessionStorage):
* storage/StorageNamespaceProvider.h:
2014-12-10 Roger Fong <roger_fong@apple.com>
Unreviewed. Follow-up patch to r177099.
https://bugs.webkit.org/show_bug.cgi?id=133634
<rdar://problem/15949588>
Enable GL_EXT_draw_buffers on iOS as well.
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::supportsExtension):
2014-12-10 Roger Fong <roger_fong@apple.com>
Implement Multiple Render Targets as WebGL 1 extension.
https://bugs.webkit.org/show_bug.cgi?id=133634.
<rdar://problem/15949588>
Reviewed by Brent Fulgham.
Tested by:
webgl/1.0.3/conformance/extensions/webgl-draw-buffers.html
Enable the implementation now that an underlying driver bug has been resolved.
Do not enable for desktop platforms older that OS X 10.10.
* html/canvas/WebGLDrawBuffers.cpp:
(WebCore::WebGLDrawBuffers::supported):
2014-12-10 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r164329): Input fields are not honoring the maxlength attribute
https://bugs.webkit.org/show_bug.cgi?id=139447
Reviewed by Benjamin Poulain.
The bug was caused by String::substring being called with the selection's end offset
in the second argument instead of the selection's length in handleBeforeTextInsertedEvent.
Fixed the bug by passing the right second argument to String::substring.
Test: fast/forms/input-maxlength-inserting-in-middle.html
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
2014-12-10 Anders Carlsson <andersca@apple.com>
Add a missing null check.
* page/Page.cpp:
(WebCore::Page::~Page):
2014-12-10 Antti Koivisto <antti@apple.com>
Crash when creating CSSCalcBinaryOperation
https://bugs.webkit.org/show_bug.cgi?id=134886
rdar://problem/17663561
Reviewed by Chris Dumez.
Test: fast/css/calc-binary-operation-crash.html
* css/CSSCalculationValue.cpp:
(WebCore::determineCategory):
Ensure that both axis are within the addSubtractResult table.
Remove unneeded CalcOther test. The call site guarantees it doesn't happen and the normal cases would handle it anyway.
Also strengthen some asserts.
2014-12-10 Anders Carlsson <andersca@apple.com>
Add WebStorageNamespaceProvider::closeLocalStorage
https://bugs.webkit.org/show_bug.cgi?id=139502
Reviewed by Tim Horton.
* page/Page.cpp:
(WebCore::Page::~Page):
Call StorageNamespaceProvider::removePage.
* storage/StorageNamespaceProvider.h:
(WebCore::StorageNamespaceProvider::optionalLocalStorageNamespace):
Helper function that returns the local storage namespace if one exists.
2014-12-10 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] MathML tokens with text fail to expose their text content via AtkText
https://bugs.webkit.org/show_bug.cgi?id=139454
Reviewed by Chris Fleizach.
Expose the text content of the element for non-anonymous RenderMathMLOperators.
This is needed because for ATK we expose the rendered element itself; not the
descendant text renderers. Also include MathML tokens as objects which should
implement AtkText.
Test: accessibility/math-text.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):
2014-12-10 Sebastian Dröge <sebastian@centricular.com>
[GStreamer] Use appsrcs instead of unconnected queues
https://bugs.webkit.org/show_bug.cgi?id=139490
Reviewed by Philippe Normand.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webkit_web_audio_src_init):
(webKitWebAudioSrcConstructed):
(webKitWebAudioSrcFinalize):
(webKitWebAudioSrcSetProperty):
(webKitWebAudioSrcLoop):
(webKitWebAudioSrcChangeState):
Previously we directly chained buffers into unconnected queues,
which confused some code inside GStreamer and caused some harmless
warnings. Now we use appsrcs instead, which also allows us to remove
quite some code.
2014-12-10 Enrica Casucci <enrica@apple.com>
Fix iOS builders for 8.0
https://bugs.webkit.org/show_bug.cgi?id=139495
Reviewed by Eric Carlson.
* WebCore.exp.in:
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController enterFullscreen:mode:]):
(-[WebVideoFullscreenController requestHideAndExitFullscreen]):
(-[WebVideoFullscreenController enterFullscreen:]): Deleted.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2014-12-10 peavo@outlook.com <peavo@outlook.com>
[Curl] Cache entry is sometimes deleted when request receives a not modified response.
https://bugs.webkit.org/show_bug.cgi?id=139339
Reviewed by Alex Christensen.
Sometimes it happens that a request receives a not modified response,
but the cache entry has already been deleted by another request.
This can be avoided by locking a cache entry while there are pending
requests for the cache entry's url.
* platform/network/curl/CurlCacheEntry.h:
(WebCore::CurlCacheEntry::addClient):
(WebCore::CurlCacheEntry::removeClient):
(WebCore::CurlCacheEntry::hasClients):
* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::didReceiveResponse):
(WebCore::CurlCacheManager::didFail):
(WebCore::CurlCacheManager::addCacheEntryClient):
(WebCore::CurlCacheManager::removeCacheEntryClient):
* platform/network/curl/CurlCacheManager.h:
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::isHttpNotModified):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::initializeHandle):
2014-12-10 Sebastian Dröge <sebastian@centricular.com>
[GStreamer] Use a buffer pool for allocations in the AudioDestination
https://bugs.webkit.org/show_bug.cgi?id=139487
Reviewed by Philippe Normand.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcLoop):
(webKitWebAudioSrcChangeState):
Use a buffer pool for the allocations instead of allocating a
new small buffer for every 128 samples we produce.
2014-12-10 Martin Robinson <mrobinson@igalia.com>
[GTK] Add support for text-decoration-skip
https://bugs.webkit.org/show_bug.cgi?id=131540
Reviewed by Gustavo Noronha Silva.
No new tests. This is covered by existing layout tests.
* platform/graphics/cairo/FontCairo.cpp:
(WebCore::GlyphIterationState): Added this class, a modified version of the Mac
port's implementation.
(WebCore::Font::dashesForIntersectionsWithRect): Ditto.
* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
(WebCore::Font::getGlyphsAndAdvancesForComplexText): Added an implementation for
HarfBuzz that just fills out the GlyphBuffer, but does not render it.
(WebCore::Font::drawComplexText): Use the new getGlyphsAndAdvancesForComplexText
in a similar way to the Mac port.
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun): We need to pass the current
character index to GlyphBuffer:add since it's used by dashesForIntersectionsWithRect
and otherwise it will be uninitialized when we try to access it.
2014-12-10 Andreas Kling <akling@apple.com>
REGRESSION(r177048) 11 failures on layout tests fast/selectors.
<https://webkit.org/b/139483>
Unreviewed fix for bots.
When rolling out the broken change, I accidentally also rolled out
a bug fix that Benjamin had made to sibling invalidation.
Restore his implementation of nodeOrItsAncestorNeedsStyleRecalc().
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::nodeOrItsAncestorNeedsStyleRecalc):
(WebCore::updateStyleIfNeededForNode):
(WebCore::ComputedStyleExtractor::propertyValue):
2014-12-08 Philippe Normand <pnormand@igalia.com>
[GStreamer] AudioSourceProvider support in the MediaPlayer
https://bugs.webkit.org/show_bug.cgi?id=78883
Reviewed by Gustavo Noronha Silva.
GStreamer-based audio source provider for the GTK and EFL
ports. This new component gathers decoded raw audio data from the
MediaPlayer and pipes it to an AudioBus when required by the
User Agent.
* PlatformEfl.cmake: New files in the build.
* PlatformGTK.cmake: Ditto.
* platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp: Added.
(WebCore::onAppsinkNewBufferCallback): Function called when a new
buffer can be pulled from appsink.
(WebCore::onGStreamerDeinterleavePadAddedCallback): Function
called when a new source pad has been added to deinterleave.
(WebCore::onGStreamerDeinterleaveReadyCallback): Function called
when the deinterleave element completed the configuration of all
its source pads.
(WebCore::copyGstreamerBuffersToAudioChannel): Called for each
channel of the AudioBus that needs data as input.
(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
Create an audio bin that by default routes buffers only to
autoaudiosink. A new route is added if the provider has a client.
(WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer):
Clean buffer adapters and audio bin.
(WebCore::AudioSourceProviderGStreamer::configureAudioBin):
(WebCore::AudioSourceProviderGStreamer::provideInput): Transfer
data from the buffer adapters to the bus channels.
(WebCore::AudioSourceProviderGStreamer::handleAudioBuffer): Pull a
buffer from appsink and queue it to the buffer adapter.
(WebCore::AudioSourceProviderGStreamer::setClient): Complete the
construction of the audio bin by adding a new chain to the tee
element. This new chain will deinterleave the buffer stream to
planar audio channels and route them to an appsink per channel for
data extraction.
(WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):
A new appsink after a new source pad has been added to deinterleave.
(WebCore::AudioSourceProviderGStreamer::deinterleavePadsConfigured):
Configure the client Node format (number of channels and sample
rate) once the provider knows how many audio channels are managed
by the pipeline.
(WebCore::cleanUpElementsAfterDeinterleaveSourcePadCallback):
(WebCore::AudioSourceProviderGStreamer::cleanUpElementsAfterDeinterleaveSourcePad):
Remove the elements after the given deinterleave source pad.
(WebCore::AudioSourceProviderGStreamer::reset): Cleanup the
deinterleave source pads. This is especially needed before the
whole pipeline goes to NULL and later on prerolls again.
* platform/audio/gstreamer/AudioSourceProviderGStreamer.h: Added.
(WebCore::AudioSourceProviderGStreamer::create): Use this to
create the provider and get an OwnPtr of it.
(WebCore::AudioSourceProviderGStreamer::client): Provider client getter.
(WebCore::AudioSourceProviderGStreamer::getAudioBin): Audio bin
getter, used by the media player to configure its
playbin::audio-sink property.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
Provider life cycle management and reset the audio provider before
going to NULL.
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::cancelLoad): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::didEnd): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink): Configure
the audio source provider if needed.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(WebCore::MediaPlayerPrivateGStreamer::audioSourceProvider):
Provider getter, used by MediaPlayer and MediaElement.
2014-12-09 Myles C. Maxfield <mmaxfield@apple.com>
Scrolling to anchor tags does nothing in vertical-rl writing mode
https://bugs.webkit.org/show_bug.cgi?id=137838
Reviewed by David Hyatt.
Scroll to a particular tag, and make sure the viewport is rendered as expected.
Tests: fast/events/scroll-to-anchor-vertical-lr-writing-mode.html
fast/events/scroll-to-anchor-vertical-writing-mode-contained-2.html
fast/events/scroll-to-anchor-vertical-writing-mode-contained.html
fast/events/scroll-to-anchor-vertical-writing-mode.html
* page/FrameView.cpp:
(WebCore::FrameView::scrollToAnchor):
* rendering/ScrollBehavior.cpp:
* rendering/ScrollBehavior.h:
2014-12-09 Bem Jones-Bey <bjonesbe@adobe.com>
REGRESSION(r155906): Page content disappears on Tuaw article after loading
https://bugs.webkit.org/show_bug.cgi?id=138100
Reviewed by Simon Fraser.
Test: ManualTests/float-layer-not-painting.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::insertFloatingObject): If a layout happens,
it can change whether the float's renderer has a self painting layer.
So in that case, we need to update the flag on the FloatingObject
instance for that float.
2014-12-09 Andreas Kling <akling@apple.com>
Roll out r165076.
<rdar://problem/18490587>
This change broke selection when editing Confluence wiki pages.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::nodeOrItsAncestorNeedsStyleRecalc):
(WebCore::ComputedStyleExtractor::propertyValue):
* dom/Document.cpp:
(WebCore::nodeOrItsAncestorNeedsStyleRecalc): Deleted.
(WebCore::Document::updateStyleIfNeededForNode): Deleted.
* dom/Document.h:
* editing/htmlediting.cpp:
(WebCore::isEditablePosition):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::forwardEvent):
2014-12-09 Myles C. Maxfield <mmaxfield@apple.com>
Fix iOS build after r177035.
Unreviewed.
I accidentally added my line to WebCore.exp.in inside an
#IF PLATFORM(MAC) block.
* WebCore.exp.in:
2014-12-09 Jeremy Jones <jeremyj@apple.com>
Enable automatic optimized fullscreen mode.
https://bugs.webkit.org/show_bug.cgi?id=139437
Reviewed by Eric Carlson.
Anticipate transition to optimized video fullscreen mode when entering background.
* WebCore.exp.in:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::overrideBackgroundPlaybackRestriction): Add logic for automatic transition detection.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoOptimized): Add logic for automatic transition detection.
2014-12-09 Myles C. Maxfield <mmaxfield@apple.com>
Delete Node::boundingBox()
https://bugs.webkit.org/show_bug.cgi?id=139333
Conceptually, boundingBox() should be on RenderInline. In addition,
Node::boundingBox() is completely broken for inline elements: it
makes a rect from the top left of the first inline child to the
bottom right of the last inline child, disregarding the intermediate
inline children. This breaks with vertical text and with line
breaks.
What makes this problem worse is that some functions actually rely
on this bad behavior. These functions are functions that use the
Node's so-called "bounding box" to scroll to an anchor tag.
This patch goes through all the call sites of Node::boundingBox(),
and segregates them into calls that expect the true bounding box
and calls that need this false bounding box. This patch then moves
this false bounding box into RenderElement, using the name
anchorRect(). Callers what want the correct bounding box have been
updated to use RenderElement::absoluteBoundingBoxRect().
Reviewed by Zalan Bujtas.
No new tests because there should be no behavior change.
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySliderThumb::elementRect): Use
RenderObject::absoluteBoundingBoxRect()
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getUpperLeftCorner): Deleted.
(WebCore::ContainerNode::getLowerRightCorner): Deleted.
(WebCore::ContainerNode::boundingBox): Deleted.
* dom/ContainerNode.h:
* dom/Element.cpp:
(WebCore::Element::scrollIntoView): Use RenderElement::anchorRect().
(WebCore::Element::scrollIntoViewIfNeeded): Ditto.
(WebCore::Element::updateFocusAppearance): Ditto.
* dom/Node.cpp:
(WebCore::Node::boundingBox): Deleted.
* dom/Node.h:
(WebCore::Node::pixelSnappedBoundingBox): Deleted.
* html/ColorInputType.cpp:
(WebCore::ColorInputType::elementRectRelativeToRootView): Use
RenderObject::absoluteBoundingBoxRect()
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::buildBubbleTree): Ditto.
* page/FrameView.cpp:
(WebCore::FrameView::scrollElementToRect): Use
RenderElement::anchorRect().
(WebCore::FrameView::scrollToAnchor): Ditto.
* page/SpatialNavigation.cpp:
(WebCore::nodeRectInAbsoluteCoordinates): Use
RenderObject::absoluteBoundingBoxRect()
* rendering/RenderElement.cpp:
(WebCore::RenderElement::getUpperLeftCorner): Moved from ContainerNode.
(WebCore::RenderElement::getLowerRightCorner): Moved from
ContainerNode.
(WebCore::RenderElement::anchorRect): Moved from ContainerNode.
* rendering/RenderObject.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::topOfFirstText): Helper for
RenderElement::anchorRect()
* rendering/RenderText.h:
2014-12-09 Antti Koivisto <antti@apple.com>
REGRESSION (r173272): When open PDF from Safari in iBooks, title is replaced to “QuickLookPDF-s72DbgAU-1”
https://bugs.webkit.org/show_bug.cgi?id=139453
rdar://problem/19052192
Reviewed by Pratik Solanki.
Pulling the suggested filename from the platform response returned null string on USE(CFNETWORK) code path
if it was the first thing needed from it.
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformSuggestedFilename): Use the lazy accessor.
2014-12-09 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] MathML tokens, tables, and row-like elements are exposed with ATK_ROLE_UNKNOWN
https://bugs.webkit.org/show_bug.cgi?id=139402
Reviewed by Chris Fleizach.
Expose tables and their children using existing table AtkRole types,
token elements using the new ATK_ROLE_STATIC, and row-like elements
using ATK_ROLE_PANEL. Also expose <mlabeledtr> as a math table row
and <ms> as math text.
No new tests; instead, added MathML elements to roles-exposed.html.
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isMathToken):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isMathToken):
(WebCore::AccessibilityRenderObject::isMathText):
(WebCore::AccessibilityRenderObject::isMathTableRow):
* accessibility/AccessibilityRenderObject.h:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* css/mathml.css:
(ms, mi, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose):
(mi, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose): Deleted.
* mathml/mathtags.in:
2014-12-09 Dean Jackson <dino@apple.com>
[Apple] Use Accelerate framework to speed-up FEGaussianBlur
https://bugs.webkit.org/show_bug.cgi?id=139310
Unreviewed followup, after comments by Andreas Kling.
It was pointed out that we already have a USE(ACCELERATE), so
we don't need a HAVE(ACCELERATE) :)
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplyGeneric):
(WebCore::FEGaussianBlur::platformApply):
2014-12-09 Alberto Garcia <berto@igalia.com>
Unreviewed. Style fix following r177019.
Use nullptr instead of 0.
* bindings/gobject/ConvertToUTF8String.cpp:
(convertToUTF8String):
2014-12-09 Javier Fernandez <jfernandez@igalia.com>
Refactor of rebuildFloatingObjectSetFromIntrudingFloats function after r176957.
https://bugs.webkit.org/show_bug.cgi?id=139445
Reviewed by Darin Adler.
The function rebuildFloatingObjectSetFromIntrudingFloats would be clearer if
we use a helper function to locate the previous sibling with overhanging floats.
These changes has been suggested as part of the patch review for bug #139150, which
landed in r176957.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::avoidsFloats):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::previousSiblingWithOverhangingFloats):
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.h:
(WebCore::RenderBox::isGridItem):
2014-12-09 Alberto Garcia <berto@igalia.com>
convertToUTF8String converts null string to empty string
https://bugs.webkit.org/show_bug.cgi?id=133904
Reviewed by Carlos Garcia Campos.
Test added to Tools/TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp
Return 0 if the string is null.
* bindings/gobject/ConvertToUTF8String.cpp:
(convertToUTF8String):
2014-12-09 Jeremy Jones <jeremyj@apple.com>
When invalidating fullscreen, cancel instead of stop optimizedFullscfreen.
https://bugs.webkit.org/show_bug.cgi?id=139145
Reviewed by Eric Carlson.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::invalidate): call cancel instead of stop
* platform/spi/ios/AVKitSPI.h: add -cancelOptimizedFullscreen.
2014-12-09 Alberto Garcia <berto@igalia.com>
[Media][GTK][EFL] Reduce style updates (painting) in controls
https://bugs.webkit.org/show_bug.cgi?id=137773
Reviewed by Carlos Garcia Campos.
Don't update media controls if they are not visible, and
initialize slider to a zero value.
* Modules/mediacontrols/mediaControlsBase.js:
(Controller.prototype.createControls):
(Controller.prototype.handleDurationChange):
(Controller.prototype.updateProgress):
(Controller.prototype.updateTime):
* Modules/mediacontrols/mediaControlsGtk.js:
(ControllerGtk.prototype.updateTime):
2014-12-09 Sebastian Dröge <sebastian@centricular.com>
[GStreamer] Add video/mp2t as alternative mimetype for MPEG TS
https://bugs.webkit.org/show_bug.cgi?id=139433
Reviewed by Philippe Normand.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mimeTypeCache):
It's used e.g. on http://www.jwplayer.com/html5/mediasource/ .
2014-12-09 Jeremy Jones <jeremyj@apple.com>
Enable activating optimized fullscreen mode from standard fulscreen mode.
https://bugs.webkit.org/show_bug.cgi?id=139137
Reviewed by Jer Noble.
Going from standard fullscreen mode to optimized fullscreen mode requires the ability to
update the fullscreen mode in HTMLMediaElement and a new standard-and-optimized-fullscreen mode.
This change KVO observes AVKit's optimizedFullscreenActive and forwards the change down to HTMLMediaElement so it can adjust behavior appropriately.
It also hides the standard fullscreen window when going into this mode.
When exiting fullscreen from standard-and-optimized, first exit fullscreen immediately, then stopOptimizedFullscreen, and notify of completion when
optimizedFullscreen goes inactive.
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::fullscreenMode):
Treat VideoFullscreenModeStandardAndOptimized as a kind of optimized mode.
* WebCore.exp.in: New export for WebVideoFullscreenModelVideoElement::fullscreenModeChanged
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::displayType):
Treat VideoFullscreenModeStandardAndOptimized as a kind of optimized mode.
* html/HTMLMediaElement.h: Add new fullscreen mode.
(WebCore::HTMLMediaElement::fullscreenModeChanged): Update fullscreen mode so it does optimized fullscreen mode behaviors when applicable.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h: Declare setOptimizedActive
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVVideoLayer setPlayerViewController:]): observe optimizedFullscreenActive
(-[WebAVVideoLayer observeValueForKeyPath:ofObject:change:context:]): respond to changes to optimizedFullscreenActive
(WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit): Init members.
(WebVideoFullscreenInterfaceAVKit::playerController):
Give player controller a reference to the WebVideoFullscreenInterface so it can pass along mode change state.
(WebVideoFullscreenInterfaceAVKit::enterFullscreen): Handle new fullscreen modes.
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): ditto
(WebVideoFullscreenInterfaceAVKit::invalidate): ditto
(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
(WebVideoFullscreenInterfaceAVKit::setOptimizedActive): Handle changes to fullscreen mode.
Also handle the case that exiting fullscreen happend when optimized mode ends.
* platform/ios/WebVideoFullscreenModel.h: declare fullscreenModeChanged()
* platform/ios/WebVideoFullscreenModelVideoElement.h: declare fullscreenModeChanged()
* platform/ios/WebVideoFullscreenModelVideoElement.mm: add fullscreenModeChanged()
(WebVideoFullscreenModelVideoElement::WebVideoFullscreenModelVideoElement): Init members.
(WebVideoFullscreenModelVideoElement::fullscreenModeChanged): Added. Update video element fullscreen mode.
2014-12-08 Benjamin Poulain <bpoulain@apple.com>
Fix the iOS build after r177002
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::supportsExtension):
2014-12-07 Roger Fong <roger_fong@apple.com>
Implementation EXT_sRGB as a WebGL1 extension.
https://bugs.webkit.org/show_bug.cgi?id=109332.
<rdar://problem/17363470>
Reviewed by Dean Jackson.
Tested by:
webgl/1.0.3/conformance/webgl/ext-sRGB.html
fast/canvas/webgl/constants.html
This patch implements the SRGB extension for WebGL1.
Details of the extension specification are outlined here:
https://www.khronos.org/registry/webgl/extensions/EXT_sRGB/
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* html/canvas/EXTsRGB.cpp: Added.
(WebCore::EXTsRGB::EXTsRGB):
(WebCore::EXTsRGB::~EXTsRGB):
(WebCore::EXTsRGB::getName):
* html/canvas/EXTsRGB.h: Added.
* html/canvas/EXTsRGB.idl: Added.
* html/canvas/WebGLExtension.h:
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::checkStatus):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
(WebCore::WebGLRenderingContext::renderbufferStorage):
(WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLRenderingContext.idl:
* platform/graphics/Extensions3D.h:
* platform/graphics/GraphicsContext3D.cpp:
(WebCore::GraphicsContext3D::computeFormatAndTypeParameters):
(WebCore::GraphicsContext3D::getClearBitsByFormat):
(WebCore::GraphicsContext3D::getChannelBitsByFormat):
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::supportsExtension):
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::texImage2D):
2014-12-08 Dean Jackson <dino@apple.com>
[Apple] Use Accelerate framework to speed-up FEGaussianBlur
https://bugs.webkit.org/show_bug.cgi?id=139310
<rdar://problem/18434594>
Reviewed by Simon Fraser.
Using Apple's Accelerate framework provides faster blurs
than the parallel jobs approach, especially since r168577
which started performing retina-accurate filters.
Using Accelerate.framework to replace the existing box blur (what
we use to approximate Gaussian blurs) gets about a 20% speedup on
desktop class machines, but between a 2x-6x speedup on iOS hardware.
Obviously this depends on the size of the content being blurred,
but it is still good.
The change is to intercept the platformApply function on
FEGaussianBlur and send it off to Accelerate.
There is an interactive performance test: PerformanceTests/Interactive/blur-filter-timing.html
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::kernelPosition): Move this to a file static function from the .h.
(WebCore::accelerateBoxBlur): The Accelerate implementation.
(WebCore::standardBoxBlur): The default generic/standard implementation.
(WebCore::FEGaussianBlur::platformApplyGeneric): Use accelerate or the default form.
(WebCore::FEGaussianBlur::platformApply): Don't try the parallelJobs approach if Accelerate is available.
* platform/graphics/filters/FEGaussianBlur.h:
(WebCore::FEGaussianBlur::kernelPosition): Deleted. Move into the .cpp.
2014-12-08 Beth Dakin <bdakin@apple.com>
Copy and Lookup menu items should be disabled when something is not copyable
https://bugs.webkit.org/show_bug.cgi?id=139423
Reviewed by Tim Horton.
New function allowCopy() indicates whether the HitTestResult would allow itself to
be copied onto the pasteboard.
* WebCore.exp.in:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::allowsCopy):
* rendering/HitTestResult.h:
2014-12-08 Chris Dumez <cdumez@apple.com>
Move 'text-shadow' check from RenderStyle::changeRequiresLayout() to changeAffectsVisualOverflow()
https://bugs.webkit.org/show_bug.cgi?id=139420
Reviewed by Simon Fraser.
Move 'text-shadow' check from RenderStyle::changeRequiresLayout() to
changeAffectsVisualOverflow(). This has no behavior change as
changeRequiresLayout() calls changeAffectsVisualOverflow(). However,
this is clearer as text-shadow affects the visual overflow (similarly
to box-shadow).
No new tests, no behavior change.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeAffectsVisualOverflow):
(WebCore::RenderStyle::changeRequiresLayout):
2014-12-08 Anders Carlsson <andersca@apple.com>
Fix typo.
* storage/StorageNamespaceImpl.cpp:
(WebCore::localStorageNamespaceMap):
2014-12-08 Anders Carlsson <andersca@apple.com>
WebStorageNamespaceProvider should create StorageNamespaceImpls
https://bugs.webkit.org/show_bug.cgi?id=139419
Reviewed by Andreas Kling.
* WebCore.exp.in:
Export new symbols.
* WebCore.xcodeproj/project.pbxproj:
Make StorageNamespaceImpl.h a private header.
* storage/StorageNamespaceImpl.cpp:
(WebCore::localStorageNamespaceMap):
Use NeverDestroyed.
(WebCore::StorageNamespaceImpl::createSessionStorageNamespace):
(WebCore::StorageNamespaceImpl::getOrCreateLocalStorageNamespace):
Add new functions for creating namespaces.
(WebCore::StorageNamespaceImpl::localStorageNamespace):
(WebCore::StorageNamespaceImpl::sessionStorageNamespace):
Call the new functions.
* storage/StorageNamespaceImpl.h:
Add new members, make sure to deprecate the ones we don't want anyone calling.
* storage/StorageNamespaceProvider.cpp:
(WebCore::StorageNamespaceProvider::localStorageNamespace):
(WebCore::StorageNamespaceProvider::transientLocalStorageNamespace):
* storage/StorageNamespaceProvider.h:
Pass the quota when creating storage namespaces.
2014-12-08 Benjamin Poulain <benjamin@webkit.org>
Move the new :nth-child() and :nth-last-child() out of experimental
https://bugs.webkit.org/show_bug.cgi?id=139329
Reviewed by Andreas Kling.
The code is stable.
Feedback has only been positive.
All the known issues have been reported to the CSS WG.
The #ifdef don't really work anymore anyway for :nth-child() and :nth-last-child().
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
2014-12-08 Benjamin Poulain <bpoulain@apple.com>
A selector should not match anything if there is a subselector after a non-scrollbar pseudo element
https://bugs.webkit.org/show_bug.cgi?id=139336
rdar://problem/19051623
Reviewed by Andreas Kling.
Tests: fast/css/duplicated-after-pseudo-element.html
fast/css/duplicated-before-pseudo-element.html
fast/css/simple-selector-after-pseudo-element.html
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::constructFragments):
The code filtering out simple selectors was only considering
the relation CSSSelector::SubSelector. That comes from SelectorChecker where
the relation considered is the one from the previous selector.
In this case, the relation is the extracted from the current simple selector,
which is the relation with the following selector.
When a single simple selector was following a pseudo element, the relation evaluated
to descendant/adjacent/direct-adjacent and we were skipping the early return.
That simple selector was evaluated as a regular filter on the element.
In the CSS JIT, we can just remove that test altogether. Fragments are built one after
the other. By definition, the evaluated simple selector belong to the current fragment.
2014-12-08 Benjamin Poulain <benjamin@webkit.org>
Fix the parsing of advanced :lang() after r176902
https://bugs.webkit.org/show_bug.cgi?id=139379
Reviewed by Andreas Kling.
There were two mistakes that were only caught in debug:
The lexer was not calling isIdentifierStart() before parseIdentifier().
Some identifier we were parsing should have been invalid.
This was caught with an assertion in parseIdentifier().
The other issue is that we were accumulating pointer to freed memory.
The tokenizer for LANGRANGE was creating a new string with a StringBuilder.
The problem is that CSSParserString does not keep the source string alive.
Consequently, the list of language range was accumulating pointers to dead
StringImpls.
The fix there is to simply extend the token to take the original asterisk character
from the input. That is not elegant but that's efficient and we know
the buffer lifetime.
* css/CSSParser.cpp:
(WebCore::CSSParser::realLex):
* css/CSSGrammar.y.in: Fix the indentation of a language range rule.
2014-12-08 Anders Carlsson <andersca@apple.com>
Try to fix the 32-bit build.
* WebCore.exp.in:
2014-12-08 Myles C. Maxfield <mmaxfield@apple.com>
Inline elements whose parents have small line-height are laid out too low
https://bugs.webkit.org/show_bug.cgi?id=139375
Reviewed by Dave Hyatt.
This is a port of the Blink patch at
https://src.chromium.org/viewvc/blink?revision=155253&view=revision.
When laying out inline elements, we try to align leaf children's parents'
baselines across the entire line. However, if you set line-height: 0px on a
span, the entire InlineBox which represents that span will have a height of
0, and therefore be laid out entirely on the baseline. In addition, we will
try to vertically center the leaf text in the span's InlineBox, which means
the leaf text will be vertically centered on the baseline. All the other
major browsers do not have this behavior; instead, they line up the boxes
as you would expect.
This bug led to a rendering problem on the front page of the New York Times.
Here is the ChangeLog from the Blink patch:
Fix baseline position when it is outside the element's box
Specifically, we shouldn't force the baseline to be inside the element. IE
and FF don't do this, and it's incompatible with the CSS spec:
"The baseline of an 'inline-block' is the baseline of its last line box in
the normal flow, unless it has either no in-flow line boxes or if its
'overflow' property has a computed value other than 'visible', in which case
the baseline is the bottom margin edge."
-- http://www.w3.org/TR/CSS21/visudet.html#leading
It doesn't have a special case for "baseline is outside of the element's
margin box".
Test: fast/text/small-line-height.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::baselinePosition):
2014-12-08 Eric Carlson <eric.carlson@apple.com>
[iOS] YouTube plug-in replacement should support partial urls
https://bugs.webkit.org/show_bug.cgi?id=139400
Reviewed by Alexey Proskuryakov.
* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::YouTubePluginReplacement::youTubeURL): Call Document::completeURL.
2014-12-08 Anders Carlsson <andersca@apple.com>
Build fix.
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::deleteAllCookiesModifiedSince):
2014-12-08 Andreas Kling <akling@apple.com>
Roll out r175352.
<https://webkit.org/b/139146>
This change caused some unexpected assertions in line box teardown.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::willBeRemovedFromTree):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::willBeDestroyed):
* rendering/RenderReplaced.h:
2014-12-08 Myles C. Maxfield <mmaxfield@apple.com>
[iOS] Narrow non-breaking space does not fall back to a correct font
https://bugs.webkit.org/show_bug.cgi?id=139335
Reviewed by Enrica Casucci.
Test: fast/text/narrow-non-breaking-space.html
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::requiresCustomFallbackFont):
(WebCore::FontCache::getCustomFallbackFont):
2014-12-08 Daniel Bates <dabates@apple.com>
[iOS] Fix the WebKit build with the public SDK
Include header UIKit.h.
* platform/spi/ios/MediaPlayerSPI.h:
2014-12-08 Chris Dumez <cdumez@apple.com>
Revert r176293 & r176275
Unreviewed, revert r176293 & r176275 changing the Vector API to use unsigned type
instead of size_t. There is some disagreement regarding the long-term direction
of the API and we shouldn’t leave the API partly transitioned to unsigned type
while making a decision.
* WebCore.exp.in:
* bindings/js/JSDOMBinding.h:
(WebCore::jsArray):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* cssjit/SelectorCompiler.cpp:
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::append):
(WebCore::SearchBuffer::prependContext):
(WebCore::SearchBuffer::search):
(WebCore::SearchBuffer::length):
* html/HTMLFormElement.cpp:
(WebCore::removeFromVector):
* html/parser/HTMLParserIdioms.h:
* html/parser/XSSAuditor.cpp:
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::duplicateDataBufferIfNecessary):
2014-12-08 Anders Carlsson <andersca@apple.com>
Make deleting all cookies after a given date a little more sane
https://bugs.webkit.org/show_bug.cgi?id=139409
Reviewed by Antti Koivisto.
* WebCore.exp.in:
Update exports.
* platform/network/PlatformCookieJar.h:
* platform/network/cf/CookieJarCFNet.cpp:
* platform/network/curl/CookieJarCurl.cpp:
* platform/network/soup/CookieJarSoup.cpp:
Rename deleteAllCookiesModifiedAfterDate to deleteAllCookiesModifiedSince and change it
to take an std::chrono::system_clock::time_point instead.
* platform/network/mac/CookieJarMac.mm:
(WebCore::cookieStorage):
Helper function that returns an NSHTTPCookieStorage given a network session.
(WebCore::deleteAllCookiesModifiedSince):
Get the cookie storage from the network storage instead of just getting the global one.
2014-12-08 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r176953, add an unreachable return to make GCC happy.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy):
2014-12-08 Javier Fernandez <jfernandez@igalia.com>
[CSS Grid Layout] Grid items must set a new formatting context.
https://bugs.webkit.org/show_bug.cgi?id=139150
Reviewed by David Hyatt.
Grid item's margins must not collapse even when they may be adjoining to
its content's margins. Also, setting a new formatting context prevents any
'float' protruding content on the adjoining grid items.
This patch also renames the expandsToEncloseOverhangingFloats to be more generic now,
determining whether a new formatting context is set or not. This affects not only to
how floats behave, but whether margins should collapse or not.
Tests: fast/css-grid-layout/float-not-protruding-into-next-grid-item.html
fast/css-grid-layout/grid-item-margins-not-collapse.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::avoidsFloats): Using the new createsNewFormattingContext function.
(WebCore::RenderBlock::expandsToEncloseOverhangingFloats): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::MarginInfo::MarginInfo): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::layoutBlock): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::computeOverflow): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::addOverhangingFloats): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::needsLayoutAfterRegionRangeChange): Using the new createsNewFormattingContext function.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::createsNewFormattingContext): Added.
(WebCore::RenderBox::avoidsFloats): Removed checks already defined in the new createsNewFormattingContext function.
* rendering/RenderBox.h:
(WebCore::RenderBox::isGridItem): Added.
2014-12-08 Daniel Bates <dabates@apple.com>
[iOS] Attempt to fix the public SDK build after <https://trac.webkit.org/r176841>
(https://bugs.webkit.org/show_bug.cgi?id=139227)
* platform/spi/ios/AVKitSPI.h:
2014-12-08 Chris Dumez <cdumez@apple.com>
Stop using ResourceRequest::cachePolicy() in FrameLoader::subresourceCachePolicy()
https://bugs.webkit.org/show_bug.cgi?id=139350
Reviewed by Antti Koivisto.
Stop using ResourceRequest::cachePolicy() in FrameLoader::subresourceCachePolicy()
and use m_loadType instead. ResourceRequest::cachePolicy() is meant to be passed
to the network stack, and isn't supposed to be used as input inside WebCore.
No new tests, no behavior change.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy):
2014-12-08 Philippe Normand <pnormand@igalia.com>
[GTK] UserMedia Permission Request API
https://bugs.webkit.org/show_bug.cgi?id=136449
Reviewed by Carlos Garcia Campos.
Very basic constraints validation support in the GStreamer
MediaStreamCenter. This is needed so the GTK C API tests using the
getUserMedia() API would not time out.
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
(WebCore::MediaStreamCenterGStreamer::~MediaStreamCenterGStreamer):
(WebCore::MediaStreamCenterGStreamer::validateRequestConstraints):
(WebCore::MediaStreamCenterGStreamer::createMediaStream):
2014-12-08 Anders Carlsson <andersca@apple.com>
Remove ResourceHandle::loadsBlocked()
https://bugs.webkit.org/show_bug.cgi?id=139401
Reviewed by Daniel Bates.
This hasn't returned true since Leopard, so get rid of it.
* page/Chrome.cpp:
(WebCore::Chrome::canRunModalNow):
* platform/network/ResourceHandle.h:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::loadsBlocked): Deleted.
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::loadsBlocked): Deleted.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::loadsBlocked): Deleted.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::loadsBlocked): Deleted.
2014-12-08 Chris Fleizach <cfleizach@apple.com>
AX: iOS: VoiceOver gets hung on some websites consistently.
https://bugs.webkit.org/show_bug.cgi?id=139331
Reviewed by Mario Sanchez Prada.
iFrames are attachments on iOS, but they do not have attachment views. As a result,
WebCore would return incorrect information for the element count and index of children elements.
No tests. Bug only manifests itself when iOS accessibility frameworks call into WebCore.
* accessibility/AccessibilityMockObject.h:
(WebCore::AccessibilityMockObject::isDetachedFromParent):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isDetachedFromParent):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityElementCount]):
(-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
(-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
(-[WebAccessibilityObjectWrapper accessibilityContainer]):
2014-12-08 Doron Wloschowsky <doron_wloschowsky@scee.net>
Webkit using Harfbuzz does not display Arabic script correctly
https://bugs.webkit.org/show_bug.cgi?id=136337
Reviewed by Carlos Garcia Campos.
Using reinterpret_cast to convert hb_codepoint_t* into UChar*
doesn't work on big endian systems.
* platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
(WebCore::harfBuzzGetGlyph):
2014-12-08 Sebastian Dröge <sebastian@centricular.com>
[GStreamer] Major cleanup of AudioDestination implementation
https://bugs.webkit.org/show_bug.cgi?id=139370
Reviewed by Philippe Normand.
* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
Add an audioresample element before the audio sink. The audio sink
might not be able to handle our sampling rate.
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
(WebCore::AudioDestinationGStreamer::~AudioDestinationGStreamer):
(WebCore::AudioDestinationGStreamer::stop):
(WebCore::AudioDestinationGStreamer::finishBuildingPipelineAfterWavParserPadReady): Deleted.
Don't use a wavparse element but directly link the raw audio from
the source to the audio sink.
(WebCore::AudioDestinationGStreamer::start):
Catch errors when going to PLAYING early, we might not get an error
message.
* platform/audio/gstreamer/AudioDestinationGStreamer.h:
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(getGStreamerMonoAudioCaps):
(webKitWebAudioSrcConstructed):
(webKitWebAudioSrcChangeState):
Don't use a WAV encoder but directly output raw audio. Also don't
include a unneeded audioconvert element before the interleave.
(webKitWebAudioSrcLoop):
Add timestamps and durations to the output buffers, map them in
READWRITE mode and actually keep them mapped until we're sure
nothing is actually writing into them.
(webKitWebAudioSrcLoop):
Pause the task on errors instead of continuously calling it again
immediately.
2014-12-08 Sebastian Dröge <sebastian@centricular.com>
[GStreamer] Use gst_message_parse_buffering()
https://bugs.webkit.org/show_bug.cgi?id=139365
Reviewed by Philippe Normand.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::processBufferingStats):
Use gst_message_parse_buffering() instead of manually getting
the percentage from the message's structure. While the latter
is supposed to work and part of the ABI stability guarantee,
it's just not nice and overly complicated.
2014-12-08 Sebastian Dröge <sebastian@centricular.com>
[GStreamer] Minor cleanup of the AudioFileReader implementation
https://bugs.webkit.org/show_bug.cgi?id=139367
Reviewed by Philippe Normand.
* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::~AudioFileReader):
Don't call gst_bus_remove_signal_watch(), the source was already
destroyed together with the main context and doing it again here
will give a g_critical().
(WebCore::AudioFileReader::handleSample):
Calculate the number of samples from the actual buffer size
and the bytes-per-frame instead of the buffer duration. Using
the buffer duration can lead to rounding errors and might cause
too few samples to be copied over later.
(WebCore::AudioFileReader::handleMessage):
Set the pipeline to GST_STATE_NULL immediately when receiving
errors to prevent other follow-up error messages from propagating
through the bus and spamming the user's terminal with g_warnings().
(WebCore::AudioFileReader::handleNewDeinterleavePad):
Sync the state of the queue and sink after deinterleave with
the parent state instead of just setting them to READY. That
way we potentially go to PAUSED state a bit earlier already
and prevent a potential race condition that could cause buffers
to arrive in the new elements in READY state already (which would
fail).
(WebCore::AudioFileReader::plugDeinterleave):
Handle multiple decodebin source pads by ignoring all following
ones just in case there are multiple for whatever reason.
(WebCore::AudioFileReader::decodeAudioForBusCreation):
Catch errors from going to PAUSED state early. We might not
get a error message at all if we're unlucky.
(WebCore::AudioFileReader::plugDeinterleave):
(WebCore::AudioFileReader::createBus):
(WebCore::AudioFileReader::handleSample):
Downmix to mono if required instead of just using the front
left channel and claiming it is mono. Downmixing from stereo
to mono will mix both channels instead of just taking the left.
2014-12-08 Sebastian Dröge <sebastian@centricular.com>
[GStreamer] Handle CLOCK_LOST and LATENCY messages
https://bugs.webkit.org/show_bug.cgi?id=139341
Reviewed by Philippe Normand.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
Handle CLOCK_LOST message by shortly going back to PAUSED state
and then to PLAYING again to let the pipeline select a new clock
for us.
This can happen if the stream that ends in a sink that provides
the current clock disappears, for example if the audio sink
provides the clock and the audio stream is disabled. It also
happens relatively often with HTTP adaptive streams when switching
between different variants of a stream.
Also handle the LATENCY message by triggering the default GStreamer
mechanism to update the latency. This can happen if the latency of
live elements changes, or for one reason or another a new live element
is added or removed from the pipeline.
2014-12-08 Sebastian Dröge <sebastian@centricular.com>
[GStreamer] Use audio-filter property on GStreamer >= 1.4.2
https://bugs.webkit.org/show_bug.cgi?id=139360
Reviewed by Philippe Normand.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
Since 1.4.0 there is an audio-filter property we can use to place
the pitch-preserving filter at a more canonical position inside
the pipeline. Since 1.4.2 this property also handles all necessary
conversions for us.
This simplifies our sink code a bit because we don't have to create
a custom sink bin anymore.
2014-12-08 Sebastian Dröge <sebastian@centricular.com>
[GStreamer] Add video/flv to the list of supported mimetypes
https://bugs.webkit.org/show_bug.cgi?id=139344
Reviewed by Gustavo Noronha Silva.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mimeTypeCache):
Add video/flv additional to video/x-flv to the list of supported
mimetypes. It's used on some websites, e.g.
http://www.jwplayer.com/html5/formats/
2014-12-08 Sebastian Dröge <sebastian@centricular.com>
[GStreamer] Remove GStreamer 0.10 #ifdefs.
https://bugs.webkit.org/show_bug.cgi?id=138921
Reviewed by Philippe Normand.
* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::initializeGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::buffered):
Remove GStreamer 0.10 #ifdefs, we depend on >= 1.0.3 at least.
2014-12-08 Sebastian Dröge <sebastian@centricular.com>
[GStreamer] Add application/x-mpegurl to the list of supported mimetypes.
https://bugs.webkit.org/show_bug.cgi?id=139343
Reviewed by Gustavo Noronha Silva.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mimeTypeCache):
It's an alternative mimetype for the already supported
application/vnd.apple.mpegurl (aka HLS) and adding it
allows all streams on http://www.jwplayer.com/html5/hls/
to be played.
2014-12-07 Gwang Yoon Hwang <yoon@igalia.com>
[TextureMapper] Normalize pattern transform for pattern compositing
https://bugs.webkit.org/show_bug.cgi?id=139374
Reviewed by Martin Robinson.
In CoordGfx/TexMapGL, pattern compositing (for background image) uses
the patternTransform shader uniform. However, current implementation
miscalculates its transform matrix. It uses simple rectToRect
transformationMatrix which produces unnormalized garbage term.
This causes unexpected behavior at the fragmentation stage in some
mobile GPUs.
It should calculate its scale based on tileSize and contentSize,
and its position based on tilePhase and contentSize.
No new tests because the bug only occurs on some mobile GPUs.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::computePatternTransformIfNeeded):
2014-12-07 Youenn Fablet <youenn.fablet@crf.canon.fr>
[Soup][Curl] HTTP header values should be treated as latin1, not UTF-8
https://bugs.webkit.org/show_bug.cgi?id=128739
Reviewed by Martin Robinson.
Removed UTF-8 conversion of HTTP header values (SOUP and CURL).
Removed unnecessary UTF-8 conversion of HTTP header names (SOUP).
Changed conversion of HTTP method from UTF-8 to ASCII (SOUP and CURL).
Added explicit UTF-8 conversion of Content-Disposition header to compute download suggested filename.
Test: http/tests/xmlhttprequest/response-special-characters.html
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::headerCallback): Removed header conversion.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback): Ditto.
(WebCore::ResourceHandleManager::initializeHandle): Changed HTTP method conversion to ASCI.
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateFromSoupMessageHeaders): Removed header conversion.
(WebCore::ResourceRequest::updateSoupMessage): Changed HTTP method conversion to ASCII.
(WebCore::ResourceRequest::toSoupMessage): Ditto.
(WebCore::ResourceRequest::updateFromSoupMessage):
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::updateFromSoupMessageHeaders): Rmoved header conversion.
(WebCore::ResourceResponse::platformSuggestedFilename): Added explicit conversion of contentDisposition to UTF-8.
2014-12-07 Dan Bernstein <mitz@apple.com>
Introduce and deploy a function that allocates and returns an instance of a soft-linked class
https://bugs.webkit.org/show_bug.cgi?id=139348
Reviewed by Anders Carlsson.
In [[getFooClass() alloc] init*], the type of the result of +alloc is id, so the compiler
picks an arbitrary declaration of init*, not necessarily the Foo one. This can then lead
to warnings or errors if the types or attributes don’t match, or to runtime errors if Foo
doesn’t even have the expected initializer. The new allocFooInstance() returns a Foo *, thus
avoiding the ambiguity.
* editing/mac/DataDetection.mm:
(WebCore::DataDetection::detectItemAroundHitTestResult):
* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper allocateVolumeView]):
(-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::createMix):
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::abort):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::PlatformCALayerMac): Cast the result of +alloc to an instance of the
expected class.
* platform/graphics/mac/FontMac.mm:
(WebCore::showLetterpressedGlyphsWithAdvances):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::createQTMovie):
(WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
* platform/graphics/mac/PDFDocumentImageMac.mm:
(WebCore::PDFDocumentImage::createPDFDocument):
* platform/ios/PlatformSpeechSynthesizerIOS.mm:
(SOFT_LINK_CONSTANT):
(-[WebSpeechSynthesisWrapper speakUtterance:]):
* platform/ios/WebCoreMotionManager.mm:
(-[WebCoreMotionManager initializeOnMainThread]):
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController init]):
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
* platform/mac/ContentFilterMac.mm:
(WebCore::ContentFilter::ContentFilter):
* platform/mac/SoftLinking.h: Added alloc##className##instance().
* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController setVideoElement:]):
* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::setupCaptureSession):
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::AVCaptureDeviceManager::verifyConstraintsForMediaType):
* platform/mediastream/mac/AVMediaCaptureSource.mm:
(WebCore::AVMediaCaptureSource::setupSession):
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setupCaptureSession):
* platform/network/ios/QuickLook.mm:
(WebCore::registerQLPreviewConverterIfNeeded):
(WebCore::QuickLookHandle::QuickLookHandle):
2014-12-07 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add Since tags to GObject DOM bindings documentation
https://bugs.webkit.org/show_bug.cgi?id=139356
Reviewed by Gustavo Noronha Silva.
Now that we have a small stable API, and new symbols are added
manually, we can also add the version to the symbols file, that
the code generator can ue to add Since tags to the gtk-doc.
* bindings/gobject/webkitdom.symbols: Add @2.8 to the new symbols
added for 2.8.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateConstants): Add Since tag to gtk-doc if there's a version
number for the symbol in the .symbols file.
(GenerateFunction): Ditto.
(ReadStableSymbols):
2014-12-07 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Missing API detected in GObject DOM bindings after r176630
https://bugs.webkit.org/show_bug.cgi?id=139201
Reviewed by Gustavo Noronha Silva.
Bring back WebKitDOMDeprecated and add custom versions of the
removed symbols as deprecated in favor of the new ones. Also add
the new ones as stable API.
* CMakeLists.txt: Pass a list of additional dependencies to GENERATE_BINDINGS.
* PlatformGTK.cmake: Ditto.
* PlatformMac.cmake: Ditto.
* bindings/gobject/WebKitDOMDeprecated.cpp: Added.
(webkit_dom_html_element_get_inner_html):
(webkit_dom_html_element_set_inner_html):
(webkit_dom_html_element_get_outer_html):
(webkit_dom_html_element_set_outer_html):
* bindings/gobject/WebKitDOMDeprecated.h: Added.
* bindings/gobject/WebKitDOMDeprecated.symbols: Added.
* bindings/gobject/webkitdom.symbols:
2014-12-06 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r176915.
DisplayRefreshMonitorClient is the parent class of GraphicsLayerUpdater
only if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) is true, so override
is incorrect if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) is false.
That's why r176915 broke the build on non PLATFORM(COCOA) platforms,
such as GTK, EFL, Apple Windows.
Additionally displayRefreshFired is only used inside USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
guard, so there is no reason to define it for non COCOA platforms.
* platform/graphics/GraphicsLayerUpdater.cpp:
* platform/graphics/GraphicsLayerUpdater.h:
2014-12-06 Anders Carlsson <andersca@apple.com>
Fix build with newer versions of clang.
rdar://problem/18978733
Add a bunch of overrides since we're not disabling the "inconsistent missing override" warning in WebKit.
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingStateFixedNode.h:
* page/scrolling/ScrollingStateFrameScrollingNode.h:
* page/scrolling/ScrollingStateOverflowScrollingNode.h:
* page/scrolling/ScrollingStateStickyNode.h:
* page/scrolling/ScrollingTreeFrameScrollingNode.h:
(WebCore::ScrollingTreeFrameScrollingNode::updateLayersAfterDelegatedScroll): Deleted.
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
* platform/graphics/GraphicsLayerUpdater.h:
* platform/mac/ScrollbarThemeMac.h:
(WebCore::ScrollbarThemeMac::supportsControlTints): Deleted.
(WebCore::ScrollbarThemeMac::maxOverlapBetweenPages): Deleted.
* rendering/RenderLayerCompositor.h:
* rendering/RenderSnapshottedPlugIn.h:
2014-12-06 Anders Carlsson <andersca@apple.com>
Fix build with newer versions of clang.
rdar://problem/18978687
Add a bunch of overrides since we're not disabling the "inconsistent missing override" warning in WebKit.
* html/HTMLElement.h:
* html/HTMLMediaElement.h:
* html/track/VTTCue.h:
* loader/FrameNetworkingContext.h:
(WebCore::FrameNetworkingContext::shouldClearReferrerOnHTTPSToHTTPRedirect): Deleted.
* loader/cache/CachedImage.h:
* page/SuspendableTimer.h:
* platform/Scrollbar.h:
* platform/graphics/InbandTextTrackPrivate.h:
* rendering/RenderBlockFlow.h:
2014-12-06 Anders Carlsson <andersca@apple.com>
Follow-up build fix.
* Configurations/Base.xcconfig:
2014-12-06 Anders Carlsson <andersca@apple.com>
Fix build with newer versions of clang.
rdar://problem/18978689
Disable the "inconsistent missing override" warning due to our use of macros in SVG where it's hard to
know whether we can add an override or not.
Also, cast return values of +alloc to the right type, and add some casts for vector iterator arithmetic.
* Configurations/Base.xcconfig:
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::guidForOriginAndName):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _stringForRange:attributed:]):
* editing/cocoa/HTMLConverter.mm:
(_shadowForShadowStyle):
(HTMLConverter::_addTableForElement):
* platform/graphics/SVGGlyph.cpp:
(WebCore::isCompatibleArabicForm):
* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::createMix):
* platform/graphics/mac/FontMac.mm:
(WebCore::showLetterpressedGlyphsWithAdvances):
* platform/ios/PlatformSpeechSynthesizerIOS.mm:
(-[WebSpeechSynthesisWrapper speakUtterance:]):
* platform/ios/WebCoreMotionManager.mm:
(-[WebCoreMotionManager initializeOnMainThread]):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::spannedRows):
(WebCore::RenderTableSection::spannedColumns):
2014-12-06 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error, missing guard.
https://bugs.webkit.org/show_bug.cgi?id=139338
Reviewed by Alex Christensen.
There is missing a ENABLE(CSS_SELECTORS_LEVEL4) guard in CSSParser.cpp.
* css/CSSParser.cpp:
(WebCore::CSSParser::realLex):
2014-12-05 Chris Fleizach <cfleizach@apple.com>
AX: I cannot activate links on the mobile version of news.google.com
https://bugs.webkit.org/show_bug.cgi?id=139330
Reviewed by Simon Fraser.
This website only listens for touch events. VoiceOver normally dispatches click and mouse events,
so on iOS this falls and VoiceOver is not able to activate anything.
The solution here is to dispatch simulated touch down/up events.
Test: platform/ios-simulator/ios-accessibility/press-fires-touch-events.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
(WebCore::AccessibilityObject::dispatchTouchEvent):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isDetachedFromParent):
* page/EventHandler.h:
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::dispatchSimulatedTouchEvent):
* platform/ios/PlatformEventFactoryIOS.h:
* platform/ios/PlatformEventFactoryIOS.mm:
(WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
(WebCore::PlatformEventFactory::createPlatformSimulatedTouchEvent):
2014-12-05 Myles C. Maxfield <mmaxfield@apple.com>
Directional single quotation marks are not rotated in vertical text
https://bugs.webkit.org/show_bug.cgi?id=138526
Reviewed by Darin Adler.
In vertical text, directional single quotation marks are not rotated along with
the rest of the letters.
Test: fast/text/vertical-quotation-marks.html
* platform/graphics/FontGlyphs.cpp:
(WebCore::shouldIgnoreRotation):
2014-12-05 Dhi Aurrahman <diorahman@rockybars.com>
Implement parser for :lang pseudo class selector arguments that contain wildcard '*' subtags
https://bugs.webkit.org/show_bug.cgi?id=139014
Reviewed by Benjamin Poulain.
Consider each language range in :lang() that consists of an asterisk
immediately followed by an identifier beginning with an ASCII hyphen
as a valid input for the selector as specified in [1].
[1] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo
Test: fast/css/parsing-css-lang.html
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::realLex):
2014-12-05 Simon Fraser <simon.fraser@apple.com>
Programmatic scrolling and content changes are not always synchronized
https://bugs.webkit.org/show_bug.cgi?id=139245
rdar://problem/18833612
Reviewed by Anders Carlsson.
For programmatic scrolls, AsyncScrollingCoordinator::requestScrollPositionUpdate()
calls updateScrollPositionAfterAsyncScroll(), then dispatches the requested
scroll position to the scrolling thread.
Once the scrolling thread commits, it calls back to the main thread via
scheduleUpdateScrollPositionAfterAsyncScroll(), which schedules a second
call to updateScrollPositionAfterAsyncScroll() on a timer. That's a problem,
because some other scroll may have happened in the meantime; when the timer
fires, it can sometimes restore a stale scroll position.
Fix by bailing early from scheduleUpdateScrollPositionAfterAsyncScroll()
for programmatic scrolls, since we know that requestScrollPositionUpdate()
already did the updateScrollPositionAfterAsyncScroll().
Test:
ManualTests/programmatic-scroll-flicker.html
* page/FrameView.cpp:
(WebCore::FrameView::reset): nullptr.
(WebCore::FrameView::setScrollPosition): Ditto.
(WebCore::FrameView::setWasScrolledByUser): Ditto.
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate): Use a local variable for
isProgrammaticScroll just to make sure we use the same value for the duration of this function.
(WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll): Do nothing
if this is a programmatic scroll.
2014-12-05 Timothy Horton <timothy_horton@apple.com>
Build fix.
* platform/spi/mac/TUCallSPI.h:
2014-12-05 Roger Fong <roger_fong@apple.com>
[Win] proj files copying over too many resources..
https://bugs.webkit.org/show_bug.cgi?id=139315.
<rdar://problem/19148278>
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.proj: Don't copy over bin32 build output.
2014-12-05 Timothy Horton <timothy_horton@apple.com>
Use the system string for telephone number menu
https://bugs.webkit.org/show_bug.cgi?id=139324
<rdar://problem/18726471>
* platform/spi/mac/TUCallSPI.h: Added.
Actually add the SPI header from the last commit.
2014-12-05 Tim Horton <timothy_horton@apple.com>
Use the system string for telephone number menu
https://bugs.webkit.org/show_bug.cgi?id=139324
<rdar://problem/18726471>
Reviewed by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/TUCallSPI.h: Added.
Add an SPI header.
2014-12-05 Jer Noble <jer.noble@apple.com>
[MSE][Mac] Return absolute value of error code from CDMSessionMediaSourceAVFObjC::update().
https://bugs.webkit.org/show_bug.cgi?id=139316
Reviewed by Eric Carlson.
Similarly to our asynchronous error reporting, return the absolute value of the error code.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::systemCodeForError):
(WebCore::CDMSessionMediaSourceAVFObjC::update):
2014-12-05 Anders Carlsson <andersca@apple.com>
Fix build on Windows.
* page/SessionIDHash.h:
2014-12-05 Zalan Bujtas <zalan@apple.com>
Issue repaint at setUnavailablePluginIndicatorIsHidden() only when embedded object's indicator status changes.
https://bugs.webkit.org/show_bug.cgi?id=139311
Reviewed by Tim Horton.
Not testable.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsHidden):
2014-12-05 Andreas Kling <akling@apple.com>
PassRef should deref on destruction if pointee was not moved.
<https://webkit.org/b/139309>
Reviewed by Antti Koivisto.
Remove calls to PassRef::dropRef() since it's no longer necessary to manually
notify PassRef that you didn't move the pointee.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
(WebCore::RenderElement::setStyle):
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
2014-12-05 Benjamin Poulain <bpoulain@apple.com>
Fix style sharing with the "type" and "readonly" attributes
https://bugs.webkit.org/show_bug.cgi?id=139283
Reviewed by Antti Koivisto.
There are two bugs adressed with this patch:
1) The attributes "type" and "readonly" where only handled correctly
for input elements. For everything else, they could incorrectly
be ignored for style sharing.
2) The handling of attributes was incorrect for selector lists, leading
to various bugs (incorrect style sharing in some cases, disabling
style sharing on valid cases).
For [1], the problem was that attribute checking had been limited to
StyleResolver::canShareStyleWithControl(). That function is for handling
the special states of input element. For any other element, the attributes
were simply ignored.
For [2], there were a bunch of small problems. First, containsUncommonAttributeSelector()
was not recursive, which caused it to ignored any nested selector list. This used to be
correct but since we have advanced selectors we can no longer assumed selectors are not nested.
A second issue was that any attribute in a selector list was causing us to fall back
to the slow case. Now that we have the fast :matches(), we really don't want that.
The function containsUncommonAttributeSelector() was transformed into a recursive function
tracking where we are in the selector.
At the entry point, we start with the flag "startsOnRightmostElement" set to true. The flag is then
updated on the stack of each recursive call.
For example, "webkit > is:matches(freaking > awesome)". We evalute "is" with the flag to true, then recurse
into evaluating "freaking > awesome" with the flag still set to true. When we evalute ">", the flag
is set to false to evaluate any following selectors.
After evaluating "freaking > awesome", we go back to our previous stack frame, and the flag
is back to true and we can continue evaluating with the curren top level state.
From some logging, I discovered that the attribute handling is way too aggressive.
This is not a regression and I cannot fix that easily so I left a fixme.
Tests: fast/css/data-attribute-style-sharing-1.html
fast/css/data-attribute-style-sharing-2.html
fast/css/data-attribute-style-sharing-3.html
fast/css/data-attribute-style-sharing-4.html
fast/css/data-attribute-style-sharing-5.html
fast/css/data-attribute-style-sharing-6.html
fast/css/data-attribute-style-sharing-7.html
fast/css/readonly-attribute-style-sharing-1.html
fast/css/readonly-attribute-style-sharing-2.html
fast/css/readonly-attribute-style-sharing-3.html
fast/css/readonly-attribute-style-sharing-4.html
fast/css/readonly-attribute-style-sharing-5.html
fast/css/readonly-attribute-style-sharing-6.html
fast/css/readonly-attribute-style-sharing-7.html
fast/css/type-attribute-style-sharing-1.html
fast/css/type-attribute-style-sharing-2.html
fast/css/type-attribute-style-sharing-3.html
fast/css/type-attribute-style-sharing-4.html
fast/css/type-attribute-style-sharing-5.html
fast/css/type-attribute-style-sharing-6.html
fast/css/type-attribute-style-sharing-7.html
* css/RuleSet.cpp:
(WebCore::containsUncommonAttributeSelector):
(WebCore::RuleData::RuleData):
(WebCore::selectorListContainsAttributeSelector): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithControl):
(WebCore::StyleResolver::canShareStyleWithElement):
2014-12-05 Jer Noble <jer.noble@apple.com>
[WTF] MediaTime should support round-tripping from and to doubles.
https://bugs.webkit.org/show_bug.cgi?id=139248
Reviewed by Eric Carlson.
Check whether the MediaTime's underlying data is floating point before converting
to a CMTime or QTTime.
* platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
(WebCore::toCMTime):
* platform/graphics/mac/MediaTimeQTKit.mm:
(WebCore::toQTTime):
2014-12-05 Anders Carlsson <andersca@apple.com>
Add a private browsing mode to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=139308
Reviewed by Sam Weinig.
Use -1 instead of -2 for the deleted value.
* page/SessionIDHash.h:
2014-12-05 Chris Dumez <cdumez@apple.com>
Move 'text-emphasis-style' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139285
Reviewed by Sam Weinig.
Move 'text-emphasis-style' CSS property to the new StyleBuilder by
using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue): Deleted.
(WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue): Deleted.
(WebCore::ApplyPropertyTextEmphasisStyle::applyValue): Deleted.
(WebCore::ApplyPropertyTextEmphasisStyle::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitTextEmphasisStyle):
(WebCore::StyleBuilderCustom::applyInheritWebkitTextEmphasisStyle):
(WebCore::StyleBuilderCustom::applyValueWebkitTextEmphasisStyle):
2014-12-05 Eric Carlson <eric.carlson@apple.com>
[iOS] remove "enter optimized fullscreen" gesture
https://bugs.webkit.org/show_bug.cgi?id=139301
Reviewed by Jer Noble.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.handleWrapperTouchStart): Remove gesture recognizer.
2014-12-05 Beth Dakin <bdakin@apple.com>
rdar://problem/19156353 Additional build-fixes needed.
Rubber-stamped by Tim Horton.
This is a bit unfortunate, but we need to always forward-declare this for now.
* platform/spi/mac/QuickLookMacSPI.h:
2014-12-05 David Kilzer <ddkilzer@apple.com>
FeatureDefines.xcconfig: Workaround bug in Xcode 5.1.1 when defining ENABLE_WEB_REPLAY
<http://webkit.org/b/139286>
Reviewed by Daniel Bates.
* Configurations/FeatureDefines.xcconfig: Switch back to using
PLATFORM_NAME to workaround a bug in Xcode 5.1.1 on 10.8.
2014-12-05 Eric Carlson <eric.carlson@apple.com>
[iOS] allow host application to opt-out of alternate fullscreen pt. 2
https://bugs.webkit.org/show_bug.cgi?id=139227
Reviewed by Jer Noble and Anders Carlsson
* WebCore.exp.in: Export HTMLMediaSession::allowsAlternateFullscreen, change the signature of
WebVideoFullscreenInterfaceAVKit::setupFullscreen.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController enterFullscreen:mode:]): Update for
WebVideoFullscreenInterfaceAVKit::setupFullscreen change.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add argument to setupFullscreen.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setupFullscreen): Ditto.
2014-12-05 Shivakumar JM <shiva.jm@samsung.com>
Fix build warning in WebCore/platform/graphics module
https://bugs.webkit.org/show_bug.cgi?id=139290
Reviewed by Carlos Garcia Campos.
Fix a build warning by removing parameter name from function.
No new tests, no behavior change.
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::getFamilyNameStringFromFontDescriptionAndFamily):
2014-12-05 sungmin cho <sungmin17.cho@lge.com>
GraphicsLayerTextureMapper: Rename parameter to be more clear
https://bugs.webkit.org/show_bug.cgi?id=139288
Reviewed by Martin Robinson.
Rename 'media' to 'platformLayer'.
No new tests, no change in functionality.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setContentsToPlatformLayer):
2014-12-04 Mark Rowe <mrowe@apple.com>
Fix pre-Yosemite builds.
The #ifs in two SPI wrapper headers were incorrect, resulting in code being included
prior to Yosemite that required Yosemite to compile.
* platform/spi/mac/NSSharingServicePickerSPI.h:
* platform/spi/mac/NSSharingServiceSPI.h:
2014-12-02 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: timeline probe records have inaccurate per-probe hit counts
https://bugs.webkit.org/show_bug.cgi?id=138976
Reviewed by Joseph Pecoraro.
Update the signature for breakpointActionProbe to take batchId and sampleId.
Covered by existing test inspector-protocol/debugger/didSampleProbe-multiple-probes.html.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::breakpointActionProbe):
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createProbeSampleData):
* inspector/TimelineRecordFactory.h:
2014-12-04 Adenilson Cavalcanti <cavalcantii@gmail.com>
Groove/inset/outset borders show solid if the color is black
https://bugs.webkit.org/show_bug.cgi?id=58608
Reviewed by Simon Fraser.
Test: fast/borders/mixed-border-style2.html
This patch will lighten/darken the border side colors, handling
border decoration in a similar way as Firefox does.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
(WebCore::RenderObject::calculateBorderStyleColor):
* rendering/RenderObject.h:
2014-12-04 Chris Dumez <cdumez@apple.com>
Move 'webkit-aspect-ratio' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139250
Reviewed by Sam Weinig.
Move 'aspect-ratio' CSS property to the new StyleBuilder by
using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyAspectRatio::applyInheritValue): Deleted.
(WebCore::ApplyPropertyAspectRatio::applyInitialValue): Deleted.
(WebCore::ApplyPropertyAspectRatio::applyValue): Deleted.
(WebCore::ApplyPropertyAspectRatio::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitAspectRatio):
(WebCore::StyleBuilderCustom::applyInheritWebkitAspectRatio):
(WebCore::StyleBuilderCustom::applyValueWebkitAspectRatio):
2014-12-04 Timothy Horton <timothy_horton@apple.com>
Further fix the 32-bit build.
* page/mac/TextIndicatorWindow.mm:
(WebCore::TextIndicatorWindow::setTextIndicator):
2014-12-04 Timothy Horton <timothy_horton@apple.com>
Fix the 32-bit build.
* page/mac/TextIndicatorWindow.h:
* page/mac/TextIndicatorWindow.mm:
(WebCore::TextIndicatorWindow::setTextIndicator):
2014-12-04 Tim Horton <timothy_horton@apple.com>
TextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139252
<rdar://problem/19140827>
Reviewed by Anders Carlsson.
* WebCore.exp.in:
* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithSelectionInFrame):
(WebCore::TextIndicator::TextIndicator):
* page/TextIndicator.h:
(WebCore::TextIndicator::selectionRectInWindowCoordinates):
(WebCore::TextIndicator::textBoundingRectInWindowCoordinates):
(WebCore::TextIndicator::selectionRectInScreenCoordinates): Deleted.
(WebCore::TextIndicator::textBoundingRectInScreenCoordinates): Deleted.
Go back to keeping the rects in "window" coordinates.
* page/mac/TextIndicatorWindow.h:
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
(WebCore::TextIndicatorWindow::setTextIndicator):
Let callers pass in the contentRect instead of trying to share the code
to compute it, since it needs to be different for legacy and modern WebKit.
2014-12-04 Oliver Hunt <oliver@apple.com>
Serialization of MapData object provides unsafe access to internal types
https://bugs.webkit.org/show_bug.cgi?id=138653
Reviewed by Geoffrey Garen.
We now keep the value portion of the key/value pair in MapData as a
separate stack. This allows us to maintain the spec semantic of
"atomic" serialisation of the key/value pair without retaining the
use of a potentially invalid iterator.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::serialize):
2014-12-04 Radu Stavila <stavila@adobe.com>
[SVG Masking] Add support for referencing <mask> elements from -webkit-mask-image
https://bugs.webkit.org/show_bug.cgi?id=139092
Reviewed by Simon Fraser.
This patch improves the -webkit-mask-image property by allowing it to reference
a <mask> element defined in an inline or external SVG document.
Up until now, each image to be used as a mask consisted of a FillLayer object
whose m_image member represented the mask. Now, in order to accomodate
<mask> elements referenced by a fragment identifier (e.g. file.svg#mask1)
a new class was created (MaskImageOperation) and added as a member of the
FillLayer. As such, from now on, all FillLayer objects used for masking will
store the masking information in this new member.
When parsing the -webkit-mask-image property (or the -webkit-mask shorthand)
a new MaskImageOperation object is created for each image. If the value represents
an external URL, a pending SVG document will be created which will be loaded
during the phase that loads the pending resources. When the download is complete,
the MaskImageOperation is notified by the CachedSVGDocument class and checks if
the received download is a valid SVG and the requested fragment identifier
actually exists and identifies a <mask> element. If it does, that element's
renderer (of type RenderSVGResourceMasker) will be used when painting the mask layers.
Otherwise, the MaskImageOperation class will use the already downloaded data
buffer to create a CachedImage from it and use that instead, basically emulating
the previous behavior, when only images were accepted. This ensures that all existing
behavior, like painting entire SVGs, painting normal images (e.g. PNG/JPG), painting
generated images (e.g. linear-gradient) works as it did before.
No new tests required, this patch doesn't change any current functionality.
It only adds support for referencing <mask> elements for the -webkit-mask-image
property. This is sub-part 1 of the bigger patch https://bugs.webkit.org/show_bug.cgi?id=129682.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSValue.cpp:
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isWebKitCSSResourceValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::clear):
(WebCore::StyleResolver::createMaskImageOperations):
* css/StyleResolver.h:
(WebCore::StyleResolver::State::maskImagesWithPendingSVGDocuments):
* css/WebKitCSSResourceValue.cpp: Added.
(WebCore::WebKitCSSResourceValue::WebKitCSSResourceValue):
(WebCore::WebKitCSSResourceValue::customCSSText):
(WebCore::WebKitCSSResourceValue::isCSSValueNone):
* css/WebKitCSSResourceValue.h: Added.
(WebCore::WebKitCSSResourceValue::create):
(WebCore::WebKitCSSResourceValue::innerValue):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::addCachedResource):
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::CachedSVGDocument):
(WebCore::CachedSVGDocument::finishLoading):
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedSVGDocumentReference.cpp:
(WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
(WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
(WebCore::CachedSVGDocumentReference::load):
* loader/cache/CachedSVGDocumentReference.h:
* page/FrameView.cpp:
(WebCore::FrameView::isSVGDocument):
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::createPageFromBuffer):
* page/Page.h:
* platform/ScrollView.h:
(WebCore::ScrollView::isSVGDocument):
* platform/graphics/MaskImageOperation.cpp: Added.
(WebCore::MaskImageOperation::create):
(WebCore::MaskImageOperation::MaskImageOperation):
(WebCore::MaskImageOperation::~MaskImageOperation):
(WebCore::MaskImageOperation::isCSSValueNone):
(WebCore::MaskImageOperation::cssValue):
(WebCore::MaskImageOperation::isMaskLoaded):
(WebCore::MaskImageOperation::setRenderLayerImageClient):
(WebCore::MaskImageOperation::addRendererImageClient):
(WebCore::MaskImageOperation::removeRendererImageClient):
(WebCore::MaskImageOperation::getOrCreateCachedSVGDocumentReference):
(WebCore::MaskImageOperation::notifyFinished): This is the method that gets called when the document has finished
downloading and checks if it can find a valid <mask> element.
(WebCore::MaskImageOperation::drawMask):
(WebCore::MaskImageOperation::getSVGMasker):
* platform/graphics/MaskImageOperation.h: Added.
* rendering/RenderBoxModelObject.cpp: The BackgroundImageGeometry class was moved out of RenderBoxModelObject in
order to be used as a parameter for other methods. This was necessary to avoid having methods with very many parameters.
(WebCore::BackgroundImageGeometry::setNoRepeatX):
(WebCore::BackgroundImageGeometry::setNoRepeatY):
(WebCore::BackgroundImageGeometry::useFixedAttachment):
(WebCore::BackgroundImageGeometry::clip):
(WebCore::BackgroundImageGeometry::relativePhase):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::clip): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::relativePhase): Deleted.
* rendering/RenderBoxModelObject.h:
(WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
(WebCore::BackgroundImageGeometry::destOrigin):
(WebCore::BackgroundImageGeometry::setDestOrigin):
(WebCore::BackgroundImageGeometry::destRect):
(WebCore::BackgroundImageGeometry::setDestRect):
(WebCore::BackgroundImageGeometry::phase):
(WebCore::BackgroundImageGeometry::setPhase):
(WebCore::BackgroundImageGeometry::tileSize):
(WebCore::BackgroundImageGeometry::setTileSize):
(WebCore::BackgroundImageGeometry::spaceSize):
(WebCore::BackgroundImageGeometry::setSpaceSize):
(WebCore::BackgroundImageGeometry::setPhaseX):
(WebCore::BackgroundImageGeometry::setPhaseY):
(WebCore::BackgroundImageGeometry::setHasNonLocalGeometry):
(WebCore::BackgroundImageGeometry::hasNonLocalGeometry):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::BackgroundImageGeometry): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::destOrigin): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestOrigin): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::destRect): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestRect): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::phase): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhase): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::tileSize): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setTileSize): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::spaceSize): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setSpaceSize): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseX): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseY): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setHasNonLocalGeometry): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::hasNonLocalGeometry): Deleted.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::~RenderLayer):
* rendering/RenderLayer.h:
* rendering/RenderLayerMaskImageInfo.cpp: Added.
(WebCore::RenderLayer::MaskImageInfo::layerToMaskMap): Returns a static map that links MaskImageInfo objects to RenderLayers.
(WebCore::RenderLayer::MaskImageInfo::getIfExists): Returns the MaskImageInfo associated with a specific RenderLayer.
(WebCore::RenderLayer::MaskImageInfo::get): Returns the MaskImageInfo associated with a specific RenderLayer (creates it if necessary).
(WebCore::RenderLayer::MaskImageInfo::remove): Removes the MaskImageInfo associated with a specific RenderLayer.
(WebCore::RenderLayer::MaskImageInfo::MaskImageInfo):
(WebCore::RenderLayer::MaskImageInfo::~MaskImageInfo):
(WebCore::RenderLayer::MaskImageInfo::notifyFinished): Gets called when the SVG document finished loading, triggers repaint.
(WebCore::RenderLayer::MaskImageInfo::imageChanged): Gets called when the image object changed, triggers repaint.
(WebCore::RenderLayer::MaskImageInfo::updateMaskImageClients): Goes through all mask layers and sets image/SVG clients.
Updates list of internal and external SVG references.
(WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients): Removes all image/SVG clients and clears lists of internal and external SVG references.
* rendering/RenderLayerMaskImageInfo.h: Added.
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderSVGResourceMasker):
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::FillLayer):
(WebCore::FillLayer::operator=):
(WebCore::FillLayer::operator==):
(WebCore::FillLayer::cullEmptyLayers):
(WebCore::FillLayer::hasNonEmptyMaskImage):
(WebCore::FillLayer::imagesAreLoaded):
* rendering/style/FillLayer.h:
(WebCore::FillLayer::maskImage):
(WebCore::FillLayer::imageOrMaskImage):
(WebCore::FillLayer::setMaskImage):
(WebCore::FillLayer::clearMaskImage):
(WebCore::FillLayer::hasMaskImage):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applySVGMask):
(WebCore::RenderSVGResourceMasker::applyResource):
(WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
* rendering/svg/RenderSVGResourceMasker.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::createElementRenderer):
(WebCore::SVGMaskElement::addClientRenderLayer):
(WebCore::SVGMaskElement::removeClientRenderLayer):
* svg/SVGMaskElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::setCachedDocument):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
2014-12-04 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176789.
https://bugs.webkit.org/show_bug.cgi?id=139255
Broke the non Mac-WK2 builds (Requested by stavila on
#webkit).
Reverted changeset:
"Remove isSpecifiedFont boolean from FontDescription"
https://bugs.webkit.org/show_bug.cgi?id=139233
http://trac.webkit.org/changeset/176789
2014-12-03 Antti Koivisto <antti@apple.com>
Remove isSpecifiedFont boolean from FontDescription
https://bugs.webkit.org/show_bug.cgi?id=139233
Reviewed by Andreas Kling.
It is barely used.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInheritFontFamily):
(WebCore::StyleBuilderCustom::applyValueFontFamily):
* platform/graphics/FontDescription.cpp:
(WebCore::genericFamiliesSet):
(WebCore::FontDescription::hasGenericFirstFamily):
Add a function to test for generic families.
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::setTextRenderingMode):
(WebCore::FontDescription::operator==):
(WebCore::FontDescription::isSpecifiedFont): Deleted.
(WebCore::FontDescription::setIsSpecifiedFont): Deleted.
* rendering/RenderText.cpp:
(WebCore::RenderText::computeUseBackslashAsYenSymbol):
This is the only client.
Figure out the equivalent information dynamically if needed.
2014-12-03 Joonghun Park <jh718.park@samsung.com>
Use std::unique_ptr instead of PassOwnPtr|OwnPtr for Pasteboard
https://bugs.webkit.org/show_bug.cgi?id=139019
Reviewed by Darin Adler.
No new tests, no behavior changes.
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::DataTransfer):
* dom/DataTransfer.h:
* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::createDraggingDataTransfer):
* platform/Pasteboard.h:
* platform/efl/PasteboardEfl.cpp:
(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createPrivate):
(WebCore::Pasteboard::createForDragAndDrop):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createForGlobalSelection):
(WebCore::Pasteboard::createPrivate):
(WebCore::Pasteboard::createForDragAndDrop):
(WebCore::Pasteboard::create): Deleted.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createPrivate):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createPrivate):
(WebCore::Pasteboard::createForDragAndDrop):
(WebCore::Pasteboard::create): Deleted.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createPrivate):
(WebCore::Pasteboard::createForDragAndDrop):
2014-12-03 Benjamin Poulain <bpoulain@apple.com>
Get rid of FrameLoaderClient::dispatchWillRequestResource
https://bugs.webkit.org/show_bug.cgi?id=139235
Reviewed by Alexey Proskuryakov.
It is useless.
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::dispatchWillRequestResource): Deleted.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
2014-12-03 Myles C. Maxfield <mmaxfield@apple.com>
List markers in RTL languages do not draw the first character.
https://bugs.webkit.org/show_bug.cgi?id=139244
Reviewed by Simon Fraser.
Off-by-one error when reversing the string (from LTR to RTL)
Test: fast/lists/rtl-marker.html
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
2014-12-03 Beth Dakin <bdakin@apple.com>
<input> elements get whitespace action menu instead of editable text menu
https://bugs.webkit.org/show_bug.cgi?id=139241
-and corresponding-
rdar://problem/19072083
Reviewed by Sam Weinig.
Since we will hit test form controls as form controls, we need a new function to
determine if the hit point is over text inside that form control or not.
* WebCore.exp.in:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::isOverTextInsideFormControlElement):
* rendering/HitTestResult.h:
2014-12-03 Tim Horton <timothy_horton@apple.com>
Keyboard input should be disabled in the preview popover
https://bugs.webkit.org/show_bug.cgi?id=139219
<rdar://problem/19052381>
Reviewed by Anders Carlsson.
* page/ChromeClient.h:
(WebCore::ChromeClient::shouldDispatchFakeMouseMoveEvents):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
Allow ChromeClient to disable the dispatch of "fake" mouseMove events
that happens during scrolling.
2014-12-03 Antti Koivisto <antti@apple.com>
Remove genericFamily enum from FontDescription
https://bugs.webkit.org/show_bug.cgi?id=139207
Reviewed by Andreas Kling.
We use predefined AtomicStrings for generic families. The side enum adds no information.
* css/CSSFontSelector.cpp:
(WebCore::resolveGenericFamily):
(WebCore::CSSFontSelector::getFontData):
Match the existing quirk where the default font can be replaced by @font-face rule but user generic families can't.
(WebCore::CSSFontSelector::resolvesFamilyFor):
(WebCore::fontDataForGenericFamily): Deleted.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontFamily::applyInheritValue):
(WebCore::ApplyPropertyFontFamily::applyInitialValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::checkForGenericFamilyChange):
Remove the explicit monospace check, earlier useFixedDefaultSize check is equivalent.
(WebCore::StyleResolver::initializeFontStyle):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::useFixedDefaultSize):
(WebCore::FontDescription::setWeight):
(WebCore::FontDescription::equalForTextAutoSizing):
(WebCore::FontDescription::operator==):
(WebCore::FontDescription::genericFamily): Deleted.
(WebCore::FontDescription::setGenericFamily): Deleted.
* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::controlFont):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
Reset the lineheight unconditionally for buttons.
This always happened before because the explicitly set generic family made the font compare false.
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemFont):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemFont):
(WebCore::RenderThemeMac::setFontFromControlSize):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
Resolve document style for final value immediately as it can't be affected by @font-face rules.
2014-12-03 Zalan Bujtas <zalan@apple.com>
ASSERTION: RenderMultiColumnFlowThread::processPossibleSpannerDescendant() when column spanner's parent is not a RenderBlockFlow.
https://bugs.webkit.org/show_bug.cgi?id=139188
rdar://problem/18502182
Reviewed by David Hyatt.
This patch ensures that the validation check for spanner in isValidColumnSpanner() is in synch
with the expectation in RenderMultiColumnFlowThread::processPossibleSpannerDescendant().
(descendant's parent is expected to be a RenderBlockFlow)
Test: fast/multicol/svg-content-as-column-spanner-crash.html
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::isValidColumnSpanner):
2014-12-03 peavo@outlook.com <peavo@outlook.com>
[TexMap] Redundant method in GraphicsLayerTextureMapper.
https://bugs.webkit.org/show_bug.cgi?id=138005
Reviewed by Alex Christensen.
The TextureMapperLayer method descendantsOrSelfHaveRunningAnimations() can be used
instead of the GraphicsLayerTextureMapper method startedAnimation().
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::addAnimation):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2014-12-03 Jeremy Jones <jeremyj@apple.com>
Subtitle menu should only appear when useful.
https://bugs.webkit.org/show_bug.cgi?id=139133
Reviewed by Eric Carlson.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController hasLegibleMediaSelectionOptions]): only enable when there are non default options.
(-[WebAVPlayerController hasAudioMediaSelectionOptions]): only enable when there is more than one option.
2014-12-03 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Inline text elements with accessible object attributes and/or event handlers are not exposed
https://bugs.webkit.org/show_bug.cgi?id=139071
Reviewed by Chris Fleizach.
Adds a new InlineRole accessibility role type for non-focusable inline
elements which have an event handler or attribute suggesting possible
inclusion by the platform. This is mapped to ATK_ROLE_STATIC for GTK and
EFL. On the Mac, it is currently ignored to preserve existing behavior.
Added new test cases to the existing roles-exposed.html test.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsDatetimeAttribute): Added.
* accessibility/AccessibilityObject.h: Added InlineRole.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole): Handle InlineRole.
* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Include InlineRole objects.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Ignore InlineRole objects.
* html/HTMLTagNames.in: Added 'time'.
2014-12-03 Jer Noble <jer.noble@apple.com>
[Mac] Hang when calling -[AVAsset resolvedURL].
https://bugs.webkit.org/show_bug.cgi?id=139223
Reviewed by Eric Carlson.
On a particularly slow-loading site, a call to -[AVAsset resolvedURL] can take an arbitrarily long
time. Treat this AVAsset property similar to other "metadata" properties, and check the load status
of the property before requesting it.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin): Check the load state of -resolvedURL.
(WebCore::MediaPlayerPrivateAVFoundationObjC::resolvedURL): Ditto.
(WebCore::assetMetadataKeyNames): Add @"resolvedURL".
2014-12-03 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r176721 to fix ENABLE(CSS_DEVICE_ADAPTATION) build.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseViewportProperty):
2014-12-03 Chris Dumez <cdumez@apple.com>
Move 'display' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139218
Reviewed by Antti Koivisto.
Move 'display' CSS property to the new StyleBuilder.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyDisplay::isValidDisplayValue): Deleted.
(WebCore::ApplyPropertyDisplay::applyInheritValue): Deleted.
(WebCore::ApplyPropertyDisplay::applyInitialValue): Deleted.
(WebCore::ApplyPropertyDisplay::applyValue): Deleted.
(WebCore::ApplyPropertyDisplay::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::isValidDisplayValue):
(WebCore::StyleBuilderCustom::applyInheritDisplay):
(WebCore::StyleBuilderCustom::applyValueDisplay):
* css/makeprop.pl:
Add support for passing multiple values for Custom option, e.g.:
'Custom=Inherit|Value'. This was useful as we did not need custom
code for display's initial value.
2014-12-03 Chris Dumez <cdumez@apple.com>
Modernize the CSSParser code
https://bugs.webkit.org/show_bug.cgi?id=139209
Reviewed by Antti Koivisto.
Modernize the CSSParser code by:
- Using more references instead of pointers
- Using nullptr instead of 0
No new tests, no behavior change.
2014-12-03 David Kilzer <ddkilzer@apple.com>
[iOS] REGRESSION (r176622): WebCore fails to link
Speculative fix for the following build failure:
Ld WebCore
Undefined symbols for architecture armv7s:
"__ZN3JSC10IdentifierC1EPNS_9ExecStateERKN3WTF12AtomicStringE", referenced from:
__ZN7WebCoreL24createAccelerationObjectEPKNS_16DeviceMotionData12AccelerationEPN3JSC9ExecStateE in JSDeviceMotionEventCustom.o
* bindings/js/JSDeviceMotionEventCustom.cpp: Include
<runtime/IdentifierInlines.h> to define missing symbol.
2014-12-02 Dean Jackson <dino@apple.com>
[Media] Audio content shouldn't have fullscreen buttons, even if in a video element
https://bugs.webkit.org/show_bug.cgi?id=139200
<rdar://problem/18914506>
Reviewed by Eric Carlson.
An audio-only resource, even if loaded into a <video> element, should not
present the fullscreen or optimised fullscreen controls. This includes a
MediaDocument, which is always a <video> element. We can detect this by
examining the length of the videoTracks property as our content loads.
Test: media/audio-as-video-fullscreen.html
* Modules/mediacontrols/mediaControlsApple.js:
(Controller): Initialize a hasVisualMedia to false.
(Controller.prototype.handleReadyStateChange): If we see a videoTrack, hasVisualMedia is now true.
(Controller.prototype.updateFullscreenButtons): Merge the updateFullscreenButton and
updateOptimizedFullscreenButton methods into this single spot, and check for
hasVisualMedia.
(Controller.prototype.updateFullscreenButton): Deleted.
(Controller.prototype.updateOptimizedFullscreenButton): Deleted.
* Modules/mediacontrols/mediaControlsBase.js: Do the same for the other ports.
2014-12-02 Dean Jackson <dino@apple.com>
Missing support for innerHTML on SVGElement
https://bugs.webkit.org/show_bug.cgi?id=136903
Unreviewed followup from r176630. Minor style nits that I missed in my review.
* dom/Element.h: Remove unnecessary parameter name.
* html/parser/HTMLTreeBuilder.cpp: Whitespace cleanup.
(WebCore::HTMLTreeBuilder::adjustedCurrentStackItem):
2014-12-03 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
[EFL] Add subtle crypto to the build system
https://bugs.webkit.org/show_bug.cgi?id=138612
Reviewed by Csaba Osztrogonác.
It is obvious to make Efl use GnuTLS as well,
and since there seems no reason why to separate
Efl and Gtk implementations from each other, I
also propose renaming the gtk directory and file
suffixes to gnutls.
No new tests needed.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp: Renamed from Source/WebCore/crypto/gtk/CryptoAlgorithmAES_CBCGtk.cpp.
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
* crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp: Renamed from Source/WebCore/crypto/gtk/CryptoAlgorithmAES_KWGtk.cpp.
(WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
(WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
* crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp: Renamed from Source/WebCore/crypto/gtk/CryptoAlgorithmHMACGtk.cpp.
(WebCore::getGnutlsDigestAlgorithm):
(WebCore::calculateSignature):
(WebCore::CryptoAlgorithmHMAC::platformSign):
(WebCore::CryptoAlgorithmHMAC::platformVerify):
* crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp: Renamed from Source/WebCore/crypto/gtk/CryptoAlgorithmRSAES_PKCS1_v1_5Gtk.cpp.
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
* crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp: Renamed from Source/WebCore/crypto/gtk/CryptoAlgorithmRSASSA_PKCS1_v1_5Gtk.cpp.
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
* crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp: Renamed from Source/WebCore/crypto/gtk/CryptoAlgorithmRSA_OAEPGtk.cpp.
(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
* crypto/gnutls/CryptoAlgorithmRegistryGnuTLS.cpp: Renamed from Source/WebCore/crypto/gtk/CryptoAlgorithmRegistryGtk.cpp.
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
* crypto/gnutls/CryptoDigestGnuTLS.cpp: Renamed from Source/WebCore/crypto/gtk/CryptoDigestGtk.cpp.
(WebCore::CryptoDigest::CryptoDigest):
(WebCore::CryptoDigest::~CryptoDigest):
(WebCore::CryptoDigest::create):
(WebCore::CryptoDigest::addBytes):
(WebCore::CryptoDigest::computeHash):
* crypto/gnutls/CryptoKeyRSAGnuTLS.cpp: Renamed from Source/WebCore/crypto/gtk/CryptoKeyRSAGtk.cpp.
(WebCore::CryptoKeyRSA::CryptoKeyRSA):
(WebCore::CryptoKeyRSA::create):
(WebCore::CryptoKeyRSA::~CryptoKeyRSA):
(WebCore::CryptoKeyRSA::restrictToHash):
(WebCore::CryptoKeyRSA::isRestrictedToHash):
(WebCore::CryptoKeyRSA::keySizeInBits):
(WebCore::CryptoKeyRSA::buildAlgorithmDescription):
(WebCore::CryptoKeyRSA::exportData):
(WebCore::CryptoKeyRSA::generatePair):
* crypto/gnutls/SerializedCryptoKeyWrapGnuTLS.cpp: Renamed from Source/WebCore/crypto/gtk/SerializedCryptoKeyWrapGtk.cpp.
(WebCore::getDefaultWebCryptoMasterKey):
(WebCore::wrapSerializedCryptoKey):
(WebCore::unwrapSerializedCryptoKey):
* crypto/keys/CryptoKeyRSA.h:
2014-12-02 Benjamin Poulain <benjamin@webkit.org>
Little cleanup of the default stylesheet
https://bugs.webkit.org/show_bug.cgi?id=139168
Reviewed by Antti Koivisto.
The default stylesheet has a lot of historical junk that need cleaning. This patch addresses
only the bits that do not change behaviors and have positive perf and readability impact.
I have limited :matches() to attributes for now. The idea is to only target
simple selectors that are not used for filtering by the collectors.
We should eventually clean up more cases, one thing at a time.
Tests: fast/css/map-tag-default-display.html
fast/selectors/map-tag-default-display.html
* css/html.css:
(map): Deleted.
map was explicitely setting its display to inline. Remove that since it is the default.
(head): Deleted.
(meta): Deleted.
(title): Deleted.
(link): Deleted.
(style): Deleted.
(script): Deleted.
(div): Deleted.
(layer): Deleted.
(article, aside, footer, header, hgroup, main, nav, section): Deleted.
(address): Deleted.
(head, link, meta, script, style, title):
(address, article, aside, div, footer, header, hgroup, layer, main, nav, section):
Group the standard blocks in a single rule.
(input:matches([type="hidden"], [type="image"], [type="file"])):
(input:matches([type="radio"], [type="checkbox"])):
(input:matches([type="button"], [type="submit"], [type="reset"])):
(input:matches([type="button"], [type="submit"], [type="reset"]), input[type="file"]::-webkit-file-upload-button, button):
(input:matches([type="button"], [type="submit"], [type="reset"]):active, input[type="file"]::-webkit-file-upload-button:active, button:active):
(input:matches([type="button"], [type="submit"], [type="reset"]):active, input[type="file"]:active::-webkit-file-upload-button, button:active):
(input[type="file"]:active:disabled::-webkit-file-upload-button, button:active:disabled):
(input:matches([type="checkbox"], [type="radio"]):checked):
(input:matches([type="checkbox"], [type="radio"]):checked:disabled):
(select:matches([size], [multiple], [size][multiple])):
(select:matches([size="0"], [size="1"])):
(input[type="hidden"], input[type="image"], input[type="file"]): Deleted.
(input[type="radio"], input[type="checkbox"]): Deleted.
(input[type="button"], input[type="submit"], input[type="reset"]): Deleted.
(input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::-webkit-file-upload-button, button): Deleted.
(input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]::-webkit-file-upload-button:active, button:active): Deleted.
(input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]:active::-webkit-file-upload-button, button:active): Deleted.
(input[type="button"]:active:disabled, input[type="submit"]:active:disabled, input[type="reset"]:active:disabled, input[type="file"]:active:disabled::-webkit-file-upload-button, button:active:disabled): Deleted.
(input[type="checkbox"]:checked, input[type="radio"]:checked): Deleted.
(input[type="checkbox"]:checked:disabled, input[type="radio"]:checked:disabled): Deleted.
(select[size][multiple]): Deleted.
(select[size="1"]): Deleted.
Group every selector lists that only differentiates complex selectors through attributes
into a simple complex selector with :matches().
2014-12-02 Mark Lam <mark.lam@apple.com>
Rolling out r176592, r176603, r176616, and r176705 until build and perf issues are resolved.
https://bugs.webkit.org/show_bug.cgi?id=138821
Not reviewed.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::deserializeString):
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::isBadMatch):
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::buildSelectionHighlight):
* platform/graphics/SegmentedFontData.cpp:
(WebCore::SegmentedFontData::fontDataForCharacter):
(WebCore::SegmentedFontData::containsCharacter):
(WebCore::SegmentedFontData::isLoading):
* platform/graphics/WOFFFileFormat.cpp:
(WebCore::convertWOFFToSfnt):
* platform/graphics/cairo/GradientCairo.cpp:
(WebCore::Gradient::platformGradient):
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::clearFrameBufferCache):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintFillLayers):
* rendering/style/GridResolvedPosition.cpp:
(WebCore::firstNamedGridLineBeforePosition):
(WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
* svg/SVGFontElement.cpp:
(WebCore::kerningForPairOfStringsAndGlyphs):
* svg/SVGPathByteStream.h:
(WebCore::SVGPathByteStream::append):
* xml/XPathNodeSet.h:
(WebCore::XPath::NodeSet::begin):
(WebCore::XPath::NodeSet::end):
2014-12-02 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Fix build break EFL port since r176696
https://bugs.webkit.org/show_bug.cgi?id=139215
Unreviewed, build fix for EFL port.
* storage/StorageNamespaceProvider.h: Include SecurityOriginHash.h from WebCore/page directory.
2014-12-02 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Table captions and table rows are missing from the accessible hierarchy
https://bugs.webkit.org/show_bug.cgi?id=139005
Reviewed by Chris Fleizach.
Expose table captions and rows via ATK. Accomplishing the former is done
by role mapping and inclusion of the object as a child of the table for
ATK. Accomplishing the latter was mostly a matter of deleting all the ATK
platform code that had been forcing rows to be ignored. Because captions
are not being exposed on the Mac, they are now explicitly being ignored
for that platform.
Tests: accessibility/aria-table-hierarchy.html
accessibility/table-hierarchy.html
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole): Added CaptionRole.
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren): Include non-ignored captions as table children.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetNChildren): Removed special handling for tables.
(webkitAccessibleRefChild): Removed special handling for tables.
(webkitAccessibleGetIndexInParent): Removed special handling for table cells.
(atkRole): Corrected broken mapping for RowRole.
(getNChildrenForTable): Deleted.
(getChildForTable): Deleted.
(getIndexInParentForCellInRow): Deleted.
* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Ignore captions as table children.
2014-12-02 Alexey Proskuryakov <ap@apple.com>
http/tests/appcache/main-resource-fallback-for-network-error-crash.html can break subsequent tests
https://bugs.webkit.org/show_bug.cgi?id=139149
Reviewed by Anders Carlsson.
* WebCore.exp.in: Added ApplicationCache::deleteAllCaches.
* loader/appcache/ApplicationCache.h:
* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::deleteAllCaches): Added.
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::getManifestURLs): Removed logging. It is OK to
have this function called when there is no database file.
* loader/appcache/ApplicationCacheStorage.h: Renamed manifestURLs to getManifestURLs,
because WebKit style.
2014-12-02 Tim Horton <timothy_horton@apple.com>
Remove a SnowLeopard-era quirk for QuickLook
https://bugs.webkit.org/show_bug.cgi?id=139208
<rdar://problem/19121822>
Reviewed by Alexey Proskuryakov.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy):
* loader/FrameLoaderClient.h:
* platform/mac/QuickLookMac.h: Removed.
* platform/mac/QuickLookMac.mm: Removed.
2014-12-02 Anders Carlsson <andersca@apple.com>
Begin stubbing out a StorageNamespaceProvider class
https://bugs.webkit.org/show_bug.cgi?id=139203
Reviewed by Tim Horton.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Add new files.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::localStorage):
If the page has a storage namespace provider, get the local storage from it.
* page/Page.cpp:
(WebCore::Page::Page):
Move the storage namespace provider from the configuration.
(WebCore::Page::setStorageNamespaceProvider):
Add a setter. This will be used by setGroupName.
* page/Page.h:
(WebCore::Page::storageNamespaceProvider):
Add a getter.
* page/PageConfiguration.cpp:
* page/PageConfiguration.h:
Add a storage namespace provider member.
* storage/StorageNamespaceProvider.cpp:
(WebCore::StorageNamespaceProvider::StorageNamespaceProvider):
(WebCore::StorageNamespaceProvider::~StorageNamespaceProvider):
(WebCore::StorageNamespaceProvider::addPage):
(WebCore::StorageNamespaceProvider::removePage):
(WebCore::StorageNamespaceProvider::localStorageNamespace):
(WebCore::StorageNamespaceProvider::transientLocalStorageNamespace):
* storage/StorageNamespaceProvider.h:
Stub out a storage namespace provider class.
2014-12-02 Beth Dakin <bdakin@apple.com>
More build fixing.
* platform/spi/mac/QuickLookMacSPI.h:
2014-12-02 Beth Dakin <bdakin@apple.com>
Another build fix.
* platform/spi/mac/NSMenuSPI.h:
2014-12-02 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* platform/spi/mac/QuickLookMacSPI.h:
2014-12-02 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* platform/spi/mac/QuickLookMacSPI.h:
2014-12-02 Eric Carlson <eric.carlson@apple.com>
Unreviewed, fix typo introduced in r176673.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
2014-12-02 Beth Dakin <bdakin@apple.com>
Should use standardQuickLookMenuItem for apps that don't implement customizations
https://bugs.webkit.org/show_bug.cgi?id=139193
-and corresponding-
rdar://problem/18944696
Reviewed by Anders Carlsson.
New SPI headers.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/NSMenuSPI.h: Added.
* platform/spi/mac/QuickLookMacSPI.h: Added.
2014-12-02 Gavin Barraclough <barraclough@apple.com>
Generalize PageActivityAssertionToken
https://bugs.webkit.org/show_bug.cgi?id=139106
Reviewed by Sam Weinig.
PageActivityAssertionToken is a RAII mechanism implementing a counter, used by PageThrottler
to count user visible activity in progress on the page (currently page load and media playback).
Use of an RAII type is prevents a number of possible errors, including double counting a single
media element, or failing to decrement the count after a media element has been deallocated.
The current implementation has a number of drawbacks that have been addressed by this refactoring:
- specific to single use in PageThrottler class - not reusable.
- incomplete encapsulation - the counter and WeakPtrFactory that comprise the current implementation
are not encapsulated (are in the client type, PageThrottler).
- tokens are not shared - PageActivityAssertionToken instances are managed by std::unique, every
increment requires an object allocation.
- redundancy - the current implementation uses a WeakPtr to safely reference the PageThrottler, this
is internally implemented using a reference counted type, resulting in two counters being
incremented (one in the PageActivityAssertionToken, one in the PageThrottler).
In the reimplementation:
- a callback is provided via a lambda function, which allows for easy reuse without a lot of
boilerplate code.
- the counter, callback and ownership of the otherwise weakly-owned token is encapsulated within the
RefCounter type.
- a single count within RefCounter::Count stores the counter value, and also manage the lifetime
of this object.
- standard RefPtrs are used to manage references to the RefCounter::Count.
* WebCore.xcodeproj/project.pbxproj:
- removed PageActivityAssertionToken.cpp/.h
* html/HTMLMediaElement.cpp:
- removed PageActivityAssertionToken.h
* html/HTMLMediaElement.h:
- std::unique_ptr<PageActivityAssertionToken> -> RefPtr<RefCounter::Count>
* loader/FrameLoader.cpp:
- removed PageActivityAssertionToken.h
* loader/FrameLoader.h:
- std::unique_ptr<PageActivityAssertionToken> -> RefPtr<RefCounter::Count>
* loader/SubresourceLoader.cpp:
- removed PageActivityAssertionToken.h
* loader/SubresourceLoader.h:
- removed class PageActivityAssertionToken
* page/Page.cpp:
- removed PageActivityAssertionToken.h
(WebCore::Page::Page):
- removed Page* parameter to PageThrottler
* page/Page.h:
- removed class PageActivityAssertionToken
* page/PageActivityAssertionToken.cpp: Removed.
* page/PageActivityAssertionToken.h: Removed.
- removed PageActivityAssertionToken.cpp/.h
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
- removed m_page, m_weakPtrFactory, m_activityCount; added m_pageActivityCounter.
(WebCore::PageThrottler::mediaActivityToken):
- std::unique_ptr<PageActivityAssertionToken> -> PassRefPtr<RefCounter::Count>
(WebCore::PageThrottler::pageLoadActivityToken):
- std::unique_ptr<PageActivityAssertionToken> -> PassRefPtr<RefCounter::Count>
(WebCore::PageThrottler::pageActivityCounterValueDidChange):
- merged functionality of incrementActivityCount/decrementActivityCount
(WebCore::PageThrottler::incrementActivityCount): Deleted.
- see pageActivityCounterValueDidChange
(WebCore::PageThrottler::decrementActivityCount): Deleted.
- see pageActivityCounterValueDidChange
* page/PageThrottler.h:
(WebCore::PageThrottler::weakPtr): Deleted.
- no longer required; this functionality is now encapsulated within RefCounter.
2014-12-02 Tim Horton <timothy_horton@apple.com>
Always show the arrow for text selection services
https://bugs.webkit.org/show_bug.cgi?id=139191
<rdar://problem/18903995>
Reviewed by Anders Carlsson.
* platform/spi/mac/DataDetectorsSPI.h:
* page/mac/ServicesOverlayController.mm:
Move a few things to DataDetectorsSPI.h.
(WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
(WebCore::ServicesOverlayController::buildSelectionHighlight):
Make use of the real DDHighlightStyle names.
Add DDHighlightStyleButtonShowAlways for selection services.
2014-12-02 Anders Carlsson <andersca@apple.com>
Fix iOS build.
* WebCore.exp.in:
2014-12-02 Chris Dumez <cdumez@apple.com>
Crash when setting 'flex' CSS property to 'calc(2 * 3) calc(2 * 3)'
https://bugs.webkit.org/show_bug.cgi?id=139162
Reviewed by Darin Adler.
Add support for calculated values in 'flex' CSS property.
Previously, those did not work in release builds, and were hitting
an assertion in debug builds.
Test: fast/css/flex-calculated-value.html
* css/CSSParser.cpp:
(WebCore::CSSParser::validCalculationUnit):
Do not call RefPtr::release() as we are not interested in the return
value. Assign nullptr to the member instead.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillPositionComponent):
(WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
(WebCore::CSSParser::parseFontWeight):
(WebCore::CSSParser::parsedDouble):
(WebCore::CSSParser::colorIntFromValue):
(WebCore::CSSParser::parseColorParameters):
(WebCore::CSSParser::parseHSLParameters):
(WebCore::CSSParser::parseFlex):
* css/CSSParser.h:
2014-12-02 Eric Carlson <eric.carlson@apple.com>
Fix logging typo
https://bugs.webkit.org/show_bug.cgi?id=139182
Reviewed by Alexey Proskuryakov.
No new tests, only logging code is changed.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Don't use %f to log a string.
2014-12-02 Anders Carlsson <andersca@apple.com>
Get rid of the WinINet based network implementation
https://bugs.webkit.org/show_bug.cgi?id=139187
Reviewed by Andreas Kling.
This code was only used by the Windows CE port. Now it's unused.
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/win/AuthenticationChallenge.h: Removed.
* platform/network/win/CookieJarWin.cpp: Removed.
* platform/network/win/CredentialStorageWin.cpp: Removed.
* platform/network/win/ProxyServerWin.cpp: Removed.
* platform/network/win/ResourceError.h: Removed.
* platform/network/win/ResourceHandleWin.cpp: Removed.
* platform/network/win/ResourceRequest.h: Removed.
* platform/network/win/ResourceResponse.h: Removed.
* platform/network/win/SocketStreamError.h: Removed.
* platform/network/win/SocketStreamHandle.h: Removed.
* platform/network/win/SocketStreamHandleWin.cpp: Removed.
2014-12-02 Chris Dumez <cdumez@apple.com>
Crash when setting 'column-span' CSS property to 'calc(2 * 3)'
https://bugs.webkit.org/show_bug.cgi?id=139170
Reviewed by Darin Adler.
Add support for calculated values for 'column-span' and 'column-width'
CSS properties. Previously, these were not working in release builds
and hitting assertions in debug builds.
Tests: fast/css/column-width-calculated-value.html
fast/css/webkit-column-span-calculated-value.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
2014-12-02 Anders Carlsson <andersca@apple.com>
Remove visited link handling from PageGroup
https://bugs.webkit.org/show_bug.cgi?id=139185
Reviewed by Sam Weinig.
* CMakeLists.txt:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* loader/HistoryController.cpp:
* page/Chrome.cpp:
(WebCore::ChromeClient::populateVisitedLinks): Deleted.
* page/ChromeClient.h:
* page/DefaultVisitedLinkStore.cpp: Removed.
* page/DefaultVisitedLinkStore.h: Removed.
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
(WebCore::Page::visitedLinkStore):
(WebCore::Page::setVisitedLinkStore):
(WebCore::Page::removeAllVisitedLinks): Deleted.
* page/Page.h:
* page/PageGroup.cpp:
(WebCore::PageGroup::PageGroup):
(WebCore::PageGroup::visitedLinkStore): Deleted.
(WebCore::PageGroup::isLinkVisited): Deleted.
(WebCore::PageGroup::addVisitedLinkHash): Deleted.
(WebCore::PageGroup::addVisitedLink): Deleted.
(WebCore::PageGroup::removeVisitedLink): Deleted.
(WebCore::PageGroup::removeVisitedLinks): Deleted.
(WebCore::PageGroup::removeAllVisitedLinks): Deleted.
(WebCore::PageGroup::setShouldTrackVisitedLinks): Deleted.
* page/PageGroup.h:
2014-12-02 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
Use references instead of pointers in EditingStyle
https://bugs.webkit.org/show_bug.cgi?id=137918
Reviewed by Darin Adler.
* editing/EditingStyle.cpp:
(WebCore::extractPropertyValue):
(WebCore::identifierForStyleProperty):
(WebCore::textColorFromStyle):
(WebCore::backgroundColorFromStyle):
(WebCore::textAlignResolvingStartAndEnd):
(WebCore::EditingStyle::triStateOfStyle):
(WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::EditingStyle::removeStyleFromRulesAndContext):
(WebCore::StyleChange::StyleChange):
(WebCore::setTextDecorationProperty):
(WebCore::StyleChange::extractTextStyles):
(WebCore::diffTextDecorations):
(WebCore::fontWeightIsBold):
(WebCore::extractPropertiesNotIn):
(WebCore::getPropertiesNotIn):
* editing/EditingStyle.h:
2014-12-02 Bartlomiej Gajda <b.gajda@samsung.com>
[GStreamer] Media Source sending seek event fails.
https://bugs.webkit.org/show_bug.cgi?id=139181
Reviewed by Philippe Normand.
There were callbacks connected to app_src on 'seek', but if stream type is not seekable, they would never launch,
and seeking (as in MediaPlayerPrivateGStreamer::doSeek) fails.
No new tests needed.
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
(webkit_media_src_init):
2014-12-02 Chris Dumez <cdumez@apple.com>
Move 'font-family' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139172
Reviewed by Antti Koivisto.
Move 'font-family' CSS property to the new StyleBuilder by using
custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyFontFamily::applyInheritValue): Deleted.
(WebCore::ApplyPropertyFontFamily::applyInitialValue): Deleted.
(WebCore::ApplyPropertyFontFamily::applyValue): Deleted.
(WebCore::ApplyPropertyFontFamily::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialFontFamily):
(WebCore::StyleBuilderCustom::applyInheritFontFamily):
(WebCore::StyleBuilderCustom::applyValueFontFamily):
2014-12-02 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
Fix class was previously declared as a struct warnings
https://bugs.webkit.org/show_bug.cgi?id=139131
Reviewed by Csaba Osztrogonác.
No new tests needed.
* platform/graphics/texmap/TextureMapperGL.h:
2014-12-02 Sylvain Galineau <galineau@adobe.com>
Missing support for innerHTML on SVGElement
https://bugs.webkit.org/show_bug.cgi?id=136903
Reviewed by Dean Jackson.
Two parts to this patch:
1. Move innerHTML/outerHTML to Element so SVG elements can inherit them, per https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#innerhtml
2. Make sure fragment insertion is processed relative to the proper node, per http://www.whatwg.org/specs/web-apps/current-work/#adjusted-current-node
The latter part was ported over from Blink.
Test: svg/in-html/svg-inner-html.html
* bindings/objc/PublicDOMInterfaces.h: Move innerHTML/outerHTML to Element.
* dom/Element.cpp:
(WebCore::Element::mergeWithNextTextNode): Helper used by Element::innerHTML/outerHTML as well as HTMLElement::innerText/outerText; moved to Element as protected static.
(WebCore::Element::innerHTML): Moved from HTMLElement.
(WebCore::Element::outerHTML): Moved from HTMLElement.
(WebCore::Element::setOuterHTML): Moved from HTMLElement.
(WebCore::Element::setInnerHTML): Moved from HTMLElement.
* dom/Element.h:
* dom/Element.idl:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::innerHTML): Deleted.
(WebCore::HTMLElement::outerHTML): Deleted.
(WebCore::HTMLElement::setInnerHTML): Deleted.
(WebCore::mergeWithNextTextNode): Deleted.
(WebCore::HTMLElement::setOuterHTML): Deleted.
* html/HTMLElement.h:
* html/HTMLElement.idl:
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext): no more m_contextElement.
(WebCore::HTMLTreeBuilder::constructTree): read namespace from adjusted current node.
(WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately): use contextElementStackItem for insertion.
(WebCore::HTMLTreeBuilder::adjustedCurrentStackItem): compute adjusted current node.
(WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent): use adjusted current node for context.
(WebCore::HTMLTreeBuilder::processTokenInForeignContent): use adjusted current node to read namespace.
* html/parser/HTMLTreeBuilder.h:
(WebCore::HTMLTreeBuilder::FragmentParsingContext::contextElement): Deleted. Read from contextElementStackItem.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::contextElementStackItem): Added.
2014-11-20 Jeffrey Pfau <jpfau@apple.com>
Add cancelable version of willSendRequest
https://bugs.webkit.org/show_bug.cgi?id=138987
Reviewed by Anders Carlsson.
Covered by existing tests.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest):
* loader/ResourceLoader.h:
2014-12-01 Benjamin Poulain <benjamin@webkit.org>
Add the dynamic specificity of the selector list argument when matching :nth-child() and :nth-last-child()
https://bugs.webkit.org/show_bug.cgi?id=139001
Reviewed by Andreas Kling.
When matching :nth-child(An+B of selector list) or :nth-last-child(An+B of selector list),
we were previously ignoring the arguments.
That behavior seems to be confusing for users. We made the proposal to include the selector list
like when using :matches():
http://lists.w3.org/Archives/Public/www-style/2014Oct/0533.html
David Baron also agrees with this behavior:
http://lists.w3.org/Archives/Public/www-style/2014Oct/0534.html
This patch adds the specificity computation.
Tests: fast/css/nth-child-specificity-1.html
fast/css/nth-child-specificity-2.html
fast/css/nth-last-child-specificity-1.html
fast/css/nth-last-child-specificity-2.html
* css/CSSSelector.cpp:
(WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::matchSelectorList):
* css/SelectorChecker.h:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
2014-12-01 Chris Dumez <cdumez@apple.com>
Move 'text-shadow' / 'box-shadow' / '-webkit-box-shadow' to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138938
Reviewed by Sam Weinig.
Move 'text-shadow' / 'box-shadow' / '-webkit-box-shadow' CSS properties
from StyleResolver to the new StyleBuilder by using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyTextOrBoxShadowValue):
(WebCore::StyleBuilderCustom::applyInitialTextShadow):
(WebCore::StyleBuilderCustom::applyInheritTextShadow):
(WebCore::StyleBuilderCustom::applyValueTextShadow):
(WebCore::StyleBuilderCustom::applyInitialBoxShadow):
(WebCore::StyleBuilderCustom::applyInheritBoxShadow):
(WebCore::StyleBuilderCustom::applyValueBoxShadow):
(WebCore::StyleBuilderCustom::applyInitialWebkitBoxShadow):
(WebCore::StyleBuilderCustom::applyInheritWebkitBoxShadow):
(WebCore::StyleBuilderCustom::applyValueWebkitBoxShadow):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2014-12-01 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Add a ENABLE_CSS_SCROLL_SNAP macro to CMake build system
https://bugs.webkit.org/show_bug.cgi?id=139085
Reviewed by Andreas Kling.
* PlatformEfl.cmake:
Include page/scrolling/AxisScrollSnapOffsets.cpp to EFL build files to fix build break.
2014-12-01 Zalan Bujtas <zalan@apple.com>
Twitter avatar moves when hovering/unhovering the "follow" button.
https://bugs.webkit.org/show_bug.cgi?id=139147
rdar://problem/19096508
Reviewed by Simon Fraser.
This patch ensures that the out of flow positioned render boxes (RenderReplaced) do not
get repositioned when their inline box wrappers move.
Ideally, out of flow positioned renderers do not have inline wrappers by the time we start
placing inline boxes, but in certain case (optimized code path for descendantsHaveSameLineHeightAndBaseline()),
they are still part of the inline box tree.
This patch prevents those renderer boxes from getting positioned as part of the inline box placement.
They will get removed later at RenderBlockFlow::computeBlockDirectionPositionsForLine().
Test: fast/inline/out-of-flow-positioned-render-replaced-box-moves.html
* rendering/InlineBox.cpp:
(WebCore::InlineBox::adjustPosition):
2014-12-01 Tim Horton <timothy_horton@apple.com>
Null deref under TextIndicator::createWithSelectionInFrame using find-in-page on bugzilla
https://bugs.webkit.org/show_bug.cgi?id=139164
<rdar://problem/19107247>
Reviewed by Beth Dakin.
* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithSelectionInFrame):
Null-check the ImageBuffer in addition to the Image.
2014-12-01 Anders Carlsson <andersca@apple.com>
Remove IWebCookieManager on Windows
https://bugs.webkit.org/show_bug.cgi?id=139144
Reviewed by Sam Weinig.
Remove code that handles overriding the cookie storage.
* platform/network/NetworkStorageSession.h:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::cookieStorageOverride): Deleted.
(WebCore::overrideCookieStorage): Deleted.
(WebCore::overridenCookieStorage): Deleted.
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):
2014-12-01 Dean Jackson <dino@apple.com>
[iOS Media] Slider knob should not have a border
https://bugs.webkit.org/show_bug.cgi?id=139160
<rdar://problem/19075185>
Reviewed by Jer Noble.
The change in r175715 required adding !important to a bunch
of rules for pseudo elements. The border width of slider knobs
for media controls should be zero, so add an !important there.
* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-timeline::-webkit-slider-thumb): Change
border to border-width and force it to zero.
2014-12-01 Chris Dumez <cdumez@apple.com>
Take into consideration canvas drawing for throttling DOM timers
https://bugs.webkit.org/show_bug.cgi?id=139140
<rdar://problem/19102218>
Reviewed by Andreas Kling.
Take into consideration canvas drawing for throttling DOM timers so
that:
- Timers drawing on a visible canvas can no longer get throttled.
This fixes the following sites:
- http://hint.fm/wind/
- http://radar.weather.gov/Conus/full_loop.php
- Timers that are drawing on a canvas that is not user observable
now get throttled, thus using less CPU. As an example, on
http://hint.fm/wind/, CPU usage is at 110% when the canvas is
inside the viewport on my machine. CPU usage would remain at
110% when scrolling the canvas outside the viewport before this
patch. After this patch, the CPU usage goes down to 5% when
the canvas is outside the viewport.
Tests: fast/canvas/canvas-inside-viewport-timer-throttling.html
fast/canvas/canvas-outside-viewport-timer-throttling.html
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::putDelegate):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::notifyObserversCanvasChanged):
* page/DOMTimer.cpp:
(WebCore::DOMTimerFireState::setScriptMadeNonUserObservableChangesToElement):
(WebCore::DOMTimer::scriptDidCauseElementRepaint):
(WebCore::DOMTimerFireState::setScriptMadeNonUserObservableChangesToElementStyle): Deleted.
(WebCore::DOMTimer::scriptDidUpdateStyleOfElement): Deleted.
* page/DOMTimer.h:
2014-12-01 Myles C. Maxfield <mmaxfield@apple.com>
Crash in Font::dashesForIntersectionsWithRect() due to underlining SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=139158
Reviewed by Simon Fraser.
RenderingContexts are only created if the primary SimpleFontData is an SVG font,
but dashesForIntersectionWithRect() uses the first character's SimpleFontData.
One might be an SVG font but the other might not be.
Note that this brittle design will be fixed with the SVG -> OTF translator.
Test: fast/css3-text/css3-text-decoration/text-decoration-skip/decoration-skip-crash-fallback-svg.html
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::dashesForIntersectionsWithRect):
2014-12-01 Bartlomiej Gajda <b.gajda@samsung.com>
[MSE] Fix not always calling mediaPlayer seek.
https://bugs.webkit.org/show_bug.cgi?id=139139
Reviewed by Jer Noble.
Original comment states that media source shall always be notified of seek if it's not closed.
No new tests needed.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::seekTimerFired):
2014-12-01 Tim Horton <timothy_horton@apple.com>
Implement yellow highlight for WebKit1 data detectors
https://bugs.webkit.org/show_bug.cgi?id=138956
<rdar://problem/18992185>
Reviewed by Beth Dakin.
* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithSelectionInFrame):
(WebCore::TextIndicator::TextIndicator):
* page/TextIndicator.h:
(WebCore::TextIndicator::selectionRectInScreenCoordinates):
(WebCore::TextIndicator::textBoundingRectInScreenCoordinates):
(WebCore::TextIndicator::selectionRectInWindowCoordinates): Deleted.
(WebCore::TextIndicator::textBoundingRectInWindowCoordinates): Deleted.
Store TextIndicator rects in screen coordinates, since that's what we
want anyway, and this makes it easier to share this code between the WebKits.
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
(WebCore::TextIndicatorWindow::setTextIndicator):
Avoid some rect conversion because the TextIndicator rects are already in screen coordinates.
2014-12-01 Anders Carlsson <andersca@apple.com>
Remove old site specific quirks code that was added in 2009
https://bugs.webkit.org/show_bug.cgi?id=139141
Reviewed by Antti Koivisto.
* platform/network/NetworkingContext.h:
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::start):
2014-12-01 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: DOMExceptions do not show the error message string in Pause Reason section
https://bugs.webkit.org/show_bug.cgi?id=138988
Reviewed by Timothy Hatcher.
* inspector/WebInjectedScriptHost.cpp:
(WebCore::WebInjectedScriptHost::type):
Give all DOM Exception types the "error" RemoteObject subtype.
2014-12-01 Bartlomiej Gajda <b.gajda@samsung.com>
[MSE] Unset timestamps of trackbuffers during Reset Parser State algorithm.
https://bugs.webkit.org/show_bug.cgi?id=139075.
Reviewed by Jer Noble.
Specification requires from us to unset timestamps for trackBuffers
during abort() method.
Test: media/media-source/media-source-append-nonsync-sample-after-abort.html
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::resetParserState):
(WebCore::SourceBuffer::abort):
* Modules/mediasource/SourceBuffer.h:
2014-12-01 Chris Dumez <cdumez@apple.com>
Transform StyleBuilderCustom into a class and mark it as a friend of RenderStyle
https://bugs.webkit.org/show_bug.cgi?id=138999
Reviewed by Sam Weinig.
Transform StyleBuilderCustom into a class and mark it as a friend of
RenderStyle. This is needed because some of the StyleBuilderCustom
functions need to access RenderStyle's private API.
No new tests, no behavior change.
* css/StyleBuilderCustom.h:
Move functions from StyleBuilderFunctions namespace to
StyleBuilderCustom class.
* css/makeprop.pl:
Use StyleBuilderCustom scope instead of StyleBuilderFunctions for
custom implementation.
* rendering/style/RenderStyle.h:
Mark StyleBuilderCustom class as a friend, similarly to what was
already done for DeprecatedStyleBuilder and StyleResolver.
2014-11-17 Oliver Hunt <oliver@apple.com>
Make sure range based iteration of Vector<> still receives bounds checking
https://bugs.webkit.org/show_bug.cgi?id=138821
Reviewed by Mark Lam.
There are a few uses of begin()/end() that explicitly require pointers,
so we use getPtr() to extract the underlying pointer generically.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::deserializeString):
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::isBadMatch):
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::buildSelectionHighlight):
* platform/graphics/SegmentedFontData.cpp:
(WebCore::SegmentedFontData::fontDataForCharacter):
(WebCore::SegmentedFontData::containsCharacter):
(WebCore::SegmentedFontData::isLoading):
* platform/graphics/WOFFFileFormat.cpp:
(WebCore::convertWOFFToSfnt):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintFillLayers):
* rendering/style/GridResolvedPosition.cpp:
(WebCore::firstNamedGridLineBeforePosition):
(WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
* svg/SVGFontElement.cpp:
(WebCore::kerningForPairOfStringsAndGlyphs):
* svg/SVGPathByteStream.h:
(WebCore::SVGPathByteStream::append):
* xml/XPathNodeSet.h:
(WebCore::XPath::NodeSet::begin):
(WebCore::XPath::NodeSet::end):
2014-11-29 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Fix a build warning when CSS_SCROLL_SNAP is enabled
https://bugs.webkit.org/show_bug.cgi?id=139084
Reviewed by Andrei Bucur.
Fix a build warning. Copy constructor of StyleScrollSnapPoints should initialize its base class.
* rendering/style/StyleScrollSnapPoints.cpp:
(WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints): Call RefCounted().
2014-11-29 Sam Weinig <sam@webkit.org>
Move the '-webkit-locale', '-webkit-text-orientation', '-webkit-writing-mode', '-webkit-justify-self' and '-webkit-perspective' CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139104
Reviewed by Anders Carlsson.
* css/CSSPropertyNames.in:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueWebkitLocale):
(WebCore::StyleBuilderFunctions::applyValueWebkitWritingMode):
(WebCore::StyleBuilderFunctions::applyValueWebkitTextOrientation):
(WebCore::StyleBuilderFunctions::applyValueWebkitJustifySelf):
(WebCore::StyleBuilderFunctions::applyValueWebkitPerspective):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2014-11-29 Anders Carlsson <andersca@apple.com>
Add an EmptyVisitedLinkStore implementation
https://bugs.webkit.org/show_bug.cgi?id=139102
Reviewed by Sam Weinig.
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
* loader/EmptyClients.h:
2014-11-28 Sam Weinig <sam@webkit.org>
Move the '-webkit-initial-letter', '-webkit-line-box-contain' and '-webkit-text-stroke-width' CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139053
Reviewed by Andreas Kling.
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertInitialLetter):
(WebCore::StyleBuilderConverter::convertTextStrokeWidth):
(WebCore::StyleBuilderConverter::convertLineBoxContain):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2014-11-26 Philippe Normand <pnormand@igalia.com>
[GStreamer] HTTP source element lacks SCHEDULING query support
https://bugs.webkit.org/show_bug.cgi?id=139064
Reviewed by Carlos Garcia Campos.
No new tests, covered by http/tests/media/hls.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcQueryWithParent): Make the element handle SCHEDULING
queries with the BANDWIDTH_LIMITED flag. This helps uridecodebin
to configure itself for adaptive streaming playback scenarios.
2014-11-27 Ryuan Choi <ryuan.choi@navercorp.com>
[EFL] Remove E_Dbus dependency
https://bugs.webkit.org/show_bug.cgi?id=136355
Reviewed by Gyuyoung Kim.
E_Dbus is the simple wrapper of Dbus but it has not been maintained since EFL 1.8.
Instead, EFL introduced Eldbus, which is almost similar with E_Dbus but provides more dbus like interface.
This patch replaces E_Dbus implementation to Eldbus.
* PlatformEfl.cmake:
* platform/efl/BatteryProviderEfl.cpp:
(WebCore::BatteryProviderEfl::BatteryProviderEfl):
(WebCore::BatteryProviderEfl::~BatteryProviderEfl):
(WebCore::BatteryProviderEfl::stopUpdating):
(WebCore::batteryProperties):
(WebCore::batteryPropertiesChanged):
(WebCore::BatteryProviderEfl::deviceTypeCallback):
(WebCore::BatteryProviderEfl::enumerateDevices):
(WebCore::BatteryProviderEfl::startUpdating):
(WebCore::BatteryProviderEfl::setBatteryStatus):
(WebCore::BatteryProviderEfl::timerFired): Deleted.
(WebCore::BatteryProviderEfl::getBatteryStatus): Deleted.
(WebCore::BatteryProviderEfl::setBatteryClient): Deleted.
* platform/efl/BatteryProviderEfl.h:
(WebCore::BatteryProviderEfl::connection):
(WebCore::BatteryProviderEfl::setSignalHandler):
(WebCore::BatteryProviderEfl::~BatteryProviderEfl): Deleted.
2014-11-27 Antti Koivisto <antti@apple.com>
CrashTracer: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::HTMLPlugInImageElement::updateSnapshot + 108
https://bugs.webkit.org/show_bug.cgi?id=139057
Reviewed by Anders Carlsson.
No test, don't know how to repro.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::updateSnapshot): Null check the renderer.
2014-11-27 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Meter and Option elements do not expose their id attribute
https://bugs.webkit.org/show_bug.cgi?id=139017
Reviewed by Mario Sanchez Prada.
The options in a collapsed select element lack a node, so get the id
attribute from the associated action element. In the case of a meter,
the meter element itself is not exposed; its RenderMeter is instead.
So associate the meter element's id with the exposed RenderMeter.
No new tests. Instead, updated existing expectations to reflect the fix.
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::element):
* accessibility/AccessibilityProgressIndicator.h:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
2014-11-27 Anders Carlsson <andersca@apple.com>
Add a Page::setVisitedLinkStore member function
https://bugs.webkit.org/show_bug.cgi?id=139065
Reviewed by Antti Koivisto.
This will be used in a subsequent commit.
* WebCore.exp.in:
* page/Page.cpp:
(WebCore::Page::setVisitedLinkStore):
* page/Page.h:
2014-11-25 Sukolsak Sakshuwong <sukolsak@gmail.com>
Add parsing for :dir()
https://bugs.webkit.org/show_bug.cgi?id=138932
Reviewed by Benjamin Poulain.
Add support for parsing :dir() pseudo class. The implementation of selector
matching will be in a follow-up patch.
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSSelector.cpp:
(WebCore::appendPseudoClassFunctionTail):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
2014-11-25 Anders Carlsson <andersca@apple.com>
Remove user content handling from PageGroup
https://bugs.webkit.org/show_bug.cgi?id=139051
Reviewed by Antti Koivisto.
Remove m_userContentController from PageGroup and the related functions and symbol exports.
* WebCore.exp.in:
* page/PageGroup.cpp:
(WebCore::PageGroup::PageGroup):
(WebCore::PageGroup::~PageGroup):
(WebCore::PageGroup::addPage):
(WebCore::PageGroup::removePage):
(WebCore::PageGroup::addUserScriptToWorld): Deleted.
(WebCore::PageGroup::addUserStyleSheetToWorld): Deleted.
(WebCore::PageGroup::removeUserScriptFromWorld): Deleted.
(WebCore::PageGroup::removeUserStyleSheetFromWorld): Deleted.
(WebCore::PageGroup::removeUserScriptsFromWorld): Deleted.
(WebCore::PageGroup::removeUserStyleSheetsFromWorld): Deleted.
(WebCore::PageGroup::removeAllUserContent): Deleted.
* page/PageGroup.h:
2014-11-25 Anders Carlsson <andersca@apple.com>
Add a user content controller to WebViewGroup and use it for user content
https://bugs.webkit.org/show_bug.cgi?id=139043
Reviewed by Antti Koivisto.
* WebCore.exp.in:
Export symbols.
* page/Page.cpp:
(WebCore::Page::setUserContentController):
Invalidate the injected style cache when setting a new user content controller.
2014-11-25 Philippe Normand <pnormand@igalia.com>
[GStreamer] gstmpegts is not initialized
https://bugs.webkit.org/show_bug.cgi?id=139039
Reviewed by Carlos Garcia Campos.
* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::initializeGStreamer): Initialize the gstmpegts library.
2014-11-24 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
Fix unused variable warning in Biquad.cpp
https://bugs.webkit.org/show_bug.cgi?id=139031
Reviewed by Andreas Kling.
No new tests needed.
* platform/audio/Biquad.cpp:
2014-11-24 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
Remove Qt cruft related to tap higlighting
https://bugs.webkit.org/show_bug.cgi?id=139030
Reviewed by Andreas Kling.
No new tests needed.
* CMakeLists.txt:
* page/GestureTapHighlighter.cpp: Removed.
* page/GestureTapHighlighter.h: Removed.
2014-11-24 Dhi Aurrahman <diorahman@rockybars.com>
Fix the parsing and re-serialization of :lang pseudo class selector when it has multiple arguments with same value
https://bugs.webkit.org/show_bug.cgi?id=139013
Reviewed by Benjamin Poulain.
Fix the parsing and re-serialization of :lang pseudo class selector when
it has multiple arguments with same value e.g. :lang(en, en, en). Previously,
given :lang(en, en, en) selector, it was parsed and reserialized
as :lang(enenen) instead of :lang(en, en, en)
Related test on parsing and re-serialization of css selectors is updated.
* css/CSSSelector.cpp:
(WebCore::appendArgumentList):
2014-11-24 Zalan Bujtas <zalan@apple.com>
Fix r176527. Iterate through the text renderers.
https://bugs.webkit.org/show_bug.cgi?id=139007
Reviewed by Antti Koivisto.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
2014-11-24 Zalan Bujtas <zalan@apple.com>
Simple line layout: Rename TextFragment::mustBreak to TextFragment::isLineBreak
https://bugs.webkit.org/show_bug.cgi?id=139035
Reviewed by Antti Koivisto.
Move new line logic to FlowContents class.
This is in preparation to support <br>.
No change in functionality.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::nextFragment):
(WebCore::SimpleLineLayout::createLineRuns):
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::isNewline):
(WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter): Deleted.
2014-11-24 Benjamin Poulain <benjamin@webkit.org>
Move :placeholder-shown out of experimental
https://bugs.webkit.org/show_bug.cgi?id=138998
Reviewed by Andreas Kling.
The pseudo class :placeholder-shown is used by the inspector, disabling it breaks
the sidebar.
The implementation has been stable for a while, we can move it to stable.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown):
2014-11-24 Antti Koivisto <antti@apple.com>
Avoid String concatenation with line break iterator
https://bugs.webkit.org/show_bug.cgi?id=139034
Reviewed by Zalan Bujtas.
Test: fast/text/simple-lines-multiple-renderers-break.html
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::initializeSegments):
Include String too so it doesn't need to be fetched from the renderer.
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
Make this iterative instead of recursive.
Uset setPriorContext to provide previous characters instead of concatenating
the string from all the previous segments.
(WebCore::SimpleLineLayout::findNextNonWhitespace):
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
Search using segments instead of the concatenated string.
(WebCore::SimpleLineLayout::FlowContents::textWidth):
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow):
(WebCore::SimpleLineLayout::FlowContents::runWidth):
(WebCore::SimpleLineLayout::FlowContents::segmentForPositionSlow): Deleted.
(WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Deleted.
(WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition): Deleted.
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::characterAt):
(WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition):
(WebCore::SimpleLineLayout::FlowContents::segmentForPosition):
2014-11-24 Zalan Bujtas <zalan@apple.com>
SimpleLineLayout::canUseFor() should iterate through RenderTexts to check if their content is eligible for simple line layout.
https://bugs.webkit.org/show_bug.cgi?id=139007
Reviewed by Antti Koivisto.
Tests: fast/text/simple-line-layout-multiple-renderers-non-breaking-space.html
fast/text/simple-line-layout-multiple-renderers-with-float.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
2014-11-22 Sam Weinig <sam@webkit.org>
Move the '-webkit-box-reflext' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139008
Reviewed by Anders Carlsson.
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertReflection):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2014-11-24 Antti Koivisto <antti@apple.com>
Remove unused Style struct from SimpleLineLayout.cpp
https://bugs.webkit.org/show_bug.cgi?id=139027
Reviewed by Sam Weinig.
It was moved to FlowContents.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::Style::Style): Deleted.
2014-11-24 peavo@outlook.com <peavo@outlook.com>
[Curl] Compile error in ResourceHandleManager.cpp.
https://bugs.webkit.org/show_bug.cgi?id=139026
Reviewed by Brent Fulgham.
The parameter types of the constructor of the Timer class has changed.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::ResourceHandleManager):
(WebCore::ResourceHandleManager::downloadTimerCallback):
* platform/network/curl/ResourceHandleManager.h:
2014-11-24 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Unskip the skipped ATK tests in roles-exposed.html
https://bugs.webkit.org/show_bug.cgi?id=139016
Reviewed by Chris Fleizach.
There was one test that could not be unskipped without making a change
for that one to pass: mapping DocumentRegionRole to ATK_ROLE_PANEL. The
rest of the "fix" is just unskipping tests for ATK and updating the test
expectations.
No new tests needed.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
2014-11-23 Antti Koivisto <antti@apple.com>
Use segment vector for FlowContents
https://bugs.webkit.org/show_bug.cgi?id=139015
Reviewed by Zalan Bujtas.
And FlowContents::Segment struct and use it.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::splitRunsAtRendererBoundary):
Use segments.
If there is only one segment there is nothing to do. Bail out.
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::initializeSegments):
Move initialization to a function so m_segments can be const.
Don't add empty end segment, handle the end case in code.
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::textWidth):
Simplify and use segments.
(WebCore::SimpleLineLayout::FlowContents::segmentForPositionSlow):
Replace hand-rolled binary search with std::lower_bounds.
(WebCore::SimpleLineLayout::FlowContents::segmentForRenderer):
(WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded):
(WebCore::SimpleLineLayout::FlowContents::renderer): Deleted.
(WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions): Deleted.
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::hasOneSegment):
(WebCore::SimpleLineLayout::FlowContents::length):
(WebCore::SimpleLineLayout::FlowContents::isEnd):
(WebCore::SimpleLineLayout::FlowContents::isEndOfContent): Deleted.
Renamed.
(WebCore::SimpleLineLayout::FlowContents::segmentForPosition):
Inline the fast path.
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):
(WebCore::SimpleLineLayout::RunResolver::rangeForRenderer):
2014-11-22 Simon Fraser <simon.fraser@apple.com>
Extend WKRenderObject and WKRenderLayer with some more useful data
https://bugs.webkit.org/show_bug.cgi?id=139006
Reviewed by Sam Weinig.
Export WebCore::RenderLayerBacking::backingStoreMemoryEstimate() const.
* WebCore.exp.in:
2014-11-22 Antti Koivisto <antti@apple.com>
Make locale part of the SimpleLineLayout::FlowContent::Style
https://bugs.webkit.org/show_bug.cgi?id=139004
Reviewed by Zalan Bujtas.
That's the only part of style not extracted out of RenderStyle in the constructor.
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::Style::Style):
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded):
* rendering/SimpleLineLayoutFlowContents.h:
Also remove RenderBlockFlow member since it is now unused.
(WebCore::SimpleLineLayout::FlowContents::Style::Style): Deleted.
Move to cpp.
2014-11-22 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Accessible names missing for imagemap images and links
https://bugs.webkit.org/show_bug.cgi?id=127288
Reviewed by Chris Fleizach.
Return the alt text, if present, for the accessible name for image maps
and image map links for ATK. Also expose the accessible element with
ATK_ROLE_IMAGE_MAP instead of ATK_ROLE_IMAGE.
Test: accessibility/image-with-alt-and-map.html
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isImageMap):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetName):
(atkRole):
2014-11-22 Andreas Kling <akling@apple.com>
Remove unused Document::ignoreAutofocus().
<https://webkit.org/b/139002>
Reviewed by Antti Koivisto.
No one ever actually changes this flag, so let's remove it.
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore::Document::ignoreAutofocus): Deleted.
(WebCore::Document::setIgnoreAutofocus): Deleted.
* html/HTMLFormControlElement.cpp:
(WebCore::shouldAutofocus):
2014-11-22 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r176459 to fix GTK build.
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::ScrollAnimatorNone):
(WebCore::ScrollAnimatorNone::requestAnimationTimerFired):
* platform/ScrollAnimatorNone.h:
2014-11-22 Andreas Kling <akling@apple.com>
Convert PassRefPtr return types to RefPtr.
<https://webkit.org/b/138995>
Reviewed by Anders Carlsson.
Convert an assortment of DOM and HTML related functions
to return RefPtr instead of PassRefPtr.
2014-11-21 Jer Noble <jer.noble@apple.com>
Unreviewed iOS build fix; move new symbols out of Mac-only exports.
* WebCore.exp.in:
2014-11-21 Timothy Horton <timothy_horton@apple.com>
Remove a file that r176499 presumably did not mean to add.
* WebCore.exp.in.orig: Removed.
2014-11-21 Jer Noble <jer.noble@apple.com>
Support multiple signatures of diagnostic logging.
https://bugs.webkit.org/show_bug.cgi?id=138690
Reviewed by Anders Carlsson.
Pull logDiagnosticMessage() out of ChromeClient and make a new client interface,
DiagnosticLoggingClient, which supports multiple kinds of diagnostic logging,
namely: simple logging without a parameter, logging with a success parameter, and
logging with a generic string value parameter.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute): Use DiagnosticLoggingClient.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame): Ditto.
* loader/SubframeLoader.cpp:
(WebCore::logPluginRequest): Ditto.
* page/ChromeClient.h:
(WebCore::ChromeClient::logDiagnosticMessage): Deleted.
* page/DiagnosticLoggingClient.h:
(WebCore::DiagnosticLoggingClient::logDiagnosticMessage): Added.
(WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithResult): Added.
(WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithValue): Added.
(WebCore::DiagnosticLoggingClient::~DiagnosticLoggingClient): Empty destructor.
Rename Page::PageClient to PageConfiguration, and pass that configuration from
Page into MainFrame upon construction.
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage): Use PageConfiguration instead of PageClients.
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients): Ditto.
* loader/EmptyClients.h:
* page/MainFrame.cpp:
(WebCore::MainFrame::MainFrame): Pass loaderClientForMainFrame through to the
Frame constructor.
(WebCore::MainFrame::create): Takes a PageConfiguration.
* page/MainFrame.h:
(WebCore::MainFrame::diagnosticLoggingClient): Simple accessor.
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::PageClients::PageClients): Deleted.
(WebCore::Page::PageClients::~PageClients): Deleted.
* page/Page.h:
* page/PageConfiguration.cpp: Added.
(WebCore::PageConfiguration::PageConfiguration): Renamed from PageClients().
(WebCore::PageConfiguration::~PageConfiguration): Renamed from ~PageClients().
* page/PageConfiguration.h: Added.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged): Use PageConfiguration instead of PageClients.
Add new files and symbols to the project.
* CMakeLists.txt:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
2014-11-21 Chris Dumez <cdumez@apple.com>
Throttled DOMTimers can prevent their document from being garbage collected
https://bugs.webkit.org/show_bug.cgi?id=138915
Reviewed by Andreas Kling.
Throttled DOMTimers whose interval depend on viewport changes would
keep a Vector of elements outside viewport causing them to be throttled
so that we could check later on (upon scroll or layout) if those
elements are still outside viewport. The issue is that these elements
could potentially be removed from the document (and destroyed) after
the timer has fired. To handle this, DOMTimer was ref'ing the
elements. Unfortunately, this was causing us to leak the document
as the elements in the Vector would keep the document alive.
To handle this issue, this patch updates the DOMTimer Vector to use
weak pointers. The WeakPtrFactory is stored in ElementRareData to
avoid wasting memory for all kinds of Elements (it is a fair assumption
that the number of elements whose style is animated via timers is low).
Test: fast/dom/throttled-timer-running-on-document-destruction.html
* dom/Element.cpp:
(WebCore::Element::createWeakPtr):
* dom/Element.h:
* dom/ElementRareData.cpp:
* dom/ElementRareData.h:
(WebCore::ElementRareData::weakPtrFactory):
* page/DOMTimer.cpp:
(WebCore::DOMTimerFireState::elementsChangedOutsideViewport):
(WebCore::DOMTimer::updateThrottlingStateAfterViewportChange):
* page/DOMTimer.h:
2014-11-21 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, EFL build fix since r176459.
r176459 removed Timer parameter in timer callbacks only for Mac port.
So this patch applies it to remaining classes for EFL port.
No new tests, fix build break.
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::RTCDTMFSender):
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::RTCDataChannel):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection):
* Modules/vibration/Vibration.cpp:
(WebCore::Vibration::Vibration):
(WebCore::Vibration::timerFired):
* Modules/vibration/Vibration.h:
* bindings/js/GCController.cpp:
(WebCore::GCController::GCController):
* platform/efl/BatteryProviderEfl.cpp:
(WebCore::BatteryProviderEfl::BatteryProviderEfl):
(WebCore::BatteryProviderEfl::timerFired):
* platform/efl/BatteryProviderEfl.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::BitmapTexturePool::BitmapTexturePool):
(WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::CompositingCoordinator):
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::CoordinatedImageBacking::CoordinatedImageBacking):
(WebCore::CoordinatedImageBacking::clearContentsTimerFired):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
* platform/mock/DeviceMotionClientMock.cpp:
(WebCore::DeviceMotionClientMock::DeviceMotionClientMock):
(WebCore::DeviceMotionClientMock::timerFired):
* platform/mock/DeviceMotionClientMock.h:
* platform/mock/TimerEventBasedMock.h:
(WebCore::TimerEvent::TimerEvent):
(WebCore::TimerEvent::timerFired):
2014-11-21 Benjamin Poulain <bpoulain@apple.com>
Start using the new :not() and :matches() in the Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=138978
Reviewed by Joseph Pecoraro.
There are only minor pending issues on :not() and :matches(). The feedback
has only been positive so far. It is time to move them out the experimental
flag.
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSSelector.cpp:
(WebCore::simpleSelectorSpecificityInternal):
(WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity):
(WebCore::appendSelectorList):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::determineLinkMatchType):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
2014-11-21 Chris Dumez <cdumez@apple.com>
Unreviewed, iOS build fix after r176462.
Export a few extra symbols.
* WebCore.exp.in:
2014-11-21 Chris Dumez <cdumez@apple.com>
Properties in CSSPropertyNames.in should use the new StyleBuilder by default
https://bugs.webkit.org/show_bug.cgi?id=138983
Reviewed by Andreas Kling.
This patch makes using the new StyleBuilder the default and drops the
[NewStyleBuilder] option as a result. A new [LegacyStyleBuilder] option
is introduced for CSS properties that are not generated in the new
StyleBuilder yet.
* css/CSSPropertyNames.in:
* css/SVGCSSPropertyNames.in:
* css/makeprop.pl:
2014-11-21 Chris Dumez <cdumez@apple.com>
[iOS] Regression(r176202): line-height is wrong on marco.org
https://bugs.webkit.org/show_bug.cgi?id=138970
Reviewed by Simon Fraser.
After r176202, on iOS with IOS_TEXT_AUTOSIZING enabled, we would
multiply the lineHeight by RenderStyle::textSizeAdjust()::multiplier()
unconditionally. However, we're only supposed to do so if
RenderStyle::textSizeAdjust()::isPercentage() returns true. This
patch reintroduces the textSizeAdjust().isPercentage() check that was
inadvertently dropped when refactoring the code to be shared between
iOS and OS X.
Additionally, the multiplier is only supposed the be applied if the
input CSSPrimitiveValue is a Length or a Number. However, after
r176202, we would apply the multiplier if the CSSPrimitiveValue is
a Percentage or a Number. This patch updates the code to match the
behavior prior to r176202.
Test: fast/css/line-height-text-autosizing.html
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::convertLineHeight):
(WebCore::StyleBuilderFunctions::applyValueLineHeight):
2014-11-21 Chris Fleizach <cfleizach@apple.com>
AX: com.apple.WebKit.WebContent crashed at WebCore: WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const
https://bugs.webkit.org/show_bug.cgi?id=138905
Reviewed by Mario Sanchez Prada.
The crash log indicates that m_renderer is null at the time we ask ancestorsOfType().
This is more of a speculative fix, since I am not entirely sure m_renderer is null when we enter the method.
Unable to determine cause of crash or how to reproduce on demand.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2014-11-21 Jer Noble <jer.noble@apple.com>
[EME][Mac] Check the underlying error if the one returned by AVFoundation is AVErrorUnknown.
https://bugs.webkit.org/show_bug.cgi?id=138986
Reviewed by Eric Carlson.
When we recieve an error with the code AVErrorUnknown, look for an underlying error from CoreMedia (or another
lower-level framework) with a (presumably) more informative error code, and return that code instead.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::systemCodeForError):
(WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
(WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
2014-11-21 Chris Fleizach <cfleizach@apple.com>
AX: Unclear that user and password are autofilled, no VoiceOver version of the yellow outline.
https://bugs.webkit.org/show_bug.cgi?id=138904
Reviewed by Mario Sanchez Prada.
Add an attribute that marks when a text field is auto-filled.
Test: accessibility/auto-filled-value.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isValueAutofilled):
* accessibility/AccessibilityObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2014-11-21 Andreas Kling <akling@apple.com>
RenderElement::removeChild() doesn't need a return value.
<https://webkit.org/b/138985>
Reviewed by Pantti Koivisto.
Nobody uses the return value from RenderElement::removeChild().
Change it to return void and remove all the unnecessary plumbing.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removeChild):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::removeChild):
* rendering/RenderBlockFlow.h:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::removeChild):
* rendering/RenderButton.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::removeChild):
(WebCore::RenderElement::removeChildInternal):
* rendering/RenderElement.h:
* rendering/RenderMenuList.cpp:
(RenderMenuList::removeChild):
* rendering/RenderMenuList.h:
* rendering/RenderRuby.cpp:
(WebCore::RenderRubyAsInline::removeChild):
(WebCore::RenderRubyAsBlock::removeChild):
* rendering/RenderRuby.h:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::removeChild):
* rendering/RenderRubyRun.h:
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRootWrapper::removeChildWithoutRestructuring):
(WebCore::RenderMathMLRootWrapper::removeChild):
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::removeChildInternal):
(WebCore::RenderMathMLScripts::removeChild):
(WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
(WebCore::RenderMathMLScriptsWrapper::removeChild):
* rendering/mathml/RenderMathMLScripts.h:
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::removeChild):
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::removeChild):
* rendering/svg/RenderSVGInline.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::removeChild):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::removeChild):
* rendering/svg/RenderSVGText.h:
2014-11-21 Tim Horton <timothy_horton@apple.com>
REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
​https://bugs.webkit.org/show_bug.cgi?id=138960
<rdar://problem/19056715>
Reviewed by Anders Carlsson.
* platform/spi/mac/DataDetectorsSPI.h:
Add some DataDetectors SPI.
2014-11-21 Jer Noble <jer.noble@apple.com>
[Mac] Random crashes inside media libraries when creating then destroying media quickly.
https://bugs.webkit.org/show_bug.cgi?id=138980
Reviewed by Eric Carlson.
Speculative fix for random crashes in the layout tests which occur randomly but regularly. The theory is
that creating-then-destroying our media objects too quickly triggers crashes deep within the media frameworks
when their initialization threads don't have a chance to complete before the main player object is destroyed.
Test out this theory by delaying the destruction of the AVPlayer object for 1s after its owner is destroyed.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2014-11-21 Jer Noble <jer.noble@apple.com>
[Mac] Delay of 1-2s after the first paint of a video frame.
https://bugs.webkit.org/show_bug.cgi?id=138979
Reviewed by Eric Carlson.
Only bother waiting for a signal that a new image is ready when the image isn't ready in the first place.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2014-11-21 Glenn Adams <glenn@skynav.com> and Myles C. Maxfield <mmaxfield@apple.com>
Add support to -webkit-line-break property for CSS3 Text line-break property values and semantics.
https://bugs.webkit.org/show_bug.cgi?id=89235
Reviewed by Eric Seidel and Dave Hyatt.
This patch adds semantic support for the CSS3 line-break property (qua -webkit-line-break),
and enables testing on (apple) mac ports. Follow on patches will enable these tests on
other ports as they are incrementally verified.
See also wiki documentation at:
[1] http://trac.webkit.org/wiki/LineBreaking
[2] http://trac.webkit.org/wiki/LineBreakingCSS3Mapping
Tests: css3/line-break/line-break-auto-centered.html
css3/line-break/line-break-auto-half-kana.html
css3/line-break/line-break-auto-hyphens.html
css3/line-break/line-break-auto-inseparables.html
css3/line-break/line-break-auto-iteration-marks.html
css3/line-break/line-break-auto-postfixes.html
css3/line-break/line-break-auto-prefixes.html
css3/line-break/line-break-auto-sound-marks.html
css3/line-break/line-break-loose-centered.html
css3/line-break/line-break-loose-half-kana.html
css3/line-break/line-break-loose-hyphens.html
css3/line-break/line-break-loose-inseparables.html
css3/line-break/line-break-loose-iteration-marks.html
css3/line-break/line-break-loose-postfixes.html
css3/line-break/line-break-loose-prefixes.html
css3/line-break/line-break-loose-sound-marks.html
css3/line-break/line-break-normal-centered.html
css3/line-break/line-break-normal-half-kana.html
css3/line-break/line-break-normal-hyphens.html
css3/line-break/line-break-normal-inseparables.html
css3/line-break/line-break-normal-iteration-marks.html
css3/line-break/line-break-normal-postfixes.html
css3/line-break/line-break-normal-prefixes.html
css3/line-break/line-break-normal-sound-marks.html
css3/line-break/line-break-strict-centered.html
css3/line-break/line-break-strict-half-kana.html
css3/line-break/line-break-strict-hyphens.html
css3/line-break/line-break-strict-inseparables.html
css3/line-break/line-break-strict-iteration-marks.html
css3/line-break/line-break-strict-postfixes.html
css3/line-break/line-break-strict-prefixes.html
css3/line-break/line-break-strict-sound-marks.html
These tests were previously added in http://trac.webkit.org/changeset/143378, but skipped
in generic TestExpectations. In this patch, they are marked as Pass for the (apple) mac ports.
* platform/text/LineBreakIteratorPoolICU.h:
(WebCore::LineBreakIteratorPool::makeLocaleWithBreakKeyword):
Add static function to construct ICU locale argument (also used as pool key) with additional
break keyword.
(LineBreakIteratorPool):
(WebCore::LineBreakIteratorPool::take):
(WebCore::LineBreakIteratorPool::put):
Remove direct dependency from ICU library (and types), moving that dependency into
new {open,close}LineBreakIterator() functions (defined in TextBreakIteratorICU.cpp).
Update to take line break mode into account.
Create (and cache) different break iterators depending on line break mode (in addition to locale),
which entails expanding pool entry key format to optionally append "@break=" +
"loose"|"normal"|"strict" keyword to locale string.
* platform/text/TextBreakIterator.h:
(WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
(WebCore::LazyLineBreakIterator::isLooseCJKMode):
(WebCore::LazyLineBreakIterator::get):
(WebCore::LazyLineBreakIterator::reset):
(LazyLineBreakIterator):
Define LineBreakIteratorMode enumeration for use in TextBreakIterator et al.
Add state member to indicate line break mode.
* platform/text/TextBreakIteratorICU.cpp:
(WebCore::acquireLineBreakIterator):
Use new line break mode when making iterator from pool.
Handle change of return type of LineBreakIteratorPool::take() to non-ICU type,
i.e., TextBreakIterator* instead of ICU's UBreakIterator*.
(WebCore::releaseLineBreakIterator):
Handle change of parameter type of LineBreakIteratorPool::put() to non-ICU type,
i.e., TextBreakIterator* instead of ICU's UBreakIterator*.
(WebCore):
(WebCore::isCJKLocale):
New functions for determining if CJK rules apply.
(WebCore::openLineBreakIterator):
New function for abstracting opening of ICU style line break iterator. This is now
used in LineBreakIteratorPoolICU.h rather than having direct ICU API dependency there.
This function also takes into account the line break mode.
Note that this function only calls ubrk_openRules() when the author has opted-in via
using the -webkit-line-break CSS property. Eventually, we would like to be able to
customize the rules that ICU's line breaking algorithm uses (especially for CJK text);
however, ubrk_openRules() currently parses its input string to create a DFA and is
therefore very slow. In fact, it's so slow that increasing our cache size in
LineBreakIteratorPool doesn't actually help enough. Also note that the default value
for the line-break CSS property is 'auto'.
(WebCore::closeLineBreakIterator):
(WebCore::mapLineIteratorModeToRules):
New function for abstracting closing of ICU style line break iterator. This is now
used in LineBreakIteratorPoolICU.h rather than having direct ICU API dependency there.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
Pass line break iterator mode flag when reseting LazyLineBreakIterator.
Add looseMode local variable to prevent need for computing under isBreakable().
* rendering/RenderText.cpp:
(WebCore::mapLineBreakToIteratorMode):
Add implementation for mapLineBreakToIteratorMode(), used by both RenderText::computePreferredLogicalWidths
and RenderBlock::LineBreaker::nextLineBreak.
(WebCore):
(WebCore::RenderText::computePreferredLogicalWidths):
Ensure (lazy line) breakIterator is initialized for line break mode.
Ensure isBreakable() is passed loose mode flag to match behavior in RenderBlock::LineBreaker::nextLineBreak.
* rendering/RenderText.h:
(WebCore):
Add declaration for mapLineBreakToIteratorMode(), used by both RenderText::computePreferredLogicalWidths
and RenderBlock::LineBreaker::nextLineBreak.
* rendering/break_lines.cpp:
(WebCore):
Introduce (local) enum NBSPBehavior for expanding template on nextBreakablePosition.
(WebCore::isBreakableSpace):
Add externally specified loose mode parameter to prevent need to invoke line break iterator
accessor method on each invocation. Use new loose mode flavors off NBP functions.
(WebCore::needsLineBreakIterator):
Use enum NBSP behavior template parameter rather than boolean.
(WebCore::nextBreakablePositionNonLoosely):
Extend name to distinguish from loose flavor of this function.
(WebCore::nextBreakablePositionLoosely):
Add loose flavor of NBP invoked only when loose mode applies, in which case ASCII shortcut
table cannot be used.
(WebCore::nextBreakablePosition):
(WebCore::nextBreakablePositionIgnoringNBSP):
Use (renamed) non-loose flavor of NBP.
(WebCore::nextBreakablePositionLoose):
(WebCore::nextBreakablePositionIgnoringNBSPLoose):
Introduce loose flavor of NBP template expansions.
* rendering/break_lines.h:
(WebCore):
(WebCore::isBreakable):
Add externally specified loose mode parameter to prevent need to invoke line break iterator
accessor method on each invocation.
2014-11-21 Anders Carlsson <andersca@apple.com>
More build fixes.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream):
2014-11-21 Eric Carlson <eric.carlson@apple.com>
[iOS] allocate volume view on the main thread
https://bugs.webkit.org/show_bug.cgi?id=138971
rdar://problem/18016958
Reviewed by Jer Noble.
* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper allocateVolumeView]): New, dispatch to the main thread if necessary before allocating
the volume view.
(-[WebMediaSessionHelper initWithCallback:]): Call allocateVolumeView.
2014-11-21 Zalan Bujtas <zalan@apple.com>
REGRESSION(r175259) Simple line layout text measuring behavior changed.
https://bugs.webkit.org/show_bug.cgi?id=138947
rdar://problem/19050653
Reviewed by Antti Koivisto.
In certain cases, when block flow needs to compute the preferred width of a particular text
renderer, we use the non-simple line layout text measuring.
However, the same text renderer might end up at simple line layout later.
Complex line layout measures text including the trailing space and it subtracts
(the constant value of) space width afterwards, while simple line layout measures
runs without the extra space.
In such cases, this may result different word widths and produce unexpected line breaking. (preferred width != final width)
In long term, any text renderer qualified for simple line layout should go through the simple
text measuring code path. (https://bugs.webkit.org/show_bug.cgi?id=138973)
For now, just copy complex line layout behaviour. This also matches the previous simple line layout line breaking implementation.
Test: fast/text/simple-line-text-measuring-with-trailing-space.html
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::textWidth):
2014-11-21 Anders Carlsson <andersca@apple.com>
More Windows build fixes.
* platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
(WebCore::LegacyCACFLayerTreeHost::LegacyCACFLayerTreeHost):
(WebCore::LegacyCACFLayerTreeHost::renderTimerFired):
* platform/graphics/ca/win/LegacyCACFLayerTreeHost.h:
* platform/mock/GeolocationClientMock.cpp:
(WebCore::GeolocationClientMock::GeolocationClientMock):
(WebCore::GeolocationClientMock::permissionTimerFired):
(WebCore::GeolocationClientMock::controllerTimerFired):
* platform/mock/GeolocationClientMock.h:
2014-11-21 Andreas Kling <akling@apple.com>
RenderMathMLScripts isPrescript() helper should take a reference.
<https://webkit.org/b/138975>
Reviewed by Antti Koivisto.
Tidy this up a bit, since it's never called with a null pointer.
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::isPrescript):
(WebCore::RenderMathMLScripts::fixAnonymousStyles):
(WebCore::RenderMathMLScripts::addChildInternal):
(WebCore::RenderMathMLScripts::removeChildInternal):
(WebCore::RenderMathMLScripts::layout):
(WebCore::RenderMathMLScriptsWrapper::addChildInternal):
(WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
2014-11-21 Anders Carlsson <andersca@apple.com>
Windows build fixes.
* plugins/PluginPackage.cpp:
(WebCore::PluginPackage::freeLibraryTimerFired):
(WebCore::PluginPackage::PluginPackage):
* plugins/PluginPackage.h:
* plugins/PluginStream.cpp:
(WebCore::PluginStream::PluginStream):
(WebCore::PluginStream::delayDeliveryTimerFired):
(WebCore::PluginStream::deliverData): Deleted.
* plugins/PluginStream.h:
* plugins/PluginView.cpp:
(WebCore::PluginView::popPopupsStateTimerFired):
(WebCore::PluginView::requestTimerFired):
(WebCore::PluginView::invalidateTimerFired):
(WebCore::PluginView::PluginView):
(WebCore::PluginView::lifeSupportTimerFired):
(WebCore::PluginView::performRequest): Deleted.
(WebCore::PluginView::setValue): Deleted.
(WebCore::PluginView::setParameters): Deleted.
(WebCore::PluginView::userAgent): Deleted.
* plugins/PluginView.h:
* plugins/win/PluginMessageThrottlerWin.cpp:
(WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin):
(WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
* plugins/win/PluginMessageThrottlerWin.h:
2014-11-21 Tim Horton <timothy_horton@apple.com>
REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
https://bugs.webkit.org/show_bug.cgi?id=138960
<rdar://problem/19056715>
Reviewed by Beth Dakin.
* platform/spi/mac/DataDetectorsSPI.h:
Softlink some SPI.
2014-11-21 Tim Horton <timothy_horton@apple.com>
Move TextIndicator{Window} to WebCore
https://bugs.webkit.org/show_bug.cgi?id=138954
<rdar://problem/18992185>
Some adjustments by Csaba Osztrogonác.
Reviewed by Anders Carlsson.
Move TextIndicator and TextIndicatorWindow to WebCore so that both
WebKits can share the implementation.
* CMakeLists.txt:
Build TextIndicator.
* WebCore.exp.in:
Export TextIndicator{Window} symbols for the WebKits.
* WebCore.xcodeproj/project.pbxproj:
* page/TextIndicator.cpp: Renamed from Source/WebKit2/Shared/TextIndicator.cpp.
* page/TextIndicator.h: Renamed from Source/WebKit2/Shared/TextIndicator.h.
Straighforward move of TextIndicator from WebKit2, except:
Move TextIndicator::Data and TextIndicator::PresentationTransition out directly
into the WebCore namespace to allow for implementation of WebKit2 argument coders.
Use Image instead of ShareableBitmap internally.
Move the TextIndicatorData encode/decode to WebCoreArgumentCoders.
* page/mac/TextIndicatorWindow.h: Renamed from Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h.
* page/mac/TextIndicatorWindow.mm: Renamed from Source/WebKit2/UIProcess/mac/TextIndicatorWindow.mm.
Straighforward move of TextIndicatorWindow from WebKit2.
2014-11-21 Anders Carlsson <andersca@apple.com>
Remove the Timer parameters from timer callbacks
https://bugs.webkit.org/show_bug.cgi?id=138974
Reviewed by Antti Koivisto.
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::keyRequestTimerFired):
(WebCore::MediaKeySession::addKeyTimerFired):
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::GeoNotifier::GeoNotifier):
(WebCore::Geolocation::GeoNotifier::timerFired):
(WebCore::Geolocation::Geolocation):
(WebCore::Geolocation::resumeTimerFired):
* Modules/geolocation/Geolocation.h:
* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::IDBTransactionBackend):
(WebCore::IDBTransactionBackend::taskTimerFired):
* Modules/indexeddb/IDBTransactionBackend.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::appendBufferTimerFired):
(WebCore::SourceBuffer::removeTimerFired):
* Modules/mediasource/SourceBuffer.h:
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::scheduledEventTimerFired):
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::RTCDTMFSender):
(WebCore::RTCDTMFSender::scheduledEventTimerFired):
* Modules/mediastream/RTCDTMFSender.h:
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::RTCDataChannel):
(WebCore::RTCDataChannel::scheduledEventTimerFired):
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection):
(WebCore::RTCPeerConnection::scheduledEventTimerFired):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/notifications/Notification.cpp:
(WebCore::Notification::Notification):
(WebCore::Notification::taskTimerFired):
* Modules/notifications/Notification.h:
* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback):
(WebCore::NotificationCenter::NotificationRequestCallback::timerFired):
* Modules/notifications/NotificationCenter.h:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::resumeTimerFired):
(WebCore::WebSocketChannel::closingTimerFired):
* Modules/websockets/WebSocketChannel.h:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::AXObjectCache):
(WebCore::AXObjectCache::notificationPostTimerFired):
* accessibility/AXObjectCache.h:
* bindings/js/GCController.cpp:
(WebCore::GCController::GCController):
(WebCore::GCController::gcTimerFired):
* bindings/js/GCController.h:
* css/CSSFontFaceSource.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::CSSFontSelector::beginLoadTimerFired):
* css/CSSFontSelector.h:
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::sweepMatchedPropertiesCache):
* css/StyleResolver.h:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::visualUpdatesSuppressionTimerFired):
(WebCore::Document::styleRecalcTimerFired):
(WebCore::Document::optimizedStyleSheetUpdateTimerFired):
(WebCore::Document::sharedObjectPoolClearTimerFired):
(WebCore::Document::updateFocusAppearanceTimerFired):
(WebCore::Document::pendingTasksTimerFired):
(WebCore::Document::webkitWillEnterFullScreenForElement):
(WebCore::Document::webkitDidExitFullScreenForElement):
(WebCore::Document::fullScreenChangeDelayTimerFired):
(WebCore::Document::loadEventDelayTimerFired):
(WebCore::Document::didAssociateFormControlsTimerFired):
(WebCore::Document::domCookieCacheExpiryTimerFired):
* dom/Document.h:
* dom/EventSender.h:
(WebCore::EventSender::timerFired):
(WebCore::EventSender<T>::EventSender):
* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::ScriptRunner):
(WebCore::ScriptRunner::timerFired):
* dom/ScriptRunner.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::animationTimerFired):
* dom/ScriptedAnimationController.h:
* dom/StyledElement.cpp:
(WebCore::PresentationAttributeCacheCleaner::PresentationAttributeCacheCleaner):
(WebCore::PresentationAttributeCacheCleaner::cleanCache):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::AlternativeTextController):
(WebCore::AlternativeTextController::timerFired):
* editing/AlternativeTextController.h:
* editing/Editor.cpp:
(WebCore::Editor::Editor):
(WebCore::Editor::updateEditorUINowIfScheduled):
(WebCore::Editor::editorUIUpdateTimerFired):
(WebCore::Editor::scanSelectionForTelephoneNumbers): Deleted.
* editing/Editor.h:
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::caretBlinkTimerFired):
* editing/FrameSelection.h:
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::SpellChecker):
(WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
* editing/SpellChecker.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::HTMLFormElement):
(WebCore::HTMLFormElement::requestAutocompleteTimerFired):
* html/HTMLFormElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::HTMLPlugInElement):
(WebCore::HTMLPlugInElement::swapRendererTimerFired):
* html/HTMLPlugInElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
* html/HTMLPlugInImageElement.h:
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::HTMLSourceElement):
(WebCore::HTMLSourceElement::errorEventTimerFired):
* html/HTMLSourceElement.h:
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::HTMLTrackElement):
(WebCore::HTMLTrackElement::loadTimerFired):
* html/HTMLTrackElement.h:
* html/MediaController.cpp:
(MediaController::MediaController):
(MediaController::asyncEventTimerFired):
(MediaController::clearPositionTimerFired):
(MediaController::timeupdateTimerFired):
* html/MediaController.h:
* html/MediaDocument.cpp:
(WebCore::MediaDocument::MediaDocument):
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/MediaDocument.h:
* html/SearchInputType.cpp:
(WebCore::SearchInputType::SearchInputType):
(WebCore::SearchInputType::searchEventTimerFired):
* html/SearchInputType.h:
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::setMessage):
(WebCore::ValidationMessage::setMessageDOMAndStartTimer):
(WebCore::ValidationMessage::buildBubbleTree):
(WebCore::ValidationMessage::requestToHideMessage):
(WebCore::ValidationMessage::deleteBubbleTree):
* html/ValidationMessage.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::WebGLRenderingContext):
(WebCore::WebGLRenderingContext::dispatchContextLostEvent):
(WebCore::WebGLRenderingContext::maybeRestoreContext):
* html/canvas/WebGLRenderingContext.h:
* html/parser/HTMLParserScheduler.cpp:
(WebCore::HTMLParserScheduler::HTMLParserScheduler):
(WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
* html/parser/HTMLParserScheduler.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::MediaControlPanelElement):
(WebCore::MediaControlPanelElement::transitionTimerFired):
(WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::MediaControls):
(WebCore::MediaControls::hideFullscreenControlsTimerFired):
* html/shadow/MediaControls.h:
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::SpinButtonElement):
(WebCore::SpinButtonElement::repeatingTimerFired):
* html/shadow/SpinButtonElement.h:
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::LoadableTextTrack):
(WebCore::LoadableTextTrack::loadTimerFired):
* html/track/LoadableTextTrack.h:
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::VTTRegion):
(WebCore::VTTRegion::scrollTimerFired):
* html/track/VTTRegion.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask):
(WebCore::ChangeRegionOversetTask::timerFired):
* inspector/InspectorDOMAgent.cpp:
(WebCore::RevalidateStyleAttributeTask::RevalidateStyleAttributeTask):
(WebCore::RevalidateStyleAttributeTask::timerFired):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorBackendDispatchTask::InspectorBackendDispatchTask):
(WebCore::InspectorBackendDispatchTask::timerFired):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::InspectorOverlay):
(WebCore::InspectorOverlay::updatePaintRectsTimerFired):
* inspector/InspectorOverlay.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::DocumentLoader):
(WebCore::DocumentLoader::handleSubstituteDataLoadNow):
(WebCore::DocumentLoader::handleSubstituteDataLoadSoon):
(WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameLoader):
(WebCore::FrameLoader::checkTimerFired):
* loader/FrameLoader.h:
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::ImageLoader):
(WebCore::ImageLoader::timerFired):
* loader/ImageLoader.h:
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::LinkLoader):
(WebCore::LinkLoader::linkLoadTimerFired):
(WebCore::LinkLoader::linkLoadingErrorTimerFired):
* loader/LinkLoader.h:
* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::NavigationScheduler):
(WebCore::NavigationScheduler::timerFired):
* loader/NavigationScheduler.h:
* loader/PingLoader.cpp:
(WebCore::PingLoader::PingLoader):
* loader/PingLoader.h:
(WebCore::PingLoader::timeoutTimerFired):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::ProgressTracker):
(WebCore::ProgressTracker::progressHeartbeatTimerFired):
* loader/ProgressTracker.h:
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
(WebCore::ResourceLoadScheduler::requestTimerFired):
* loader/ResourceLoadScheduler.h:
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::TextTrackLoader):
(WebCore::TextTrackLoader::cueLoadTimerFired):
* loader/TextTrackLoader.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::Callback::Callback):
(WebCore::CachedResource::Callback::timerFired):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::CachedResourceLoader):
(WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
* loader/cache/CachedResourceLoader.h:
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::IconDatabase):
(WebCore::IconDatabase::syncTimerFired):
* loader/icon/IconDatabase.h:
* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::AutoscrollController):
(WebCore::AutoscrollController::autoscrollTimerFired):
* page/AutoscrollController.h:
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::CaptionUserPreferences):
(WebCore::CaptionUserPreferences::timerFired):
* page/CaptionUserPreferences.h:
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF):
(WebCore::CaptionUserPreferencesMediaAF::updateTimerFired):
* page/CaptionUserPreferencesMediaAF.h:
* page/DeviceController.cpp:
(WebCore::DeviceController::DeviceController):
(WebCore::DeviceController::fireDeviceEvent):
* page/DeviceController.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::cursorUpdateTimerFired):
(WebCore::EventHandler::autoHideCursorTimerFired):
(WebCore::EventHandler::recognizeLongMousePress):
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):
(WebCore::EventHandler::hoverTimerFired):
* page/EventHandler.h:
* page/EventSource.cpp:
(WebCore::EventSource::EventSource):
(WebCore::EventSource::connectTimerFired):
* page/EventSource.h:
* page/FocusController.cpp:
(WebCore::FocusController::FocusController):
(WebCore::FocusController::focusRepaintTimerFired):
* page/FocusController.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::Frame::overflowAutoScrollTimerFired):
* page/Frame.h:
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::delayedScrollEventTimerFired):
(WebCore::FrameView::speculativeTilingEnableTimerFired):
(WebCore::FrameView::layoutTimerFired):
(WebCore::FrameView::updateEmbeddedObjectsTimerFired):
(WebCore::FrameView::flushAnyPendingPostLayoutTasks):
(WebCore::FrameView::postLayoutTimerFired):
* page/FrameView.h:
* page/PageOverlay.cpp:
(WebCore::PageOverlay::PageOverlay):
(WebCore::PageOverlay::fadeAnimationTimerFired):
* page/PageOverlay.h:
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::imageLoadingSettingsTimerFired):
* page/Settings.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
(WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
(WebCore::AnimationControllerPrivate::animationTimerFired):
* page/animation/AnimationControllerPrivate.h:
* page/mac/ServicesOverlayController.h:
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::ServicesOverlayController):
(WebCore::ServicesOverlayController::determineActiveHighlightTimerFired):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS):
(WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
(WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired):
* platform/HysteresisActivity.h:
(WebCore::HysteresisActivity::HysteresisActivity):
(WebCore::HysteresisActivity::hysteresisTimerFired):
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
(WebCore::ScrollAnimator::horizontalScrollSnapTimerFired):
(WebCore::ScrollAnimator::verticalScrollSnapTimerFired):
* platform/ScrollAnimator.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::Scrollbar):
(WebCore::Scrollbar::autoscrollTimerFired):
* platform/Scrollbar.h:
* platform/Timer.h:
(WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
(WebCore::Timer::Timer): Deleted.
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::MediaSession):
(WebCore::MediaSession::clientDataBufferingTimerFired):
* platform/audio/MediaSession.h:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::startAnimation):
(WebCore::BitmapImage::advanceAnimation):
* platform/graphics/BitmapImage.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::MediaPlayer):
(WebCore::MediaPlayer::reloadTimerFired):
* platform/graphics/MediaPlayer.h:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::ScratchBuffer):
(WebCore::ScratchBuffer::timerFired):
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC):
(WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired):
* platform/graphics/ca/LayerPool.cpp:
(WebCore::LayerPool::LayerPool):
(WebCore::LayerPool::pruneTimerFired):
* platform/graphics/ca/LayerPool.h:
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::TileController):
(WebCore::TileController::tileRevalidationTimerFired):
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::TileGrid):
(WebCore::TileGrid::cohortRemovalTimerFired):
* platform/graphics/ca/TileGrid.h:
* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::IOSurfacePool):
(WebCore::IOSurfacePool::collectionTimerFired):
* platform/graphics/cg/IOSurfacePool.h:
* platform/graphics/cg/SubimageCacheWithTimer.cpp:
(WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
(WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
* platform/ios/LegacyTileCache.h:
* platform/ios/LegacyTileCache.mm:
(WebCore::LegacyTileCache::LegacyTileCache):
(WebCore::LegacyTileCache::tileCreationTimerFired):
* platform/mac/HIDGamepadProvider.cpp:
(WebCore::HIDGamepadProvider::HIDGamepadProvider):
(WebCore::HIDGamepadProvider::connectionDelayTimerFired):
(WebCore::HIDGamepadProvider::inputNotificationTimerFired):
* platform/mac/HIDGamepadProvider.h:
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
* platform/mock/DeviceOrientationClientMock.cpp:
(WebCore::DeviceOrientationClientMock::DeviceOrientationClientMock):
(WebCore::DeviceOrientationClientMock::timerFired):
* platform/mock/DeviceOrientationClientMock.h:
* platform/mock/PlatformSpeechSynthesizerMock.cpp:
(WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
(WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
* platform/mock/PlatformSpeechSynthesizerMock.h:
* platform/network/DNSResolveQueue.cpp:
(WebCore::DNSResolveQueue::DNSResolveQueue):
(WebCore::DNSResolveQueue::timerFired):
* platform/network/DNSResolveQueue.h:
* platform/network/NetworkStateNotifier.h:
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::failureTimerFired):
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/mac/NetworkStateNotifierMac.cpp:
(WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::ImageQualityController):
(WebCore::ImageQualityController::highQualityRepaintTimerFired):
* rendering/ImageQualityController.h:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::styleDidChange):
(WebCore::RenderButton::timerFired):
* rendering/RenderButton.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired):
(WebCore::RenderLayerCompositor::layerFlushTimerFired):
(WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
* rendering/RenderLayerCompositor.h:
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::RenderMarquee):
(WebCore::RenderMarquee::timerFired):
* rendering/RenderMarquee.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::RenderProgress):
(WebCore::RenderProgress::animationTimerFired):
* rendering/RenderProgress.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
(WebCore::RenderView::lazyRepaintTimerFired):
* rendering/RenderView.h:
* replay/EventLoopInputDispatcher.cpp:
(WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
(WebCore::EventLoopInputDispatcher::timerFired):
* replay/EventLoopInputDispatcher.h:
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::StorageAreaImpl):
(WebCore::StorageAreaImpl::closeDatabaseTimerFired):
(WebCore::StorageAreaImpl::closeDatabaseIfIdle):
* storage/StorageAreaImpl.h:
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::StorageAreaSync):
(WebCore::StorageAreaSync::scheduleFinalSync):
(WebCore::StorageAreaSync::syncTimerFired):
(WebCore::StorageAreaSync::scheduleSync):
* storage/StorageAreaSync.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::svgLoadEventTimerFired):
* svg/SVGElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::SVGScriptElement):
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::SVGStyleElement):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::SVGUseElement):
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::SMILTimeContainer):
(WebCore::SMILTimeContainer::timerFired):
* svg/animation/SMILTimeContainer.h:
* xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle):
(WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
* xml/XMLHttpRequestProgressEventThrottle.h:
2014-11-21 Chris Dumez <cdumez@apple.com>
Crash when setting 'transition-delay' CSS property to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138784
Reviewed by Sam Weinig.
Update CSSPrimitiveValue::computeTime() to use primitiveType() instead
of m_primitiveUnitType so that it properly handles calculated values.
Without this, we would hit the ASSERT_NOT_REACHED() assertion in
computeTime() for calculated values.
Test: fast/css/transition-delay-calculated-value.html
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::computeTime):
2014-11-21 Chris Dumez <cdumez@apple.com>
Regression(r175381): -webkit-mask-box-image is broken
https://bugs.webkit.org/show_bug.cgi?id=138969
<rdar://problem/19054471>
Reviewed by Simon Fraser.
After r175381, the StyleBuilder would call NinePieceImage::setMaskDefaults()
*after* calling CSSToStyleMap::mapNinePieceImage(), instead of *before*, for
-webkit-mask-box-image CSS property. This was causing the mask defaults to
overwrite what was set by mapNinePieceImage().
Test: fast/css/webkit-mask-box-image.html
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertBorderMask):
2014-11-21 Chris Dumez <cdumez@apple.com>
Crash when setting 'font' CSS property to 'calc(2 * 3)'
https://bugs.webkit.org/show_bug.cgi?id=138933
Reviewed by Darin Adler.
The CSS Parser was not handling calculated values when parsing the font
weight. This would lead us to hit an assertion when parsing a font
property whose weight is set to a calculated value.
This patch updates parseFontWeight() to properly handle calculated
values.
Test: fast/css/font-calculated-value.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFontWeight):
2014-11-21 Bear Travis <betravis@gmail.com>
[CSS Font Loading] Switch to dispatching events asynchronously
https://bugs.webkit.org/show_bug.cgi?id=138755
Reviewed by Simon Fraser.
Moving FontLoader to dispatch events and notify callbacks similarly
to EventSender or the GenericEventQueue. Several bugs have popped
up in the past because FontLoader has been sending events during
layout, and there is no need for that to be the case.
Covered by existing font loader event tests. Added an additional
test for the svg case, fontloader-svg-select.
* css/FontLoader.cpp:
(WebCore::FontLoader::didLayout):
(WebCore::FontLoader::timerFired): Adding asynchronous callback.
(WebCore::FontLoader::scheduleEvent): Add an event to the dispatch
queue.
(WebCore::FontLoader::firePendingEvents): Modified to handle the
loading done event and callbacks.
(WebCore::FontLoader::loadingDone): Modified to spin up the timer
rather than immediately dispatching events.
* css/FontLoader.h:
2014-11-21 Daniel Bates <dabates@apple.com>
Attempt to fix the internal Apple Mavericks build after <https://trac.webkit.org/changeset/176448>
(https://bugs.webkit.org/show_bug.cgi?id=138930)
Declare NSCachedURLResponse SPI when building without the Apple Internal SDK and with the Apple
Internal SDK when building for OS X Mavericks or earlier.
* platform/spi/cf/CFNetworkSPI.h:
2014-11-21 Anders Carlsson <andersca@apple.com>
Make memoryCache() return a reference
https://bugs.webkit.org/show_bug.cgi?id=138939
Reviewed by Antti Koivisto.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::replayXHR):
(WebCore::InspectorResourceAgent::setCacheDisabled):
(WebCore::InspectorResourceAgent::mainFrameNavigated):
* loader/DocumentLoader.cpp:
(WebCore::areAllLoadersPageCacheAcceptable):
(WebCore::DocumentLoader::finishedLoading):
(WebCore::DocumentLoader::responseReceived):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::willCancel):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::addIncrementalDataBuffer):
(WebCore::CachedImage::finishLoading):
* loader/cache/CachedResource.cpp:
(WebCore::deadDecodedDataDeletionIntervalForResourceType):
(WebCore::CachedResource::~CachedResource):
(WebCore::CachedResource::failBeforeStarting):
(WebCore::CachedResource::addClientToSet):
(WebCore::CachedResource::removeClient):
(WebCore::CachedResource::destroyDecodedDataIfNeeded):
(WebCore::CachedResource::setDecodedSize):
(WebCore::CachedResource::setEncodedSize):
(WebCore::CachedResource::didAccessDecodedData):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):
(WebCore::CachedResourceLoader::clearPreloads):
(WebCore::CachedResourceLoader::printPreloadStats):
* loader/cache/MemoryCache.cpp:
(WebCore::memoryCache):
(WebCore::MemoryCache::removeRequestFromCache):
(WebCore::MemoryCache::removeRequestFromSessionCaches):
* loader/cache/MemoryCache.h:
* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::resourceBecameFileBacked):
* page/FrameView.cpp:
(WebCore::FrameView::willPaintContents):
(WebCore::FrameView::didPaintContents):
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):
* testing/Internals.cpp:
(WebCore::Internals::isLoadingFromMemoryCache):
2014-11-21 Daniel Bates <dabates@apple.com>
[iOS] WebKit2 fails to build with public SDK due to missing SPI from CFNetwork, QuartzCore, MediaPlayer, XPC
https://bugs.webkit.org/show_bug.cgi?id=138930
Reviewed by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj: Rename header MPAVRoutingControllerSPI.h to MediaPlayerSPI.h.
* loader/cocoa/SubresourceLoaderCocoa.mm: Move NSCachedURLResponse forward declarations to file
CFNetworkSPI.h and include header CFNetworkSPI.h.
* loader/mac/ResourceLoaderMac.mm: Ditto.
* platform/audio/ios/MediaSessionManagerIOS.mm: Substitute MediaPlayerSPI.h for MPAVRoutingControllerSPI.h.
* platform/spi/cf/CFNetworkSPI.h: Add more SPI.
* platform/spi/cg/CoreGraphicsSPI.h: Ditto.
* platform/spi/cocoa/QuartzCoreSPI.h: Ditto.
* platform/spi/ios/MediaPlayerSPI.h: Renamed from Source/WebCore/platform/spi/ios/MPAVRoutingControllerSPI.h.
2014-11-21 Chris Fleizach <cfleizach@apple.com>
AX: MathML expressions are misread by VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=138948
Reviewed by Mario Sanchez Prada.
The logic for deciding what's the radicand and an index was too tied to children placement.
We should instead pull directly from the source.
Test: platform/mac/accessibility/mathml-root.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::mathRadicandObject):
(WebCore::AccessibilityRenderObject::mathRootIndexObject):
* rendering/mathml/RenderMathMLRoot.h:
2014-11-20 Benjamin Poulain <bpoulain@apple.com>
Remove the remaining vestiges of minimal-ui
https://bugs.webkit.org/show_bug.cgi?id=138890
Reviewed by Sam Weinig.
In ViewportArguments' setViewportFeature(), I skip the warning for now.
* WebCore.exp.in:
* dom/ViewportArguments.cpp:
(WebCore::setViewportFeature):
* dom/ViewportArguments.h:
(WebCore::ViewportArguments::ViewportArguments):
(WebCore::ViewportArguments::operator==):
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::ViewportConfiguration):
(WebCore::ViewportConfiguration::initialScale):
(WebCore::ViewportConfiguration::minimumScale):
(WebCore::ViewportConfiguration::updateConfiguration):
(WebCore::ViewportConfiguration::viewportArgumentsLength):
(WebCore::ViewportConfiguration::layoutWidth):
(WebCore::ViewportConfiguration::layoutHeight):
(WebCore::ViewportConfigurationTextStream::operator<<):
(WebCore::ViewportConfiguration::description):
(WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI): Deleted.
(WebCore::ViewportConfiguration::activeMinimumLayoutSizeInScrollViewCoordinates): Deleted.
(WebCore::ViewportConfiguration::resetMinimalUI): Deleted.
(WebCore::ViewportConfiguration::didFinishDocumentLoad): Deleted.
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::minimumLayoutSizeForMinimalUI): Deleted.
(WebCore::ViewportConfiguration::usesMinimalUI): Deleted.
2014-11-20 Benjamin Poulain <benjamin@webkit.org>
Web Inspector: do not show invalid specificity for dynamic cases of :matches()
https://bugs.webkit.org/show_bug.cgi?id=138911
Reviewed by Joseph Pecoraro.
* css/CSSSelector.cpp:
(WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity):
(WebCore::functionalPseudoClassStaticSpecificity):
(WebCore::staticSpecificityInternal):
(WebCore::CSSSelector::staticSpecificity):
(WebCore::CSSSelector::specificity): Deleted.
* css/CSSSelector.h:
Add an additional computation path for the inspector.
The regular path ignores everything inside function pseudo classes.
This new path takes the static specificity of the regular path, then evaluate
recursively all the selector lists inside any level of :matches().
If two complex selector of selector list do not have the same specificity,
we bail out and refuse to compute a static specificity representing the selector.
* inspector/InspectorStyleSheet.cpp:
(WebCore::buildObjectForSelectorHelper):
(WebCore::selectorsFromSource):
(WebCore::InspectorStyleSheet::buildObjectForSelector):
Do not add the complexity to the inspector's CSSSelector structure whenever
it is dynamic.
2014-11-20 Benjamin Poulain <bpoulain@apple.com>
Remove InspectorCSSAgent::buildArrayForRuleList()
https://bugs.webkit.org/show_bug.cgi?id=138907
Reviewed by Andreas Kling.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForRuleList): Deleted.
* inspector/InspectorCSSAgent.h:
2014-11-20 Zalan Bujtas <zalan@apple.com>
REGRESSION (174986): CSS clip property is ignored when border-radius is present.
https://bugs.webkit.org/show_bug.cgi?id=138935
rdar://problem/18965984
Reviewed by Simon Fraser.
Revert back to r163382 and fix bug 127729 properly. Save the graphics context when paint and clip rects are
the same, but the clip rect has radius.
Each iteration on ::clipRect() from r163382 onwards just introduced yet another regression.
Test: fast/clip/css-clip-does-not-work-when-border-radius-is-present.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
2014-11-20 Geoffrey Garen <ggaren@apple.com>
Removed the custom allocator for PODRedBlackTree
https://bugs.webkit.org/show_bug.cgi?id=138942
Reviewed by Sam Weinig.
bmalloc is fast enough.
* WebCore.xcodeproj/project.pbxproj:
* platform/PODArena.h: Removed.
* platform/PODFreeListArena.h: Removed. This is the point of the patch.
* platform/PODIntervalTree.h:
(WebCore::PODIntervalTree::PODIntervalTree): Deleted. As a side effect
of removing our custom allocator, we can no longer have a special
"I'm not initialized yet" state. Instead, the tree either exists or not,
like an idiomatic C++ object.
* platform/PODRedBlackTree.h:
(WebCore::PODRedBlackTree::PODRedBlackTree): Ditto.
(WebCore::PODRedBlackTree::~PODRedBlackTree): We need to clear in our
destructor because we can no longer rely on the arena destructor
implicitly freeing our tree nodes.
Side note: This change basically removes the whole reason for having
a purpose-built tree for POD data. We should probably remove this whole
data structure in a follow-up patch, and just use a standard tree.
(WebCore::PODRedBlackTree::clear):
(WebCore::PODRedBlackTree::add):
(WebCore::PODRedBlackTree::remove):
(WebCore::PODRedBlackTree::contains):
(WebCore::PODRedBlackTree::visitInorder):
(WebCore::PODRedBlackTree::size):
(WebCore::PODRedBlackTree::checkInvariants):
(WebCore::PODRedBlackTree::dump):
(WebCore::PODRedBlackTree::deleteNode):
(WebCore::PODRedBlackTree::markFree): Use normal new/delete, and mark
ourselves as fast allocated so we get the bmalloc goodness.
(WebCore::PODRedBlackTree::isInitialized): Deleted.
(WebCore::PODRedBlackTree::initIfNeeded): Deleted.
* rendering/FloatingObjects.cpp:
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
(WebCore::FloatingObjects::FloatingObjects):
(WebCore::FloatingObjects::clear):
(WebCore::FloatingObjects::addPlacedObject):
(WebCore::FloatingObjects::removePlacedObject):
(WebCore::FloatingObjects::computePlacedFloatsTree):
(WebCore::FloatingObjects::placedFloatsTree):
(WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalLeftOffset):
(WebCore::FloatingObjects::logicalRightOffset): POD tree had a slightly
weird behavior in which it was valid to use some of its APIs without
first initializing it, but not others. It's not really possible to model
that behavior with normal C++ objects that use new/delete, so instead
I added some explicit NULL checks.
* rendering/FloatingObjects.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
* rendering/RenderView.cpp:
(WebCore::RenderView::intervalArena): Deleted.
* rendering/RenderView.h: Removed custom-allocator-related cruft.
2014-11-20 Dean Jackson <dino@apple.com>
Support unprefixed animation event types
https://bugs.webkit.org/show_bug.cgi?id=138931
<rdar://problem/18943167>
Reviewed by Simon Fraser.
Tests: animations/unprefixed-events-mixed-with-prefixed.html
animations/unprefixed-events.html
Support the unprefixed animation event names:
- animationstart (was webkitAnimationStart)
- animationiteration (was webkitAnimationIteration)
- animationend (was webkitAnimationEnd)
(Yes, event types are case sensitive and yes, this will
likely cause some head-scratching as people change content)
The approach here is to follow what transitions does:
- listener only for old event name -> fire old event name
- listener for both old and new event name -> fire new event name
- listener only for new event name -> fire new event name
That way pages that were trying to anticipate the new event name
won't get duplicate events.
* CMakeLists.txt: Add new AnimationEvent* stuff.
* DerivedSources.make: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: New files for all in one builds.
* dom/DOMAllInOne.cpp:
* dom/AnimationEvent.cpp: Added. Copied from WebKitAnimationEvent.cpp.
(WebCore::AnimationEventInit::AnimationEventInit):
(WebCore::AnimationEvent::AnimationEvent):
(WebCore::AnimationEvent::~AnimationEvent):
(WebCore::AnimationEvent::animationName):
(WebCore::AnimationEvent::elapsedTime):
(WebCore::AnimationEvent::eventInterface):
* dom/AnimationEvent.h: Added. Copied from WebKitAnimationEvent.h.
* dom/AnimationEvent.idl: Added. Copied from WebKitAnimationEvent.idl.
* dom/Document.cpp:
(WebCore::Document::addListenerTypeIfNeeded): Handle new event types.
* dom/EventNames.h: New names.
* dom/EventNames.in:
* dom/EventTarget.cpp:
(WebCore::legacyType): Provide a mapping from the new names to the older
prefixed forms.
* html/HTMLAttributeNames.in: Support the on* attributes, even though I
hate them and wish this approach would die.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):
* page/DOMWindow.h: New names, and constructors.
* page/DOMWindow.idl:
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): Fire new type.
* page/animation/KeyframeAnimation.cpp: Fire the new types of events.
(WebCore::KeyframeAnimation::onAnimationStart):
(WebCore::KeyframeAnimation::onAnimationIteration):
(WebCore::KeyframeAnimation::onAnimationEnd):
(WebCore::KeyframeAnimation::sendAnimationEvent):
2014-11-20 Tim Horton <timothy_horton@apple.com>
Remove a piece of DataDetectors SPI that we aren't using anymore
https://bugs.webkit.org/show_bug.cgi?id=138917
Reviewed by Beth Dakin.
* platform/spi/mac/DataDetectorsSPI.h:
2014-11-20 Beth Dakin <bdakin@apple.com>
Invalid message WebPageProxy.DidPerformDictionaryLookup on Google stocks result
https://bugs.webkit.org/show_bug.cgi?id=138568
-and corresponding-
rdar://problem/18904600
Reviewed by Tim Horton.
Add an optional parameter indicating whether or not to include images.
* WebCore.exp.in:
* editing/cocoa/HTMLConverter.h:
* editing/cocoa/HTMLConverter.mm:
(WebCore::editingAttributedStringFromRange):
2014-11-20 Myles C. Maxfield <mmaxfield@apple.com>
Fix the !ENABLE(SVG_FONTS) build after r176276
https://bugs.webkit.org/show_bug.cgi?id=138924
Reviewed by Csaba Osztrogonác.
No new tests because there is no behavior change.
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestFont):
2014-11-19 Ada Chan <adachan@apple.com>
Add a way to mute an AudioContext.
https://bugs.webkit.org/show_bug.cgi?id=138104
Reviewed by Eric Carlson.
Keep a muted state in AudioDestinationNode. If m_muted is true,
zero out the audio buffers.
No new tests, since it's difficult to test whether the audio is indeed muted.
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
Call pageMutedStateDidChange() so it'll initialize the destination audio node's muted state accordingly.
(WebCore::AudioContext::pageMutedStateDidChange):
Set the destination audio node's muted state to match the page's muted state.
* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::AudioDestinationNode):
Initialize m_muted.
(WebCore::AudioDestinationNode::render):
If m_muted is true, call AudioBus::zero() to zero out the buffers.
* Modules/webaudio/AudioDestinationNode.h:
(WebCore::AudioDestinationNode::setMuted):
Set m_muted.
2014-11-20 Chris Dumez <cdumez@apple.com>
Crash when destroying a Document that has a throttled timer still running
https://bugs.webkit.org/show_bug.cgi?id=138914
Reviewed by Benjamin Poulain.
Upon destruction, a throttled DOMTimer whose interval depends on
viewport changes will try to unregister itself from the view. It gets
the view pointer from its Document. However, scriptExecutionContext()
can return null if the Document is being destroyed (i.e. ~DOMTimer()
is called from ~ScriptExecutionContext(), as the ScriptExecutionContext
owns the DOMTimer).
This patch adds a null check for scriptExecutionContext() in the
DOMTimer destructor to avoid this issue.
Test: fast/dom/throttled-timer-running-on-document-destruction.html
* page/DOMTimer.cpp:
(WebCore::DOMTimer::~DOMTimer):
(WebCore::DOMTimer::unregisterForViewportChanges):
Add assertion to make sure scriptExecutionContext() does not return
null.
(WebCore::DOMTimerFireState::setChangedStyleOfElementOutsideViewport): Deleted.
Killed this function as this was dead code.
2014-11-20 Zalan Bujtas <zalan@apple.com>
Simple line layout: Introduce text fragment continuation.
https://bugs.webkit.org/show_bug.cgi?id=138274
This patch extends simple line layout coverage to multiple text renderers.
When a particular render flow has multiple text renderers (but not any other type)
then we use simple line layout to process and paint the content. -other, existing requirements still apply
so that for example if the content requires decoration, we bail out of simple line layout.
FlowContent now supports multiple renderes. It continuously reads content from sibling renderers
so that the simple line layout parser sees it as one monolithic block of content. Run positions
are all relative to the block and they get resolved to renderer's positions on demand.
(painting, computing bounding rects etc)
Reviewed by Antti Koivisto.
Performance test already been added for the multiple rendere use case,
correctness is covered by existing test cases.
Test: fast/text/simple-lines-mutliple-renderers.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Check if children are all 8bit RenderTexts.
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Move the endofline check right before where we might overflow using end position.
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Split runs at renderers' boundary to be in sync with inline text renderering.
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::textWidth): Do not measure text across renderers. It could produce different width value due to
ligature which later can produce unexpected line breaks and out sync rendering in general.
(WebCore::SimpleLineLayout::FlowContents::renderer):
(WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions):
(WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Read the next renderer content if needed.
(WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::runWidth):
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):
2014-11-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176396.
https://bugs.webkit.org/show_bug.cgi?id=138926
revealed some WebCore::BidiResolver issue. rollout this for
now. (Requested by zalan on #webkit).
Reverted changeset:
"Simple line layout: Introduce text fragment continuation."
https://bugs.webkit.org/show_bug.cgi?id=138274
http://trac.webkit.org/changeset/176396
2014-11-20 Zalan Bujtas <zalan@apple.com>
Simple line layout: Introduce text fragment continuation.
https://bugs.webkit.org/show_bug.cgi?id=138274
This patch extends simple line layout coverage to multiple text renderers.
When a particular render flow has multiple text renderers (but not any other type)
then we use simple line layout to process and paint the content. -other, existing requirements still apply
so that for example if the content requires decoration, we bail out of simple line layout.
FlowContent now supports multiple renderes. It continuously reads content from sibling renderers
so that the simple line layout parser sees it as one monolithic block of content. Run positions
are all relative to the block and they get resolved to renderer's positions on demand.
(painting, computing bounding rects etc)
Reviewed by Antti Koivisto.
Performance test already been added for the multiple rendere use case,
correctness is covered by existing test cases.
Test: fast/text/simple-lines-mutliple-renderers.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Check if children are all 8bit RenderTexts.
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Move the endofline check right before where we might overflow using end position.
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Split runs at renderers' boundary to be in sync with inline text renderering.
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::textWidth): Do not measure text across renderers. It could produce different width value due to
ligature which later can produce unexpected line breaks and out sync renderering in general.
(WebCore::SimpleLineLayout::FlowContents::renderer):
(WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions):
(WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Read the next renderer content if needed.
(WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::runWidth):
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):
2014-11-20 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error when GStreamer is enabled.
https://bugs.webkit.org/show_bug.cgi?id=138925
Reviewed by Philippe Normand.
A guard is missing for an overridden method.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2014-11-20 Adrian Perez de Castro <aperez@igalia.com>
[GTK] Provide convenience API in DOM bindings to post messages to user message handlers
https://bugs.webkit.org/show_bug.cgi?id=138871
Reviewed by Carlos Garcia Campos.
Adds a convenience function in the WebKitGTK+ DOM bindings to post
messages to user message handlers in a way convenient way more
convenient than using the autogenerated bindings.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_dom_window_webkit_message_handlers_post_message):
Added new convenience API function to post messages to user message
handlers.
* bindings/gobject/WebKitDOMCustom.h: Ditto.
* bindings/gobject/WebKitDOMCustom.symbols: Ditto.
2014-11-12 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Replace the usage of size_t by unsigned
https://bugs.webkit.org/show_bug.cgi?id=136218
Reviewed by Benjamin Poulain.
In general, size_t should be used for sizes of objects in
memory. We're using it to represent indexes and spans in the
grid. Now that the maximum number of tracks is 1 million, it
should be safe to replace them by unsigned integers.
No new tests as there is no change in functionality.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTrackRepeatFunction):
* css/StyleResolver.cpp:
(WebCore::createImplicitNamedGridLinesFromGridArea):
(WebCore::createGridTrackList):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::GridIterator):
(WebCore::RenderGrid::GridIterator::nextGridItem):
(WebCore::RenderGrid::GridIterator::isEmptyAreaEnough):
(WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
(WebCore::RenderGrid::GridSizingData::GridSizingData):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::gridTrackSize):
(WebCore::RenderGrid::distributeSpaceToTracks):
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
(WebCore::RenderGrid::ensureGridSize):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
(WebCore::RenderGrid::populateGridPositions):
* rendering/RenderGrid.h:
* rendering/style/GridCoordinate.h:
(WebCore::GridSpan::integerSpan):
* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::explicitGridColumnCount):
(WebCore::GridResolvedPosition::explicitGridRowCount):
(WebCore::explicitGridSizeForSide):
(WebCore::GridResolvedPosition::resolveNamedGridLinePositionFromStyle):
(WebCore::GridResolvedPosition::resolveGridPositionFromStyle):
(WebCore::GridResolvedPosition::resolveGridPositionAgainstOppositePosition):
(WebCore::firstNamedGridLineBeforePosition):
(WebCore::GridResolvedPosition::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
(WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
* rendering/style/GridResolvedPosition.h:
(WebCore::GridResolvedPosition::adjustGridPositionForRowEndColumnEndSide):
(WebCore::GridResolvedPosition::adjustGridPositionForSide):
(WebCore::GridResolvedPosition::GridResolvedPosition):
(WebCore::GridResolvedPosition::toInt):
* rendering/style/StyleGridData.h:
2014-11-20 Andreas Kling <akling@apple.com>
Remove "document has no sibling rules" optimization.
<https://webkit.org/b/138902>
Reviewed by Antti Koivisto.
We were keeping a document-level flag to track whether there are any
sibling rules in any active style sheets.
This information was used to do.. nothing.
* css/StyleResolver.h:
(WebCore::StyleResolver::usesSiblingRules): Deleted.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::usesSiblingRules): Deleted.
(WebCore::DocumentStyleSheetCollection::setUsesSiblingRulesOverride): Deleted.
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::insertedInto): Deleted.
* mathml/MathMLMathElement.h:
2014-11-20 Andreas Kling <akling@apple.com>
Caret renderer is always a RenderBlock.
<https://webkit.org/b/138912>
Reviewed by Chris Dumez.
Tighten typing in the code that finds and deals with the renderer
used to paint the caret (it's always a RenderBlock.)
* editing/FrameSelection.cpp:
(WebCore::CaretBase::updateCaretRect):
(WebCore::FrameSelection::caretRendererWithoutUpdatingLayout):
(WebCore::DragCaretController::caretRenderer):
(WebCore::repaintCaretForLocalRect):
(WebCore::CaretBase::paintCaret):
* editing/FrameSelection.h:
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::absoluteCaretBounds):
* editing/htmlediting.cpp:
(WebCore::rendererForCaretPainting):
(WebCore::localCaretRectInRendererForCaretPainting):
(WebCore::absoluteBoundsForLocalCaretRect):
* editing/htmlediting.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintCaret):
2014-11-20 Antti Koivisto <antti@apple.com>
REGRESSION (r172854): Web Viewer in FileMaker does not render a Base64 encoded animated-GIF
https://bugs.webkit.org/show_bug.cgi?id=138807
<rdar://problem/18829540>
Reviewed by Simon Fraser.
Animation gets paused because WebKit thinks the GIF is outside of the view.
* page/FrameView.cpp:
(WebCore::FrameView::windowClipRect):
We need to convert to window coordinates in paintsEntireContents mode too so these functions are consistent.
This matters with some WK1 API clients.
2014-11-19 Chris Dumez <cdumez@apple.com>
Move 'clip' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138909
Reviewed by Andreas Kling.
Move 'clip' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder by using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyClip::convertToLength): Deleted.
(WebCore::ApplyPropertyClip::applyInheritValue): Deleted.
(WebCore::ApplyPropertyClip::applyInitialValue): Deleted.
(WebCore::ApplyPropertyClip::applyValue): Deleted.
(WebCore::ApplyPropertyClip::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyInitialClip):
(WebCore::StyleBuilderFunctions::applyInheritClip):
(WebCore::StyleBuilderFunctions::applyValueClip):
2014-11-19 Ryuan Choi <ryuan.choi@navercorp.com>
Remove dead code from TiledBackingStore
https://bugs.webkit.org/show_bug.cgi?id=138864
Reviewed by Andreas Kling.
Since r168151, paint() method, m_commitTileUpdatesOnIdleEventLoop and related code are not used.
No new tests, no behavior change.
* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::TiledBackingStore):
(WebCore::TiledBackingStore::setTileSize):
(WebCore::TiledBackingStore::invalidate):
(WebCore::TiledBackingStore::createTiles):
(WebCore::TiledBackingStore::paint): Deleted.
(WebCore::TiledBackingStore::startTileBufferUpdateTimer): Deleted.
(WebCore::TiledBackingStore::tileBufferUpdateTimerFired): Deleted.
(WebCore::TiledBackingStore::startBackingStoreUpdateTimer): Deleted.
(WebCore::TiledBackingStore::backingStoreUpdateTimerFired): Deleted.
* platform/graphics/TiledBackingStore.h:
(WebCore::TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop): Deleted.
2014-11-19 Andreas Kling <akling@apple.com>
Remove "document has no ::before and/or ::after rules" optimization.
<https://webkit.org/b/138897>
Reviewed by Antti Koivisto.
This optimization has been dead for a long time, since the default UA
style contains both ::before and ::after rules.
* css/RuleFeature.cpp:
(WebCore::recursivelyCollectFeaturesFromSelector):
(WebCore::RuleFeatureSet::add):
(WebCore::RuleFeatureSet::clear):
* css/RuleFeature.h:
(WebCore::RuleFeatureSet::RuleFeatureSet):
* css/StyleResolver.h:
(WebCore::StyleResolver::usesBeforeAfterRules): Deleted.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::usesBeforeAfterRules): Deleted.
(WebCore::DocumentStyleSheetCollection::setUsesBeforeAfterRulesOverride): Deleted.
* html/HTMLQuoteElement.cpp:
(WebCore::HTMLQuoteElement::insertedInto): Deleted.
* html/HTMLQuoteElement.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::needsPseudoElement):
2014-11-19 Myles C. Maxfield <mmaxfield@apple.com>
[OS X] Upright vertical text is completely broken for multi-code-unit codepoints
https://bugs.webkit.org/show_bug.cgi?id=138891
Reviewed by Dan Bernstein.
We were assuming that we can use the string index (in UTF-16) as the glyph
index. This falls down when a single codepoint (and glyph) contians
multiple code units.
Test: platform/mac/fast/text/multiple-codeunit-vertical-upright.html
* platform/graphics/GlyphPage.h:
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::GlyphPage::fill):
2014-11-19 Daniel Bates <dabates@apple.com>
Attempt to fix the Apple Internal Mavericks build after <https://trac.webkit.org/changeset/176347>
(https://bugs.webkit.org/show_bug.cgi?id=136863)
Define enumerator NSHTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain when building without
the Apple Internal SDK or with the Apple Internal SDK on OS X Mavericks or earlier.
* platform/spi/cf/CFNetworkSPI.h:
2014-11-16 Sam Weinig <sam@webkit.org>
Move the 'quotes' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138788
Reviewed by Chris Dumez.
Test: fast/css/content/content-quotes-07.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
Fix the parser to only accept none as a valid primitive identifier. Tested in
the newly added content-quotes-07.html.
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertQuotes):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
Move "quotes" to the new style builder.
* rendering/style/RenderStyle.h:
Add an initialQuotes() function for use in the auto-generated style builder.
2014-11-19 Dean Jackson <dino@apple.com>
Handle unprefixed @keyframes rule
https://bugs.webkit.org/show_bug.cgi?id=138899
<rdar://problem/18943117>
Reviewed by Simon Fraser.
Support the parsing of unprefixed @keyframes. In
CSSParser, assign the same token identifier to
the prefixed and unprefixed forms. This will
keep compatibility with older content. If a page
has both forms, then whatever comes last will
win (as it does if you had duplicate names of the same
form).
Tests: animations/unprefixed-keyframes-rule.html
animations/unprefixed-keyframes.html
* css/CSSGrammar.y.in: Rename the WEBKIT_KEYFRAME_RULE_SYM symbol to
be KEYFRAME_RULE_SYM. Same with KEYFRAMES_SYM.
* css/CSSParser.cpp:
(WebCore::CSSParser::detectAtToken): Look for the @keyframes style
strings and assign the new token values.
2014-11-19 Andreas Kling <akling@apple.com>
Move pseudo-style code from RenderObject to RenderElement.
<https://webkit.org/b/138880>
Reviewed by Antti Koivisto.
Migrate get*PseudoStyle() to RenderElement, and the selection color
functions along with them. This gets rid of a DOM ancestor walk in
pseudo style lookup.
Narrow down some argument types to keep things building.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftSelectionGap):
(WebCore::RenderBlock::logicalRightSelectionGap):
(WebCore::styleForFirstLetter):
(WebCore::RenderBlock::updateFirstLetterStyle):
(WebCore::RenderBlock::createFirstLetterRenderer):
* rendering/RenderBlock.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::getCachedPseudoStyle):
(WebCore::RenderElement::getUncachedPseudoStyle):
(WebCore::RenderElement::selectionColor):
(WebCore::RenderElement::selectionPseudoStyle):
(WebCore::RenderElement::selectionForegroundColor):
(WebCore::RenderElement::selectionEmphasisMarkColor):
(WebCore::RenderElement::selectionBackgroundColor):
* rendering/RenderElement.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionBackgroundColor): Deleted.
(WebCore::RenderObject::selectionColor): Deleted.
(WebCore::RenderObject::selectionPseudoStyle): Deleted.
(WebCore::RenderObject::selectionForegroundColor): Deleted.
(WebCore::RenderObject::selectionEmphasisMarkColor): Deleted.
(WebCore::RenderObject::getCachedPseudoStyle): Deleted.
(WebCore::RenderObject::getUncachedPseudoStyle): Deleted.
* rendering/RenderObject.h:
* rendering/RenderText.h:
(WebCore::RenderText::getCachedPseudoStyle):
(WebCore::RenderText::selectionBackgroundColor):
(WebCore::RenderText::selectionForegroundColor):
(WebCore::RenderText::selectionEmphasisMarkColor):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paint):
2014-11-19 Tim Horton <timothy_horton@apple.com>
Add an optional entry transition (from selection highlight) to TextIndicator
https://bugs.webkit.org/show_bug.cgi?id=138856
<rdar://problem/18840128>
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Add an export.
* platform/spi/cocoa/QuartzCoreSPI.h:
Add some SPI.
2014-11-19 Chris Dumez <cdumez@apple.com>
Move 'outline-style' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138882
Reviewed by Sam Weinig.
Move 'outline-style' CSS property from DeprecatedStyleBuilder to the
new StyleBuilder by using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyDefault::setValue): Deleted.
(WebCore::ApplyPropertyDefault::applyValue): Deleted.
(WebCore::ApplyPropertyDefault::createHandler): Deleted.
(WebCore::ApplyPropertyOutlineStyle::applyInheritValue): Deleted.
(WebCore::ApplyPropertyOutlineStyle::applyInitialValue): Deleted.
(WebCore::ApplyPropertyOutlineStyle::applyValue): Deleted.
(WebCore::ApplyPropertyOutlineStyle::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyInheritOutlineStyle):
(WebCore::StyleBuilderFunctions::applyInitialOutlineStyle):
(WebCore::StyleBuilderFunctions::applyValueOutlineStyle):
2014-11-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: JSContext inspection Resource search does not work
https://bugs.webkit.org/show_bug.cgi?id=131252
Reviewed by Timothy Hatcher.
Test: inspector/debugger/search-scripts.html
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::searchInResources):
A little cleanup.
2014-11-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide $exception in the console for the thrown exception value
https://bugs.webkit.org/show_bug.cgi?id=138726
Reviewed by Timothy Hatcher.
Tests: inspector/debugger/command-line-api-exception-nested-catch.html
inspector/debugger/command-line-api-exception.html
* inspector/CommandLineAPIModuleSource.js:
Expose $exception in the more complete command line API.
2014-11-19 David Hyatt <hyatt@apple.com>
Images/replaced elements that are as tall as a page should be on their own page
https://bugs.webkit.org/show_bug.cgi?id=138886 - <rdar://problem/18296371>
Reviewed by Dean Jackson.
Added fast/multicol/tall-image-behavior.html (and RL/LR variants)
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeReplacedAndTextLineTopAndBottom):
* rendering/InlineFlowBox.h:
Add a new method that computes the line top and line bottom ignoring all margins,
overflow and line-height. This allows us to see if a line that is taller than a page
can be made to fit if we ignored margins and unused descent.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
Call the new helper function, computeReplacedAndTextLineTopAndBottom and push
to a new page if we see that we can fit on a page by ourselves without blank space
included.
2014-11-18 Ada Chan <adachan@apple.com>
Take Web Audio into account for the Page::isPlayingAudio() API.
https://bugs.webkit.org/show_bug.cgi?id=137464
Reviewed by Jer Noble.
Make AudioContext a subclass of AudioProducer. It figures out whether there's
audio playing by checking whether its AudioDestinationNode is playing (and not
silent). It calls Document::updateIsPlayingAudio() whenever its audio playing
state has changed.
Test: webaudio/web-audio-is-playing.html
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::lazyInitialize):
Add itself to the Document's list of AudioProducers if it's not an offline
audio context.
(WebCore::AudioContext::uninitialize):
Remove itself from the Document's list of AudioProducers if it's not an offline
audio context.
(WebCore::AudioContext::stop):
Tell the document to update its audio playing state.
(WebCore::AudioContext::isPlayingAudio):
Return true if the audio context hasn't been stopped and its destination node is
playing audio.
(WebCore::AudioContext::pageMutedStateDidChange):
Add a FIXME for now.
(WebCore::AudioContext::isPlayingAudioDidChange):
Call Document::updateIsPlayingAudio().
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::AudioDestinationNode):
Initialize m_isSilent and m_isEffectivelyPlayingAudio.
(WebCore::AudioDestinationNode::render):
Call setIsSilent() with the appropriate value after rendering.
(WebCore::AudioDestinationNode::isPlayingDidChange):
Call updateIsEffectivelyPlayingAudio().
(WebCore::AudioDestinationNode::setIsSilent):
If m_isSilent has changed, call updateIsEffectivelyPlayingAudio().
(WebCore::AudioDestinationNode::updateIsEffectivelyPlayingAudio):
If m_isEffectivelyPlayingAudio has changed, call AudioContext::isPlayingAudioDidChange().
* Modules/webaudio/AudioDestinationNode.h:
(WebCore::AudioDestinationNode::isPlaying):
(WebCore::AudioDestinationNode::isPlayingAudio):
* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::isPlaying):
Return whether the AudioDestination is playing.
* Modules/webaudio/DefaultAudioDestinationNode.h:
* platform/audio/AudioIOCallback.h:
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::start):
Call setIsPlaying() instead.
(WebCore::AudioDestinationIOS::stop):
Ditto.
(WebCore::AudioDestinationIOS::setIsPlaying):
If m_isPlaying has changed, call AudioIOCallback::isPlayingDidChange().
* platform/audio/ios/AudioDestinationIOS.h:
* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestinationMac::start):
Call setIsPlaying() instead.
(WebCore::AudioDestinationMac::stop):
Ditto.
(WebCore::AudioDestinationMac::setIsPlaying):
If m_isPlaying has changed, call AudioIOCallback::isPlayingDidChange().
* platform/audio/mac/AudioDestinationMac.h:
* testing/Internals.cpp:
(WebCore::Internals::isPagePlayingAudio):
* testing/Internals.h:
* testing/Internals.idl:
Add internals.isPagePlayingAudio() for testing.
2014-11-19 Daniel Bates <dabates@apple.com>
Attempt to fix the Apple Internal Mountain Lion build after <https://trac.webkit.org/changeset/176347>
(https://bugs.webkit.org/show_bug.cgi?id=136863)
Only import header CFNSURLConnection.h when building for iOS or OS X Yosemite.
* platform/spi/cf/CFNetworkSPI.h:
2014-11-19 Antti Koivisto <antti@apple.com>
Fix TilesAdded bitmask
https://bugs.webkit.org/show_bug.cgi?id=138883
Reviewed by Simon Fraser.
Simon spotted this.
* platform/graphics/ca/GraphicsLayerCA.h:
Use 1LLU << 29 instead of 1LLU < 29
This worked before by pure luck as bit 0 is unused.
2014-11-19 Daniel Bates <dabates@apple.com>
[iOS] Make WebKit build with public iOS SDK
https://bugs.webkit.org/show_bug.cgi?id=136863
Reviewed by David Kilzer.
* WebCore.xcodeproj/project.pbxproj: Add private headers CFNetworkSPI.h and
NS{CalendarDate, String, URLDownload}SPI.h.
* loader/cocoa/DiskCacheMonitorCocoa.mm: Move forward declaration of
CFNetwork data types and functions from here to file CFNetworkSPI.h and
include header CFNetworkSPI.h.
* platform/network/mac/ResourceHandleMac.mm: Substitute CFNetworkSPI.h for
CFURLRequestSPI.h as the content of the latter was incorporated into the former.
* platform/spi/cf/CFNetworkSPI.h: Added.
* platform/spi/cf/CFURLRequestSPI.h: Removed; incorporated its functionality
into CFNetworkSPI.h
* platform/spi/cocoa/NSCalendarDateSPI.h: Added.
* platform/spi/cocoa/NSStringSPI.h: Added.
* platform/spi/cocoa/NSURLDownloadSPI.h: Added.
2014-11-19 Benjamin Poulain <bpoulain@apple.com>
Get rid of AccessibilityObject::setRoleValue()
https://bugs.webkit.org/show_bug.cgi?id=138861
Reviewed by Chris Fleizach.
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::setRoleValue): Deleted.
2014-11-19 Philippe Normand <pnormand@igalia.com>
Missing NULL-check in VideoTrack::setLanguage
https://bugs.webkit.org/show_bug.cgi?id=138867
Reviewed by Jer Noble.
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::setLanguage): Prevent change event creation
on an empty video track list.
2014-11-19 Chris Fleizach <cfleizach@apple.com>
AX: Safari fails to load a web page with VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=138849
Reviewed by Mario Sanchez Prada.
Sometimes an inlineElementContinuation will continue to an inline RenderBlock, so we case this incorrectly and bad things happen.
Test: accessibility/inline-block-assertion.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::startOfContinuations):
2014-11-19 Zalan Bujtas <zalan@apple.com>
Simple line layout: RenderTreeAsText should use rangeForRenderer() when dumping simple line text.
https://bugs.webkit.org/show_bug.cgi?id=138847
Reviewed by Antti Koivisto.
This is in preparation to support multiple renderers for simple line layout.
Use rangeForRenderer() to get runs for a particular renderer as opposed to for the entire flow.
Not testable.
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
2014-11-19 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error when CSS_SELECTORS_LEVEL4 is not enabled.
https://bugs.webkit.org/show_bug.cgi?id=138870
Reviewed by Alex Christensen.
* css/CSSSelector.cpp:
(WebCore::simpleSelectorSpecificityInternal):
2014-11-19 Chris Fleizach <cfleizach@apple.com>
AX: Screen braille input doesn't work on forms.
https://bugs.webkit.org/show_bug.cgi?id=138804
Reviewed by Mario Sanchez Prada.
Allow iOS to set values of text fields through the API.
Test: platform/ios-sim/accessibility/set-value.html
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:]):
2014-11-19 Zalan Bujtas <zalan@apple.com>
Simple line layout: Add renderer based rect collecting to RunResolver.
https://bugs.webkit.org/show_bug.cgi?id=138818
Reviewed by Antti Koivisto.
This is in preparation to multiple renderers support.
RunResolver should be able to collect rects for a particular renderer
that might overlap multiple runs. (or might just be a subset of a Run)
Covered by existing tests.
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::renderer): It operates on a single renderer currently.
(WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions): It operates on a single renderer currently.
* rendering/SimpleLineLayoutFlowContents.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::computeTextBoundingBox):
(WebCore::SimpleLineLayout::computeTextFirstRunLocation):
(WebCore::SimpleLineLayout::collectTextAbsoluteRects):
(WebCore::SimpleLineLayout::collectTextAbsoluteQuads):
(WebCore::SimpleLineLayout::showLineLayoutForFlow):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::baselinePosition):
(WebCore::SimpleLineLayout::linePosition):
(WebCore::SimpleLineLayout::lineSize):
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::Run::rectForTextRenderer):
(WebCore::SimpleLineLayout::RunResolver::Run::baseline):
(WebCore::SimpleLineLayout::RunResolver::Run::text):
(WebCore::SimpleLineLayout::RunResolver::Run::computeRect):
(WebCore::SimpleLineLayout::RunResolver::RunResolver):
* rendering/SimpleLineLayoutResolver.h:
2014-11-19 Dhi Aurrahman <diorahman@rockybars.com>
Add selector checker for :lang pseudo class in Selectors level 4
https://bugs.webkit.org/show_bug.cgi?id=138281
Reviewed by Benjamin Poulain.
Add selector checker for :lang pseudo class in Selectors level 4.
The language tags matching is specified in [1,2].
[1] http://www.ietf.org/rfc/rfc4647.txt
[2] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo
Tests: fast/selectors/lang-extended-filtering.html
fast/selectors/lang-multiple.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorCheckerTestFunctions.h:
(WebCore::containslanguageSubtagMatchingRange):
(WebCore::matchesLangPseudoClass):
(WebCore::matchesLangPseudoClassDeprecated):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
2014-11-18 Philippe Normand <pnormand@igalia.com>
start/stop method for AudioBufferSourceNodes and OscillatorNodes can take no args
https://bugs.webkit.org/show_bug.cgi?id=138739
Reviewed by Darin Adler.
The patch is inspired by the following Blink revision by
<rtoy@google.com>:
<https://src.chromium.org/viewvc/blink?view=rev&revision=160845>
Test: webaudio/dom-exceptions.html
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::start):
(WebCore::AudioBufferSourceNode::startPlaying):
(WebCore::AudioBufferSourceNode::noteGrainOn):
(WebCore::AudioBufferSourceNode::startGrain): Deleted.
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::start):
(WebCore::AudioScheduledSourceNode::stop):
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/OscillatorNode.idl:
2014-11-18 Benjamin Poulain <benjamin@webkit.org>
Add the initial implementation of dynamic specificity for :matches()
https://bugs.webkit.org/show_bug.cgi?id=138822
Reviewed by Andreas Kling.
Previously we completely ignored the selector list of :matches() when computing
the specificity of the selector.
The spec (http://dev.w3.org/csswg/selectors4/#specificity) says:
"The specificity of a :matches() pseudo-class, however, is the specificity
of the most specific complex selector that matched the given element."
This patch does just that.
In the CSS JIT, we only consider specificities that can be computed statically
for now, this should be extended later.
When the specificity is dynamic, we fall back to SelectorChecker. In that case,
we execute every selector of the selector list and we keep the maximum value
as the specificity for the whole :matches().
Tests: fast/css/matches-specificity-1.html
fast/css/matches-specificity-2.html
fast/css/matches-specificity-3.html
fast/css/matches-specificity-4.html
fast/css/matches-specificity-5.html
fast/css/matches-specificity-6.html
fast/css/matches-specificity-7.html
fast/css/matches-specificity-8.html
fast/css/matches-specificity-9.html
fast/css/matches-specificity-10.html
* css/CSSSelector.cpp:
(WebCore::selectorSpecificity):
(WebCore::maxSpecificity):
(WebCore::CSSSelector::specificity):
(WebCore::simpleSelectorSpecificityInternal):
(WebCore::CSSSelector::simpleSelectorSpecificity):
:matches() itself should not have any specificity. The specificity of its components
is computed in SelectorChecker.
Since :matches() is no longer accounted as a class B specificity, I had to finish
the specificity of :not() or some test breaks.
* css/CSSSelector.h:
* css/PageRuleCollector.cpp:
(WebCore::comparePageRules):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
We can no longer shortcut the execution when context.pseudoElementEffective is false.
There is no guarantee that a following selector wouldn't match with a higher specificity.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::constructFragments):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2014-11-18 David Kilzer <ddkilzer@apple.com>
FeatureDefines.xcconfig: Switch from using PLATFORM_NAME to SDK selectors
<http://webkit.org/b/138813>
Reviewed by Mark Rowe.
* Configurations/FeatureDefines.xcconfig: Switch to using SDK
selectors.
2014-11-18 Chris Dumez <cdumez@apple.com>
Crash when setting 'z-index' / 'flex-shrink' CSS properties to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138783
Reviewed by Andreas Kling.
Update operators converting CSSPrimitiveValue to integer / floating
point types to properly handle calculated values (e.g. 'calc(2 * 3)').
Previously, this was not working in release builds and we would hit an
ASSERT_NOT_REACHED() in debug builds.
Tests: fast/css/flex-shrink-calculated-value.html
fast/css/z-index-calculated-value.html
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator unsigned short):
(WebCore::CSSPrimitiveValue::operator int):
(WebCore::CSSPrimitiveValue::operator unsigned):
(WebCore::CSSPrimitiveValue::operator float):
2014-11-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176263 and r176273.
https://bugs.webkit.org/show_bug.cgi?id=138854
Underlines are hideous. (Requested by litherum on #webkit).
Reverted changesets:
"Use underlining metrics from the font file"
https://bugs.webkit.org/show_bug.cgi?id=138762
http://trac.webkit.org/changeset/176263
"iOS build fix."
http://trac.webkit.org/changeset/176273
2014-11-18 Chris Dumez <cdumez@apple.com>
Add a setting to toggle DOMTimer throttling support
https://bugs.webkit.org/show_bug.cgi?id=138844
<rdar://problem/19020874>
Reviewed by Andreas Kling.
Add a setting to disable DOM timers throttling, in order to help
developers determine if a specific issue is caused by timer
throttling.
* page/DOMTimer.cpp:
(WebCore::DOMTimerFireState::contextDocument):
(WebCore::DOMTimerFireState::scriptMadeUserObservableChanges):
(WebCore::DOMTimer::isDOMTimersThrottlingEnabled):
(WebCore::DOMTimer::updateThrottlingStateIfNecessary):
* page/DOMTimer.h:
* page/Settings.in:
2014-11-18 Beth Dakin <bdakin@apple.com>
REGRESSION: Invoking dictionary lookup on text in some search fields searches for
incorrect item
https://bugs.webkit.org/show_bug.cgi?id=138853
-and corresponding-
rdar://problem/18912505
Reviewed by Tim Horton.
Get the visible position based on the frame, not just the renderer.
* editing/mac/DictionaryLookup.mm:
(WebCore::rangeForDictionaryLookupAtHitTestResult):
2014-11-18 David Hyatt <hyatt@apple.com>
REGRESSION (r167210): Invalid cast in WebCore::RenderBlock::blockSelectionGaps
https://bugs.webkit.org/show_bug.cgi?id=137590
Reviewed by Dean Jackson.
Added fast/block/selection-block-gaps-crash.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::blockSelectionGaps):
Check that we really are a RenderBlock before recurring.
2014-11-18 Andreas Kling <akling@apple.com>
Avoid synchronous style recalc in Document.activeElement
<https://webkit.org/b/138850>
Reviewed by Ryosuke Niwa.
This subtly changes the behavior of <input autofocus>, which was caught by
a layout test. Auto-focus doesn't happen until the render tree is attached,
although it was possible to force it by accessing document.activeElement.
Now auto-focus is always lazy. This is consistent with other browser engines.
~1% progression on Speedometer locally.
* dom/Document.cpp:
(WebCore::Document::activeElement):
2014-11-18 Chris Dumez <cdumez@apple.com>
Have Vector::capacity() return an unsigned instead of a size_t
https://bugs.webkit.org/show_bug.cgi?id=138842
Reviewed by Andreas Kling.
Update the code base now that Vector::capacity() returns an unsigned
type instead of a size_t.
No new tests, no behavior change.
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::append):
(WebCore::SearchBuffer::prependContext):
(WebCore::SearchBuffer::search):
(WebCore::SearchBuffer::length):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::duplicateDataBufferIfNecessary):
2014-11-18 Geoffrey Garen <ggaren@apple.com>
Removed the custom allocator for ListHashSet nodes
https://bugs.webkit.org/show_bug.cgi?id=138841
Reviewed by Andreas Kling.
Uses of ListHashSet no longer need to declare an inline capacity,
since that was only used to specify the capacity of the custom allocator.
* dom/DOMNamedFlowCollection.h:
* dom/DocumentEventQueue.h:
* dom/DocumentStyleSheetCollection.h:
* dom/NamedFlowCollection.h:
* html/FormController.h:
* rendering/FloatingObjects.h:
* rendering/RenderBlock.h:
2014-11-18 David Hyatt <hyatt@apple.com>
REGRESSION(r152313): Inline-block element doesn't wrap properly
https://bugs.webkit.org/show_bug.cgi?id=138846 - <rdar://problem/18838703>
Reviewed by Simon Fraser.
Added fast/inline-block/inline-block-empty-spans.html
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::canBreakAtThisPosition):
2014-11-18 Myles C. Maxfield <mmaxfield@apple.com>
Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns
https://bugs.webkit.org/show_bug.cgi?id=138204
Reviewed by Dave Hyatt.
This code is responsible for pushing block elements to the next column if
the "orphans" CSS property is triggered. The mechanism by which this is
achieved is to push the block down such that the origin of the block is
at the origin of the next column. However, if there is negative line
spacing, the top portion of the text might actually be on top of the
origin of the block. Therefore, the block wasn't being pushed down enough
to entirely contain its text, so the top pieces were being drawn on the
previous column.
Test: fast/multicol/orphans-negative-line-spacing.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
2014-11-18 Chris Dumez <cdumez@apple.com>
DOMTimers sometimes don't get unthrottled on scrolling
https://bugs.webkit.org/show_bug.cgi?id=138838
Reviewed by Antti Koivisto.
DOMTimers sometimes didn't get unthrottled on scrolling. This is
because we stopped listening for viewport changes every time the
timer fires, but we didn't listen for those changes again if we
decided the timer should stay throttled after the timer's action
was executed.
We should listen for viewport changes again after executing the
timer's action, if there are elements outside the viewport causing
the DOMTimer to be throttled, even if the throttleState hasn't
changed (i.e the timer stays throttled).
Test: fast/dom/timer-unthrottle-on-scroll.html
* page/DOMTimer.cpp:
(WebCore::DOMTimer::updateThrottlingStateIfNecessary):
(WebCore::DOMTimer::updateTimerIntervalIfNecessary):
(WebCore::DOMTimer::updateThrottlingStateAfterViewportChange):
2014-11-18 Daniel Bates <dbates@webkit.org>
[iOS] Make WebCore build and link with public SDK
https://bugs.webkit.org/show_bug.cgi?id=136487
Reviewed by David Kilzer.
* bindings/objc/DOMInternal.mm: Include header NSMapTableSPI.h.
* bindings/objc/WebScriptObject.mm: Ditto; Also fix style nit, substitute
#import for #include when importing header WTFString.h.
* bridge/objc/objc_instance.mm: Include header NSMapTableSPI.h and remove
#import NSMapTable.h as the former will import the latter.
* platform/ios/PlatformEventFactoryIOS.mm: Include header wtf/CurrentTime.h
for the declaration of WTF::currentTime().
* platform/ios/wak/WebCoreThread.mm: Remove unnecessary include of header CoreFoundation/CFPriv.h.
* platform/spi/ios/AVKitSPI.h: Add more SPI.
* platform/spi/ios/MPAVRoutingControllerSPI.h: Ditto.
2014-11-18 Myles C. Maxfield <mmaxfield@apple.com>
Subclass CachedFont for SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=138686
Reviewed by Simon Fraser.
Re-landing due to flakey bots.
CachedFont had many #if ENABLE(SVG_FONTS) scattered throughout it.
Splitting out this SVG-specific code into a subclass of CachedFont
cleans up the design.
No new tests because there is no behavior change.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): There are two sections
in this function; one for SVG fonts and one for regular fonts.
I've moved these two sections into CachedFont and SVGCachedFont,
thereby simplifying this function.
(WebCore::CSSFontFaceSource::ensureFontData): Ditto.
(WebCore::CSSFontFaceSource::svgFontFaceElement): Moved to header.
(WebCore::CSSFontFaceSource::setSVGFontFaceElement): Ditto.
(WebCore::CSSFontFaceSource::isSVGFontFaceSource): Ditto.
* css/CSSFontFaceSource.h: Put functions that are simple enough to
be inlined here.
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::isSVGFontTarget): Convenience
function.
(WebCore::CSSFontFaceSrcValue::cachedFont): Pass through a boolean
from CSSFontSelector to CachedResourceHandle regarding if we should
be using SVGCachedFont instead of CachedFont.
* css/CSSFontFaceSrcValue.h: New convenience function.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Pass through a boolean
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceType): Update for new
CachedResource type
(WebCore::cachedResourcesForFrame): Ditto.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont):
(WebCore::CachedFont::ensureCustomFontData): Taken from
CSSFontFaceSource::getFontData()
(WebCore::CachedFont::getFontData): Ditto.
(WebCore::CachedFont::platformDataFromCustomData): Ditto.
(WebCore::CachedFont::ensureSVGFontData): Moved to SVGCachedFont.
(WebCore::CachedFont::getSVGFontById): Ditto.
* loader/cache/CachedFont.h:
* loader/cache/CachedResource.cpp:
(WebCore::defaultPriorityForResourceType): Update for new enum
type.
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource): Takes new boolean.
(WebCore::CachedResourceLoader::requestFont): Ditto.
(WebCore::CachedResourceLoader::checkInsecureContent): Update for
new enum type
(WebCore::CachedResourceLoader::canRequest): Ditto.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGFont.cpp: Added.
(WebCore::CachedSVGFont::CachedSVGFont): Moved from
CSSFontFaceSource::getFontData() and CachedFont
(WebCore::CachedSVGFont::getFontData): Ditto.
(WebCore::CachedSVGFont::platformDataFromCustomData): Ditto.
(WebCore::CachedSVGFont::ensureCustomFontData): Ditto.
(WebCore::CachedSVGFont::getSVGFontById): Ditto.
(WebCore::CachedSVGFont::firstFontFace): Ditto.
* loader/cache/CachedSVGFont.h: Subclass CachedFont.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::getStatistics): Update for new enum.
* svg/SVGFontFaceUriElement.cpp:
(WebCore::isSVGFontTarget): Convenience function.
(WebCore::SVGFontFaceUriElement::loadFont): Update for new
boolean.
2014-11-18 Chris Dumez <cdumez@apple.com>
Update the Vector API to deal with unsigned types instead of size_t
https://bugs.webkit.org/show_bug.cgi?id=138824
Reviewed by Andreas Kling.
Update code base to fix build errors related to the typing changes
in the Vector API (size_t -> unsigned).
No new tests, no behavior change.
* WebCore.exp.in:
* bindings/js/JSDOMBinding.h:
(WebCore::jsArray):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* cssjit/SelectorCompiler.cpp:
* html/HTMLFormElement.cpp:
(WebCore::removeFromVector):
* html/parser/HTMLParserIdioms.h:
* html/parser/XSSAuditor.cpp:
2014-11-18 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewed iOS build fix
* platform/graphics/ios/SimpleFontDataIOS.mm:
(WebCore::SimpleFontData::platformInit):
2014-11-18 Dan Bernstein <mitz@apple.com>
iOS build fix.
* platform/graphics/ios/SimpleFontDataIOS.mm:
(WebCore::SimpleFontData::platformInit):
2014-11-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176264.
https://bugs.webkit.org/show_bug.cgi?id=138837
caused many test failures (Requested by litherum on #webkit).
Reverted changeset:
"Subclass CachedFont for SVG fonts"
https://bugs.webkit.org/show_bug.cgi?id=138686
http://trac.webkit.org/changeset/176264
2014-11-18 Daniel Bates <dabates@apple.com>
[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138802
Reviewed by David Kilzer.
Add SPI wrapper headers {Dispatch, DynamicLinker, IOPMLib, MachVM, NSPointerFunctions, MobileGestalt}SPI.h
that forward declare applicable libdispatch, dyld, IOKit, mach, Foundation, MobileGestalt SPI
and use these headers instead of the including private headers corresponding to these libraries/frameworks.
* WebCore.xcodeproj/project.pbxproj: Add private headers MobileGestaltSPI.h and
MachVMSPI.h, and project headers DynamicLinkerSPI.h, NSPointerFunctionsSPI.h,
DispatchSPI.h and IOPMLibSPI.h. Also, sort files in Xcode project.
* bindings/objc/DOMInternal.mm: Include header NSPointerFunctionsSPI.h.
* bridge/objc/objc_instance.mm: Ditto; Also, sort #import directives.
* platform/cocoa/DisplaySleepDisablerCocoa.cpp: Substitute header IOPMLibSPI.h
for private header IOKit/pwr_mgt/IOPMLib.h.
* platform/cocoa/MemoryPressureHandlerCocoa.mm: Substitute header DispatchSPI.h
for private header dispatch/private.h.
* platform/graphics/ios/FontServicesIOS.mm: Substitute header DynamicLinkerSPI.h
for private header mach-o/dyld_priv.h.
* platform/ios/PlatformScreenIOS.mm: Substitute header MobileGestaltSPI.h for
private header MobileGestalt.h.
* platform/spi/cocoa/DispatchSPI.h: Added.
* platform/spi/cocoa/DynamicLinkerSPI.h: Added.
* platform/spi/cocoa/IOPMLibSPI.h: Added.
* platform/spi/cocoa/MachVMSPI.h: Added.
* platform/spi/cocoa/NSPointerFunctionsSPI.h: Added.
* platform/spi/ios/MobileGestaltSPI.h: Added.
2014-11-18 Myles C. Maxfield <mmaxfield@apple.com>
Subclass CachedFont for SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=138686
Reviewed by Simon Fraser.
CachedFont had many #if ENABLE(SVG_FONTS) scattered throughout it.
Splitting out this SVG-specific code into a subclass of CachedFont
cleans up the design.
No new tests because there is no behavior change.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): There are two sections
in this function; one for SVG fonts and one for regular fonts.
I've moved these two sections into CachedFont and SVGCachedFont,
thereby simplifying this function.
(WebCore::CSSFontFaceSource::ensureFontData): Ditto.
(WebCore::CSSFontFaceSource::svgFontFaceElement): Moved to header.
(WebCore::CSSFontFaceSource::setSVGFontFaceElement): Ditto.
(WebCore::CSSFontFaceSource::isSVGFontFaceSource): Ditto.
* css/CSSFontFaceSource.h: Put functions that are simple enough to
be inlined here.
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::isSVGFontTarget): Convenience
function.
(WebCore::CSSFontFaceSrcValue::cachedFont): Pass through a boolean
from CSSFontSelector to CachedResourceHandle regarding if we should
be using SVGCachedFont instead of CachedFont.
* css/CSSFontFaceSrcValue.h: New convenience function.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Pass through a boolean
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceType): Update for new
CachedResource type
(WebCore::cachedResourcesForFrame): Ditto.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont):
(WebCore::CachedFont::ensureCustomFontData): Taken from
CSSFontFaceSource::getFontData()
(WebCore::CachedFont::getFontData): Ditto.
(WebCore::CachedFont::platformDataFromCustomData): Ditto.
(WebCore::CachedFont::ensureSVGFontData): Moved to SVGCachedFont.
(WebCore::CachedFont::getSVGFontById): Ditto.
* loader/cache/CachedFont.h:
* loader/cache/CachedResource.cpp:
(WebCore::defaultPriorityForResourceType): Update for new enum
type.
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource): Takes new boolean.
(WebCore::CachedResourceLoader::requestFont): Ditto.
(WebCore::CachedResourceLoader::checkInsecureContent): Update for
new enum type
(WebCore::CachedResourceLoader::canRequest): Ditto.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGFont.cpp: Added.
(WebCore::CachedSVGFont::CachedSVGFont): Moved from
CSSFontFaceSource::getFontData() and CachedFont
(WebCore::CachedSVGFont::getFontData): Ditto.
(WebCore::CachedSVGFont::platformDataFromCustomData): Ditto.
(WebCore::CachedSVGFont::ensureCustomFontData): Ditto.
(WebCore::CachedSVGFont::getSVGFontById): Ditto.
(WebCore::CachedSVGFont::firstFontFace): Ditto.
* loader/cache/CachedSVGFont.h: Subclass CachedFont.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::getStatistics): Update for new enum.
* svg/SVGFontFaceUriElement.cpp:
(WebCore::isSVGFontTarget): Convenience function.
(WebCore::SVGFontFaceUriElement::loadFont): Update for new
boolean.
2014-11-18 Myles C. Maxfield <litherum@gmail.com>
Use underlining metrics from the font file
https://bugs.webkit.org/show_bug.cgi?id=138762
Reviewed by Dave Hyatt.
Test: platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness.html
* platform/graphics/FontMetrics.h: Adding variables for text decoration thickness and
underline position.
(WebCore::FontMetrics::FontMetrics):
(WebCore::FontMetrics::decorationThickness):
(WebCore::FontMetrics::setDecorationThickness):
(WebCore::FontMetrics::underlinePosition):
(WebCore::FontMetrics::setUnderlinePosition):
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::platformInit): Initialize new FontMetrics members.
* platform/graphics/ios/SimpleFontDataIOS.mm:
(WebCore::SimpleFontData::platformInit): Ditto.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit): Ditto.
* platform/graphics/win/SimpleFontDataCGWin.cpp:
(WebCore::SimpleFontData::platformInit): Ditto.
* platform/graphics/win/SimpleFontDataCairoWin.cpp:
(WebCore::SimpleFontData::platformInit): Ditto.
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::initGDIFont): Ditto.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration): Use FontMetrics data.
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset): Ditto.
(WebCore::visualOverflowForDecorations): Ditto.
* style/InlineTextBoxStyle.h:
(WebCore::textDecorationStrokeThickness): Deleted.
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::initializeFontData): Initialize new FontMetrics members.
2014-11-17 David Hyatt <hyatt@apple.com>
Improve Ruby selection (getting rid of overlap and improving gap filling)
https://bugs.webkit.org/show_bug.cgi?id=138250
Reviewed by Dean Jackson.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::blockSelectionGaps):
Add Ruby text in along with the Ruby base.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::inlineSelectionGaps):
Don't let block gaps get filled in here.
* rendering/RenderRubyBase.h:
Expose accessor to the ruby run.
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::rubyRun):
* rendering/RenderRubyText.h:
Add accessor to the ruby run.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::selectionTop):
(WebCore::RootInlineBox::selectionBottom):
Improve selectionTop and selectionBottom of ruby bases to avoid the
ruby text. Improve the selectionTop and selectionBottom of ruby texts
to fill the gap up to the previous/next line as appropriate.
2014-11-18 Shivakumar JM <shiva.jm@samsung.com>
crypto: Use sequence<> instead of KeyUsage[] in IDL.
https://bugs.webkit.org/show_bug.cgi?id=138823
Reviewed by Darin Adler.
Use sequence<KeyUsage> instead of KeyUsage[] in crypto IDL as per spec: https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/
Overview.html#SubtleCrypto-method-generateKey
No new tests, no behavior change.
* crypto/SubtleCrypto.idl:
2014-11-18 Philippe Normand <pnormand@igalia.com>
HRTFDatabaseLoader is not an absolute condition to run audioContext
https://bugs.webkit.org/show_bug.cgi?id=138829
Reviewed by Jer Noble.
This patch is a port of the following Blink revision by
<keonho07.kim@samsung.com>:
<https://src.chromium.org/viewvc/blink?revision=167887&view=revision>
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::isRunnable): Deleted.
* Modules/webaudio/AudioContext.h:
(WebCore::AudioContext::hrtfDatabaseLoader): Deleted.
* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::render):
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::offlineRender):
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::PannerNode):
(WebCore::PannerNode::process):
(WebCore::PannerNode::initialize):
(WebCore::PannerNode::setPanningModel):
* Modules/webaudio/PannerNode.h:
* Modules/webaudio/RealtimeAnalyser.cpp:
* Modules/webaudio/RealtimeAnalyser.h:
* platform/audio/HRTFDatabaseLoader.cpp:
(WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
2014-11-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176218.
https://bugs.webkit.org/show_bug.cgi?id=138827
seems to have caused regressions on the perf bots (Requested
by lajava on #webkit).
Reverted changeset:
"[CSS Grid Layout] Upgrade align-self and align-items parsing
to CSS 3"
https://bugs.webkit.org/show_bug.cgi?id=133359
http://trac.webkit.org/changeset/176218
2014-11-18 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Crash getting the orientation of a MenuListOption after the MenuList was removed from the document
https://bugs.webkit.org/show_bug.cgi?id=138727
Reviewed by Chris Fleizach.
AccessibilityMenuListOption::elementRect() returns the value of the
grandparent MenuList, asserting that the grandparent exists with that
role. But it is possible to have an existing MenuListOption and remove
the element which had been backing that MenuList from the document.
Adding null checks prior to the assertions prevents our crashing if the
parent or grandparent was removed.
Test: platform/gtk/accessibility/combobox-descendants-orientation-crash.html
* accessibility/AccessibilityMenuListOption.cpp:
(WebCore::AccessibilityMenuListOption::elementRect):
2014-11-17 Benjamin Poulain <bpoulain@apple.com>
Fix a small indentation mistake in SelectorCodeGenerator::generateNthFilterTest
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthFilterTest):
2014-11-17 Benjamin Poulain <benjamin@webkit.org>
Fix two bad function names of HTMLFormControlElement
https://bugs.webkit.org/show_bug.cgi?id=138790
Reviewed by Andreas Kling.
Darin suggested some name improvements in https://bugs.webkit.org/show_bug.cgi?id=138769
* dom/CheckedRadioButtons.cpp:
(WebCore::RadioButtonGroup::add):
(WebCore::RadioButtonGroup::updateCheckedState):
(WebCore::RadioButtonGroup::requiredAttributeChanged):
(WebCore::RadioButtonGroup::remove):
(WebCore::RadioButtonGroup::updateValidityForAllButtons):
(WebCore::RadioButtonGroup::setNeedsValidityCheckForAllButtons): Deleted.
* html/FileInputType.cpp:
(WebCore::FileInputType::setFiles):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::computeWillValidate):
(WebCore::HTMLButtonElement::recalcWillValidate): Deleted.
* html/HTMLButtonElement.h:
* html/HTMLFieldSetElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::requiredAttributeChanged):
(WebCore::HTMLFormControlElement::computeWillValidate):
(WebCore::HTMLFormControlElement::willValidate):
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
(WebCore::HTMLFormControlElement::isValidFormControlElement):
(WebCore::HTMLFormControlElement::updateValidity):
(WebCore::HTMLFormControlElement::setCustomValidity):
(WebCore::HTMLFormControlElement::recalcWillValidate): Deleted.
(WebCore::HTMLFormControlElement::setNeedsValidityCheck): Deleted.
* html/HTMLFormControlElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::setValueInternal):
(WebCore::HTMLInputElement::setValueFromRenderer):
(WebCore::HTMLInputElement::computeWillValidate):
(WebCore::HTMLInputElement::parseMaxLengthAttribute):
(WebCore::HTMLInputElement::recalcWillValidate): Deleted.
* html/HTMLInputElement.h:
* html/HTMLKeygenElement.h:
* html/HTMLOutputElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::deselectItems):
(WebCore::HTMLSelectElement::optionSelectedByUser):
(WebCore::HTMLSelectElement::listBoxSelectItem):
(WebCore::HTMLSelectElement::add):
(WebCore::HTMLSelectElement::parseAttribute):
(WebCore::HTMLSelectElement::childrenChanged):
(WebCore::HTMLSelectElement::optionElementChildrenChanged):
(WebCore::HTMLSelectElement::setLength):
(WebCore::HTMLSelectElement::selectAll):
(WebCore::HTMLSelectElement::updateListBoxSelection):
(WebCore::HTMLSelectElement::selectOption):
(WebCore::HTMLSelectElement::restoreFormControlState):
(WebCore::HTMLSelectElement::parseMultipleAttribute):
(WebCore::HTMLSelectElement::reset):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::parseAttribute):
(WebCore::HTMLTextAreaElement::subtreeHasChanged):
(WebCore::HTMLTextAreaElement::setValue):
(WebCore::HTMLTextAreaElement::setNonDirtyValue):
2014-11-17 Sukolsak Sakshuwong <sukolsak@gmail.com>
Add parsing for :role()
https://bugs.webkit.org/show_bug.cgi?id=138310
Reviewed by Benjamin Poulain.
Add support for parsing :role() pseudo class. The implementation of selector
matching will be in a follow-up patch.
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSSelector.cpp:
(WebCore::appendPseudoClassFunctionTail):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
2014-11-17 Simon Fraser <simon.fraser@apple.com>
[iOS WK1] Sometimes, missing tiles in -webkit-overflow-scrolling: touch in UIWebViews
https://bugs.webkit.org/show_bug.cgi?id=138815
rdar://problem/18746203
Reviewed by Tim Horton.
The scroll-velocity-related data members on FrameView, added in r168233, were uninitialized in UIWebViews,
so FrameView::computeCoverageRect() could return garbage results, leading to too much or too little tile coverage.
We still add additional coverage from the new inclusion of a margin area, but, for simplicity, leave that the same
between WK1 and WK2 for now.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
2014-11-17 Chris Dumez <cdumez@apple.com>
Add initial layout testing coverage for timer throttling
https://bugs.webkit.org/show_bug.cgi?id=138809
Reviewed by Simon Fraser.
Add isTimerThrottled() API to Internals so that we can add layout test
coverage for timer throttling.
Tests: fast/dom/nested-timer-invisible-element-throttling.html
fast/dom/nested-timer-visible-element-throttling.html
fast/dom/repeating-timer-invisible-element-throttling.html
fast/dom/repeating-timer-visible-element-throttling.html
* page/DOMTimer.h:
* testing/Internals.cpp:
(WebCore::Internals::isTimerThrottled):
* testing/Internals.h:
* testing/Internals.idl:
2014-11-17 Zalan Bujtas <zalan@apple.com>
Simple line layout: Rename FlowContentIterator and move implementation to SimpleLineLayoutFlowContents.cpp
https://bugs.webkit.org/show_bug.cgi?id=138799
Reviewed by Antti Koivisto.
This is in preparation to support multiple renderers.
The FlowContents class will be used not just when we create runs, but also when we resolve them at painting time.
No change in functionality.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::nextFragment):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::FlowContentIterator::FlowContentIterator): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::textWidth): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::isEndOfContent): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::style): Deleted.
(WebCore::SimpleLineLayout::computeLineLeft): Deleted.
* rendering/SimpleLineLayoutFlowContents.cpp: Added.
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::textWidth):
* rendering/SimpleLineLayoutFlowContents.h: Added.
(WebCore::SimpleLineLayout::FlowContents::Style::Style):
(WebCore::SimpleLineLayout::FlowContents::style):
(WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
2014-11-17 Daniel Bates <dabates@apple.com>
Unreviewed, rolling out r176232.
Broke the Mac build. Will investigate offline.
Reverted changeset:
"[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions,
MobileGestalt"
https://bugs.webkit.org/show_bug.cgi?id=138802
http://trac.webkit.org/changeset/176232
2014-11-17 Daniel Bates <dabates@apple.com>
[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138802
Reviewed by David Kilzer.
Add SPI wrapper headers {Dispatch, DynamicLinker, IOPMLib, MachVM, NSPointerFunctions, MobileGestalt}SPI.h
that forward declare applicable libdispatch, dyld, IOKit, mach, Foundation, MobileGestalt SPI
and use these headers instead of the including private headers corresponding to these libraries/frameworks.
* WebCore.xcodeproj/project.pbxproj: Add private headers MobileGestaltSPI.h and
MachVMSPI.h, and project headers DynamicLinkerSPI.h, NSPointerFunctionsSPI.h,
DispatchSPI.h and IOPMLibSPI.h. Also, sort files in Xcode project.
* bindings/objc/DOMInternal.mm: Include header NSPointerFunctionsSPI.h.
* bridge/objc/objc_instance.mm: Ditto; Also, sort #import directives.
* platform/cocoa/DisplaySleepDisablerCocoa.cpp: Substitute header IOPMLibSPI.h
for private header IOKit/pwr_mgt/IOPMLib.h.
* platform/cocoa/MemoryPressureHandlerCocoa.mm: Substitute header DispatchSPI.h
for private header dispatch/private.h.
* platform/graphics/ios/FontServicesIOS.mm: Substitute header DynamicLinkerSPI.h
for private header mach-o/dyld_priv.h.
* platform/ios/PlatformScreenIOS.mm: Substitute header MobileGestaltSPI.h for
private header MobileGestalt.h.
* platform/spi/cocoa/DispatchSPI.h: Added.
* platform/spi/cocoa/DynamicLinkerSPI.h: Added.
* platform/spi/cocoa/IOPMLibSPI.h: Added.
* platform/spi/cocoa/MachVMSPI.h: Added.
* platform/spi/cocoa/NSPointerFunctionsSPI.h: Added.
* platform/spi/ios/MobileGestaltSPI.h: Added.
2014-11-17 Daniel Bates <dabates@apple.com>
[iOS] CoreText and CoreUI SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138760
Reviewed by David Kilzer.
Add a SPI wrapper header CoreUISPI.h that forward declares CoreUI SPI
and use this header instead of including private headers of CoreUI directly.
Additionally, add more forward declarations for CoreText SPI.
* WebCore.xcodeproj/project.pbxproj: Add project header CoreUISPI.h.
* platform/graphics/ios/FontCacheIOS.mm: Include header CoreTextSPI.h instead
of including CoreText headers directly.
* platform/graphics/mac/FontMac.mm: Include header CoreUISPI.h instead
of including CoreUI headers directly.
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Remove unnecessary
include of CoreText headers. These headers will be included by header
CoreTextSPI.h (at the top of the file).
* platform/graphics/mac/SimpleFontDataMac.mm: Remove forward declaration
of CTFontDescriptorIsSystemUIFont() and include of header CTFontDescriptorPriv.h
as this duplicates the logic in CoreTextSPI.h, which is included in this file.
* platform/spi/cocoa/CoreTextSPI.h: Added more forward declarations. Simplified
#include directives.
* platform/spi/ios/CoreUISPI.h: Added.
* rendering/RenderThemeIOS.mm: Move CoreUI externs from this file to file
CoreUISPI.h and include header CoreUISPI.h.
2014-11-17 Zalan Bujtas <zalan@apple.com>
Simple line layout: Drop 16bit support temporarily.
https://bugs.webkit.org/show_bug.cgi?id=138796
Reviewed by Antti Koivisto.
This is in preparation to multiple renderers support.
It requires code refactoring on top of the coming multiple renderers codebase.
(Not expecting any significant coverage shrinking.)
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
(WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContentIterator::textWidth):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::nextFragment):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
2014-11-17 Tim Horton <timothy_horton@apple.com>
DataDetectors PageOverlay callbacks can come in to the wrong overlay
https://bugs.webkit.org/show_bug.cgi?id=138801
<rdar://problem/18991369>
Reviewed by Anders Carlsson.
* page/PageOverlay.cpp:
(WebCore::generatePageOverlayID):
(WebCore::PageOverlay::PageOverlay):
* page/PageOverlay.h:
Give each PageOverlay a unique ID.
2014-11-17 Javier Fernandez <jfernandez@igalia.com>
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
https://bugs.webkit.org/show_bug.cgi?id=133359
Reviewed by David Hyatt.
Broaden justify-self's parsing name as a preparation of migrating
align-self, align-items and justify-items to the CSS 3 Alignment syntax.
The current naming was too tied to justify-self and needs to
be broadened. This will reduce the follow-up implementations'
patches.
Upgrade align-self and align-items parsing to CSS 3
This change migrates the 2 properties to the CSS 3 Alignment
parsing. The new parsing is identical to how we parse
'justify-self'. The 2 properties need to be migrated together
as they are used in tandem in CSSComputedStyleDeclaration.
This change also removes EAlignItems as it is now unused.
Tests: css3/parse-align-items.html
css3/parse-align-self.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties.
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isKeywordPropertyID): Removed align-items and align-self from the list.
(WebCore::isValidKeywordPropertyAndValue): Removed align-items and align-self from the list.
(WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties.
(WebCore::isBaselinePositionKeyword): Utility function added to identify Baseline keyword values.
(WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties.
(WebCore::CSSParser::parseJustifySelf): Deleted.
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Refactoring some mapping functions.
(WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration.
(WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added.
(WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted.
(WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted.
(WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted.
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Added a new adjustment to resolve the "auto" vale on the alignment properties.
(WebCore::StyleResolver::adjustStyleForAlignment): Added. Function to resolve the "auto" vale on the alignment properties.
(WebCore::StyleResolver::applyProperty):
(WebCore::isDisplayFlexibleBox): Deleted. Moved to the RenderStyle.
(WebCore::isDisplayGridBox): Deleted. Moved to the RenderStyle.
(WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to the RenderStyle.
* css/StyleResolver.h:
* rendering/RenderBox.cpp:
(WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPosition enum.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPosition enum.
(WebCore::resolveAlignment): Consider also that align-items could be "auto", since it's the default now.
(WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPosition enum.
* rendering/RenderFlexibleBox.h:
* rendering/RenderFullScreen.cpp:
(WebCore::createFullScreenStyle): Adapted to the new ItemPosition enum.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPosition enum.
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPosition enum.
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPosition enum.
(WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPosition enum.
* rendering/style/RenderStyle.h: Adapted to the new ItemPosition enum.
* rendering/style/RenderStyleConstants.h: Adapted to the new ItemPosition enum.
* rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPosition enum.
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPosition enum.
(WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPosition enum.
* rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPosition enum.
* style/StyleResolveTree.cpp:
(WebCore::Style::determineChange): Changes in the alignItems property will cause a Detach.
2014-11-17 Shivakumar JM <shiva.jm@samsung.com>
Attribute text in HTMLAnchorElement should behave as per specification.
https://bugs.webkit.org/show_bug.cgi?id=138557
Reviewed by Darin Adler.
attribute text in HTMLAnchorElement should not be readonly as per specification
http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute.
Also This matches the behavior of Chrome 38 and FireFox.
Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::text):
(WebCore::HTMLAnchorElement::setText):
* html/HTMLAnchorElement.h:
* html/HTMLAnchorElement.idl:
2014-11-17 Chris Dumez <cdumez@apple.com>
Throttle timers that change the style of elements outside the viewport
https://bugs.webkit.org/show_bug.cgi?id=138292
Reviewed by Antti Koivisto.
Throttle timers that change the style of elements outside the viewport
to 1 second, similarly to what was already done for timers interacting
with non user observable plugins. To be conservative, we don't throttle
timers that also cause DOM Tree modifications (e.g. adding/removing
nodes, modify element attributes).
On huffingtonpost.com, the CPU usage is at ~17% when the top scrolling
banner is inside the viewport on my machine. Without this patch, CPU
usage would stay ~17% when the banner is outside the viewport. Thanks
to timer throttling, CPU usage now goes down to ~1.5%, without user
observable side effects. The timers get unthrottled when they are
inside the viewport again (i.e. due to scrolling or layout).
On espn.com, the CPU usage goes down from ~7% at the top of the page
to ~1% when scrolling to the bottom of the page. On ebay.com, CPU
usage goes down from ~25% at the top of the page to less than 1% when
scrolling to the bottom of the page.
2014-11-17 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error, CoreGraphics header file included.
https://bugs.webkit.org/show_bug.cgi?id=138795
Reviewed by Brent Fulgham.
CoreGraphics is not available on WinCairo.
* platform/graphics/win/FontCacheWin.cpp:
2014-11-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176169.
https://bugs.webkit.org/show_bug.cgi?id=138797
Appears to have broken svg/custom/anchor-on-use.svg (Requested
by ap on #webkit).
Reverted changeset:
"Attribute text in HTMLAnchorElement should behave as per
specification."
https://bugs.webkit.org/show_bug.cgi?id=138557
http://trac.webkit.org/changeset/176169
2014-11-17 Daniel Bates <dabates@apple.com>
[iOS] AVKit and MediaPlayer SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138756
Reviewed by Eric Carlson.
Add a SPI wrapper headers {AVKit, MPAVRoutingController}SPI.h that forward declares
AVKit and MPAVRoutingController SPI, respectively, and use these header instead of
including private headers of AVKit and MediaPlayer directly.
* WebCore.xcodeproj/project.pbxproj: Add project and private header AVKitSPI.h
and MPAVRoutingControllerSPI.h, respectively.
* platform/audio/ios/MediaSessionManagerIOS.mm: Include header MPAVRoutingControllerSPI.h
instead of including the private header MPAVRoutingController.h.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Include header AVKitSPI.h
instead of including AVKit headers directly.
2014-11-17 Daniel Bates <dabates@apple.com>
Attempt to fix the Mac build after <https://trac.webkit.org/changeset/176204>
(https://bugs.webkit.org/show_bug.cgi?id=138751)
Move declaration of CAContext to be before the declaration of CALayer since
the latter depends on the former.
* platform/spi/cocoa/QuartzCoreSPI.h:
2014-11-17 Daniel Bates <dabates@apple.com>
[iOS] QuartzCore SPI not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138751
Reviewed by David Kilzer.
Add a SPI wrapper header called QuartzCoreSPI.h that forward declares
QuartzCore SPI and use this header instead of including private headers
of QuartzCore directly.
* WebCore.xcodeproj/project.pbxproj: Added private header QuartzCoreSPI.h.
* platform/graphics/ca/mac/PlatformCAFiltersMac.h: Removed; incorporated its
functionality into QuartzCoreSPI.h.
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Substitute header
QuartzCoreSPI.h for PlatformCAFiltersMac.h as the content of the latter
was incorporated into the former.
* platform/graphics/ca/mac/PlatformCALayerMac.mm: Move CALayer and CATiledLayer
forward declarations from this file to file QuartzCoreSPI.h and include
header QuartzCoreSPI.h instead of including CATiledLayerPrivate.h directly. Also
remove header PlatformCAFiltersMac.h as its content is incorporated into QuartzCoreSPI.h
* platform/ios/LegacyTileCache.mm: Include headers CoreGraphicsSPI.h and QuartzCoreSPI.h
instead of including QuartzCore headers directly.
* platform/ios/LegacyTileGrid.mm: Include header QuartzCoreSPI.h instead
of including QuartzCore headers directly. Also sort the list of #include directives.
* platform/ios/LegacyTileGridTile.mm: Include header QuartzCoreSPI.h
instead of including QuartzCore headers directly.
* platform/spi/cocoa/QuartzCoreSPI.h: Added.
2014-11-17 Chris Dumez <cdumez@apple.com>
Move more CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138766
Reviewed by Darin Adler.
Move more CSS properties from DeprecatedStyleBuilder to the new
StyleBuilder:
line-height
word-spacing
-webkit-marquee-repetition
-webkit-text-underline-position
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::csstoLengthConversionDataWithTextZoomFactor): Deleted.
(WebCore::ApplyPropertyMarqueeRepetition::applyValue): Deleted.
(WebCore::ApplyPropertyMarqueeRepetition::createHandler): Deleted.
(WebCore::ApplyPropertyTextUnderlinePosition::applyValue): Deleted.
(WebCore::ApplyPropertyTextUnderlinePosition::createHandler): Deleted.
(WebCore::ApplyPropertyLineHeight::applyValue): Deleted.
(WebCore::ApplyPropertyLineHeight::createHandler): Deleted.
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Deleted.
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInitialValue): Deleted.
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInheritValue): Deleted.
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::createHandler): Deleted.
(WebCore::ApplyPropertyWordSpacing::applyValue): Deleted.
(WebCore::ApplyPropertyWordSpacing::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertMarqueeRepetition):
(WebCore::StyleBuilderConverter::convertTextUnderlinePosition):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::csstoLengthConversionDataWithTextZoomFactor):
(WebCore::StyleBuilderFunctions::convertLineHeight):
(WebCore::StyleBuilderFunctions::applyValueWordSpacing):
(WebCore::StyleBuilderFunctions::applyInheritLineHeight):
(WebCore::StyleBuilderFunctions::applyInitialLineHeight):
(WebCore::StyleBuilderFunctions::applyValueLineHeight):
2014-11-16 Andreas Kling <akling@apple.com>
Avoid synchronous style recalc when mutating a Node inside FrameSelection.
<https://webkit.org/b/138791>
Reviewed by Antti Koivisto.
We can safely clear the RenderView's selection without doing a synchronous
style recalc first.
This is a small progression on Speedometer locally.
* editing/FrameSelection.cpp:
(WebCore::DragCaretController::nodeWillBeRemoved):
(WebCore::FrameSelection::respondToNodeModification):
(WebCore::clearRenderViewSelection): Deleted.
Merged clearRenderViewSelection() into the call sites and removed
the now-unnecessary protection of the Document.
2014-11-17 Eric Carlson <eric.carlson@apple.com>
[iOS] allow host application to opt-out of alternate fullscreen
https://bugs.webkit.org/show_bug.cgi?id=138787
Reviewed by Darin Adler.
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::optimizedFullscreenSupported): Check mediaSession().allowsAlternateFullscreen.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreenOptimized): Do nothing if
mediaSession().allowsAlternateFullscreen says it isn't allowed.
* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::allowsAlternateFullscreen): New, check settings.
* html/HTMLMediaSession.h:
* page/Settings.cpp: Add allowsAlternateFullscreen.
* page/Settings.in: Ditto.
2014-11-16 Zan Dobersek <zdobersek@igalia.com>
Replace RenderSVGResource::cast<T>() with downcast<T>()
https://bugs.webkit.org/show_bug.cgi?id=138290
Reviewed by Chris Dumez.
Add type traits for the RenderSVGResource hierarchy. This enables
using the typecasting framework in getRenderSVGResourceById() that
in return renders the RenderSVGResource::cast<>() template and all
the static s_resourceType member variables in the hierarchy removable.
* WebCore.order:
* rendering/svg/RenderSVGResource.h:
(WebCore::RenderSVGResource::cast): Deleted.
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.h:
(WebCore::getRenderSVGResourceById):
* rendering/svg/RenderSVGResourceFilter.h:
(isType):
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGResourceSolidColor.h:
2014-11-16 Benjamin Poulain <benjamin@webkit.org>
Implement :valid and :invalid matching for the fieldset element
https://bugs.webkit.org/show_bug.cgi?id=138769
Reviewed by Darin Adler.
In the latest HTML spec, the pseudo classes :valid and :invalid match
a fieldset element based on its descendants:
https://html.spec.whatwg.org/#selector-valid
https://html.spec.whatwg.org/#selector-invalid
This patch adds that behavior.
There are two key problems to solve with these pseudo classes on fieldset:
-Efficient matching.
-Style invalidation when any of the descendant changes.
To implement the style invalidation, I have modified HTMLFormControlElement
to notify its ancestor when its state changes.
The first change is making the state fully internal to HTMLFormControlElement,
we do not want subclass to be able to change the behavior and forget to update
the ancestors.
To achieve that encapsulation, the interface was changed a bit:
-Neither willValidate() nor isValidFormControlElement() inherit from Element.
Instead, willValidate() is the implementation of FormAssociatedElement's interface
and it is final. The method isValidFormControlElement() becomes completely internal
to HTMLFormControlElement.
-Since willValidate() should no longer be re-implemented by subclass, the elements
that were depending on it have been migrated to recalcWillValidate() to set
the initial state as needed.
With the validity state fully encapsulated in HTMLFormControlElement, all I need
is a way to communicate that information to HTMLFieldSetElement ancestors.
This is done in two cases:
-The validity state changes.
-The tree changes in a way that would make the input element not a descendant
of a HTMLFieldSetElement.
The invalidation is simply done by walking up the ancestors and adding the current
element to a "validity dependency list" on each HTMLFieldSetElement.
Tests: fast/css/pseudo-invalid-fieldset-invalidation-optimization.html
fast/css/pseudo-invalid-fieldset-style-sharing.html
fast/css/pseudo-invalid-fieldset.html
fast/css/pseudo-valid-fieldset-invalidation-optimization.html
fast/css/pseudo-valid-fieldset-style-sharing.html
fast/css/pseudo-valid-fieldset.html
fast/selectors/invalid-fieldset-style-update-1.html
fast/selectors/invalid-fieldset-style-update-2.html
fast/selectors/invalid-fieldset-style-update-3.html
fast/selectors/invalid-fieldset-style-update-4.html
fast/selectors/invalid-fieldset-style-update-5.html
fast/selectors/valid-fieldset-style-update-1.html
fast/selectors/valid-fieldset-style-update-2.html
fast/selectors/valid-fieldset-style-update-3.html
fast/selectors/valid-fieldset-style-update-4.html
fast/selectors/valid-fieldset-style-update-5.html
* css/SelectorCheckerTestFunctions.h:
(WebCore::isInRange):
(WebCore::isOutOfRange):
(WebCore::isInvalid):
(WebCore::isValid):
The hack "ContainsValidityStyleRules" is in the way of correct styling
of FieldSet and Form.
It is not the right way to get stylesheet properties anyway.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithControl):
Make sure style sharing does not incorrectly share style for fieldset elements.
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore::Document::containsValidityStyleRules): Deleted.
(WebCore::Document::setContainsValidityStyleRules): Deleted.
* dom/Element.h:
(WebCore::Element::matchesValidPseudoClass):
(WebCore::Element::matchesInvalidPseudoClass):
(WebCore::Element::willValidate): Deleted.
(WebCore::Element::isValidFormControlElement): Deleted.
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::customError):
* html/FormAssociatedElement.h:
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::matchesValidPseudoClass):
(WebCore::HTMLFieldSetElement::matchesInvalidPseudoClass):
(WebCore::HTMLFieldSetElement::addInvalidDescendant):
(WebCore::HTMLFieldSetElement::removeInvalidDescendant):
Each HTMLFormControlElement that has constraint validation adds or removes
itself from its HTMLFieldSetElement ancestors.
It should be possible to just keep track of a count instead of a HashSet.
I decided to got with the HashSet to make the code more robust and easier
to debug. A few assertions ensure that the HashSet is actually used as a counter.
* html/HTMLFieldSetElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::addInvalidElementToAncestorFromInsertionPoint):
(WebCore::removeInvalidElementToAncestorFromInsertionPoint):
(WebCore::HTMLFormControlElement::insertedInto):
(WebCore::HTMLFormControlElement::removedFrom):
One tricky part of those two functions is that we cannot use
matchesValidPseudoClass() or matchesInvalidPseudoClass().
The reason is that HTMLFieldSetElement is a subclass of HTMLFormControlElement
and it has its own definition of what Valid and Invalid mean when matching selectors.
In HTMLFormControlElement, we must use the internal state,
willValidate() and isValidFormControlElement() must be used directly.
(WebCore::HTMLFormControlElement::matchesValidPseudoClass):
(WebCore::HTMLFormControlElement::matchesInvalidPseudoClass):
(WebCore::HTMLFormControlElement::willValidate):
(WebCore::addInvalidElementToAncestors):
(WebCore::removeInvalidElementFromAncestors):
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
(WebCore::HTMLFormControlElement::setNeedsValidityCheck):
(WebCore::HTMLFormControlElement::isValidFormControlElement): Deleted.
* html/HTMLFormControlElement.h:
(WebCore::HTMLFormControlElement::isValidFormControlElement):
* html/HTMLKeygenElement.h:
* html/HTMLObjectElement.h:
* html/HTMLOutputElement.h:
2014-11-16 Zan Dobersek <zdobersek@igalia.com>
[TexMap] Add typecasting support for GraphicsLayerTextureMapper
https://bugs.webkit.org/show_bug.cgi?id=138741
Reviewed by Martin Robinson.
Add type traits for the GraphicsLayerTextureMapper class.
This enables using typecasting functions instead of
toGraphicsLayerTextureMapper().
Remove toTextureMapperLayer() casting function which actually
returned the TextureMapperLayer object that belonged to the
passed-in GraphicsLayerTextureMapper. Instead, the GraphicsLayer
object is now downcasted and the TextureMapperLayer is accessed
by calling the GraphicsLayerTextureMapper::layer() method.
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::isGraphicsLayerTextureMapper):
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::toTextureMapperLayerVector):
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::toTextureMapperLayer): Deleted.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::toGraphicsLayerTextureMapper): Deleted.
2014-11-16 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move WebCore/loader to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=138646
Reviewed by Chris Dumez.
Replace OwnPtr with std::unique_ptr<> and std::make_unique<>.
However this patch leaves ResourceRequest::adopt() because this need
to be handled by different patch.
No new tests, no behavior changes.
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::preflightSuccess):
* loader/DocumentThreadableLoader.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::SubresourceLoader):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::notifyDone):
* loader/SubresourceLoader.h:
* loader/TextTrackLoader.h:
* loader/appcache/ApplicationCacheHost.h:
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::storeCopyOfCache):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestPreload):
(WebCore::CachedResourceLoader::clearPreloads):
(WebCore::CachedResourceLoader::printPreloadStats):
* loader/cache/CachedResourceLoader.h:
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::deleteAllPreparedStatements):
(WebCore::readySQLiteStatement):
* loader/icon/IconDatabase.h:
* loader/icon/IconRecord.h:
2014-11-16 Chris Dumez <cdumez@apple.com>
Crash when setting 'order' CSS property to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138780
Reviewed by Darin Adler.
CSS Calculated values were not handled by the CSS parser for 'order'
CSS property. As a result, using calculated values wouldn't work in
release builds and would hit an assertion in debug builds.
This patch updates the CSS parser to directly convert the
CSS Calculated value into a simple integer CSSPrimitiveValue for
'order' property. We could have marked CSS Calculated values as
valid in the CSS Parser instead but this would have brought issues:
- The calculated value needs to be adjusted to INT_MIN + 2 if it is less
than that. This would force us to calculate the expression anyway.
- The StyleBuilder would need updating to properly handle CSS Calculated
values for 'order'.
Test: fast/css/order-calculated-value.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
2014-11-16 Chris Dumez <cdumez@apple.com>
Assertion hit when setting a very large value to 'border-width' / 'font-size' CSS properties
https://bugs.webkit.org/show_bug.cgi?id=138770
Reviewed by Darin Adler.
When setting a very large value to a CSS property, it is represented internally as
infinity. r166114 already tried to deal with this by adding an std::isinf() check
in CSSValuePool::createValue() and returning an identifier CSSPrimitiveValue with
CSSValueInvalid value in such case. The issue is that doing leads to the
StyleBuilder getting a CSSValueInvalid CSSPrimitive value as input, which is not
handled and leads to assertions.
This patch updates the CSSParser to detect cases where the double value is
infinity earlier (in CSSParser::validUnit() and parseSimpleLengthValue()), so
that we mark the value as invalid and actually drop it. As a result,
CSSPrimitiveValues with CSSValueInvalid value no longer make their way to the
StyleBuilder.
Test: fast/css/style-builder-infinite-value.html
fast/css/infinite-floating-value.html
* css/CSSParser.cpp:
(WebCore::parseSimpleLengthValue):
(WebCore::CSSParser::validUnit):
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createValue):
2014-11-16 Shivakumar JM <shiva.jm@samsung.com>
Attribute text in HTMLAnchorElement should behave as per specification.
https://bugs.webkit.org/show_bug.cgi?id=138557
Reviewed by Darin Adler.
attribute text in HTMLAnchorElement should not be readonly as per specification
http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute.
Also This matches the behavior of Chrome 38 and FireFox.
Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::text):
(WebCore::HTMLAnchorElement::setText):
* html/HTMLAnchorElement.h:
* html/HTMLAnchorElement.idl:
2014-11-16 Chris Dumez <cdumez@apple.com>
Move 'vertical-align' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138764
Reviewed by Darin Adler.
Move 'vertical-align' CSS property from DeprecatedStyleBuilder to the
new StyleBuilder by using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyVerticalAlign::applyValue): Deleted.
(WebCore::ApplyPropertyVerticalAlign::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueVerticalAlign):
2014-11-16 Tim Horton <timothy_horton@apple.com>
Use TextIndicator instead of the built in Lookup highlight
https://bugs.webkit.org/show_bug.cgi?id=138775
<rdar://problem/18953982>
Follow-up to r176164.
* platform/spi/mac/LookupSPI.h:
(WebCore::canDisableLookupIndicator): Deleted.
Remove canDisableLookupIndicator.
2014-11-16 Chris Dumez <cdumez@apple.com>
Crash when setting '-webkit-line-clamp' CSS property to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138777
Reviewed by Benjamin Poulain.
CSS Calculated values were not handled when converting a CSSPrimitiveValue
to a LineClampValue. As a result, we would hit an ASSERT_NOT_REACHED()
assertion. To address this issue, this patch updates the code to use
primitiveType() / getValue<>() instead of m_primitiveUnitType /
m_value.num, as those getter function properly handle CSS Calculated
values.
Test: fast/css/webkit-line-clamp-calculated-value.html
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator LineClampValue):
2014-11-16 Tim Horton <timothy_horton@apple.com>
Use TextIndicator instead of the built in Lookup highlight
https://bugs.webkit.org/show_bug.cgi?id=138775
<rdar://problem/18953982>
Reviewed by Anders Carlsson.
* WebCore.exp.in:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Remove a WKSI import/export that we don't need anymore.
* platform/spi/mac/LookupSPI.h: Added.
(WebCore::canDisableLookupIndicator):
Add Lookup SPI header.
Add a 'canDisableLookupIndicator', which must be called in any translation
unit that wants to use either of the soft-linked constants related to
that functionality, before calling the get* function.
* WebCore.xcodeproj/project.pbxproj:
* editing/mac/DictionaryLookup.mm:
(WebCore::rangeForDictionaryLookupForSelection):
(WebCore::rangeForDictionaryLookupAtHitTestResult):
Adopt the Lookup SPI header.
2014-11-16 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] REGRESSION(r166288): Accessible values are no longer accessible via AT-SPI2
https://bugs.webkit.org/show_bug.cgi?id=138776
Reviewed by Chris Fleizach.
r166288 used #if...#else instead of #if...#endif, thus disabling the old
AtkValue support. Unfortunately AT-SPI2 doesn't yet have support for the
new AtkValue API. Thus r166288 broke access to value-holding elements for
AT-SPI2 assistive technologies. Replacing #else with #endif fixes things.
No new tests because catching this regression would require AT-SPI2.
* accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
(webkitAccessibleValueGetMinimumIncrement):
(webkitAccessibleValueInterfaceInit):
2014-11-16 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Expose the blockquote element using ATK_ROLE_BLOCK_QUOTE
https://bugs.webkit.org/show_bug.cgi?id=138771
Reviewed by Chris Fleizach.
Add BlockquoteRole and assigns it to blockquote elements. Make
corresponding changes to platform role mappings: ATK_ROLE_BLOCK_QUOTE
for GTK and EFL; AXGroup (which was being used already) for the Mac.
No new tests are required. Instead, updated the existing expectations
to reflect the new mapping.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isBlockquote):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
2014-11-16 Chris Dumez <cdumez@apple.com>
Crash when setting 'alt' CSS property to inherit or initial
https://bugs.webkit.org/show_bug.cgi?id=138774
<rdar://problem/18995409>
Reviewed by Chris Fleizach.
The StyleResolver was not handling 'inherit' or 'initial' values for
'alt' CSS property. As a result, the code was assuming the CSSValue
was a CSSPrimitiveValue (although it could be a CSSInitialValue or
a CSSInheritValue). In such case, the code would dereference a null
pointer because primitiveValue is initialized using:
CSSPrimitiveValue* primitiveValue = is<CSSPrimitiveValue>(*value)
? downcast<CSSPrimitiveValue>(value)
: nullptr;
Test: fast/css/alt-inherit-initial.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2014-11-15 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Lists with selectable children should have ATK_ROLE_LIST_BOX
https://bugs.webkit.org/show_bug.cgi?id=127060
Reviewed by Chris Fleizach.
Corrected the mapping from ATK_ROLE_LIST to ATK_ROLE_LIST_BOX.
No new tests. Instead, updated the expectations of roles-exposed.html to
reflect the corrected mapping.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
2014-11-15 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Video and audio elements should be exposed using ATK's video and audio roles.
https://bugs.webkit.org/show_bug.cgi?id=138767
Reviewed by Chris Fleizach.
Map AudioRole and VideoRole to ATK_ROLE_AUDIO and ATK_ROLE_VIDEO
respectively, falling back on the existing mapping to ATK_ROLE_EMBEDDED
in environments which have an older version of ATK.
No new tests are required. Instead, existing expectations were updated
to reflect the new mapping.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
2014-11-15 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Expose the footer element as ATK_ROLE_FOOTER
https://bugs.webkit.org/show_bug.cgi?id=138773
Reviewed by Chris Fleizach.
Map FooterRole to ATK_ROLE_FOOTER.
No new tests. Unskipped a test that verifies this mapping.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
2014-11-14 Dean Jackson <dino@apple.com>
Rename WebKitCSSKeyframe(s)Rule into CSSKeyframe(s)Rule
https://bugs.webkit.org/show_bug.cgi?id=138763
<rdar://problem/18991569>
Reviewed by Simon Fraser.
Globally rename WebKitCSSKeyframeRule and WebKitCSSKeyframesRule to
CSSKeyframeRule and CSSKeyframesRule respectively.
This *may* break some existing content, but is compatible with
what Blink and Firefox are doing. To minimize breakage, I kept an
alias for the old constant values on CSSRule: WEBKIT_KEYFRAMES_RULE
and WEBKIT_KEYFRAME_RULE.
Covered by existing tests.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/objc/DOMCSS.mm:
(kitClass):
* css/CSSGrammar.y.includes:
* css/CSSKeyframeRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.cpp.
(WebCore::StyleKeyframe::StyleKeyframe):
(WebCore::StyleKeyframe::~StyleKeyframe):
(WebCore::StyleKeyframe::mutableProperties):
(WebCore::StyleKeyframe::parseKeyString):
(WebCore::StyleKeyframe::cssText):
(WebCore::CSSKeyframeRule::CSSKeyframeRule):
(WebCore::CSSKeyframeRule::~CSSKeyframeRule):
(WebCore::CSSKeyframeRule::style):
(WebCore::CSSKeyframeRule::reattach):
* css/CSSKeyframeRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.h.
(WebCore::StyleKeyframe::create):
(WebCore::StyleKeyframe::keyText):
(WebCore::StyleKeyframe::setKeyText):
(WebCore::StyleKeyframe::getKeys):
(WebCore::StyleKeyframe::properties):
* css/CSSKeyframeRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.idl.
* css/CSSKeyframesRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.cpp.
(WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
(WebCore::StyleRuleKeyframes::~StyleRuleKeyframes):
(WebCore::StyleRuleKeyframes::parserAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperRemoveKeyframe):
(WebCore::StyleRuleKeyframes::findKeyframeIndex):
(WebCore::CSSKeyframesRule::CSSKeyframesRule):
(WebCore::CSSKeyframesRule::~CSSKeyframesRule):
(WebCore::CSSKeyframesRule::setName):
(WebCore::CSSKeyframesRule::appendRule):
(WebCore::CSSKeyframesRule::insertRule):
(WebCore::CSSKeyframesRule::deleteRule):
(WebCore::CSSKeyframesRule::findRule):
(WebCore::CSSKeyframesRule::cssText):
(WebCore::CSSKeyframesRule::length):
(WebCore::CSSKeyframesRule::item):
(WebCore::CSSKeyframesRule::cssRules):
(WebCore::CSSKeyframesRule::reattach):
* css/CSSKeyframesRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.h.
(WebCore::StyleRuleKeyframes::create):
(WebCore::StyleRuleKeyframes::keyframes):
(WebCore::StyleRuleKeyframes::name):
(WebCore::StyleRuleKeyframes::setName):
(WebCore::StyleRuleKeyframes::copy):
* css/CSSKeyframesRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.idl.
* css/CSSParser.cpp:
* css/CSSRule.h:
* css/CSSRule.idl:
* css/CSSStyleSheet.cpp:
* css/RuleSet.cpp:
* css/StyleResolver.cpp:
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::createCSSOMWrapper):
* inspector/InspectorStyleSheet.cpp:
(WebCore::asCSSRuleList):
2014-11-15 David Kilzer <ddkilzer@apple.com>
REGRESSION (r176137): iOS build broke after moving DataDetectors scanning code to WebCore
This regressed with the following commit:
Move DataDetectors scanning code to WebCore
https://bugs.webkit.org/show_bug.cgi?id=138731
<rdar://problem/18877535>
This fixes the following build failures:
In file included from WebCore/editing/mac/DataDetection.mm:29:
WebCore/platform/spi/mac/DataDetectorsSPI.h:66:11: error: unknown type name 'NSRect'
@property NSRect highlightFrame;
^
WebCore/editing/mac/DataDetection.mm:42:28: error: use of undeclared identifier 'DataDetection'
RetainPtr<DDActionContext> DataDetection::detectItemAroundHitTestResult(const HitTestResult& hitTestResult, FloatRect& detectedDataBoundingBox, RefPtr<Range>& detectedDataRange)
^
2 errors generated.
* WebCore.exp.in:
(DataDetection::detectItemAroundHitTestResult): Move symbol from
shared section to Mac-only section.
* editing/mac/DataDetection.mm: Add PLATFORM(MAC) check around
the entire implementation since it it unused on iOS.
* platform/spi/mac/DataDetectorsSPI.h: Expand PLATFORM(MAC)
check around DDActionContext class declarations.
2014-11-14 Benjamin Poulain <benjamin@webkit.org>
Compute the selector specificity as we match simple selectors
https://bugs.webkit.org/show_bug.cgi?id=138718
Reviewed by Andreas Kling.
This is an other tiny step toward dynamic specificity. Instead of computing
the entire specificity at the end, compute it dynamically as we are matching
each individual simple selector.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificity):
(WebCore::CSSSelector::simpleSelectorSpecificity):
(WebCore::CSSSelector::addSpecificities):
(WebCore::CSSSelector::specificityForPage):
(WebCore::CSSSelector::specificityForOneSelector): Deleted.
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match):
(WebCore::SelectorChecker::matchRecursively):
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::matchSelectorList):
* css/SelectorChecker.h:
2014-11-14 Andreas Kling <akling@apple.com>
[mac] Only images that are actually purgeable should be advertised as such.
<https://webkit.org/b/138759>
<rdar://problem/13205438>
Reviewed by Tim Horton.
Instead of saying that all images on >=Yosemite are purgeable, have BitmapImage
forward the question to CGImage for the correct answer.
The memory may be marked non-volatile by frameworks underneath WebKit at any
given time, but that's not something we need to worry about.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::decodedDataIsPurgeable):
* platform/graphics/BitmapImage.h:
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::decodedDataIsPurgeable):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::createFrameAtIndex):
* platform/spi/cg/CoreGraphicsSPI.h:
2014-11-14 Zalan Bujtas <zalan@apple.com>
Remove computeTextPaintStyle's RenderText dependency.
https://bugs.webkit.org/show_bug.cgi?id=138754
Reviewed by Simon Fraser.
So that we can compute text paint style across renderers in simple line layout.
No change in functionality.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
* rendering/TextPaintStyle.cpp:
(WebCore::computeTextPaintStyle):
* rendering/TextPaintStyle.h:
2014-11-14 Myles C. Maxfield <mmaxfield@apple.com>
Get rid of WebFontCache
https://bugs.webkit.org/show_bug.cgi?id=134752
Reviewed by Dave Hyatt.
No new tests because there is no behavior change.
* Configurations/WebCore.xcconfig:
* PlatformMac.cmake:
* WebCore.exp.in:
* WebCore.order:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::acceptableChoice):
(WebCore::betterChoice):
(WebCore::toTraitsMask):
(WebCore::desiredFamilyToAvailableFamilyDictionary):
(WebCore::rememberDesiredFamilyToAvailableFamilyMapping):
(WebCore::fontWithFamily):
(WebCore::invalidateFontCache):
(WebCore::FontCache::getTraitsInFamily):
(WebCore::FontCache::createFontPlatformData):
* platform/mac/WebFontCache.h: Removed.
* platform/mac/WebFontCache.mm: Removed.
2014-11-14 Daniel Bates <dabates@apple.com>
[iOS] NSFileManager and QuickLook SPI not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138742
Reviewed by Pratik Solanki.
Add a SPI wrapper headers {NSFileManager, QuickLook}SPI.h that forward declares
NSFileManager and QuickLook SPI, respectively, and use these header instead of
including private headers of Foundation and QuickLook directly.
* WebCore.xcodeproj/project.pbxproj: Add project and private header QuickLookSPI.h
and NSFileManagerSPI.h, respectively.
* platform/network/ios/QuickLook.mm: Include headers QuickLookSPI.h and NSFileManagerSPI.h
instead of including headers of QuickLook and Foundation directly.
* platform/spi/cocoa/NSFileManagerSPI.h: Added.
* platform/spi/ios/QuickLookSPI.h: Added.
2014-11-14 Daniel Bates <dabates@apple.com>
[iOS] CoreGraphics SPI not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138709
Reviewed by David Kilzer.
Add a SPI wrapper header called CoreGraphicsSPI.h that forward declares
CoreGraphics SPI and use this header instead of including private headers
of CoreGraphics directly.
* WebCore.xcodeproj/project.pbxproj: Add WebCore private header CoreGraphicsSPI.h. Also remove header
CGFontUnicodeSupportSPI.h as its functionality has been incorporated into header CoreGraphicsSPI.h.
* WebCore.vcxproj/WebCore.vcxproj: Add WebCore private header CoreGraphicsSPI.h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Add directories platform/spi and platform/spi/cg.
* WebCore.vcxproj/WebCoreCG.props: Add include directory platform/spi/cg.
* WebCore.vcxproj/copyForwardingHeaders.cmd: Copy WebCore headers from directory platform/spi/cg. This
is necessary because WebCore/platform/graphics/SimpleFontData.h includes CoreGraphicsSPI.h. And
WebCore/platform/graphics/SimpleFontData.h is compiled for the Apple Windows port.
* platform/graphics/SimpleFontData.h: Move CGFontRenderingStyle declaration and associated enum
from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
* platform/graphics/cg/BitmapImageCG.cpp: Remove unnecessary #include of header CGContextPrivate.h.
* platform/graphics/cg/ColorCG.cpp: Include header CoreGraphicsSPI.h instead of including headers
of CoreGraphics directly.
* platform/graphics/cg/GraphicsContextCG.cpp: Move forward declarations of CoreGraphics functions
from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h. Also sort the list
of #include directives.
* platform/graphics/cg/ImageSourceCG.cpp: Include header CoreGraphicsSPI.h instead of including
headers of CoreGraphics directly.
* platform/graphics/cg/PDFDocumentImage.cpp: Ditto.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm: Ditto.
* platform/graphics/ios/FontCacheIOS.mm: Include header CoreGraphicsSPI.h instead of including
header <CoreGraphics/CGFontUnicodeSupport.h> directly.
* platform/graphics/ios/FontServicesIOS.mm: Include header CoreGraphicsSPI.h instead of including
headers of CoreGraphics directly.
* platform/graphics/ios/SimpleFontDataIOS.mm: Ditto.
* platform/graphics/mac/FontMac.mm: Move forward declarations of CoreGraphics functions from this
file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Substitute header CoreGraphicsSPI.h for CGFontUnicodeSupportSPI.h
and remove #include of headers CGFontUnicodeSupport.h (it will be included by CoreGraphicsSPI.h).
* platform/graphics/mac/SimpleFontDataMac.mm: Move forward declarations of CoreGraphics functions
from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
* platform/ios/LegacyTileGrid.mm: Include header CoreGraphicsSPI.h instead of including headers of
CoreGraphics directly.
* platform/ios/wak/WKGraphics.h: Remove #include of header CoreGraphicsPrivate.h and forward declare
CGFontAntialiasingStyle Additionally, declare WKCompositeOperation as an alias of int and use this
data type instead of CGCompositeOperation (SPI). This approach lets us keep the definition of
CGCompositeOperation in file CoreGraphicsSPI.h, where all the other definitions/forward declarations
of CoreGraphics data types reside, as opposed to defining it in this file.
* platform/ios/wak/WKGraphics.mm:
(WKRectFillUsingOperation): Cast data type WKCompositeOperation to CGCompositeOperation and added
compile-time assert to ensure that the size of WKCompositeOperation is identical to the size of CGCompositeOperation.
* platform/graphics/cg/ImageSourceCG.cpp: Move CGImageCachingFlags declaration, associated enum, and
forward declaration of CGImageSetCachingFlags() from this file to file CoreGraphicsSPI.h and include
header CoreGraphicsSPI.h.
(WebCore::ImageSource::createFrameAtIndex): Fix incorrect comment.
* platform/spi/cocoa/CGFontUnicodeSupportSPI.h: Removed; moved its functionality into header CoreGraphicsSPI.h.
* platform/spi/cg/CoreGraphicsSPI.h: Added.
(CGFloatMin):
* rendering/RenderThemeIOS.mm: Substitute header CoreGraphics.h for CGPathPrivate.h as we no longer
make use of any functionality from CGPathPrivate.h in this file. The functionality we used from
CGPathPrivate.h, including CGPathAddRoundedRect(), has been moved to the public API header, CGPath.h,
which is included from header CoreGraphics.h.
2014-11-14 Dean Jackson <dino@apple.com>
[Media] Timeline scrubber not updating as the video plays
https://bugs.webkit.org/show_bug.cgi?id=138717
<rdar://problem/18957509>
Reviewed by Jer Noble.
There is some confusing logic that determines
whether or not the controls are hidden, and a
slight error caused timelines to not advance unless
they were explicitly showing.
The fix was to be a bit more liberal in deciding
when the controls are showing, but still cautious
enough to stop up causing repaints when things
are hidden.
Test: media/media-controls-timeline-updates.html
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.controlsAreHidden): We only need
to check if we're an audio element or explicitly
hidden.
(Controller.prototype.showControls): Explicitly call
updateTime.
2014-11-14 Tim Horton <timothy_horton@apple.com>
Move DataDetectors scanning code to WebCore
https://bugs.webkit.org/show_bug.cgi?id=138731
<rdar://problem/18877535>
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Export our new function.
* WebCore.xcodeproj/project.pbxproj:
Add DataDetection.{mm, h}
Adjust the project so that editing/mac actually points to editing/mac instead of editing/
* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
Swap to PLATFORM(MAC) instead of !PLATFORM(IOS).
Move DictionaryLookup.{mm, h} to editing/mac, where they were in the project but not on disk.
* editing/mac/DataDetection.h: Added.
* editing/mac/DataDetection.mm: Added.
(WebCore::DataDetection::detectItemAroundHitTestResult):
Moved from WebKit2.
2014-11-14 Dan Bernstein <mitz@apple.com>
<rdar://problem/18978497> Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button back/forward navigation
https://bugs.webkit.org/show_bug.cgi?id=138753
Reviewed by Tim Horton.
Removed a FrameLoaderClient function that no one overrides anymore.
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::willChangeCurrentHistoryItem): Deleted.
* loader/HistoryController.cpp:
(WebCore::HistoryController::setCurrentItem): Removed call to willChangeCurrentHistoryItem.
(WebCore::HistoryController::replaceCurrentItem): Ditto.
2014-11-14 Jeremy Jones <jeremyj@apple.com>
Do proper teardown for optimized fullscreen
https://bugs.webkit.org/show_bug.cgi?id=138648
Reviewed by Eric Carlson.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::invalidate): must do corresponding teardown based on mode.
2014-11-11 David Hyatt <hyatt@apple.com>
Table rows repaint entire table when their background color changes.
https://bugs.webkit.org/show_bug.cgi?id=26662
Reviewed by Simon Fraser.
Added fast/repaint/table-row-repaint.html
* rendering/RenderTableCell.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::clippedOverflowRectForRepaint):
Improve table row's function to unite with the cell rects that can possibly
have the the row's background color painted behind them.
2014-11-14 Zalan Bujtas <zalan@apple.com>
Simple line layout: Move simple line layout RunResolver and LineResolver implementation to SimpleLineLayoutResolver.cpp
https://bugs.webkit.org/show_bug.cgi?id=138704
Reviewed by Antti Koivisto.
No change in functionality.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/SimpleLineLayoutResolver.cpp: Added.
(WebCore::SimpleLineLayout::RunResolver::Run::Run):
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::Run::baseline):
(WebCore::SimpleLineLayout::RunResolver::Run::text):
(WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
(WebCore::SimpleLineLayout::RunResolver::Iterator::advance):
(WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
(WebCore::SimpleLineLayout::RunResolver::RunResolver):
(WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
(WebCore::SimpleLineLayout::RunResolver::rangeForRect):
(WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator):
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
(WebCore::SimpleLineLayout::LineResolver::LineResolver):
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::Run): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Run::rect): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Run::baseline): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Run::text): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Iterator::advance): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines): Deleted.
(WebCore::SimpleLineLayout::RunResolver::RunResolver): Deleted.
(WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight): Deleted.
(WebCore::SimpleLineLayout::RunResolver::rangeForRect): Deleted.
(WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator): Deleted.
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator*): Deleted.
(WebCore::SimpleLineLayout::LineResolver::LineResolver): Deleted.
2014-11-14 Andrzej Badowski <a.badowski@samsung.com>
AX: Improve AccessibilityTableCell isColumnHeaderCell function.
https://bugs.webkit.org/show_bug.cgi?id=138423
Reviewed by Chris Fleizach.
<th> cell in the zero row should be column header.
New tests are not necessary.
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::isColumnHeaderCell):
2014-11-14 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Use GMainLoopSource for request timeout in ResourceHandle
https://bugs.webkit.org/show_bug.cgi?id=138695
Reviewed by Sergio Villar Senin.
We are currently using soup_timeout_add() that simply creates a
GSource and attaches it to the given context. Using
GMainLoopSource we simplify the code and fix any potential problem
of converting the double value into milliseconds.
* platform/network/ResourceHandleInternal.h:
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::cleanupSoupRequestOperation):
(WebCore::ResourceHandle::sendPendingRequest):
(WebCore::ResourceHandle::platformSetDefersLoading):
(WebCore::requestTimeoutCallback): Deleted.
2014-11-13 Tim Horton <timothy_horton@apple.com>
[mac] Keep around more decoded image data, since it's purgeable
https://bugs.webkit.org/show_bug.cgi?id=125273
<rdar://problem/13205438>
Reviewed by Simon Fraser.
No new tests, just an optimization.
Instead of throwing away decoded image data eagerly, allow the operating
system to manage the memory via the standard purgeability mechanism,
where it can.
This improves the performance on some pathological cases (extremely large
animated GIFs) by up to 8x.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToSize):
Don't prune live resources' decoded data if it is purgeable.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedDataIfNecessary):
Don't eagerly throw away decoded image data if it's purgeable.
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.h:
(WebCore::CachedResource::decodedDataIsPurgeable):
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.h:
(WebCore::Image::decodedDataIsPurgeable):
2014-11-13 Myles C. Maxfield <litherum@gmail.com>
Addressing post-review comment
https://bugs.webkit.org/show_bug.cgi?id=138633
* platform/spi/cg/CoreGraphicsSPI.h:
2014-11-13 Myles C. Maxfield <mmaxfield@apple.com>
Move FontMac and FontCacheMac off of WKSI
https://bugs.webkit.org/show_bug.cgi?id=138633
Reviewed by Simon Fraser.
No new tests because there is no behavior change.
* WebCore.exp.in:
* WebCore.order:
* WebCore.vcxproj/WebCoreCG.props:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::platformInit):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::platformInit):
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/mac/FontMac.mm:
(WebCore::isIntegral):
(WebCore::setCGFontRenderingMode):
(WebCore::Font::drawGlyphs):
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::platformInit):
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/spi/cocoa/CoreGraphicsSPI.h: Copied from Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h.
* platform/spi/cocoa/CoreTextSPI.h:
* platform/spi/mac/NSFontSPI.h: Renamed from Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h.
2014-11-13 Chris Dumez <cdumez@apple.com>
Move 'image-resolution' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138715
Reviewed by Andreas Kling.
Move 'image-resolution' CSS property from DeprecatedStyleBuilder to
the new StyleBuilder by using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyImageResolution::applyInheritValue): Deleted.
(WebCore::ApplyPropertyImageResolution::applyInitialValue): Deleted.
(WebCore::ApplyPropertyImageResolution::applyValue): Deleted.
(WebCore::ApplyPropertyImageResolution::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyInheritImageResolution):
(WebCore::StyleBuilderFunctions::applyInitialImageResolution):
(WebCore::StyleBuilderFunctions::applyValueImageResolution):
2014-11-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r176106.
https://bugs.webkit.org/show_bug.cgi?id=138719
needs build love (Requested by kling on #webkit).
Reverted changeset:
"[mac] Keep around more decoded image data, since it's
purgeable"
https://bugs.webkit.org/show_bug.cgi?id=125273
http://trac.webkit.org/changeset/176106
2014-11-13 Eric Carlson <eric.carlson@apple.com>
Context menus should not offer the "Download video" option for videos that cannot
be downloaded
https://bugs.webkit.org/show_bug.cgi?id=138530
-and corresponding-
rdar://problem/18919130
Reviewed by Tim Horton.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::canSaveMediaData):
(WebCore::MediaPlayer::supportsSave): Deleted.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::supportsFullscreen):
(WebCore::MediaPlayerPrivateInterface::canSaveMediaData):
(WebCore::MediaPlayerPrivateInterface::supportsSave): Deleted.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::resolvedURL):
(WebCore::MediaPlayerPrivateAVFoundation::canSaveMediaData):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::resolvedURL):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::canSaveMediaData):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::isDownloadableMedia):
2014-11-02 Tim Horton <timothy_horton@apple.com>
[mac] Keep around more decoded image data, since it's purgeable
<https://webkit.org/b/125273>
<rdar://problem/13205438>
Reviewed by Simon Fraser and Andreas Kling.
No new tests, just an optimization.
Instead of throwing away decoded image data eagerly, allow the operating
system to manage the memory via the standard purgeability mechanism,
where it can.
This improves the performance on some pathological cases (extremely large
animated GIFs) by up to 8x.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToSize):
Don't prune live resources' decoded data if it is purgeable.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedDataIfNecessary):
Don't eagerly throw away decoded image data if it's purgeable.
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.h:
(WebCore::CachedResource::decodedDataIsPurgeable):
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.h:
(WebCore::Image::decodedDataIsPurgeable):
2014-11-13 Daniel Bates <dabates@apple.com>
[iOS] NSGeometry data types are not available in the public SDK
https://bugs.webkit.org/show_bug.cgi?id=137536
Reviewed by David Kilzer.
Towards building iOS WebKit with the public iOS SDK, define NSGeometry
data types and functions in terms of CGGeometry data types and functions
because the former is SPI on iOS.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Include
header WAKAppKitStubs.h when building for iOS. Otherwise, include header NSGeometry.h.
* platform/graphics/ca/mac/PlatformCALayerMac.mm: Remove import of private header NSGeometry.h.
We will use the NSGeometry data types defined in WAKAppKitStubs.h, which is implicitly imported
by header WAKWindow.h.
* platform/graphics/mac/MediaPlayerProxy.h: Substitute WAKAppKitStubs.h for NSGeometry.h.
* platform/ios/PlatformEventFactoryIOS.mm: Ditto. Also fix up style issues with #import directives.
* platform/ios/WebEvent.mm: Ditto.
* platform/ios/wak/WAKAppKitStubs.h: Define typedefs and macros that map NSGeometry data types
and functions to the analogous CGGeometry data types and functions. Also, remove #ifdef __OBJC__-
guard as the existing content in WAKAppKitStubs.h assumes that this file will only be included
in an Objective-C/Objective-C++ file.
* platform/ios/wak/WAKView.h: Import header WAKAppKitStubs.h instead of defining macros for some
NSGeometry data types.
2014-11-13 Simon Fraser <simon.fraser@apple.com>
[WK2] Fire a layout milestone on session restore based on render tree size
https://bugs.webkit.org/show_bug.cgi?id=138711
rdar://problem/16033854
Reviewed by Anders Carlsson.
New layout milestone for session restore based on render tree size. Only used
in WK2 at present.
* page/LayoutMilestones.h:
2014-11-13 Dan Bernstein <mitz@apple.com>
Policy client not called for navigations through the page cache
https://bugs.webkit.org/show_bug.cgi?id=138703
Reviewed by Alexey Proskuryakov.
Test added to TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadDifferentDocumentItem): When using a cached page, which already
has a document loader, set the document loader’s triggering action (so that the policy
client sees that this is a back/forward navigation) and clear its last checked request (so
that the policy client gets called).
2014-11-13 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Do not return ATK_ROLE_UNKNOWN for null or otherwise invalid accessible objects
https://bugs.webkit.org/show_bug.cgi?id=137867
Reviewed by Chris Fleizach.
Return ATK_ROLE_INVALID for null or otherwise invalid accessible objects.
Test: platform/gtk/accessibility/detached-object-role.html
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetRole):
2014-11-13 Eric Carlson <eric.carlson@apple.com>
[iOS] update optimized fullscreen media controls artwork
https://bugs.webkit.org/show_bug.cgi?id=138705
Reviewed by Dean Jackson.
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::mediaUIImageData): Remove one button.
* Modules/mediacontrols/MediaControlsHost.idl:
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.controlsAreHidden): Add parentheses to fix the logic.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.shouldHaveStartPlaybackButton): The big play button should not be
visible during playback.
(ControllerIOS.prototype.createControls): No longer necessary to insert style dynamically,
(ControllerIOS.prototype.setPlaying): Call the base class first so "isPlaying" is set before
calling updateControls, which calls shouldHaveStartPlaybackButton.
* platform/ios/WebCoreSystemInterfaceIOS.h: Update constants.
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::mediaControlsStyleSheet): Add button style to the media controls sheet.
2014-11-13 Benjamin Poulain <bpoulain@apple.com>
Implement the matching for :nth-last-child(An+B of selector-list)
https://bugs.webkit.org/show_bug.cgi?id=138650
Reviewed by Andreas Kling.
Matching is trivial based on the existing CSS4 infrastructure.
The tricky part is style invalidation. In the cases of the old :nth-last-child()
and :nth-last-of-type(), we were using the flag ChildrenAffectedByBackwardPositionalRules.
The problem with ChildrenAffectedByBackwardPositionalRules is that it only invalidate
subtrees when nodes are being added or removed. It is a valuable optimization by itself
since tree updates are less common than property updates.
For the case of property updates, I have added the new flag "ChildrenAffectedByPropertyBasedBackwardPositionalRules".
It pretty much work the same way but invalidates subtree on style recalc.
Tests: fast/css/nth-child-and-nth-last-child.html
fast/css/nth-last-child-of-classname.html
fast/css/nth-last-child-of-complex-selector.html
fast/css/nth-last-child-of-compound-selector.html
fast/css/nth-last-child-of-style-sharing-1.html
fast/css/nth-last-child-of-style-sharing-2.html
fast/css/nth-last-child-of-style-update-optimization.html
fast/css/nth-last-child-of-tagname.html
fast/selectors/nth-last-child-of-class-style-update.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* dom/Element.cpp:
(WebCore::Element::setChildrenAffectedByPropertyBasedBackwardPositionalRules):
(WebCore::Element::hasFlagsSetDuringStylingOfChildren):
(WebCore::Element::rareDataChildrenAffectedByPropertyBasedBackwardPositionalRules):
* dom/Element.h:
(WebCore::Element::childrenAffectedByPropertyBasedBackwardPositionalRules):
* dom/ElementRareData.h:
(WebCore::ElementRareData::childrenAffectedByPropertyBasedBackwardPositionalRules):
(WebCore::ElementRareData::setChildrenAffectedByPropertyBasedBackwardPositionalRules):
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::resetDynamicRestyleObservations):
* dom/Node.cpp:
(WebCore::Node::updateAncestorsForStyleRecalc):
(WebCore::Node::setNeedsStyleRecalc):
(WebCore::markAncestorsWithChildNeedsStyleRecalc): Deleted.
* dom/Node.h:
Unlike the other marking steps, ChildrenAffectedByPropertyBasedBackwardPositionalRules can only really
affect one level (because we don't have a parent-selectors). It is quite easy to mark large
trees with ChildrenAffectedByPropertyBasedBackwardPositionalRules by using a selector list that is a bit
too generic. When that happen, we must be careful not invalidating everything, just the affected subtree.
2014-11-12 Jon Honeycutt <jhoneycutt@apple.com>
REGRESSION (r172826): Password field placeholder text is missing if
placeholder attribute precedes type attribute
<https://bugs.webkit.org/show_bug.cgi?id=138682>
<rdar://problem/18574213>
When the placeholder attribute is encountered, a shadow tree is created
to include the placeholder element. When the type attribute is
encountered, the previous shadow tree is destroyed, and a new shadow
tree is created. TextFieldInputType::createShadowSubtree() did not
handle creating the placeholder element.
This regressed in r172826 because prior to r172826, the placeholder
element would be recreated when
HTMLTextFormControlElement::updatePlaceholderVisibility() was called.
In r172826, updatePlaceholderVisibility() was changed to only show or
hide the placeholder element if it exists.
Reviewed by Benjamin Poulain.
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createShadowSubtree):
Call updatePlaceholderVisibility() to insert the placeholder element
(after the inner text element has been inserted, as it appears before
it in the shadow DOM).
2014-11-13 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] Accessible focus events are emitted when the selection is changed in non-focused combo boxes
https://bugs.webkit.org/show_bug.cgi?id=137866
Reviewed by Mario Sanchez Prada.
Check that the AccessibilityMenuList is really focused before notifying
the platform that it is focused. Likewise, only notify the platform of
an AccessibilityMenuListOption focus gain if the AccessibilityMenuList
containing that option is expanded.
Test: platform/gtk/accessibility/menu-list-unfocused-notifications.html
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::notifyChildrenSelectionChange):
(WebCore::AXObjectCache::postPlatformNotification):
2014-11-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Unexpected crashes in layout test after r175953
https://bugs.webkit.org/show_bug.cgi?id=138652
Reviewed by Csaba Osztrogonác.
In r175953, it set reusableNodeIndex value with m_partCache's size(). It causes
out of bound index crash because the reusableNodeIndex is Vector object.
No new test. This patch is to fix broken tests related to widgets on EFL port.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::getThemePartFromCache): Need to set reusableNodeIndex with "size() - 1".
2014-11-13 Chris Dumez <cdumez@apple.com>
Lazily create HTMLInputElement's inputType and shadow subtree
https://bugs.webkit.org/show_bug.cgi?id=138524
Reviewed by Ryosuke Niwa.
When an HTMLInputElement was created by the parser, we would first call
HTMLInputElement::create(), then call Element::parserSetAttributes() on
the constructed input. With the previous implementation, this was a bit
inefficient because HTMLInputElement::create() would construct a
TextInputType inputType (as this is the default) as well as its
corresponding shadow subtree. Then, parserSetAttributes() would often
set the |type| attribute and would need to destroy this input type as
well as its subtree if the new |type| is not 'text', to create a new
inputType / shadow subtree of the right type. The profiler showed that
this was fairly expensive.
To improve this, this patch delays the inputType / shadow subtree
creation when the HTMLInputElement is constructed by the parser, until
the attributes are actually set by the parser. This way, we directly
create an inputType / shadow subtree of the right type.
I see a 1.4% speed up on speedometer (73.95 -> 75.0).
Test: fast/dom/HTMLInputElement/border-attribute-crash.html
* dom/Element.cpp:
(WebCore::Element::parserSetAttributes):
(WebCore::Element::parserDidSetAttributes):
* dom/Element.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::create):
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::initializeInputType):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::parserDidSetAttributes):
(WebCore::HTMLInputElement::finishParsingChildren):
* html/HTMLInputElement.h:
2014-11-12 Chris Dumez <cdumez@apple.com>
Have DOMTimer deal with more ScriptExecutionContext references
https://bugs.webkit.org/show_bug.cgi?id=138679
Reviewed by Andreas Kling.
Have DOMTimer deal with more ScriptExecutionContext references instead
of pointers, to make it clear the script execution context cannot be
null.
No new tests, no behavior change.
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
(WebCore::ScheduledAction::executeFunctionInContext):
* bindings/js/ScheduledAction.h:
* dom/DocumentEventQueue.cpp:
* page/DOMTimer.cpp:
(WebCore::DOMTimerFireState::DOMTimerFireState):
(WebCore::NestedTimersMap::instanceForContext):
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::removeById):
(WebCore::DOMTimer::fired):
* page/DOMTimer.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::clearTimeout):
(WebCore::DOMWindow::setInterval):
(WebCore::DOMWindow::clearInterval):
* page/SuspendableTimer.cpp:
(WebCore::SuspendableTimer::SuspendableTimer):
* page/SuspendableTimer.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::clearTimeout):
(WebCore::WorkerGlobalScope::setInterval):
(WebCore::WorkerGlobalScope::clearInterval):
2014-11-12 Dean Jackson <dino@apple.com>
Support unprefixed animation property names
https://bugs.webkit.org/show_bug.cgi?id=138678
<rdar://problem/18943059>
Reviewed by Simon Fraser.
Step 1 of 3 in unprefixing CSS animations: handling the
property names and values.
Unlike other unprefixing, where we use an alias that
effectively removes the prefixed values from the code,
for animations we need to keep the old values around so that
existing content will not break (e.g. computed style).
During testing I noticed that we didn't handle the
(relatively) new animation-direction values of
"reverse" and "alternate-reverse" when querying
computed style.
Tests: animations/unprefixed-properties.html
animations/unprefixed-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Handle the unprefixed
values, but also get animation direction to produce the correct
results when "reverse" and "alternate-reverse" is specified.
* css/CSSParser.cpp: Handle the new values. If necessary, pass a flag
around indicating whether it is prefixed or unprefixed.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAnimationShorthand): Use the flag to decide
which of the forms we're going to check.
(WebCore::CSSParser::parseAnimationProperty):
* css/CSSParser.h:
* css/CSSProperty.h:
(WebCore::prefixingVariantForPropertyId): Add prefixing/unprefixing variants for
all the animation values, and clean up the code a bit.
* css/CSSPropertyNames.in: Add new properties.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): We need handlers for the
unprefixed forms. This should move to the new StyleBuilder soon.
* css/StyleProperties.cpp: Handle new values.
(WebCore::StyleProperties::getPropertyValue):
(WebCore::StyleProperties::asText):
* css/StylePropertyShorthand.cpp:
(WebCore::animationShorthand):
(WebCore::animationShorthandForParsing): Decide which list of properties to use.
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
(WebCore::webkitAnimationShorthandForParsing): Deleted.
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp: Since the new properties come before "background" in
alphabetical order, they are earlier in the CSSPropertyNames.in file, and thus
we need to update the call sites that think CSSPropertyBackground is the first
property.
(WebCore::StyleResolver::styleForKeyframe): Replace CSSPropertyBackground with CSSPropertyAnimation.
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::applyProperty):
2014-11-12 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* WebCore.exp.in:
2014-11-12 Timothy Horton <timothy_horton@apple.com>
Fix the iOS build.
* platform/spi/mac/DataDetectorsSPI.h:
It's likely that more of this file should be compiled out on iOS,
but this is all we need to build.
2014-11-12 Beth Dakin <bdakin@apple.com>
WK1: Support default actions for images
https://bugs.webkit.org/show_bug.cgi?id=138668
-and corresponding-
rdar://problem/18785434
Reviewed by Tim Horton.
Symbol needed for copying image.
* WebCore.exp.in:
2014-11-05 Ada Chan <adachan@apple.com>
Implement new plug-in API for muting plug-ins
https://bugs.webkit.org/show_bug.cgi?id=138105
Reviewed by Anders Carlsson.
Add the new NPNVmuteAudioBool NPNVariable.
Test: platform/mac-wk2/plugins/muted-state.html
* plugins/npapi.h:
2014-11-12 Tim Horton <timothy_horton@apple.com>
Need to show the text indicator when Data Detectors shows a popover
https://bugs.webkit.org/show_bug.cgi?id=138664
<rdar://problem/18869900>
Reviewed by Beth Dakin.
* platform/spi/mac/DataDetectorsSPI.h:
Add new DataDetectors SPI.
2014-11-12 Chris Dumez <cdumez@apple.com>
Minor improvements to RenderListItem
https://bugs.webkit.org/show_bug.cgi?id=138601
Reviewed by Darin Adler.
Make several minor improvements to RenderListItem and clean up the
code a bit.
No new tests, no behavior change.
* rendering/RenderListItem.cpp:
(WebCore::isHTMLListElement):
- Rename isList to isHTMLListElement() for clarity as it checks
for HTMLOListElement and HTMLUListElement types
- Inline the function as it is short.
- Use is<HTML*Element>() for type checking
- Update the argument to take a Node& instead of an Element*. This
is because the argument is expected to the non-null. Also using
looser typing here allows us to use this utility function is one
more place, without impacting performance as
hasTagName(HTMLQualifiedName) is defined on Node.
(WebCore::enclosingList):
- Pass the argument as a reference instead of a pointer as it is
expected to be non-null.
- Initialize firstNode before the loop to avoid the if (!firstNode)
check for every iteration.
(WebCore::nextListItem):
- Take an Element as second argument instead of a RenderListItem*
and provide convenience overloads so that we don't need to do
null checks just because some calls sites call this function
with 2 arguments and others with 1 argument. This way, we avoid
unnecessary null checks as most call sites already do such
checks (or have references).
- Transform the while loop into a for loop for clarity.
- Don't traverse an Element's subtree if the Element does not have
a renderer as it is impossible of any of its descendant to have
a renderer (and we are looking for a specific type of renderer).
(WebCore::previousListItem):
- Pass the item argument as a reference instead of a pointer as it
is expected to be non-null.
- Reduce the scope of the |current| so that it is now declared
inside the loop.
(WebCore::RenderListItem::updateItemValuesForOrderedList):
(WebCore::RenderListItem::itemCountForOrderedList):
- Pass argument as a reference instead of a pointer as it was expected
to be non-null (There was an assertion in place to make sure of it).
(WebCore::RenderListItem::calcValue):
- Use is<HTMLOListElement>() instead of hasTagName().
(WebCore::getParentOfFirstLineBox):
- Rename variables to stop using abbreviations.
- Pass arguments as references instead of pointers as they are expected
to be non-null.
- Remove the firstChild null check before the loop as it does not
change behavior. The loop will abort early if firstChild is null
and we will end up returning nullptr as well.
- Use is<>() more for type checking.
- Reuse the isHTMLListElement() utility function instead of duplicating
its code inside this function.
(WebCore::firstNonMarkerChild):
- Pass argument as a reference as it is expected to be non-null.
- Rename variable from result to child for clarity, as we are traversing
the children.
(WebCore::RenderListItem::markerTextWithSuffix):
- Use String appending instead of StringBuilder as it simplifies the
code a lot and should not impact performance in this case.
(WebCore::RenderListItem::explicitValueChanged):
- Restructure the code a bit to do the |listNode| null check before the
loop, now that nextListItem() takes a reference in argument. This is
the only call site where we didn't already know that listNode is
non-null.
(WebCore::previousOrNextItem):
- Mark this function as inline as it is short and called repeatedly.
2014-11-12 Chris Dumez <cdumez@apple.com>
Speed up HTMLTextFormControlElement::setInnerTextValue() a bit
https://bugs.webkit.org/show_bug.cgi?id=138619
Reviewed by Darin Adler.
Speed up HTMLTextFormControlElement::setInnerTextValue() a bit by:
- Not doing a virtual isTextFormControl() call. Relying on innerTextElement()
not returning null is sufficient.
- Caching the result of innerTextElement() instead of repeatedly calling that
virtual function.
- De-virtualizing setFormControlValueMatchesRenderer() /
formControlValueMatchesRenderer() as these are never overridden.
- Moving the code constructing the innerTextValue from a
TextControlInnerTextElement from innerTextValue() to a new
innerTextValueFrom(TextControlInnerTextElement&) function and call this new
function from setInnerTextValue() to avoid calling innerTextElement() again
and making sure it is non-null
- Do the tree traversal from innerTextElement's firstChild instead of from
innerTextElement. The innerTextElement is a TextControlInnerTextElement.
Therefore, it cannot be an HTMLBRElement or a Text node.
No new tests, no behavior change.
* html/HTMLFormControlElement.h:
(WebCore::HTMLFormControlElement::formControlValueMatchesRenderer):
(WebCore::HTMLFormControlElement::setFormControlValueMatchesRenderer):
* html/HTMLTextFormControlElement.cpp:
(WebCore::stripTrailingNewline):
(WebCore::innerTextValueFrom):
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
(WebCore::HTMLTextFormControlElement::innerTextValue):
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
(WebCore::finishText): Deleted.
2014-11-12 Jer Noble <jer.noble@apple.com>
[Mac] media/track/audio-track.html is flakey
https://bugs.webkit.org/show_bug.cgi?id=138394
Reviewed by Alexey Proskuryakov.
The above test fails if the HTMLMediaElement's "canplaythrough" event fires before the AudioTrackList's
"addtrack" event fires. This can happen because each object keeps its own GenericEventQueue, which
empties when that individual queue's timer fires. So events can be enqueued in the following order:
1, A, 2, B, 3, C; but fired in a different order: 1, 2, 3, A, B, C.
Make events enqueued in GenericEventQueues globally ordered, so that events are fired in the order
which they are enqueued, regardless of which object owns the queue. Use a static queue of
GenericEventQueues to manage which GenericEventQueue fires and in what order.
GenericEventQueues will use a WeakPtrFactory to cancel pending events. Revoking a GenericEventQueue's
weak pointers means those queue's entries will be skipped the next time the meta-queue is processed.
* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::GenericEventQueue): Create a WeakPtrFactory instead of a Timer.
(WebCore::GenericEventQueue::enqueueEvent): Enqueue this queue with the MetaQueue.
(WebCore::GenericEventQueue::sharedTimer): Lazily-initializing accessor.
(WebCore::GenericEventQueue::sharedTimerFired): Ask each queue to dispatch one event.
(WebCore::GenericEventQueue::pendingQueues): Lazily-initializing accessor.
(WebCore::GenericEventQueue::dispatchOneEvent): Renamed from timerFired.
(WebCore::GenericEventQueue::close): Revoke all WeakPtrs.
(WebCore::GenericEventQueue::cancelAllEvents): Ditto.
(WebCore::GenericEventQueue::hasPendingEvents): Use !isEmpty().
(WebCore::GenericEventQueue::timerFired): Deleted.
* dom/GenericEventQueue.h:
2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Expose user script messages to GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=138411
Reviewed by Philippe Normand.
* PlatformGTK.cmake: Add WebKitDOMCustomUnstable.h to the list of
installed headers and make a symlink for it in the DerivedSources dir.
* bindings/gobject/WebKitDOMCustomUnstable.h: Added.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_dom_window_get_webkit_namespace):
(webkit_dom_user_message_handlers_namespace_get_handler):
* bindings/scripts/CodeGeneratorGObject.pm:
(HasUnstableCustomAPI): Helper function to check if the given
class has custom unstable API.
(WriteData): Include WebKitDOMCustomUnstable.h header if the class
has API defined there.
2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix how SerializedScriptValue is exposed to GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=138409
Reviewed by Philippe Normand.
It's currently exposed as a WebKitDOMSerializedScriptValue class
that doesn't really exist. It should be handled as a string, that
is used to create a SerializedScriptValue when coming from the
API, and converted to a string again when returned to the API.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetGlibTypeName): Return gchar* as glib type of SerializedScriptValue.
(IsGDOMClassType): Don't consider SerializedScriptValue as a GDOM class.
(GenerateFunction): Handle SerializedScriptValue parameters and
return values specially.
* bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
(webkit_dom_test_callback_callback_with_serialized_script_value_param):
* bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_serialized_value):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
(webkit_dom_test_serialized_script_value_interface_class_init):
(webkit_dom_test_serialized_script_value_interface_get_value):
(webkit_dom_test_serialized_script_value_interface_set_value):
(webkit_dom_test_serialized_script_value_interface_get_readonly_value):
(webkit_dom_test_serialized_script_value_interface_get_cached_value):
(webkit_dom_test_serialized_script_value_interface_set_cached_value):
(webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
(webkit_dom_test_typedefs_class_init):
(webkit_dom_test_typedefs_get_immutable_serialized_script_value):
(webkit_dom_test_typedefs_set_immutable_serialized_script_value):
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move RedirectedXCompositeWindow from platform to WebKit2 layer
https://bugs.webkit.org/show_bug.cgi?id=138093
Reviewed by Martin Robinson.
Remove RedirectedXCompositeWindow.
* PlatformGTK.cmake:
2014-09-01 Philippe Normand <pnormand@igalia.com>
[WK2] UserMediaClient support
https://bugs.webkit.org/show_bug.cgi?id=123158
Reviewed by Benjamin Poulain.
Added document and frame accessors, needed by the
UserMediaRequestManager of the WebProcess. Also added two methods
used by the permission request manager to know if access to audio
or video devices is requested.
Tests: fast/mediastream/error.html
fast/mediastream/success.html
fast/mediastream/delayed-permission-allowed.html
fast/mediastream/delayed-permission-denied.html
http/tests/media/media-stream/disconnected-frame-already.html
http/tests/media/media-stream/disconnected-frame-permission-denied.html
http/tests/media/media-stream/disconnected-frame.html
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::document):
(WebCore::UserMediaRequest::frame):
* Modules/mediastream/UserMediaRequest.h:
(WebCore::UserMediaRequest::requiresAudio):
(WebCore::UserMediaRequest::requiresVideo):
2014-11-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Clean up OwnPtr in RenderThemeEfl
https://bugs.webkit.org/show_bug.cgi?id=138642
Reviewed by Zoltan Herczeg.
No new tests, no behavior change.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::applyEdjeRTLState): Clean up all remaining OwnPtr.
2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move Modules/websockets to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=138649
Reviewed by Chris Dumez.
Remove create() factory function and use std::make_unique<>, std::unique_ptr<>
instead of OwnPtr, PassOwnPtr.
However didReceiveBinaryData() is still using PassOwnPtr. It should be replaced
with std::unique_ptr<>
No new tests, no behavior.
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
* Modules/websockets/WebSocket.cpp:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::connect):
(WebCore::WebSocketChannel::didFail):
(WebCore::WebSocketChannel::processFrame):
(WebCore::WebSocketChannel::enqueueTextFrame):
(WebCore::WebSocketChannel::enqueueRawFrame):
(WebCore::WebSocketChannel::enqueueBlobFrame):
(WebCore::WebSocketChannel::processOutgoingFrameQueue):
(WebCore::WebSocketChannel::sendFrame):
* Modules/websockets/WebSocketChannel.h:
* Modules/websockets/WebSocketDeflateFramer.cpp:
(WebCore::WebSocketDeflateFramer::createExtensionProcessor):
(WebCore::WebSocketDeflateFramer::enableDeflate):
(WebCore::WebSocketDeflateFramer::deflate):
(WebCore::WebSocketDeflateFramer::inflate):
(WebCore::WebSocketExtensionDeflateFrame::create): Deleted.
* Modules/websockets/WebSocketDeflateFramer.h:
(WebCore::DeflateResultHolder::create): Deleted.
(WebCore::InflateResultHolder::create): Deleted.
* Modules/websockets/WebSocketDeflater.cpp:
(WebCore::WebSocketDeflater::WebSocketDeflater):
(WebCore::WebSocketInflater::WebSocketInflater):
(WebCore::WebSocketDeflater::create): Deleted.
(WebCore::WebSocketInflater::create): Deleted.
* Modules/websockets/WebSocketDeflater.h:
* Modules/websockets/WebSocketExtensionDispatcher.cpp:
(WebCore::WebSocketExtensionDispatcher::addProcessor):
* Modules/websockets/WebSocketExtensionDispatcher.h:
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::addExtensionProcessor):
* Modules/websockets/WebSocketHandshake.h:
2014-11-11 Chris Dumez <cdumez@apple.com>
Unreviewed iOS build fix after r176001.
Export an additional symbol.
* WebCore.exp.in:
2014-11-11 Jer Noble <jer.noble@apple.com>
[Mac] Add diagnostic logging for per-media-engine load failures
https://bugs.webkit.org/show_bug.cgi?id=138647
Reviewed by Eric Carlson.
Add diagnostic logging fired whenever a media engine fails to load media,
even if another engine subsequentially succeeds. Add a mechanism for retrieving
the platform-specific error code from a given engine.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::engineFailedToLoadKey):
* page/DiagnosticLoggingKeys.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::networkStateChanged):
(WebCore::MediaPlayer::platformErrorCode):
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerEngineFailedToLoad):
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::platformErrorCode):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::assetErrorCode):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::assetErrorCode):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::platformErrorCode):
2014-11-11 Chris Dumez <cdumez@apple.com>
Mark more virtual functions in HTMLInputElement as final
https://bugs.webkit.org/show_bug.cgi?id=138644
Reviewed by Andreas Kling.
Mark more virtual functions in HTMLInputElement as final to help the
compiler optimize better.
No new tests, no behavior change.
* html/HTMLInputElement.h:
2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove IncrementalSweeper::create()
https://bugs.webkit.org/show_bug.cgi?id=138243
Reviewed by Filip Pizlo.
As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes
IncrementalSweeper::create(), then set constructor of IncrementalSweeper to public.
Now we begins to use std::make_unique<> to create IncrementalSweeper instance.
No new tests, no behavior changes.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):
* platform/ios/WebSafeIncrementalSweeperIOS.h:
2014-11-11 Chris Dumez <cdumez@apple.com>
Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138594
Reviewed by Antti Koivisto.
Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties from
DeprecatedStyleBuilder to the new StyleBuilder using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInheritValue):
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInitialValue):
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyValue):
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::getValue):
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::setValue):
2014-11-11 David Kilzer <ddkilzer@apple.com>
Modernize $buildingForIPhone in CodeGeneratorObjC.pm
<http://webkit.org/b/138640>
Reviewed by Daniel Bates.
Mac OS X is the only platform that supports NSColor, so rename
$buildingForIPhone to $shouldUseCGColor (which is actually what
the variable represents) and define it in terms of the "macosx"
platform name.
* bindings/scripts/CodeGeneratorObjC.pm:
($buildingForIPhone): Rename to $shouldUseCGColor.
($shouldUseCGColor): False if PLATFORM_NAME is not defined,
which is the case on older Xcodes when building for Mac OS X, or
if PLATFORM_NAME is equal to "macosx". True otherwise.
(GetClassName): Switch to use new variable name.
(AddIncludesForType): Ditto.
(GenerateHeader): Remove dead code. The
$buildingForTigerOrEarlier variable was accidentally
re-introduced in r161638, but was originally removed in r127032!
(GenerateImplementation): Switch to use new variable name.
2014-11-11 Tim Horton <timothy_horton@apple.com>
Add support for mailto: link action menus
https://bugs.webkit.org/show_bug.cgi?id=138641
<rdar://problem/18741567>
Reviewed by Beth Dakin.
* WebCore.exp.in:
Add an export.
* platform/spi/mac/DataDetectorsSPI.h:
Add some DataDetectors SPI.
2014-11-11 Eric Carlson <eric.carlson@apple.com>
[iOS] video is sometimes allowed to play from the background
https://bugs.webkit.org/show_bug.cgi?id=138522
Rubber-stamped by Jer Noble.
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::updateClientDataBuffering): Call MediaSessionManager::sessionCanLoadMedia.
2014-11-11 Eric Carlson <eric.carlson@apple.com>
[iOS] a page with video in optimized fullscreen is visible
https://bugs.webkit.org/show_bug.cgi?id=138632
Reviewed by Anders Carlsson.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
(WebCore::WebVideoFullscreenInterfaceAVKit::mode): Expose fullscreen mode.
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Mountain Lion build fix
https://bugs.webkit.org/show_bug.cgi?id=138631
Reviewed by Simon Fraser.
* platform/spi/cocoa/CoreTextSPI.h:
2014-11-11 Eric Carlson <eric.carlson@apple.com>
[iOS] cleanup wireless route monitoring
https://bugs.webkit.org/show_bug.cgi?id=138614
Reviewed by Jer Noble.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::clearMediaPlayer): Add logging.
(WebCore::HTMLMediaElement::removeEventListener): Ditto.
(WebCore::HTMLMediaElement::createMediaPlayer): Ditto.
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::resetRestrictions): Add logging.
(WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Ditto.
(WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Ditto.
(-[WebMediaSessionHelper initWithCallback:]): Ditto.
(-[WebMediaSessionHelper dealloc]): Always deallocate volume view and routing controller
on the main thread.
(-[WebMediaSessionHelper clearCallback]): Add logging.
(-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Ditto.
(-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Always call routing controller on
the main thread.
(-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Ditto.
(-[WebMediaSessionHelper interruption:]): Add logging.
(-[WebMediaSessionHelper applicationWillEnterForeground:]): Ditto.
(-[WebMediaSessionHelper applicationDidBecomeActive:]): Ditto.
(-[WebMediaSessionHelper applicationWillResignActive:]): Ditto.
(-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Ditto.
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewd iOS build fix
* platform/spi/cocoa/CoreTextSPI.h:
2014-11-11 David Kilzer <ddkilzer@apple.com>
Protect Document in ProcessingInstruction::setXSLStyleSheet()
<http://webkit.org/b/138621>
Reviewed by Andreas Kling.
The patch is inspired by the following Blink revision by
<tasak@google.com>:
<https://src.chromium.org/viewvc/blink?view=rev&revision=182309>
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::setXSLStyleSheet):
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Finish moving CTFontGetVerticalGlyphsForCharacters and CTLineCreateWithUniCharProvider out from WKSI
https://bugs.webkit.org/show_bug.cgi?id=138623
Reviewed by Geoff Garen.
No new tests because there is no behavior change.
* WebCore.exp.in:
* WebCore.order:
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::GlyphPage::fill):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/spi/cocoa/CoreTextSPI.h:
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewed Mountain Lion build fix
* platform/spi/cocoa/CoreTextSPI.h:
2014-11-11 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r175852.
https://bugs.webkit.org/show_bug.cgi?id=138626
Broke PLT by introducing a crash. (Requested by rniwa on
#webkit).
Reverted changeset:
"Lazily create HTMLInputElement's inputType and shadow
subtree"
https://bugs.webkit.org/show_bug.cgi?id=138524
http://trac.webkit.org/changeset/175852
2014-11-11 Chris Dumez <cdumez@apple.com>
Regression(r175947): Caused assertions in debug builds
https://bugs.webkit.org/show_bug.cgi?id=138620
Reviewed by Benjamin Poulain.
In HTMLCollection::traverseForward(), traversedCount was incremented 1
time too many when hitting the end of the collection (i.e. element
becomes null). Doing a partial revert.
No new tests, already covered by existing tests.
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::traverseForward):
2014-11-11 Tim Horton <timothy_horton@apple.com>
DataDetectors' menu items aren't presented in the telephone number menu
https://bugs.webkit.org/show_bug.cgi?id=138602
<rdar://problem/18866308>
Reviewed by Beth Dakin.
* English.lproj/Localizable.strings:
Remove a now-unused localized string.
2014-11-11 Daniel Bates <dabates@apple.com>
[Frame Flattening] ASSERT(transaction->view == &view()) fails in RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction()
https://bugs.webkit.org/show_bug.cgi?id=138615
<rdar://problem/18928487>
Reviewed by David Hyatt.
Fixes an issue where we always expected that the RenderView associated with the RenderBlock called in
RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction() is the same as the RenderView associated with
the top transaction in the UpdateScrollInfoAfterLayoutTransaction stack regardless of frame flattening. This
expectation is only true when frame flattening is disabled.
Test: fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction):
2014-11-11 Tim Horton <timothy_horton@apple.com>
Adopt DDActionContext menu type SPI
https://bugs.webkit.org/show_bug.cgi?id=138603
<rdar://problem/18867627>
Reviewed by Anders Carlsson.
* platform/spi/mac/DataDetectorsSPI.h:
Add the new SPI.
2014-11-11 Tim Horton <timothy_horton@apple.com>
Data Detectors popovers should be dismissed upon scrolling
https://bugs.webkit.org/show_bug.cgi?id=138600
<rdar://problem/18932770>
Reviewed by Beth Dakin.
* platform/spi/mac/DataDetectorsSPI.h:
Adjust the SPI header.
2014-11-11 Tim Horton <timothy_horton@apple.com>
Localize strings for action menus
https://bugs.webkit.org/show_bug.cgi?id=138591
<rdar://problem/18815343>
Reviewed by Dan Bates.
* English.lproj/Localizable.strings:
Add a bunch of localizable strings.
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Cleanup from r175379
https://bugs.webkit.org/show_bug.cgi?id=138616
Reviewed by Simon Fraser.
No new tests because there is no behavior change.
* WebCore.exp.in:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
Move CTFontTransformGlyphs out from WKSI
https://bugs.webkit.org/show_bug.cgi?id=138599
Reviewed by Simon Fraser.
No new tests because there is no behavior change.
* WebCore.exp.in:
* WebCore.order:
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::applyTransforms):
* platform/graphics/SimpleFontData.h:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/spi/cocoa/CoreTextSPI.h:
2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr<>|std::make_unique_ptr in RenderThemeEfl::ThemePartCacheEntry::create()
https://bugs.webkit.org/show_bug.cgi?id=138558
Reviewed by Anders Carlsson.
This patch removes PassOwnPtr and OwnPtr in RenderThemeEfl::ThemePartCacheEntry::create().
It would be good if we also remove create() factory function though, in this case, it is
a little hard to remove it since the create() factory function does many works to create
a ThemePartCacheEntry instance. Thus this patch just replaces PassOwnPtr|OwnPtr with
std::unique_ptr<> and std::make_unique<> in RenderThemeEfl::ThemePartCacheEntry::create().
Besides the theme entries have been maintained by Eina_List*. Unfortunately it doesn't support
std::unique_ptr<> yet. Thus the Eina_List* should be replaced with Vector<std::unique_ptr<>>
so that m_partCache has ownship of all EFL theme entries. This patch tries to keep original
cache algorithm based on Vector class.
No new tests, no behavior changes.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
(WebCore::RenderThemeEfl::getThemePartFromCache):
* platform/efl/RenderThemeEfl.h:
2014-11-09 Darin Adler <darin@apple.com>
Minor tweaks to HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=138556
Reviewed by Chris Dumez.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
Update for namedElements function that now returns a Vector; also use
a new style for loop to iterate it.
* bindings/js/JSHTMLAllCollectionCustom.cpp: Removed some unneeded includes.
(WebCore::namedItems): Updated name to match WebKit coding style, and also
updated to use the return value from namedItems, which now returns a Vector.
(WebCore::callHTMLAllCollection): Updated for namedItems name change.
Also removed explicit Node* type from result of namedItemWithIndex, since that
function now returns a more specific type.
(WebCore::JSHTMLAllCollection::nameGetter): Update for namedItems name change.
(WebCore::JSHTMLAllCollection::item): Ditto.
(WebCore::JSHTMLAllCollection::namedItem): Ditto.
* bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Removed some unneeded includes.
(WebCore::namedItems): Updated name to match WebKit coding style, and also
updated to use the return value from namedItems, which now returns a Vector.
(WebCore::JSHTMLFormControlsCollection::nameGetter): Update for namedItems name change.
(WebCore::JSHTMLFormControlsCollection::namedItem): Ditto.
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::nameGetter): Updated to use the return value from
namedItems, which now returns a Vector.
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::HTMLAllCollection): Marked the constructor inline,
since it's only used in one place, the create function.
(WebCore::HTMLAllCollection::~HTMLAllCollection): Deleted. No need to have an
explicit destructor since there's nothing special to implement, and includers of
the header file have everything they ened to compile the compiler-generated one.
(WebCore::HTMLAllCollection::namedItemWithIndex): Changed return type to Element.
* html/HTMLAllCollection.h: Removed unneeded explicit declaration of destructor.
Chagned return type of namedItemWithIndex to Element.
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::rootTypeFromCollectionType): Marked this inline. Also
changed this to be a static member function so it can use the RootType enum, which
is now private to the class.
(WebCore::isMatchingHTMLElement): Marked this function static so it will get
internal linkage.
(WebCore::isMatchingElement): Ditto.
(WebCore::previousElement): Marked this function inline since it's called in only
one place. Changed argument type to a reference since it can never be null.
(WebCore::HTMLCollection::iterateForPreviousElement): Changed argument name and
also updated for above changes.
(WebCore::firstMatchingElement): Marked this function static so it will get
internal linkage.
(WebCore::nextMatchingElement): Ditto. Changed argument type to a reference
since it can never be null.
(WebCore::HTMLCollection::item): Changed return type to Element.
(WebCore::nameShouldBeVisibleInDocumentAll): Added an overload that takes an
Element. This streamlines the code below that calls it so it fits on one line.
(WebCore::firstMatchingChildElement): Marked this function static so it will get
internal linkage.
(WebCore::nextMatchingSiblingElement): Ditto. Changed argument type to a reference
since it can never be null.
(WebCore::HTMLCollection::usesCustomForwardOnlyTraversal): Moved here from the
header since, although it's marked inline, it's only used inside this file.
(WebCore::HTMLCollection::traverseForward): Restructured the code a little bit
to make the function smaller and possibly easier to read. This does add one
redundant null check, but it seems OK to do that.
(WebCore::HTMLCollection::collectionTraverseBackward): Tweaked foramtting a bit.
(WebCore::HTMLCollection::namedItem): Changed return type to Element. Tightened
the code that calls nameShouldBeVisibleInDocumentAll so it fits better on one line.
Changed code that handles m_shouldOnlyIncludeDirectChildren to use a nested if
instead of an && since it makes the code a little easier to read.
(WebCore::HTMLCollection::updateNamedElementCache): Tweaked code a little bit,
using shorter variable names, and using references instead of pointers. Also removed
the call to didPopulate, since setNamedItemCache now takes care of that.
(WebCore::HTMLCollection::namedItems): Changed to return a Vector instead of
appending to an existing one. Also use reserveInitialCapacity and uncheckedAppend
for better performance. Added a FIXME, because there seems to be something wrong
here about this being non-virtual. Made other small tweaks to streamline the code.
(WebCore::HTMLCollection::customElementAfter): Moved this here from the header.
There is no reason to need to inline this.
* html/HTMLCollection.h: Removed unneeded includes. Moved function bodies out
of the class definitions so the class definitions are easier to read. Made some
functions that were formerly public or protected be private instead. Added a call
to didPopulate to setNamedItemCache so the callers don't have to do it.
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::namedItem): Changed return value to Element.
Tweaked coding style a little bit.
(WebCore::HTMLFormControlsCollection::updateNamedElementCache): Rearranged to
simplify a bit. Don't build the foundInputElements set when the owner is not a
form element, since we don't use the set in that case. Use shorter variable names,
and modern for loops. Also removed the call to didPopulate, since setNamedItemCache
now takes care of that.
* html/HTMLFormControlsCollection.h: Removed some uneeded forward declarations.
Updated return type for namedItem, and also made the override private.
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::namedElements): Changed to return a Vector and updated
function name accordingly.
* html/HTMLFormElement.h: Ditto.
* html/HTMLNameCollection.h: Removed a stray blank line.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::namedItem): Changed return value to Element.
(WebCore::HTMLSelectElement::item): Ditto.
* html/HTMLSelectElement.h: Ditto.
* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::appendChildSnapOffsets): Rewrote loop as a for loop rather than a while
loop. Removed unwanted use of children()->collectionBegin() to get the first element
child of an HTMLElement. This function uses a mix of DOM and rendering functions that
is probably incorrect, but I did not tackle fixing that at this time.
2014-11-11 Dan Bernstein <mitz@apple.com>
[Mac] WebCore includes unused cursor image resources
https://bugs.webkit.org/show_bug.cgi?id=138605
Reviewed by Anders Carlsson.
* Resources/aliasCursor.png: Removed.
* Resources/cellCursor.png: Removed.
* Resources/contextMenuCursor.png: Removed.
* Resources/copyCursor.png: Removed.
* Resources/eastResizeCursor.png: Removed.
* Resources/eastWestResizeCursor.png: Removed.
* Resources/helpCursor.png: Removed.
* Resources/linkCursor.png: Removed.
* Resources/moveCursor.png: Removed.
* Resources/noDropCursor.png: Removed.
* Resources/noneCursor.png: Removed.
* Resources/northEastResizeCursor.png: Removed.
* Resources/northEastSouthWestResizeCursor.png: Removed.
* Resources/northResizeCursor.png: Removed.
* Resources/northSouthResizeCursor.png: Removed.
* Resources/northWestResizeCursor.png: Removed.
* Resources/northWestSouthEastResizeCursor.png: Removed.
* Resources/progressCursor.png: Removed.
* Resources/southEastResizeCursor.png: Removed.
* Resources/southResizeCursor.png: Removed.
* Resources/southWestResizeCursor.png: Removed.
* Resources/verticalTextCursor.png: Removed.
* Resources/waitCursor.png: Removed.
* Resources/westResizeCursor.png: Removed.
* Resources/zoomInCursor.png: Removed.
* Resources/zoomOutCursor.png: Removed.
* WebCore.xcodeproj/project.pbxproj: Removed references to the above files.
* platform/mac/CursorMac.mm:
(WebCore::Cursor::ensurePlatformCursor): For Help, Cell, ZoomIn and ZoomOut, don’t check
for a nil return value from wkCursor(), which can’t occur in any supported configuration.
For None, create a cursor with an empty NSImage instead of loading a transparent image from
the file system.
(WebCore::createNamedCursor): Deleted.
2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, rolling out r175844.
Win debug build has broken since r175844.
Reverted changeset:
"Use std::unique_ptr<> and std::make_unique<> in WebCore"
https://bugs.webkit.org/show_bug.cgi?id=138560
http://trac.webkit.org/changeset/175844
2014-11-11 Philippe Normand <pnormand@igalia.com>
Qt/Chromium remnants in MediaPlayer
https://bugs.webkit.org/show_bug.cgi?id=138611
Reviewed by Jer Noble.
* platform/graphics/MediaPlayer.h: Remove unused Qt/Chromium stuff.
2014-11-11 Chris Dumez <cdumez@apple.com>
Move '-webkit-marquee-speed' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138595
Reviewed by Antti Koivisto.
Move '-webkit-marquee-speed' CSS property from DeprecatedStyleBuilder
to the new StyleBuilder by adding a new MarqueeSpeed Converter.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyMarqueeSpeed::applyValue): Deleted.
(WebCore::ApplyPropertyMarqueeSpeed::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertMarqueeSpeed):
2014-10-07 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Limit the size of explicit/implicit grid
https://bugs.webkit.org/show_bug.cgi?id=136217
Reviewed by Andreas Kling.
A recent change in the specs allow us to set a limit (maximum
size) for both the explicit and implicit grids so we can protect
ourselves from absurdly huge grid specifications. It was decided
to use the recommended limit which is 1 million.
This means that we can remove the old limitation for the number of
repetitions in repeat(). Instead we now clamp the number of
repetitions to the maximum value that allow us to have the maximum
number of whole repetitions without exceeding the track number
limit.
* WebCore.xcodeproj/project.pbxproj:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTrackRepeatFunction): Replaced the
old limit by the new one.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::placeItemsOnGrid): Use the amount of tracks
provided by GridResolvedPosition.
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ditto.
* rendering/style/GridCoordinate.h:
(WebCore::GridSpan::GridSpan):
* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::explicitGridColumnCount): Bring
the static function back to life.
(WebCore::GridResolvedPosition::explicitGridRowCount): Ditto.
(WebCore::explicitGridSizeForSide):
* rendering/style/GridResolvedPosition.h:
2014-11-11 Yusuke Suzuki <utatane.tea@gmail.com>
CSS4 Selectors: Add multiple pseudo elements support to :matches
https://bugs.webkit.org/show_bug.cgi?id=138214
Reviewed by Benjamin Poulain.
In this patch, we implement (multiple) pseudo elements support to :matches.
Currently, we implemented it in css/SelectorChecker and there's no CSS JIT implementation.
And we change the semantics of pseudo element selector behavior.
Previously when pseudo element selector appeared in the non-rightmost
fragment, it was ignored. This patch changes it to unmatched.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::CheckingContextWithStatus::CheckingContextWithStatus):
(WebCore::SelectorChecker::match):
(WebCore::hasScrollbarPseudoElement):
(WebCore::SelectorChecker::matchRecursively):
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::matchSelectorList):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::MatchResult::matches):
(WebCore::SelectorChecker::MatchResult::updateWithMatchType):
(WebCore::SelectorChecker::MatchResult::fails):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::constructFragments):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::setHasPseudoStyles):
* rendering/style/RenderStyleConstants.h:
(WebCore::PseudoIdSet::PseudoIdSet):
(WebCore::PseudoIdSet::fromMask):
(WebCore::PseudoIdSet::has):
(WebCore::PseudoIdSet::add):
(WebCore::PseudoIdSet::merge):
(WebCore::PseudoIdSet::operator &):
(WebCore::PseudoIdSet::operator |):
(WebCore::PseudoIdSet::operator bool):
(WebCore::PseudoIdSet::data):
2014-11-10 Chris Dumez <cdumez@apple.com>
Lazily create HTMLInputElement's inputType and shadow subtree
https://bugs.webkit.org/show_bug.cgi?id=138524
Reviewed by Ryosuke Niwa.
When an HTMLInputElement was created by the parser, we would first call
HTMLInputElement::create(), then call Element::parserSetAttributes() on
the constructed input. With the previous implementation, this was a bit
inefficient because HTMLInputElement::create() would construct a
TextInputType inputType (as this is the default) as well as its
corresponding shadow subtree. Then, parserSetAttributes() would often
set the |type| attribute and would need to destroy this input type as
well as its subtree if the new |type| is not 'text', to create a new
inputType / shadow subtree of the right type. The profiler showed that
this was fairly expensive.
To improve this, this patch delays the inputType / shadow subtree
creation when the HTMLInputElement is constructed by the parser, until
the attributes are actually set by the parser. This way, we directly
create an inputType / shadow subtree of the right type.
I see a 1.4% speed up on speedometer (73.95 -> 75.0).
No new tests, no behavior change.
* dom/Element.cpp:
(WebCore::Element::parserSetAttributes):
(WebCore::Element::parserDidFinishParsingAttributes):
* dom/Element.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::create):
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::ensureInputType):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::parserDidFinishParsingAttributes):
* html/HTMLInputElement.h:
2014-11-10 Benjamin Poulain <bpoulain@apple.com>
Add parsing support for the extended :nth-last-child(An+B of selector-list) defined
https://bugs.webkit.org/show_bug.cgi?id=138520
Reviewed by Andreas Kling.
Add parsing for :nth-last-child(An+B of selector-list). The selector is defined
in CSS Selectors Level 4: http://dev.w3.org/csswg/selectors4/#the-nth-last-child-pseudo
Tests: fast/css/parsing-css-nth-last-child-of-1.html
fast/css/parsing-css-nth-last-child-of-2.html
fast/css/parsing-css-nth-last-child-of-3.html
fast/css/parsing-css-nth-last-child-of-4.html
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
2014-11-10 Said Abou-Hallawa <sabouhallawa@apple.com>
SVG foreign objects do not inherit the container coordinates system if they are repainted.
https://bugs.webkit.org/show_bug.cgi?id=138481.
Reviewed by Simon Fraser.
If a foreign object is included in an SVG, it should inherit the coordinates system
of the container if it is repainted. The foreign object is actually redrawn in the
CSS coordinates system regardless of the transformation that may be applied to the
container.
The bug is RenderSVG* classes use computeFloatRectForRepaint(), but the rest of the
render classes use computeRectForRepaint(). RenderSVGForeignObject::computeRectForRepaint()
was not defined, so we end up hitting RenderObject::computeRectForRepaint() for
a RenderSVGTransformableContainer and completely miss the transform.
Tests: svg/transforms/svg-transform-foreign-object-repaint.html
Implement RenderSVGForeignObject::computeRectForRepaint() so we can apply the
container transformation on the SVG foreign object repaint rectangle.
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::computeRectForRepaint):
* rendering/svg/RenderSVGForeignObject.h:
2014-11-10 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr<> and std::make_unique<> in WebCore
https://bugs.webkit.org/show_bug.cgi?id=138560
Reviewed by Chris Dumez.
Clean up unused OwnPtr.h and PassOwnPtr.h and use std::unique_ptr.
No new tests, no behavior changes.
* Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
* dom/ContainerNode.h:
* dom/ElementIteratorAssertions.h:
(WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
* dom/ElementRareData.h:
* page/DragController.h:
* rendering/RenderView.h:
2014-11-10 Beth Dakin <bdakin@apple.com>
WK1: Support default actions for editable text with misspelled word
https://bugs.webkit.org/show_bug.cgi?id=138590
-and corresponding-
rdar://problem/18877506
Reviewed by Tim Horton.
* WebCore.exp.in:
2014-11-10 Chris Dumez <cdumez@apple.com>
Remove unnecessary null check in FrameSelection::nodeWillBeRemoved()
https://bugs.webkit.org/show_bug.cgi?id=138578
Reviewed by Andreas Kling.
Remove unnecessary null check in FrameSelection::nodeWillBeRemoved()
and turn the argument into a reference to make it clear it cannot be
null.
No new tests, no behavior change.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::willRemoveChild):
* dom/Document.cpp:
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore::Document::nodeWillBeRemoved):
* dom/Document.h:
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::nodeWillBeRemoved):
(WebCore::NodeIterator::updateForNodeRemoval):
* dom/NodeIterator.h:
* dom/Range.cpp:
(WebCore::Range::insertNode):
(WebCore::boundaryNodeWillBeRemoved):
(WebCore::Range::nodeWillBeRemoved):
* dom/Range.h:
* dom/RangeBoundaryPoint.h:
(WebCore::RangeBoundaryPoint::setToBeforeChild):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::updatePositionForNodeRemovalPreservingChildren):
* editing/CompositeEditCommand.h:
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removeNode):
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::removeRedundantBlocks):
* editing/FrameSelection.cpp:
(WebCore::removingNodeRemovesPosition):
(WebCore::DragCaretController::nodeWillBeRemoved):
(WebCore::FrameSelection::nodeWillBeRemoved):
(WebCore::FrameSelection::respondToNodeModification):
* editing/FrameSelection.h:
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
* editing/htmlediting.cpp:
(WebCore::updatePositionForNodeRemoval):
* editing/htmlediting.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::nodeWillBeRemoved):
* page/EventHandler.h:
2014-11-10 Benjamin Poulain <bpoulain@apple.com>
Fix the build when CSS Selectors Level 4 is disabled
https://bugs.webkit.org/show_bug.cgi?id=138533
* css/CSSSelector.cpp:
(WebCore::appendArgumentList):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
2014-11-10 Chris Dumez <cdumez@apple.com>
Support throttling of DOMTimers using nested setTimeout() calls
https://bugs.webkit.org/show_bug.cgi?id=138262
Reviewed by Gavin Barraclough.
Extend DOMTimers throttling support to timers that are using nested
setTimeout() calls instead of a setInterval(). To achieve this, this
patch introduces a NestedTimersMap singleton class where nested timers
are added, and for which we potentially update the next firing time,
after the parent timer is done executing.
I have verified this helps on ebay.com for example, which has timers
interacting with non-visible plugins that are scheduled using nested
setTimeout() calls with a frequency of 150 / 200 ms.
This is a second take on r175441, which caused intermittent crashes.
This time, nested timers are removed from the NestedTimersMap when
DOMTimer::removeById() is called. It would be unsafe to use the nested
timer afterwards because we don't hold a strong reference to it and
the ScriptExecutionContext is unref'ing the DOMTimer when
ScriptExecutionContext::removeTimeout() is called from
DOMTimer::removeById().
* page/DOMTimer.cpp:
(WebCore::NestedTimersMap::NestedTimersMap):
(WebCore::NestedTimersMap::~NestedTimersMap):
(WebCore::NestedTimersMap::add):
(WebCore::NestedTimersMap::remove):
(WebCore::NestedTimersMap::begin):
(WebCore::NestedTimersMap::end):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::removeById):
(WebCore::DOMTimer::fired):
2014-11-10 Jer Noble <jer.noble@apple.com>
[EME][Mac] Add a systemCode to distinguish when no expired sessions were found in response to a "keyrelease" message.
https://bugs.webkit.org/show_bug.cgi?id=138199
Reviewed by Eric Carlson.
Clients may want to be able to distinguish between cases where expired session data is not supported, and when
those data are supported, but none are found.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage):
2014-11-04 Jer Noble <jer.noble@apple.com>
REGRESSION(r174823): Several tests fail due to canplaythrough firing before tracks are available
https://bugs.webkit.org/show_bug.cgi?id=137882
Reviewed by Eric Carlson.
For HLS streams with only one video, audio, or text track, there will be no media selection group
for that media characteristic. When culling out AVPlayerItemTracks in tracksDidChange(), do not skip
tracks for which there is no matching AVMediaSelectionGroup.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasLoadedMediaSelectionGroups): Refactored.
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia): Call above.
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
2014-11-10 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r175813.
https://bugs.webkit.org/show_bug.cgi?id=138573
Breaks complex text layout spacing (Requested by litherum on
#webkit).
Reverted changeset:
"[OSX] Some words are placed on top of each other in complex
text layout"
https://bugs.webkit.org/show_bug.cgi?id=138348
http://trac.webkit.org/changeset/175813
2014-11-10 Beth Dakin <bdakin@apple.com>
Rolling out failed build fix
http://trac.webkit.org/changeset/175819
* WebCore.exp.in:
2014-11-10 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* WebCore.exp.in:
2014-11-10 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* WebCore.exp.in:
2014-11-10 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Layers with negative z position disapear behind the page tiles
https://bugs.webkit.org/show_bug.cgi?id=138571
rdar://problem/18873480
Reviewed by Dean Jackson.
Some crufty iOS-only code in RenderLayerBacking::parentForSublayers() caused us to fail
to use the m_childContainmentLayer as the ancestor for descendants, so layers with
negative z position would get depth-sorted behind the tiles.
Fix by removing that code.
This should have been detected by compositing/tile-cache-must-flatten.html, but
testing infrastructure suck prevented us from doing so.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::parentForSublayers):
* rendering/RenderLayerBacking.h: Just some nullptr cleanup.
2014-11-10 Chris Dumez <cdumez@apple.com>
Move 'resize' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138550
Reviewed by Andreas Kling.
No new tests, no behavior change.
Move 'resize' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder by adding a new 'Resize' Converter function.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyResize::applyValue): Deleted.
(WebCore::ApplyPropertyResize::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertResize):
2014-11-10 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* editing/DictionaryLookup.h:
* editing/DictionaryLookup.mm:
2014-11-10 Chris Dumez <cdumez@apple.com>
Move 'text-indent' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138547
Reviewed by Andreas Kling.
Move 'text-indent' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder, by using custom code.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyTextIndent::applyInheritValue): Deleted.
(WebCore::ApplyPropertyTextIndent::applyInitialValue): Deleted.
(WebCore::ApplyPropertyTextIndent::applyValue): Deleted.
(WebCore::ApplyPropertyTextIndent::createHandler): Deleted.
* css/StyleBuilderConverter.h:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyInheritTextIndent):
(WebCore::StyleBuilderFunctions::applyInitialTextIndent):
(WebCore::StyleBuilderFunctions::applyValueTextIndent):
2014-11-10 Beth Dakin <bdakin@apple.com>
WK1: Support default actions for read-only text
https://bugs.webkit.org/show_bug.cgi?id=138552
-and corresponding-
rdar://problem/18877483
Reviewed by Tim Horton.
WK1 now needs to do a lot of dictionary lookup operations that it did not
previously have to handle. So this patch takes a lot of that functionality, which
was implemented as static functions in WebPageMac for WK2 and moves it into
WebCore.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* editing/DictionaryLookup.h: Added.
* editing/DictionaryLookup.mm: Added.
(WebCore::isPositionInRange):
(WebCore::shouldUseSelection):
(WebCore::rangeExpandedAroundPositionByCharacters):
(WebCore::rangeForDictionaryLookupForSelection):
(WebCore::rangeForDictionaryLookupAtHitTestResult):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2014-11-10 Myles C. Maxfield <mmaxfield@apple.com>
[OSX] Some words are placed on top of each other in complex text layout
https://bugs.webkit.org/show_bug.cgi?id=138348
Reviewed by Simon Fraser.
Some complex text layouts have lots of diacritics being placed all over the place.
CoreText sometimes compensates for this by adjusting the advances of the glyphs
throughout the string to make glyphs appear in the correct place. This means that
we can't naively cache the width of a space character; instead, we must obey
CoreText when it gives us an advance for a space.
Test: fast/text/large-space-width-complex.html
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2014-11-10 Eric Carlson <eric.carlson@apple.com>
[iOS] wireless playback placeholder UI doesn't always draw
https://bugs.webkit.org/show_bug.cgi?id=138548
While it is important to only listen for the 'webkitplaybacktargetavailabilitychanged' event
when we are displaying inline controls because listening for it increases power consumption,
we should always listen for the 'webkitcurrentplaybacktargetiswirelesschanged' event because
it controls whether or not we draw the placeholder UI which is always visible during wireless
playback.
Reviewed by Brent Fulgham.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.addVideoListeners): Always listen for the
'webkitcurrentplaybacktargetiswirelesschanged' event.
(ControllerIOS.prototype.removeVideoListeners): Always stop listening for the
'webkitcurrentplaybacktargetiswirelesschanged' event.
(ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Call updateControls so we update
the type of controls rendered and start listening for wireless target changes immediately.
(ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent): Don't start and stop
listening for 'webkitcurrentplaybacktargetiswirelesschanged', we should always listen for it.
2014-11-10 Csaba Osztrogonác <ossy@webkit.org>
Crash in WebCore::Node::getFlag
https://bugs.webkit.org/show_bug.cgi?id=137961
Reviewed by Antti Koivisto.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyBlockStyle): Null pointer check added.
2014-11-10 Mihnea Ovidenie <mihnea@adobe.com>
ASSERTION FAILED: !object || !object->parent()->isRuby() || is<RenderRubyRun>(*object) || (object->isInline() && (object->isBeforeContent() || object->isAfterContent())) || (object->isAnonymous() && ... ) in WebCore::isAnonymousRubyInlineBlock
https://bugs.webkit.org/show_bug.cgi?id=137958
Reviewed by Chris Dumez.
When a ruby element, with block behavior, dynamically changes its style
from multicol to without multicol, we have to remove its special children,
RenderMultiColumnFlowThread and RenderMultiColumnSet, the normal way using
the method in RenderBlockFlow base class. This patch adds both
RenderMultiColumnFlowThread and RenderMultiColumnSet to the list of RenderRuby
children removed normally and adds a new function - isRubyChildForNormalRemove -
to test the condition and use it in the assertion in RenderRuby*::removeChild
method.
Test: fast/multicol/newmulticol/ruby-from-multicol-to-auto.html
* rendering/RenderRuby.cpp:
(WebCore::isRubyChildForNormalRemove):
(WebCore::RenderRubyAsInline::removeChild):
(WebCore::RenderRubyAsBlock::removeChild):
2014-11-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Remove GamepadDeviceEfl::create()
https://bugs.webkit.org/show_bug.cgi?id=138553
Reviewed by Darin Adler.
As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes GamepadDeviceEfl::create().
Instead we use std::make_unique<>.
No new tests, no behavior changes.
* platform/efl/GamepadsEfl.cpp:
(WebCore::GamepadsEfl::registerDevice):
(WebCore::GamepadDeviceEfl::create): Deleted.
(WebCore::GamepadsEfl::unregisterDevice): Deleted.
2014-11-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove create() factory function in FooAnimationValue classes
https://bugs.webkit.org/show_bug.cgi?id=138206
Reviewed by Darin Adler.
As a step to use std::unique_ptr and std::make_unique, this patch removes create()
factory function in FooAnimationValue classes. As this changes, FooAnimationValue::create()
are changed to std::make_unique<>.
No new tests, no behavior changes.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::KeyframeValueList::insert):
* platform/graphics/GraphicsLayer.h:
(WebCore::FloatAnimationValue::FloatAnimationValue):
(WebCore::TransformAnimationValue::TransformAnimationValue):
(WebCore::FilterAnimationValue::FilterAnimationValue):
(WebCore::FloatAnimationValue::create): Deleted.
(WebCore::TransformAnimationValue::create): Deleted.
(WebCore::FilterAnimationValue::create): Deleted.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::startTransition):
2014-11-09 Chris Dumez <cdumez@apple.com>
Add a more correct way to compare floating point numbers and use it
https://bugs.webkit.org/show_bug.cgi?id=138527
Reviewed by Darin Adler.
Use the new WTF::areEssentuallyEqual() utility function from MathExtras.h
to compare floating-point numbers.
No new tests, no behavior change.
* page/DOMTimer.cpp:
(WebCore::DOMTimer::updateTimerIntervalIfNecessary):
* platform/graphics/FloatQuad.cpp:
(WebCore::FloatQuad::isRectilinear):
* platform/graphics/FloatRoundedRect.cpp:
(WebCore::FloatRoundedRect::Radii::isUniformCornerRadius):
* platform/graphics/FloatSize.h:
(WebCore::areEssentiallyEqual):
(WebCore::withinEpsilon): Deleted.
2014-11-08 Simon Fraser <simon.fraser@apple.com>
Implement round-rect clipping on video elements
https://bugs.webkit.org/show_bug.cgi?id=138537
rdar://problem/9534399
Reviewed by Darin Adler.
Support border-radius on video and other layers with composited contents,
by pushing a FloatRoundedRect onto the GraphicsLayer as the contentsClippingRect,
and, on Mac, using layer corner-radius or a CAShapeLayer mask.
Test: compositing/video/video-border-radius.html
* WebCore.exp.in:
* platform/graphics/FloatRoundedRect.cpp:
(WebCore::FloatRoundedRect::Radii::isUniformCornerRadius): Returns true if all
corner radii are the same, and have equal widths and heights.
* platform/graphics/FloatRoundedRect.h: Allow construction without an explicit
rect.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer): nullptr goodness.
(showGraphicsLayerTree): Print contents layers when debugging.
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::contentsClippingRect): Make this take a FloatRoundedRect.
(WebCore::GraphicsLayer::setContentsClippingRect):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setContentsClippingRect):
(WebCore::GraphicsLayerCA::setContentsToSolidColor):
(WebCore::GraphicsLayerCA::setContentsToImage):
(WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateClippingStrategy): Determines whether we can simply
use corner-radius on the existing contentsClippingLayer, or whether we have to
create a shape layer to use as a mask.
(WebCore::GraphicsLayerCA::updateContentsRects): We have to add/remove the shape layer
based on the rounded rect radii. Calls updateClippingStrategy() on the clipping layer,
and also updates clones accordingly.
(WebCore::dumpInnerLayer):
(WebCore::GraphicsLayerCA::dumpAdditionalProperties): Dump all the inner layers
(requiring on test rebaseline), including the new shape and backdrop layers.
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayer.h: Add a new shape layer type.
* platform/graphics/ca/mac/PlatformCALayerMac.h: Support for corner radius and
a rounded rect shape mask.
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::PlatformCALayerMac):
(PlatformCALayerMac::clone):
(PlatformCALayerMac::setMask):
(PlatformCALayerMac::cornerRadius):
(PlatformCALayerMac::setCornerRadius):
(PlatformCALayerMac::shapeRoundedRect):
(PlatformCALayerMac::setShapeRoundedRect):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::cornerRadius):
(PlatformCALayerWin::setCornerRadius):
(PlatformCALayerWin::shapeRoundedRect):
(PlatformCALayerWin::setShapeRoundedRect):
* platform/graphics/ca/win/PlatformCALayerWin.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::resetContentsRect): Use getRoundedInnerBorderFor() to get
the rounded rect used to clip contents.
(WebCore::RenderLayerBacking::positionOverflowControlsLayers): Push a FloatRoundedRect for the contents clip,
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor): Ditto.
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): Ditto.
(WebCore::RenderLayerBacking::updateImageContents): Get the rounded rect clip.
* rendering/RenderLayerBacking.h: nullptr.
2014-11-09 Darin Adler <darin@apple.com>
Fix various cases of incorrect cross-thread capture of non-thread-safe RefCounted
https://bugs.webkit.org/show_bug.cgi?id=138539
Reviewed by Alexey Proskuryakov.
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect): Use StringCapture
instead of isolatedCopy, to avoid a problem where the original thread does its deref
after passing the string to the other thread.
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage): Ditto.
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): Ditto.
(WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize): Ditto.
(WebCore::WorkerThreadableWebSocketChannel::Bridge::connect): Ditto.
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send): Ditto.
(WebCore::WorkerThreadableWebSocketChannel::Bridge::close): Ditto.
(WebCore::WorkerThreadableWebSocketChannel::Bridge::fail): Ditto.
* dom/Document.cpp:
(WebCore::Document::addConsoleMessage): Pass a StringCapture when creating
AddConsoleMessageTask. Same reason as above, but in a different context.
(WebCore::Document::addMessage): Ditto.
* dom/ScriptExecutionContext.h: Changed AddConsoleMessageTask to take and
capture a StringCapture rather than a String, for the same reason as above.
* fileapi/AsyncFileStream.cpp:
(WebCore::AsyncFileStream::write): Use URLCapture instead of trying to use
StringCapture on a URL, since that doesn't preserve the validity flag.
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Use StringCapture.
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail): Ditto.
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck): Ditto.
* platform/URL.h: Added URLCapture.
* platform/network/FormData.cpp:
(WebCore::appendBlobResolved): Remove incorrect pointless code that creates a new URL
from an existing URL with the ParsedURLString constructor.
* workers/DefaultSharedWorkerRepository.cpp: Fixed code that was trying to copy a URL
by copying a string to instead just use URL::copy. The comment claimed that URL::copy
is not thread safe, but that claim is incorrect.
(WebCore::SharedWorkerProxy::postExceptionToWorkerObject): Use StringCapture.
(WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject): Ditto.
(WebCore::DefaultSharedWorkerRepository::getProxy): Use URL::copy.
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::addConsoleMessage): Use StringCapture.
(WebCore::WorkerGlobalScope::addMessage): Ditto.
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postExceptionToWorkerObject): Ditto.
(WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject): Ditto.
(WebCore::WorkerMessagingProxy::sendMessageToInspector): Ditto.
(WebCore::WorkerMessagingProxy::postMessageToPageInspector): Ditto.
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::postTaskAndTerminate): Make a Task with make_unique
rather than with Task::create. Removed an extra isolatedCopy, unneeded because
the Task constructor already does an isolatedCopy.
(WebCore::WorkerRunLoop::postTaskForMode): Ditto.
(WebCore::WorkerRunLoop::Task::create): Deleted.
* workers/WorkerRunLoop.h: Removed unneeded create function and explicit
public empty destructor.
2014-11-09 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for HTMLCollection subclasses
https://bugs.webkit.org/show_bug.cgi?id=138541
Reviewed by Sam Weinig.
Use is<>() / downcast<>() for HTMLCollection subclasses for
safety and consistency with the rest of the code base.
No new tests, no behavior change.
* bindings/gobject/WebKitDOMPrivate.cpp:
(WebKit::wrap):
* html/HTMLAllCollection.h:
* html/HTMLCollection.cpp:
(WebCore::isMatchingHTMLElement):
(WebCore::isMatchingElement):
* html/HTMLCollection.h:
* html/HTMLFormControlsCollection.h:
* html/HTMLNameCollection.h:
* html/HTMLOptionsCollection.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::options):
* html/HTMLTableRowsCollection.h:
2014-11-08 Chris Dumez <cdumez@apple.com>
Call faster HTMLElement::hasTagName() in HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=138529
Reviewed by Darin Adler.
Call faster HTMLElement::hasTagName() in HTMLCollection instead of
slower Node::hasTagName() by restructuring the code a bit to
distinguish collection that deal only with HTMLElements from others.
No new tests, no behavior change.
* html/HTMLCollection.cpp:
(WebCore::isMatchingHTMLElement):
(WebCore::isMatchingElement):
2014-11-08 Chris Dumez <cdumez@apple.com>
Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType
https://bugs.webkit.org/show_bug.cgi?id=138538
Reviewed by Darin Adler.
Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType
as this only makes sense for text field input types.
No new tests, no behavior change.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::isEmptyValue):
* html/InputType.cpp:
(WebCore::InputType::isEmptyValue):
* html/InputType.h:
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::isEmptyValue):
* html/TextFieldInputType.h:
2014-11-08 Darin Adler <darin@apple.com>
Replace FileThread class with a single function
https://bugs.webkit.org/show_bug.cgi?id=138282
Reviewed by Alexey Proskuryakov.
* CMakeLists.txt: Removed FileThread.cpp.
* WebCore.vcxproj/WebCore.vcxproj: Removed FileThread.cpp/.h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/generic/ActiveDOMCallback.cpp: Removed unneeded includes.
* dom/ActiveDOMObject.cpp: Ditto.
* fileapi/AsyncFileStream.cpp:
(WebCore::callOnFileThread): Added. Implements the file thread.
(WebCore::AsyncFileStream::AsyncFileStream): Take a reference to the client.
Make m_internals. Use the destroyed flag instead of trickier techniques to
handle stopping. Once the stream is destroyed, there will be no further callbacks.
(WebCore::AsyncFileStream::~AsyncFileStream): Added assertions and merged in the
stop behavior here. This class no longer requires an explicit stop function.
(WebCore::AsyncFileStream::perform): Added. Helper used for all the operations
below. Takes a function that performs an operation and then returns a client
callback function. Respects the m_stopped boolean on the file thread (so we
don't do extra operations) and on the client thread (so we are guaranteed not
to get any client callbacks even if the file thread was partway through an
operation).
(WebCore::AsyncFileStream::getSize): Changed to use the perform function.
(WebCore::AsyncFileStream::openForRead): Ditto. Also fixed reference count
thread safety issue by capturing a StringCapture rather than a String.
(WebCore::AsyncFileStream::openForWrite): Ditto.
(WebCore::AsyncFileStream::close): Changed to use callOnFileThread.
(WebCore::AsyncFileStream::read): Changed to use the perform function.
(WebCore::AsyncFileStream::write): Ditto. Also fixed reference count
thread safety issue by capturing a StringCapture rather than a URL.
(WebCore::AsyncFileStream::truncate): Ditto.
* fileapi/AsyncFileStream.h: Removed use of RefCounted since we only need
single ownership. Removed the stop function, since we can now stop when
the stream is destroyed since we have single ownership. Made a new Internals
object to handle destruction while operations are still going on the file thread.
* fileapi/FileThread.cpp: Removed.
* fileapi/FileThread.h: Removed.
* loader/ResourceLoader.cpp: Removed unneeded include.
* platform/FileStream.cpp:
(WebCore::FileStream::~FileStream): Merged the stop function in here.
* platform/FileStream.h: Removed use of RefCounted since we only need
single ownership. Removed the empty start function. Removed the stop function,
since we can now stop when the stream is destroyed since we have single ownership.
* platform/FileStreamClient.h: Removed unneeded didStart and didStop.
* platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::BlobResourceHandle): Use make_unique to make the
stream objects instead of custom create functions.
(WebCore::BlobResourceHandle::~BlobResourceHandle): Removed now-unneeded code
to call stop functions. Destroying the objects now takes care of the this, and
that's done by the unique_ptrs.
(WebCore::BlobResourceHandle::cancel): Removed the rest of the code to stop the
m_asyncStream, keeping only the code that sets it to null. That now stops the
stream by destroying it.
* platform/network/BlobResourceHandle.h: Use std::unique_ptr rather than
RefPtr for the file stream objects.
* storage/StorageThread.h: Tweaked formatting of std::function<void()> to
match the format used elsewhere in WebKit.
2014-11-08 Simon Fraser <simon.fraser@apple.com>
Don't try to schedule a GraphicsLayer flush when propagating changes to replicas inside a flush
https://bugs.webkit.org/show_bug.cgi?id=138532
Reviewed by Dan Bernstein.
When changing masks on replica layers with certain layer configurations,
it was possible to hit an assertion that a flush was being scheduled when already
flushing, via propagateLayerChangeToReplicas(). Fix by passing the scheduleFlush
flag along.
Not testable with current GraphicsLayer configurations.
* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/graphics/ca/GraphicsLayerCA.h:
2014-11-08 Beth Dakin <bdakin@apple.com>
Implement action menu support for videos
https://bugs.webkit.org/show_bug.cgi?id=138534
-and corresponding-
rdar://problem/18742164
Reviewed by Tim Horton.
Export needed symbols and added not-yet-implemented
HitTestResult::isMediaThatCanBeDownloaded() so that action menus will work as
expected once it is implemented.
* WebCore.exp.in:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::isMediaThatCanBeDownloaded):
* rendering/HitTestResult.h:
2014-11-08 Chris Dumez <cdumez@apple.com>
Speed up HTMLInputElement::isEmptyValue()
https://bugs.webkit.org/show_bug.cgi?id=138515
Reviewed by Geoffrey Garen.
HTMLInputElement::isEmptyValue() was calling
HTMLTextFormControlElement::innerTextValue() which causes a full
subtree traversal to construct a string representation of that subtree
using a StringBuilder. In the case of HTMLInputElement::isEmptyValue(),
we don't have to do all this: We don't need to construct a String
and we can return false as soon as we find a non-empty descendant.
No new tests, no behavior change.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::isEmptyValue):
* html/HTMLInputElement.h:
2014-11-07 Eric Carlson <eric.carlson@apple.com>
[iOS] video is sometimes allowed to play from the background
https://bugs.webkit.org/show_bug.cgi?id=138522
Reviewed by Jer Noble.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::displayType): New.
* html/HTMLMediaElement.h:
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::isHidden): New, client passthrough.
(WebCore::MediaSession::displayType): Ditto.
* platform/audio/MediaSession.h:
(WebCore::MediaSessionClient::displayType):
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::sessionCanLoadMedia): New, default implementation returns
true if client is visible or playing.
* platform/audio/MediaSessionManager.h:
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::sessionCanLoadMedia): iOS override, also allows buffering
when displaying optimized fullscreen.
2014-11-07 Benjamin Poulain <bpoulain@apple.com>
Fix the build after r175772
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2014-11-07 Benjamin Poulain <benjamin@webkit.org>
Make the Selector's specificity part of Selector matching
https://bugs.webkit.org/show_bug.cgi?id=138486
Reviewed by Andreas Kling.
In CSS Selectors Level 4, the specificity of selectors is computed dynamically
based on which element is being matched.
For example, a selector:
:matches(#foo, .bar, baz)
has a specificity of
(1, 0, 0) on <baz id=foo class=bar>
(0, 1, 0) on <baz class=bar>
(0, 0, 1) on <baz>
Previously, the specificity of each selector was computed statically when populating
RuleSet. With more recent CSS, this gives us the wrong specificity because we do not know
how the selectors applies to the target.
This patch moves one tiny step in the direction of dynamic specificity. The specificity
is removed from RuleSet and is moved inside Selector Matching.
There is one bit worth keeping static: matching based on rule hash. This path is important
to avoid spending time compiling trivial selectors.
In order to keep rule hash matching working, the RuleData store which specificity class
the rule has in addition to the information about matching/not-matching. When going through
the fast path in ElementCollector, we compute the right specificity based on the type
of rule-hash matching.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificityForOneSelector):
* css/CSSSelector.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::addMatchedRule):
(WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
(WebCore::ElementRuleCollector::ruleMatches):
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
(WebCore::compareRules):
* css/ElementRuleCollector.h:
* css/RuleSet.cpp:
(WebCore::computeMatchBasedOnRuleHash):
(WebCore::RuleData::RuleData):
(WebCore::isSelectorMatchingHTMLBasedOnRuleHash): Deleted.
* css/RuleSet.h:
(WebCore::RuleData::matchBasedOnRuleHash):
(WebCore::RuleData::hasRightmostSelectorMatchingHTMLBasedOnRuleHash): Deleted.
(WebCore::RuleData::specificity): Deleted.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match):
* css/SelectorChecker.h:
* css/StyleResolver.h:
(WebCore::checkRegionSelector):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
* cssjit/SelectorCompiler.h:
(WebCore::SelectorCompiler::ruleCollectorSimpleSelectorCheckerFunction):
(WebCore::SelectorCompiler::querySelectorSimpleSelectorCheckerFunction):
(WebCore::SelectorCompiler::ruleCollectorSelectorCheckerFunctionWithCheckingContext):
(WebCore::SelectorCompiler::querySelectorSelectorCheckerFunctionWithCheckingContext):
(WebCore::SelectorCompiler::simpleSelectorCheckerFunction): Deleted.
(WebCore::SelectorCompiler::selectorCheckerFunctionWithCheckingContext): Deleted.
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::selectorMatches):
(WebCore::SelectorDataList::selectorClosest):
(WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
(WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext):
(WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:
2014-11-07 Alexey Proskuryakov <ap@apple.com>
CSP is enforced for eval in report-only mode on first page load
https://bugs.webkit.org/show_bug.cgi?id=138492
rdar://problem/15782525
Reviewed by Daniel Bates.
This is covered by existing tests when running as one test per process invocation.
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::allowEval): Allow when in report only mode. The allowEval
function itself needs to return false, because it's used in checkEvalAndReportViolation().
(WebCore::CSPDirectiveList::allowJavaScriptURLs): Apply the same fix, although it's
not changing the behavior - this function is never called with ContentSecurityPolicy::SuppressReport.
(WebCore::CSPDirectiveList::allowInlineEventHandlers): Ditto.
(WebCore::CSPDirectiveList::allowInlineScript): Ditto.
(WebCore::CSPDirectiveList::allowInlineStyle): Ditto.
(WebCore::CSPDirectiveList::allowPluginType): Ditto.
(WebCore::CSPDirectiveList::allowScriptFromSource): Ditto.
(WebCore::CSPDirectiveList::allowObjectFromSource): Ditto.
(WebCore::CSPDirectiveList::allowChildFrameFromSource): Ditto.
(WebCore::CSPDirectiveList::allowImageFromSource): Ditto.
(WebCore::CSPDirectiveList::allowStyleFromSource): Ditto.
(WebCore::CSPDirectiveList::allowFontFromSource): Ditto.
(WebCore::CSPDirectiveList::allowMediaFromSource): Ditto.
(WebCore::CSPDirectiveList::allowConnectToSource): Ditto.
(WebCore::CSPDirectiveList::allowFormAction): Ditto.
(WebCore::CSPDirectiveList::allowBaseURI): Ditto.
(WebCore::ContentSecurityPolicy::didReceiveHeader): Remove isReportOnly() check,
which is now inside allowEval().
2014-11-07 Andreas Kling <akling@apple.com>
[Mac] Avoid repainting scrollbar track when the scrollbar track is transparent.
<https://webkit.org/b/138521>
<rdar://problem/18892090>
Reviewed by Simon Fraser.
Don't bother invalidating the entire WebCore scrollbar when we've opted into
AppKit's special mode to use individual layers for scrollbar components.
NSScrollerImp will invalidate what's necessary below e.g setKnobAlpha.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPartAnimation setCurrentProgress:]):
2014-11-07 Chris Dumez <cdumez@apple.com>
Rename HTMLInputElement::imageLoader() to ensureImageLoader()
https://bugs.webkit.org/show_bug.cgi?id=138508
Reviewed by Andreas Kling.
Rename HTMLInputElement::imageLoader() to ensureImageLoader() and have
it return a reference to make it clear that it constructs an
ImageLoader if missing.
Also introduce a lightweight imageLoader() getter which just returns
the imageLoader or null if missing.
No new tests, no behavior change.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::ensureImageLoader):
(WebCore::HTMLInputElement::didMoveToNewDocument):
(WebCore::HTMLInputElement::imageLoader): Deleted.
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::imageLoader):
(WebCore::HTMLInputElement::hasImageLoader): Deleted.
* html/ImageInputType.cpp:
(WebCore::ImageInputType::srcAttributeChanged):
(WebCore::ImageInputType::attach):
(WebCore::ImageInputType::height):
(WebCore::ImageInputType::width):
2014-11-07 Chris Dumez <cdumez@apple.com>
Move 'webkit-clip-path' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138452
Reviewed by Andreas Kling.
Move 'webkit-clip-path' CSS property from DeprecatedStyleBuilder to the
new StyleBuilder so that it is now generated from CSSPropertyNames.in.
A ClipPath converter was added to support this. Custom code was avoided
by replacing if checks by assertions, relying on the CSSParser to make
sure the input is valid.
Test: fast/masking/clip-path-bad-value.html
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyClipPath::setValue): Deleted.
(WebCore::ApplyPropertyClipPath::applyValue): Deleted.
(WebCore::ApplyPropertyClipPath::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertClipPath):
2014-11-07 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Pseudo element matchedCSSRules do not include matching selector info
https://bugs.webkit.org/show_bug.cgi?id=138438
Reviewed by Benjamin Poulain.
Test: inspector/css/psuedo-element-matches.html
Element::matches is not the correct API to use to check selectors with pseudo-elements.
Instead we should use the CSS Selector checking machinary which understands them.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::buildArrayForRuleList):
(WebCore::InspectorCSSAgent::buildArrayForRegions):
(WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
Some RefPtr release improvements.
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
Use a SelectorChecker to check each Selector against the element.
This matches the SelectorChecker used when we collected the rules
for this element.
2014-11-07 Chris Dumez <cdumez@apple.com>
Drop useless HTMLElement::isURLAttribute() override
https://bugs.webkit.org/show_bug.cgi?id=138479
Reviewed by Mark Lam.
Drop useless HTMLElement::isURLAttribute() override as it is doing
nothing but calling the parent class' isURLAttribute().
No new tests, no behavior change.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::isURLAttribute): Deleted.
* html/HTMLElement.h:
2014-11-07 Eric Carlson <eric.carlson@apple.com>
[iOS] Update optimized fullscreen media controls
https://bugs.webkit.org/show_bug.cgi?id=138493
Reviewed by Brent Fulgham.
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::fullscreenMode): New.
(WebCore::MediaControlsHost::mediaUIImageData): New.
* Modules/mediacontrols/MediaControlsHost.h:
* Modules/mediacontrols/MediaControlsHost.idl:
* Modules/mediacontrols/mediaControlsiOS.css:
Renamed -webkit-media-controls-wireless-playback-status to -webkit-media-controls-inline-playback-placeholder
because it is now used for other inline playback status display. Add z-index:0 so the placeholder
renders above captions. Remove the background-image, it is now set from script.
(audio::-webkit-media-controls-inline-playback-placeholder):
(audio::-webkit-media-controls-inline-playback-placeholder.hidden):
(video::-webkit-media-controls-optimized-fullscreen-button):
(audio::-webkit-media-controls-wireless-playback-status): Deleted.
(audio::-webkit-media-controls-wireless-playback-status.hidden): Deleted.
(video::-webkit-media-controls-optimized-fullscreen-button:active): Deleted.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS): Set doingSetup to true around setup so we don't draw the inline controls
briefly when an element is created as a result of a user gesture.
(ControllerIOS.prototype.shouldHaveStartPlaybackButton): Don't allow inline controls during
initial setup to prevent inline controls from begin drawn briefly when a media element
is created and inserted by a script called from a user gesture.
(ControllerIOS.prototype.updateWirelessPlaybackStatus): wirelessPlaybackStatus -> inlinePlaybackPlaceholder.
(ControllerIOS.prototype.createControls): Ditto. Add style rules for optimized fullscreen button.
(ControllerIOS.prototype.configureInlineControls): Add the inlinePlaybackPlaceholder as a peer of
the inline controls compositing child instead of as a child so it renders correctly.
(ControllerIOS.prototype.addControls):
(ControllerIOS.prototype.updateControls): wirelessPlaybackStatus -> inlinePlaybackPlaceholder.
(ControllerIOS.prototype.handleWrapperTouchStart):
(ControllerIOS.prototype.get pageScaleFactor): Cleanup.
(ControllerIOS.prototype.set pageScaleFactor): Ditto.
(ControllerIOS.prototype.handleFullscreenChange): Show the placeholder.
* WebCore.exp.in: Export _wkGetMediaUIImageData.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::fullscreenMode): Expose fullscreen mode.
* platform/ios/WebCoreSystemInterfaceIOS.h:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
2014-11-06 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Try to fix GTK build after r175719.
Rename the Timer fired function as requestAnimationTimerFired() to
avoid ambiguity.
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::ScrollAnimatorNone):
(WebCore::ScrollAnimatorNone::requestAnimationTimerFired):
(WebCore::ScrollAnimatorNone::animationTimerFired): Deleted.
* platform/ScrollAnimatorNone.h:
2014-11-06 Chris Dumez <cdumez@apple.com>
Remove useless if check in HTMLInputElement::setValue()
https://bugs.webkit.org/show_bug.cgi?id=138485
Reviewed by Daniel Bates.
Remove useless if check in HTMLInputElement::setValue(). It was
inadvertently left in as part of r94836.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setValue):
2014-11-06 Simon Fraser <simon.fraser@apple.com>
Put names on a couple of video-related CALayers
https://bugs.webkit.org/show_bug.cgi?id=138491
Reviewed by Eric Carlson.
In debug, set layer names on a couple of video-related layers to make
debugging easier.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
2014-11-06 Darin Adler <darin@apple.com>
REGRESSION (r175549): http/tests/multipart/stop-crash.html failing (assertion failure in CachedResource::setEncodedSize)
https://bugs.webkit.org/show_bug.cgi?id=138358
Reviewed by Alexey Proskuryakov.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::setEncodedSize): Removed the incorrect assertion here.
The code asserts that resources only get bigger, never smaller. This is incorrect
for a multipart/mixed-replace image, where a later image that is smaller can replace
an earlier one. I don't fully understand why this assertion was not firing before,
but the relevant websites are working fine and the test otherwise passes.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart): Fix another
incorrect assertion that can fire for any parts after the first one. I ran into
this while testing various websites that use multipart/mixed-replace.
2014-11-06 Jeremy Jones <jeremyj@apple.com>
Fix typo in optimized fullscreen activation.
https://bugs.webkit.org/show_bug.cgi?id=138480
Reviewed by Jer Noble.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.handleWrapperTouchStart): fix typo doubleTouchIntervalThresholdms
(ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): fix typo isFullScreen
2014-11-06 Chris Dumez <cdumez@apple.com>
Stop special-casing wbr elements in HTMLElement::createElementRenderer()
https://bugs.webkit.org/show_bug.cgi?id=138474
Reviewed by Ryosuke Niwa.
Stop special-casing wbr elements in HTMLElement::createElementRenderer()
and move the code to a HTMLWBRElement subclass instead, that is
overriding createElementRenderer(). This function is already virtual.
No new tests, no behavior change.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createElementRenderer):
* html/HTMLElementsAllInOne.cpp:
* html/HTMLTagNames.in:
* html/HTMLWBRElement.cpp: Added.
(WebCore::HTMLWBRElement::create):
(WebCore::HTMLWBRElement::HTMLWBRElement):
(WebCore::HTMLWBRElement::createElementRenderer):
* html/HTMLWBRElement.h: Added.
* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::RenderLineBreak):
2014-11-05 Jer Noble <jer.noble@apple.com>
De-templatize Timer
https://bugs.webkit.org/show_bug.cgi?id=138450
Reviewed by Anders Carlsson.
Timer does not need to be a templated class; only it's constructors need to be templated.
Remove the template specifier from Timer and add same to its two class method
constructors. Replace the function pointer typedefs with using statements. Add a
helper typedef which allows invalid combinations of TimerFiredClass and
TimerFiredFunction to be caught early by the compiler, while still allowing
valid combinations (such as when the caller specifies a function on a subclass of
TimerFiredClass).
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::keyRequestTimerFired):
(WebCore::MediaKeySession::addKeyTimerFired):
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::GeoNotifier::timerFired):
(WebCore::Geolocation::resumeTimerFired):
* Modules/geolocation/Geolocation.h:
* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::taskTimerFired):
* Modules/indexeddb/IDBTransactionBackend.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBufferTimerFired):
(WebCore::SourceBuffer::removeTimerFired):
* Modules/mediasource/SourceBuffer.h:
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::scheduledEventTimerFired):
* Modules/mediastream/MediaStream.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::scheduledEventTimerFired):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/notifications/Notification.cpp:
(WebCore::Notification::Notification):
(WebCore::Notification::taskTimerFired):
* Modules/notifications/Notification.h:
* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::NotificationRequestCallback::timerFired):
* Modules/notifications/NotificationCenter.h:
* Modules/vibration/Vibration.cpp:
(WebCore::Vibration::timerFired):
* Modules/vibration/Vibration.h:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::resumeTimerFired):
(WebCore::WebSocketChannel::closingTimerFired):
* Modules/websockets/WebSocketChannel.h:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired):
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::AXObjectCache):
* bindings/js/GCController.cpp:
(WebCore::GCController::gcTimerFired):
* bindings/js/GCController.h:
* css/CSSFontFaceSource.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::beginLoadTimerFired):
* css/CSSFontSelector.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::sweepMatchedPropertiesCache):
* css/StyleResolver.h:
* dom/Document.cpp:
(WebCore::Document::visualUpdatesSuppressionTimerFired):
(WebCore::Document::styleRecalcTimerFired):
(WebCore::Document::optimizedStyleSheetUpdateTimerFired):
(WebCore::Document::sharedObjectPoolClearTimerFired):
(WebCore::Document::updateFocusAppearanceTimerFired):
(WebCore::Document::pendingTasksTimerFired):
(WebCore::Document::fullScreenChangeDelayTimerFired):
(WebCore::Document::loadEventDelayTimerFired):
(WebCore::Document::didAssociateFormControlsTimerFired):
(WebCore::Document::domCookieCacheExpiryTimerFired):
* dom/Document.h:
* dom/EventSender.h:
(WebCore::EventSender::timerFired):
* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::timerFired):
* dom/GenericEventQueue.h:
* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::timerFired):
* dom/ScriptRunner.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::animationTimerFired):
* dom/ScriptedAnimationController.h:
* dom/StyledElement.cpp:
(WebCore::PresentationAttributeCacheCleaner::cleanCache):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::timerFired):
* editing/AlternativeTextController.h:
* editing/Editor.cpp:
(WebCore::Editor::scanSelectionForTelephoneNumbers):
(WebCore::Editor::editorUIUpdateTimerFired):
* editing/Editor.h:
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::caretBlinkTimerFired):
* editing/FrameSelection.h:
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
* editing/SpellChecker.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::requestAutocompleteTimerFired):
* html/HTMLFormElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::swapRendererTimerFired):
* html/HTMLPlugInElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
* html/HTMLPlugInImageElement.h:
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::errorEventTimerFired):
* html/HTMLSourceElement.h:
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::loadTimerFired):
* html/HTMLTrackElement.h:
* html/MediaController.cpp:
(MediaController::asyncEventTimerFired):
(MediaController::clearPositionTimerFired):
(MediaController::timeupdateTimerFired):
* html/MediaController.h:
* html/MediaDocument.cpp:
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/MediaDocument.h:
* html/SearchInputType.cpp:
(WebCore::SearchInputType::searchEventTimerFired):
* html/SearchInputType.h:
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::setMessage):
(WebCore::ValidationMessage::setMessageDOMAndStartTimer):
(WebCore::ValidationMessage::buildBubbleTree):
(WebCore::ValidationMessage::requestToHideMessage):
(WebCore::ValidationMessage::deleteBubbleTree):
* html/ValidationMessage.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::dispatchContextLostEvent):
(WebCore::WebGLRenderingContext::maybeRestoreContext):
* html/canvas/WebGLRenderingContext.h:
* html/parser/HTMLParserScheduler.cpp:
(WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
* html/parser/HTMLParserScheduler.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::transitionTimerFired):
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::hideFullscreenControlsTimerFired):
* html/shadow/MediaControls.h:
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::repeatingTimerFired):
* html/shadow/SpinButtonElement.h:
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::loadTimerFired):
* html/track/LoadableTextTrack.h:
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::scrollTimerFired):
* html/track/VTTRegion.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::ChangeRegionOversetTask::timerFired):
* inspector/InspectorDOMAgent.cpp:
(WebCore::RevalidateStyleAttributeTask::timerFired):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorBackendDispatchTask::timerFired):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::updatePaintRectsTimerFired):
* inspector/InspectorOverlay.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkTimerFired):
* loader/FrameLoader.h:
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::timerFired):
* loader/ImageLoader.h:
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::linkLoadTimerFired):
(WebCore::LinkLoader::linkLoadingErrorTimerFired):
* loader/LinkLoader.h:
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledNavigation::didStartTimer):
(WebCore::NavigationScheduler::timerFired):
* loader/NavigationScheduler.h:
* loader/PingLoader.h:
(WebCore::PingLoader::timeoutTimerFired):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::progressHeartbeatTimerFired):
* loader/ProgressTracker.h:
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::requestTimerFired):
* loader/ResourceLoadScheduler.h:
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::cueLoadTimerFired):
* loader/TextTrackLoader.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::Callback::timerFired):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
* loader/cache/CachedResourceLoader.h:
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::syncTimerFired):
* loader/icon/IconDatabase.h:
* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::autoscrollTimerFired):
* page/AutoscrollController.h:
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::timerFired):
* page/CaptionUserPreferences.h:
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::updateTimerFired):
* page/CaptionUserPreferencesMediaAF.h:
* page/DeviceController.cpp:
(WebCore::DeviceController::fireDeviceEvent):
* page/DeviceController.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::cursorUpdateTimerFired):
(WebCore::EventHandler::autoHideCursorTimerFired):
(WebCore::EventHandler::recognizeLongMousePress):
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):
(WebCore::EventHandler::hoverTimerFired):
* page/EventHandler.h:
* page/EventSource.cpp:
(WebCore::EventSource::connectTimerFired):
* page/EventSource.h:
* page/FocusController.cpp:
(WebCore::FocusController::focusRepaintTimerFired):
* page/FocusController.h:
* page/Frame.cpp:
(WebCore::Frame::overflowAutoScrollTimerFired):
* page/Frame.h:
* page/FrameView.cpp:
(WebCore::FrameView::delayedScrollEventTimerFired):
(WebCore::FrameView::speculativeTilingEnableTimerFired):
(WebCore::FrameView::layoutTimerFired):
(WebCore::FrameView::updateEmbeddedObjectsTimerFired):
(WebCore::FrameView::postLayoutTimerFired):
* page/FrameView.h:
* page/PageOverlay.cpp:
(WebCore::PageOverlay::fadeAnimationTimerFired):
* page/PageOverlay.h:
* page/Settings.cpp:
(WebCore::Settings::imageLoadingSettingsTimerFired):
* page/Settings.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
(WebCore::AnimationControllerPrivate::animationTimerFired):
* page/animation/AnimationControllerPrivate.h:
* page/mac/ServicesOverlayController.h:
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::determineActiveHighlightTimerFired):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired):
* platform/HysteresisActivity.h:
(WebCore::HysteresisActivity::hysteresisTimerFired):
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
(WebCore::ScrollAnimator::startScrollSnapTimer):
(WebCore::ScrollAnimator::stopScrollSnapTimer):
(WebCore::ScrollAnimator::horizontalScrollSnapTimerFired):
(WebCore::ScrollAnimator::verticalScrollSnapTimerFired):
* platform/ScrollAnimator.h:
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::animationTimerFired):
* platform/ScrollAnimatorNone.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::autoscrollTimerFired):
* platform/Scrollbar.h:
* platform/Timer.h:
(WebCore::Timer::Timer):
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::clientDataBufferingTimerFired):
* platform/audio/MediaSession.h:
* platform/efl/BatteryProviderEfl.cpp:
(WebCore::BatteryProviderEfl::timerFired):
* platform/efl/BatteryProviderEfl.h:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::startAnimation):
(WebCore::BitmapImage::advanceAnimation):
* platform/graphics/BitmapImage.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::reloadTimerFired):
* platform/graphics/MediaPlayer.h:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::timerFired):
* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::tileBufferUpdateTimerFired):
(WebCore::TiledBackingStore::backingStoreUpdateTimerFired):
* platform/graphics/TiledBackingStore.h:
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired):
* platform/graphics/ca/LayerPool.cpp:
(WebCore::LayerPool::pruneTimerFired):
* platform/graphics/ca/LayerPool.h:
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::tileRevalidationTimerFired):
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::cohortRemovalTimerFired):
* platform/graphics/ca/TileGrid.h:
* platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
(WebCore::LegacyCACFLayerTreeHost::renderTimerFired):
* platform/graphics/ca/win/LegacyCACFLayerTreeHost.h:
* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::collectionTimerFired):
* platform/graphics/cg/IOSurfacePool.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::CoordinatedImageBacking::clearContentsTimerFired):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
* platform/ios/LegacyTileCache.h:
* platform/ios/LegacyTileCache.mm:
(WebCore::LegacyTileCache::tileCreationTimerFired):
* platform/mac/HIDGamepadProvider.cpp:
(WebCore::HIDGamepadProvider::connectionDelayTimerFired):
(WebCore::HIDGamepadProvider::inputNotificationTimerFired):
* platform/mac/HIDGamepadProvider.h:
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
* platform/mock/DeviceMotionClientMock.cpp:
(WebCore::DeviceMotionClientMock::timerFired):
* platform/mock/DeviceMotionClientMock.h:
* platform/mock/DeviceOrientationClientMock.cpp:
(WebCore::DeviceOrientationClientMock::timerFired):
* platform/mock/DeviceOrientationClientMock.h:
* platform/mock/GeolocationClientMock.cpp:
(WebCore::GeolocationClientMock::permissionTimerFired):
(WebCore::GeolocationClientMock::controllerTimerFired):
* platform/mock/GeolocationClientMock.h:
* platform/mock/PlatformSpeechSynthesizerMock.cpp:
(WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
* platform/mock/PlatformSpeechSynthesizerMock.h:
* platform/mock/TimerEventBasedMock.h:
(WebCore::TimerEvent::timerFired):
* platform/network/DNSResolveQueue.cpp:
(WebCore::DNSResolveQueue::timerFired):
* platform/network/DNSResolveQueue.h:
* platform/network/NetworkStateNotifier.h:
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::failureTimerFired):
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::downloadTimerCallback):
* platform/network/curl/ResourceHandleManager.h:
* platform/network/mac/NetworkStateNotifierMac.cpp:
(WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
* platform/network/win/ResourceHandleWin.cpp:
(WebCore::ResourceHandle::fileLoadTimer):
* plugins/PluginPackage.cpp:
(WebCore::PluginPackage::freeLibraryTimerFired):
* plugins/PluginPackage.h:
* plugins/PluginStream.cpp:
(WebCore::PluginStream::delayDeliveryTimerFired):
* plugins/PluginStream.h:
* plugins/PluginView.cpp:
(WebCore::PluginView::popPopupsStateTimerFired):
(WebCore::PluginView::requestTimerFired):
(WebCore::PluginView::invalidateTimerFired):
(WebCore::PluginView::lifeSupportTimerFired):
* plugins/PluginView.h:
* plugins/win/PluginMessageThrottlerWin.cpp:
(WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
* plugins/win/PluginMessageThrottlerWin.h:
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::highQualityRepaintTimerFired):
* rendering/ImageQualityController.h:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::styleDidChange):
(WebCore::RenderButton::timerFired):
* rendering/RenderButton.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired):
(WebCore::RenderLayerCompositor::layerFlushTimerFired):
(WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
* rendering/RenderLayerCompositor.h:
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::timerFired):
* rendering/RenderMarquee.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::animationTimerFired):
* rendering/RenderProgress.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::lazyRepaintTimerFired):
* rendering/RenderView.h:
* replay/EventLoopInputDispatcher.cpp:
(WebCore::EventLoopInputDispatcher::timerFired):
* replay/EventLoopInputDispatcher.h:
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::closeDatabaseTimerFired):
* storage/StorageAreaImpl.h:
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::syncTimerFired):
* storage/StorageAreaSync.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::svgLoadEventTimerFired):
(WebCore::SVGElement::svgLoadEventTimer):
* svg/SVGElement.h:
* svg/SVGScriptElement.h:
* svg/SVGStyleElement.h:
* svg/SVGUseElement.h:
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::timerFired):
* svg/animation/SMILTimeContainer.h:
* xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
* xml/XMLHttpRequestProgressEventThrottle.h:
2014-11-06 Yongjun Zhang <yongjun_zhang@apple.com>
Don't send identifierForInitialRequest callback method for request with DoNotSendCallbacks option.
https://bugs.webkit.org/show_bug.cgi?id=138473
The iOS specific code that sets up a valid m_identifier is not needed any more, since this
will be done later in ResourceLoader::willSendRequest. This also matches the behavior that
we don't call assignIdentifierToInitialRequest callback method if the reqeust has
DoNotSendCallbacks option.
Reviewed by Pratik Solanki.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest): Remove iOS specific block for setting up a valid
m_identifier. In iOS, also make sure we still bail out if the resource loader was stopped
in assignIdentifierToInitialRequest callback by a client.
2014-11-06 Dean Jackson <dino@apple.com>
[filters2] Support for backdrop-filter
https://bugs.webkit.org/show_bug.cgi?id=138384
<rdar://problem/18874494>
Reviewed by Simon Fraser.
Take 2!! Previous patch was rolled out.
Add prototype support for backdrop-filter
http://dev.w3.org/fxtf/filters-2/#BackdropFilterProperty
This adds support for parsing the new CSS property, adding
the value to RenderStyle, noticing that on the layer tree,
and the platform code in GraphicsLayer to render a backdrop
and apply an effect to the result.
Some things are missing:
- animation of the backdrop-filter is not yet supported
- backdrops will not work in cloned layers yet (e.g. reflections)
Tests: css3/filters/backdrop/backdropfilter-property-computed-style.html
css3/filters/backdrop/backdropfilter-property-parsing-invalid.html
css3/filters/backdrop/backdropfilter-property-parsing.html
css3/filters/backdrop/backdropfilter-property.html
css3/filters/backdrop/effect-hw.html
* WebCore.exp.in: Export the setBackdropFilters method so it can
be used from WebKit.
* css/CSSComputedStyleDeclaration.cpp: New property name.
(WebCore::isLayoutDependent):
(WebCore::ComputedStyleExtractor::propertyValue): Use the existing valueForFilter method.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Piggyback on the filter parser.
* css/CSSPropertyNames.in: Add -webkit-backdrop-filter.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Add test for backdrop.
(WebCore::StyleResolver::applyProperty): Support new property.
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::needsBackdrop): New method to test for existence of values.
(WebCore::GraphicsLayer::backdropFilters): Keeps the list of filters.
(WebCore::GraphicsLayer::setBackdropFilters):
(WebCore::GraphicsLayer::clearBackdropFilters):
* platform/graphics/ca/GraphicsLayerCA.cpp: This adds a new m_backdropLayer CALayer
that will sit behind the contents layer and provide the element's backdrop.
(WebCore::GraphicsLayerCA::willBeDestroyed):
(WebCore::GraphicsLayerCA::moveOrCopyAnimations):
(WebCore::GraphicsLayerCA::setBackdropFilters): Set a custom appearance so
remote layer hosts will notice the special layer. Also set the actual
layer properties.
(WebCore::GraphicsLayerCA::addAnimation): Remove whitespace.
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Update backdrop if necessary.
(WebCore::GraphicsLayerCA::updateLayerNames): Give the new layer a name.
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::updateGeometry): Make the backdrop layer match the contents
layer geometry.
(WebCore::GraphicsLayerCA::updateBackdropFilters): Create the backdrop layer if necessary,
and copy the filter values to any clones.
(WebCore::GraphicsLayerCA::ensureStructuralLayer): We need a structural layer if we
have backdrop filters.
(WebCore::GraphicsLayerCA::structuralLayerPurpose):
(WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
* platform/graphics/ca/GraphicsLayerCA.h: New StructuralLayerPurpose, new LayerChangeFlag.
* platform/graphics/ca/PlatformCALayer.h: New LayerType.
* platform/graphics/ca/mac/PlatformCALayerMac.mm: Define CABackdropLayer.
(PlatformCALayerMac::PlatformCALayerMac): Create the correct CALayer type.
* rendering/RenderElement.h:
(WebCore::RenderElement::createsGroup):
(WebCore::RenderElement::hasBackdropFilter): This method is always around, but
only can return true when FILTERS_LEVEL_2 is enabled.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintsWithFilters): Remove an unnecessary comment.
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h: Add hasBackdropFilter.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Update the backdrop filters.
(WebCore::RenderLayerBacking::updateBackdropFilters): Set the filters on the GraphicsLayer.
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresOwnBackingStore): Needs backingstore if it has a backdrop filter.
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForFilters): Return early if we have
a backdrop filter, because currently we absolutely require compositing.
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleWillChange): Add hasBackdropFilter().
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout): Check backdrops for change.
* rendering/style/RenderStyle.h: Add the backdropFilter style stuff.
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
(WebCore::StyleRareNonInheritedData::hasBackdropFilters):
* rendering/style/StyleRareNonInheritedData.h:
2014-11-06 Benjamin Poulain <bpoulain@apple.com>
Give pseudo elements the correct specificity
https://bugs.webkit.org/show_bug.cgi?id=138378
Reviewed by Dean Jackson.
WebKit had an old silly bug where pseudo elements were given specificity in the class B
instead of the class C.
Now that the inspector shows the specificity, this bug is much more visible which is why
I fix it now.
Test: fast/css/pseudo-element-specificity.html
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificityForOneSelector):
Give pseudo-elements the right specificity.
* Modules/mediacontrols/mediaControlsApple.css:
(video::-webkit-media-controls-volume-slider):
(audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
(audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb):
(audio::-webkit-media-controls-timeline):
(audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
(audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,):
(video:-webkit-full-screen::-webkit-media-controls-volume-slider):
(video:-webkit-full-screen::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
* Modules/mediacontrols/mediaControlsBase.css:
(video::-webkit-media-controls-volume-slider):
(audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
(audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb):
(audio::-webkit-media-controls-timeline):
(audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
(audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,):
(video:-webkit-full-screen::-webkit-media-controls-volume-slider):
(video:-webkit-full-screen::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
* css/mediaControls.css:
(audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
(audio::-webkit-media-controls-volume-slider-mute-button, video::-webkit-media-controls-volume-slider-mute-button):
* css/mediaControlsGtk.css:
(audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
(audio::-webkit-media-controls-timeline[disabled], video::-webkit-media-controls-timeline[disabled]):
(audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
The media controls were relying on the bug to override the style of input[type=range].
Ideally we should either:
-Implement some kind of high level style isolation (e.g. CSS Scoping).
-Fix the media control tree to use regular CSS scoped by a shadow pseudo ID.
Until we have one of those, I just fixed the styling by forcing the properties with lower
specificity with !important.
2014-11-06 Beth Dakin <bdakin@apple.com>
Preview views often misplaced inside popover
https://bugs.webkit.org/show_bug.cgi?id=138472
Reviewed by Tim Horton.
* WebCore.exp.in:
2014-11-06 Michael Saboff <msaboff@apple.com>
REGRESSION (r174985-174986): Site display disappears
https://bugs.webkit.org/show_bug.cgi?id=138082
Reviewed by Geoffrey Garen.
This effectively reverts to the behavior before r174985 by using the
lexical global object of the caller's frame to find the active document.
Before r174985, native functions are invoked with the ScopeShain of their
caller. The lexical global object is accessed from the ScopeChain.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
(WebCore::findOwningDocument):
(WebCore::documentWrite):
(WebCore::JSHTMLDocument::write):
(WebCore::JSHTMLDocument::writeln):
* html/HTMLDocument.idl:
2014-11-05 Sam Weinig <sam@webkit.org>
Use std::unique_ptr for TileController
https://bugs.webkit.org/show_bug.cgi?id=138429
Reviewed by Anders Carlsson.
* WebCore.exp.in:
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::create): Deleted.
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/mac/WebTiledBackingLayer.h:
* platform/graphics/ca/mac/WebTiledBackingLayer.mm:
(-[WebTiledBackingLayer createTileController:]):
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::createTileController):
* platform/graphics/ca/win/PlatformCALayerWinInternal.h:
2014-11-06 Chris Dumez <cdumez@apple.com>
Use lambda functions in DocumentOrderedMap
https://bugs.webkit.org/show_bug.cgi?id=138376
Reviewed by Darin Adler.
Use lambda functions in DocumentOrderedMap instead of separate named
functions.
No new tests, no behavior change.
* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::get):
(WebCore::DocumentOrderedMap::getElementById):
(WebCore::DocumentOrderedMap::getElementByName):
(WebCore::DocumentOrderedMap::getElementByMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedUsemap):
(WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
(WebCore::DocumentOrderedMap::getElementByWindowNamedItem):
(WebCore::DocumentOrderedMap::getElementByDocumentNamedItem):
(WebCore::DocumentOrderedMap::getAllElementsById):
(WebCore::keyMatchesId): Deleted.
(WebCore::keyMatchesName): Deleted.
(WebCore::keyMatchesMapName): Deleted.
(WebCore::keyMatchesLowercasedMapName): Deleted.
(WebCore::keyMatchesLowercasedUsemap): Deleted.
(WebCore::keyMatchesLabelForAttribute): Deleted.
(WebCore::keyMatchesWindowNamedItem): Deleted.
(WebCore::keyMatchesDocumentNamedItem): Deleted.
* dom/DocumentOrderedMap.h:
2014-11-05 Shivakumar JM <shiva.jm@samsung.com>
splitText API does not match DOM specification.
https://bugs.webkit.org/show_bug.cgi?id=138405
Reviewed by Chris Dumez.
Make the offset argument for splitText API as mandatory (and thus throw if it is omitted) and stop throwing if the offset argument is
negative (and wraps to a valid index) as per specification: https://w3c.github.io/dom/#interface-text. Also This matches the behavior
of both Firefox 33 and Chrome 38.
Test: fast/dom/Text/splitText.html
* dom/Text.idl:
2014-11-05 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r175672.
https://bugs.webkit.org/show_bug.cgi?id=138455
Tries to make backdrop layers on every layer, asserts on
Mavericks (Requested by smfr on #webkit).
Reverted changeset:
"[filters2] Support for backdrop-filter"
https://bugs.webkit.org/show_bug.cgi?id=138384
http://trac.webkit.org/changeset/175672
2014-11-04 Ada Chan <adachan@apple.com>
Figure out whether a plug-in is playing audio.
https://bugs.webkit.org/show_bug.cgi?id=137219
Reviewed by Anders Carlsson.
Add NPPVpluginIsPlayingAudio. Export some WebCore methods that will be used in WebKit2.
No new tests, but manually tested with an example plugin.
* WebCore.exp.in:
* plugins/npapi.h:
2014-11-05 Simon Fraser <simon.fraser@apple.com>
Fix crash introduced in r175656
https://bugs.webkit.org/show_bug.cgi?id=138453
Reviewed by Dan Bernstein.
repaintContainer can be null sometimes.
Covered by existing tests.
* rendering/RenderLayerCompositor.cpp:
(WebCore::styleChangeRequiresLayerRebuild):
2014-11-05 Dan Bernstein <mitz@apple.com>
Tried to fix the Windows build after removing the deletion UI.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* editing/EditingAllInOne.cpp:
2014-11-04 Dean Jackson <dino@apple.com>
[filters2] Support for backdrop-filter
https://bugs.webkit.org/show_bug.cgi?id=138384
<rdar://problem/18874494>
Reviewed by Simon Fraser.
Add prototype support for backdrop-filter
http://dev.w3.org/fxtf/filters-2/#BackdropFilterProperty
This adds support for parsing the new CSS property, adding
the value to RenderStyle, noticing that on the layer tree,
and the platform code in GraphicsLayer to render a backdrop
and apply an effect to the result.
Some things are missing:
- animation of the backdrop-filter is not yet supported
- backdrops will not work in cloned layers yet (e.g. reflections)
Tests: css3/filters/backdrop/backdropfilter-property-computed-style.html
css3/filters/backdrop/backdropfilter-property-parsing-invalid.html
css3/filters/backdrop/backdropfilter-property-parsing.html
css3/filters/backdrop/backdropfilter-property.html
css3/filters/backdrop/effect-hw.html
* WebCore.exp.in: Export the setBackdropFilters method so it can
be used from WebKit.
* css/CSSComputedStyleDeclaration.cpp: New property name.
(WebCore::isLayoutDependent):
(WebCore::ComputedStyleExtractor::propertyValue): Use the existing valueForFilter method.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Piggyback on the filter parser.
* css/CSSPropertyNames.in: Add -webkit-backdrop-filter.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Add test for backdrop.
(WebCore::StyleResolver::applyProperty): Support new property.
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::needsBackdrop): New method to test for existence of values.
(WebCore::GraphicsLayer::backdropFilters): Keeps the list of filters.
(WebCore::GraphicsLayer::setBackdropFilters):
(WebCore::GraphicsLayer::clearBackdropFilters):
* platform/graphics/ca/GraphicsLayerCA.cpp: This adds a new m_backdropLayer CALayer
that will sit behind the contents layer and provide the element's backdrop.
(WebCore::GraphicsLayerCA::willBeDestroyed):
(WebCore::GraphicsLayerCA::moveOrCopyAnimations):
(WebCore::GraphicsLayerCA::setBackdropFilters): Set a custom appearance so
remote layer hosts will notice the special layer. Also set the actual
layer properties.
(WebCore::GraphicsLayerCA::addAnimation): Remove whitespace.
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Update backdrop if necessary.
(WebCore::GraphicsLayerCA::updateLayerNames): Give the new layer a name.
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::updateGeometry): Make the backdrop layer match the contents
layer geometry.
(WebCore::GraphicsLayerCA::updateBackdropFilters): Create the backdrop layer if necessary,
and copy the filter values to any clones.
(WebCore::GraphicsLayerCA::ensureStructuralLayer): We need a structural layer if we
have backdrop filters.
(WebCore::GraphicsLayerCA::structuralLayerPurpose):
(WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
* platform/graphics/ca/GraphicsLayerCA.h: New StructuralLayerPurpose, new LayerChangeFlag.
* platform/graphics/ca/PlatformCALayer.h: New LayerType.
* platform/graphics/ca/mac/PlatformCALayerMac.mm: Define CABackdropLayer.
(PlatformCALayerMac::PlatformCALayerMac): Create the correct CALayer type.
* rendering/RenderElement.h:
(WebCore::RenderElement::createsGroup):
(WebCore::RenderElement::hasBackdropFilter): This method is always around, but
only can return true when FILTERS_LEVEL_2 is enabled.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintsWithFilters): Remove an unnecessary comment.
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h: Add hasBackdropFilter.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Update the backdrop filters.
(WebCore::RenderLayerBacking::updateBackdropFilters): Set the filters on the GraphicsLayer.
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresOwnBackingStore): Needs backingstore if it has a backdrop filter.
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForFilters): Return early if we have
a backdrop filter, because currently we absolutely require compositing.
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleWillChange): Add hasBackdropFilter().
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout): Check backdrops for change.
* rendering/style/RenderStyle.h: Add the backdropFilter style stuff.
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
(WebCore::StyleRareNonInheritedData::hasBackdropFilters):
* rendering/style/StyleRareNonInheritedData.h:
2014-11-05 Chris Dumez <cdumez@apple.com>
Move 'size' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138337
Reviewed by Andreas Kling.
Move 'size' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder by using custom code as it requires special handling.
No new tests, new behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyPageSize::mmLength): Deleted.
(WebCore::ApplyPropertyPageSize::inchLength): Deleted.
(WebCore::ApplyPropertyPageSize::getPageSizeFromName): Deleted.
(WebCore::ApplyPropertyPageSize::applyInheritValue): Deleted.
(WebCore::ApplyPropertyPageSize::applyInitialValue): Deleted.
(WebCore::ApplyPropertyPageSize::applyValue): Deleted.
(WebCore::ApplyPropertyPageSize::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::mmLength):
(WebCore::StyleBuilderFunctions::inchLength):
(WebCore::StyleBuilderFunctions::getPageSizeFromName):
(WebCore::StyleBuilderFunctions::applyInheritSize):
(WebCore::StyleBuilderFunctions::applyInitialSize):
(WebCore::StyleBuilderFunctions::applyValueSize):
2014-11-05 Chris Dumez <cdumez@apple.com>
Revert r175441 as it seems to be causing intermittent crashes in DOMTimer
https://bugs.webkit.org/show_bug.cgi?id=138449
Unreviewed roll out.
Revert r175441 as it seems to be causing intermittent crashes in DOMTimer due
to the scriptExecutionContext going away. See <rdar://problem/18883681>.
* page/DOMTimer.cpp:
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::fired):
(WebCore::NestedTimersVector::NestedTimersVector): Deleted.
(WebCore::NestedTimersVector::~NestedTimersVector): Deleted.
(WebCore::NestedTimersVector::registerTimer): Deleted.
(WebCore::NestedTimersVector::begin): Deleted.
(WebCore::NestedTimersVector::end): Deleted.
2014-11-05 Simon Fraser <simon.fraser@apple.com>
Avoid backing store for opacity:0 descendant layers
https://bugs.webkit.org/show_bug.cgi?id=138448
Reviewed by Dean Jackson.
If a composited layer has no rendered content but a painting zero-opacity descendant
layer, than we can avoid making backing store.
When the opacity on such a child changes, we need to trigger a tree rebuild
to force the backing store to come back (this could be optimized later).
Tests: compositing/backing/no-backing-for-opacity-0-child.html
compositing/backing/toggle-opacity-0-child.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerCompositor.cpp:
(WebCore::styleChangeRequiresLayerRebuild):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containerForRepaint):
2014-11-05 Chris Dumez <cdumez@apple.com>
Assertion hit DOMTimer::updateTimerIntervalIfNecessary()
https://bugs.webkit.org/show_bug.cgi?id=138440
Reviewed by Geoffrey Garen.
We sometimes hit the ASSERT(repeatInterval() == previousInterval)
assertion in DOMTimer::updateTimerIntervalIfNecessary() when visiting
the following pages:
http://lifehacker.com/the-healthiest-foods-for-one-handed-snacking-while-gami-1654728164
http://longform.org/posts/like-something-the-lord-made
After debugging, the issue turned out to be that we are comparing
floating point numbers using ==, and the check sometimes fails even
though the values really close to each other. This patch updates the
DOMTimer code to use WTF::withinEpsilon() instead of operator==()
to compare the floating point intervals.
I confirmed manually that the assertion is no longer hit.
* page/DOMTimer.cpp:
(WebCore::DOMTimer::updateTimerIntervalIfNecessary):
* platform/graphics/FloatQuad.cpp:
(WebCore::FloatQuad::isRectilinear):
(WebCore::withinEpsilon): Deleted.
2014-11-05 Chris Fleizach <cfleizach@apple.com>
AX: add "alt" as an overriding synonym of "-webkit-alt" (now in the CSS4 spec)
https://bugs.webkit.org/show_bug.cgi?id=138393
Reviewed by Dean Jackson.
Add official "alt" CSS keyword and map -webkit-alt to that.
Test: platform/mac/accessibility/alt-for-css-content.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPropertyNames.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2014-11-05 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, EFL build fix since r175647
* CMakeLists.txt: Remove DeleteButton.cpp and DeleteButtonController.cpp.
2014-11-05 Chris Dumez <cdumez@apple.com>
Allow constructing a PassRef from a Ref
https://bugs.webkit.org/show_bug.cgi?id=138389
Reviewed by Andreas Kling.
Remove calls to Ref::get() now that a PassRef can be directly
constructed from a Ref.
No new tests, no behavior change.
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createColorValue):
* css/CSSValuePool.h:
(WebCore::CSSValuePool::createInheritedValue):
(WebCore::CSSValuePool::createImplicitInitialValue):
(WebCore::CSSValuePool::createExplicitInitialValue):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):
2014-11-05 Dan Bernstein <mitz@apple.com>
Remove the unused deletion UI feature
https://bugs.webkit.org/show_bug.cgi?id=138442
Rubber-stamped by Alexey Proskuryakov.
* Resources/deleteButton.png: Removed.
* Resources/deleteButton@2x.png: Removed.
* Resources/deleteButtonPressed.png: Removed.
* Resources/deleteButtonPressed@2x.png: Removed.
* WebCore.xcodeproj/project.pbxproj: Removed references to removed files.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::cloneChildNodes): Folded the below helper function into this member
function, after removing the deleteButtonContainerElement parameter.
(WebCore::cloneChildNodesAvoidingDeleteButton): Deleted.
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::unapply): Removed use of
DeleteButtonControllerDisableScope.
(WebCore::EditCommandComposition::reapply): Ditto.
(WebCore::CompositeEditCommand::apply): Ditto.
* editing/DeleteButton.cpp: Removed.
* editing/DeleteButton.h: Removed.
* editing/DeleteButtonController.cpp: Removed.
* editing/DeleteButtonController.h: Removed.
* editing/EditCommand.cpp:
(WebCore::EditCommand::EditCommand): Removed use of
Editor::avoidIntersectionWithDeleteButtonController.
* editing/Editor.cpp:
(WebCore::Editor::Editor): Removed initialization of m_deleteButtonController.
(WebCore::Editor::rangeForPoint): Removed use of avoidIntersectionWithDeleteButtonController.
(WebCore::Editor::editorUIUpdateTimerFired): Removed call to DeleteButtonController function.
(WebCore::Editor::avoidIntersectionWithDeleteButtonController): Deleted.
(WebCore::Editor::deviceScaleFactorChanged): Deleted.
* editing/Editor.h:
(WebCore::Editor::deleteButtonController): Deleted.
(WebCore::Editor::avoidIntersectionWithDeleteButtonController): Deleted.
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::serializeNodes): Removed nodeToSkip parameter.
(WebCore::MarkupAccumulator::serializeNodesWithNamespaces): Ditto.
* editing/MarkupAccumulator.h:
* editing/markup.cpp:
(WebCore::createMarkupInternal): Removed updateRange parameter, which had become identical
to the range parameter, and changed to use the latter everywhere instead.
(WebCore::createMarkup): Don’t compute and pass separate updateRanage parameter.
* loader/EmptyClients.h: Removed shouldShowDeleteInterface override.
* page/EditorClient.h: Removed shouldShowDeleteInterface.
* page/Page.cpp:
(WebCore::Page::setDeviceScaleFactor): Removed call to Editor::deviceScaleFactorChanged.
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame): Updated for MarkupAccumulator::serializeNodes change.
* testing/Internals.cpp:
(WebCore::Internals::findEditingDeleteButton): Deleted.
* testing/Internals.h:
* testing/Internals.idl:
2014-11-04 David Hyatt <hyatt@apple.com>
Descendant ends up in wrong flow thread with nested columns and spans.
https://bugs.webkit.org/show_bug.cgi?id=137273
Reviewed by Simon Fraser.
Unskipped the two problematic span tests.
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::isValidColumnSpanner):
Remove the guard and comment and added the assertion back in.
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
Changed to no longer use handleSpannerRemoval. Because the spanner was removed from the flow thread's map,
handleSpannerRemoval was a no-op. So instead I just removed the placeholder by hand.
The second fix was to stop destroying the placeholder. Since the placeholder can just have been inserted, you
can't delete it, since otherwise code further up the stack will access the deleted object. For now, we just
leak the placeholder.
The third fix is to make sure the subtreeRoot is properly updated to be the new placeholder.
2014-11-05 Andreas Kling <akling@apple.com>
RenderBlock shouldn't need a pre-destructor hook.
<https://webkit.org/b/138430>
Reviewed by Antti Koivisto.
All that was interesting in RenderBlock::willBeDestroyed() has migrated
to RenderBlockFlow. removeFromUpdateScrollInfoAfterLayoutTransaction()
can be called from the plain destructor, so just move it there.
We don't have to worry about destroyLeftoverChildren(), since RenderElement
will take care of that for us.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::~RenderBlock):
(WebCore::RenderBlock::willBeDestroyed): Deleted.
* rendering/RenderBlock.h:
2014-11-05 Chris Dumez <cdumez@apple.com>
Remove 2 unnecessary virtual functions on InputType
https://bugs.webkit.org/show_bug.cgi?id=138433
Reviewed by Andreas Kling.
Remove 2 unused virtual functions on InputType:
- valueAttributeChanged()
- updateClearButtonVisibility()
No new tests, no behavior change.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::updateClearButtonVisibility): Deleted.
* html/HTMLInputElement.h:
* html/InputType.cpp:
(WebCore::InputType::valueAttributeChanged): Deleted.
(WebCore::InputType::updateClearButtonVisibility): Deleted.
* html/InputType.h:
2014-11-05 Chris Dumez <cdumez@apple.com>
Re-evaluate if a repetitive timer should be throttled upon firing
https://bugs.webkit.org/show_bug.cgi?id=138339
Reviewed by Gavin Barraclough.
Re-evaluate if a repetitive timer should be throttled upon firing in
case the plugin observability state has changed:
- It used to be visible but now isn't and thus the timer can be throttled
- It used to play audio but now doesn't and thus the timer can be throttled
We already stopped throttling if the plugin became observable. However,
we didn't start throttling if the plugin became non-observable.
* page/DOMTimer.cpp:
(WebCore::DOMTimer::updateThrottlingStateIfNecessary):
2014-11-03 Dean Jackson <dino@apple.com>
Add ENABLE_FILTERS_LEVEL_2 feature guard.
https://bugs.webkit.org/show_bug.cgi?id=138362
Reviewed by Tim Horton.
Add a new feature define for Level 2 of CSS Filters.
http://dev.w3.org/fxtf/filters-2/
* Configurations/FeatureDefines.xcconfig:
2014-11-05 Chris Dumez <cdumez@apple.com>
Move text-align CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138398
Reviewed by Antti Koivisto.
Move text-align CSS property from DeprecatedStyleBuilder to the new
StyleBuilder so that it is now generated from CSSPropertyNames.in.
This patch adds a TextAlign Converter to support this.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyTextAlign::applyValue): Deleted.
(WebCore::ApplyPropertyTextAlign::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTextAlign):
2014-11-05 Sanghyup Lee <sh53.lee@samsung.com>
Fix build warning in SVGMarkerElement.cpp
https://bugs.webkit.org/show_bug.cgi?id=138407
Reviewed by Darin Adler.
Build warning in debug cause 'comparison of unsigned expression >= 0 is always true [-Wtype-limits]'
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::orientType): Removed useless condition in ASSERT.
2014-11-05 Chris Dumez <cdumez@apple.com>
Stop special-casing the empty string in HTMLInputElement.type setter
https://bugs.webkit.org/show_bug.cgi?id=138403
Reviewed by Ryosuke Niwa.
Stop special-casing the empty string in HTMLInputElement.type setter.
Previously, if input.type is set to "", we would remove the type
attribute. This is inconsistent with the specification and the behavior
of other browsers (tested Firefox 33 and Chrome 38). Instead, we should
set the attribute to the empty string.
Also stop treating null as a null string to align with the
specification and other browsers (tested Firefox 33 and Chrome 38).
Finally, update HTMLInputElement::setType() to take an AtomicString in
argument instead of a String as it ends up calling setAttribute(), and
thus needing an AtomicString.
Test: fast/dom/HTMLInputElement/input-type-attribute.html
* html/FileInputType.cpp:
(WebCore::UploadButtonElement::UploadButtonElement):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setType):
* html/HTMLInputElement.h:
* html/HTMLInputElement.idl:
2014-11-05 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile error, missing guard.
https://bugs.webkit.org/show_bug.cgi?id=138421
Reviewed by Brent Fulgham.
There is missing a guard for CSS_SELECTORS_LEVEL4 in CSSParserValues.cpp.
* css/CSSParserValues.cpp:
2014-11-05 Antti Koivisto <antti@apple.com>
REGRESSION(r175601): Assertion failures in SimpleLineLayout
https://bugs.webkit.org/show_bug.cgi?id=138422
Check for end.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
2014-11-05 Andreas Kling <akling@apple.com>
Simple line layout: support text-transform: lowercase|uppercase|capitalize
<https://webkit.org/b/138406>
Reviewed by Antti Koivisto.
Expand the simple line layout coverage to include all text-transform values.
Since the property works on the text string level, it's really only a matter
of removing the short-circuit.
Test: fast/text/simple-lines-text-transform.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
2014-11-05 Jer Noble <jer.noble@apple.com>
[EME][Mac] Allow the client to specify FPS protocol versions in the keySystem type field.
https://bugs.webkit.org/show_bug.cgi?id=138380
Reviewed by Eric Carlson.
Parse out the requested FPS protocol version of the keySystem type string and pass it to
AVStreamDataParser as an options dictionary.
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
(WebCore::validKeySystemRE): Added, match comma-separated version suffixes.
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Call above.
(WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Parse out the version numbers
and pass into the session as a vector.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC): Take a vector of
protocol version numbers.
(WebCore::CDMSessionMediaSourceAVFObjC::update): Create an NSArray and pass into
the key request creation method in an options dictionary.
2014-11-05 Antti Koivisto <antti@apple.com>
Move HTTPHeaderMap encoding to the class
https://bugs.webkit.org/show_bug.cgi?id=138412
Reviewed by Andreas Kling.
* platform/network/HTTPHeaderMap.h:
(WebCore::HTTPHeaderMap::encode):
(WebCore::HTTPHeaderMap::decode):
Use generic encoding for the uncommon header map. Common headers still require custom code due to the enum class.
2014-11-04 Beth Dakin <bdakin@apple.com>
Un-anchor data detector popovers on scroll
https://bugs.webkit.org/show_bug.cgi?id=138385
-and corresponding-
rdar://problem/18869345
Reviewed by Tim Horton.
* platform/spi/mac/DataDetectorsSPI.h:
2014-11-04 Chris Dumez <cdumez@apple.com>
Avoid double hash table lookup in SpaceSplitStringData::create()
https://bugs.webkit.org/show_bug.cgi?id=138396
Reviewed by Ryosuke Niwa.
Avoid double hash table lookup in SpaceSplitStringData::create() by
calling HashMap::add() and using the AddResult, instead of calling
HashMap::get() then HashMap::add().
No new tests, no behavior change.
* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitStringData::create):
2014-11-04 Zalan Bujtas <zalan@apple.com>
Simple line layout: Abstract out content iteration and text handling in general.
https://bugs.webkit.org/show_bug.cgi?id=138346
Reviewed by Antti Koivisto.
Add a class that can act as the primary iterator/fragment handling interface to the line parser.
This helps adding support multiple renderer elements without changing the parser logic.
Currently it operates strictly on the first child of the RenderBlockFlow.
Covered by existing tests.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::FlowContentIterator::FlowContentIterator):
(WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContentIterator::textWidth):
(WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContentIterator::isEndOfContent):
(WebCore::SimpleLineLayout::FlowContentIterator::style):
(WebCore::SimpleLineLayout::computeLineLeft):
(WebCore::SimpleLineLayout::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::nextFragment):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
(WebCore::SimpleLineLayout::skipWhitespace): Deleted.
(WebCore::SimpleLineLayout::textWidth): Deleted.
* rendering/SimpleLineLayout.h:
2014-11-04 Jeremy Jones <jeremyj@apple.com>
Fix build after r138351
https://bugs.webkit.org/show_bug.cgi?id=138401
Ureviewed. Make return type match.
* platform/ios/WebCoreSystemInterfaceIOS.mm:
2014-11-04 Tim Horton <timothy_horton@apple.com>
Add bundle SPI allowing PageOverlay to customize the action menu
https://bugs.webkit.org/show_bug.cgi?id=138388
<rdar://problem/18875579>
Reviewed by Anders Carlsson.
* page/PageOverlayController.h:
Expose the list of all overlays.
2014-11-03 Jeremy Jones <jeremyj@apple.com>
Add button and enable optimized fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=138351
Reviewed by Eric Carlson.
Added optimizedFullscreenButton to js media element controls. Remove #if conditional
and use optimizedFullscreenSupported to enable feature at runtime
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::enterFullscreenOptimized): enable
(WebCore::MediaControlsHost::optimizedFullscreenSupported): added
* Modules/mediacontrols/MediaControlsHost.h: add optimizedFullscreenSupported
* Modules/mediacontrols/MediaControlsHost.idl: ditto
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-optimized-fullscreen-button): added
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls): add button
(Controller.prototype.handleReadyStateChange): update button
(Controller.prototype.updateOptimizedFullscreenButton): added
* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-optimized-fullscreen-button): added
(video::-webkit-media-controls-optimized-fullscreen-button): added
(video::-webkit-media-controls-optimized-fullscreen-button:active): added
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.createControls): listen for events from optimizedFullscreenButton
(ControllerIOS.prototype.configureInlineControls): add button for non-audio when supported.
(ControllerIOS.prototype.handleBaseGestureChange): 2-finger double-tap gesture for optimized fullscreen
(ControllerIOS.prototype.handleWrapperTouchStart): ditto
(ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): added
(ControllerIOS.prototype.handleOptimizedFullscreenTouchStart): added
(ControllerIOS.prototype.handleOptimizedFullscreenTouchEnd): added
(ControllerIOS.prototype.handleOptimizedFullscreenTouchCancel): added
(ControllerIOS.prototype.handleStartPlaybackButtonTouchStart): fix typo
(ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): fix typo
(ControllerIOS.prototype.handleStartPlaybackButtonTouchCancel): fix typo
* WebCore.exp.in:
* platform/ios/WebCoreSystemInterfaceIOS.h: added wkIsOptimizedFullscreenSupported
* platform/ios/WebCoreSystemInterfaceIOS.mm: added wkIsOptimizedFullscreenSupported
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::enterFullscreen): enable feature
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): enable feature
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): only request exit when entered and not requested exit
(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
2014-11-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Pause on exceptions should show the actual exception
https://bugs.webkit.org/show_bug.cgi?id=63096
Reviewed by Timothy Hatcher.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
Pass assertion message on.
2014-11-04 Reza Abbasian <rabbasian@apple.com>
[iOS] Fix incorrect interface orientation that can be caused by fullscreen video dismissal.
https://bugs.webkit.org/show_bug.cgi?id=137930.
Reviewed by Jer Noble.
When a fullscreen video gets dismissed programmatically, for instance for removing
a webview from the view hierarchy, it can put the device in an incorrect orientation.
Make sure we retain the window of parentView when we attempt to go to fullscreen and use
the retained window for putting the device in correct orientation after dismissal.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
(WebVideoFullscreenInterfaceAVKit::invalidate):
2014-11-04 Andreas Kling <akling@apple.com>
Remove two unused ScrollingCoordinator methods.
<https://webkit.org/b/138377>
Reviewed by Chris Dumez.
These appear to be leftovers from the now-defunct chromium port.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::horizontalScrollbarLayerForScrollableArea): Deleted.
(WebCore::ScrollingCoordinator::verticalScrollbarLayerForScrollableArea): Deleted.
* page/scrolling/ScrollingCoordinator.h:
2014-11-04 Chris Dumez <cdumez@apple.com>
Add ptr() method to Ref class
https://bugs.webkit.org/show_bug.cgi?id=138361
Reviewed by Darin Adler.
Use the new Ref::ptr() method.
No new tests, no behavior change.
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::didUpdateActiveOption):
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::getNamedItems):
* bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
(WebCore::getNamedItems):
* css/CSSStyleRule.h:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::insertRule):
* css/CSSValueList.h:
(WebCore::CSSValueList::item):
(WebCore::CSSValueList::itemWithoutBoundsCheck):
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::collect):
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationAccumulator::~ChildListMutationAccumulator):
(WebCore::ChildListMutationAccumulator::childAdded):
* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::namedItem):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChild):
* dom/CurrentScriptIncrementer.h:
(WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
(WebCore::CurrentScriptIncrementer::~CurrentScriptIncrementer):
* dom/MutationRecord.cpp:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::ensureChildNodeList):
(WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
(WebCore::NodeListsNodeData::addCacheWithQualifiedName):
* dom/Range.cpp:
(WebCore::Range::setDocument):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestScript):
(WebCore::ScriptElement::executeScript):
* dom/StaticNodeList.cpp:
(WebCore::StaticNodeList::item):
(WebCore::StaticElementList::item):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveRemainingSiblingsToNewParent):
* editing/DictationCommand.cpp:
(WebCore::DictationCommand::insertText):
* editing/DictationCommand.h:
* editing/Editor.cpp:
(WebCore::Editor::insertTextWithoutSendingTextEvent):
* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::swapInNodePreservingAttributesAndChildren):
* editing/SimplifyMarkupCommand.cpp:
(WebCore::SimplifyMarkupCommand::doApply):
* editing/markup.cpp:
(WebCore::hasOneChild):
(WebCore::hasOneTextChild):
(WebCore::replaceChildrenWithFragment):
(WebCore::replaceChildrenWithText):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::checkValidity):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getNamedElements):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::shouldLoadLink):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::revalidateStyle):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
* page/FocusController.cpp:
(WebCore::FocusController::setFocusedElement):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForRule):
* page/PageSerializer.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationController::updateAnimations):
* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::platformCALayerPaintContents):
* rendering/ClipPathOperation.h:
* rendering/RenderBlock.cpp:
(WebCore::styleForFirstLetter):
(WebCore::RenderBlock::updateFirstLetterStyle):
(WebCore::RenderBlock::createFirstLetterRenderer):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::updateColumnProgressionFromStyle):
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::setStyle):
(WebCore::RenderElement::styleDidChange):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::adjustInnerTextStyle):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::createInnerTextStyle):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::createInnerTextStyle):
* rendering/style/DataRef.h:
(WebCore::DataRef::get):
(WebCore::DataRef::access):
(WebCore::DataRef::operator==):
(WebCore::DataRef::operator!=):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::changeRequiresPositionedLayoutOnly):
(WebCore::RenderStyle::changeRequiresLayerRepaint):
(WebCore::RenderStyle::changeRequiresRepaint):
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
(WebCore::RenderStyle::changeRequiresRecompositeLayer):
(WebCore::RenderStyle::diff):
(WebCore::RenderStyle::diffRequiresLayerRepaint):
* rendering/style/RenderStyle.h:
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::cssValue):
* rendering/style/StyleGeneratedImage.h:
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
* style/StyleResolveTree.cpp:
(WebCore::Style::determineChange):
(WebCore::Style::resolveLocal):
(WebCore::Style::resolveTree):
* style/StyleResolveTree.h:
2014-11-04 Chris Dumez <cdumez@apple.com>
Move -webkit-text-emphasis-position to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138359
Reviewed by Andreas Kling.
Move -webkit-text-emphasis-position from DeprecatedStyleBilder to the
new StyleBuilder so that it is now generated from CSSPropertyNames.in.
A new TextEmphasisPosition Converter was added to support this.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::valueToEmphasisPosition): Deleted.
(WebCore::ApplyPropertyTextEmphasisPosition::applyValue): Deleted.
(WebCore::ApplyPropertyTextEmphasisPosition::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::valueToEmphasisPosition):
(WebCore::StyleBuilderConverter::convertTextEmphasisPosition):
2014-11-04 Andreas Kling <akling@apple.com>
RenderBox shouldn't need a pre-destructor hook.
<https://webkit.org/b/138367>
Reviewed by Antti Koivisto.
Move teardown logic from willBeDestroyed() to the regular ~RenderBox()
destructor since none of it depends on being in-tree or having a fully
constructed vtable.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::~RenderBox):
(WebCore::RenderBox::willBeDestroyed): Deleted.
* rendering/RenderBox.h:
2014-11-04 Myles C. Maxfield <mmaxfield@apple.com>
[OSX] CJK characters styled with font-family: cursive are italicized
https://bugs.webkit.org/show_bug.cgi?id=138328
rdar://problem/18801907
Reviewed by Simon Fraser.
FontCache::createFontPlatformData doesn’t set the oblique flag if
the requested font isn’t oblique, but
FontCache::systemFallbackForCharacters() does. This patch simply
adopts this behavior in both places.
Test: fast/text/font-cursive-italic-cjk.html
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters):
2014-11-04 Benjamin Poulain <bpoulain@apple.com>
When computing the specificity of selectors, use saturated arithmetic per component
https://bugs.webkit.org/show_bug.cgi?id=138336
Reviewed by Andreas Kling.
The code handling overflow in CSSSelector::specificity() was assuming that the value
returned by specificityForOneSelector() can only overflow one field at a time.
That assumption is no longer correct with the extended :not(). It is now possible to have
a complex selector saturating multiple fields inside a single :not().
This patch solves the problem by considering each field independently.
Test: fast/selectors/specificity-overflow-2.html
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificity):
2014-11-04 Zalan Bujtas <zalan@apple.com>
Windows build fix after r175565.
MSVC requires default c'tor even if it's never called. -0 length array.
* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Run::Run):
2014-11-04 Zalan Bujtas <zalan@apple.com>
Simple line layout: Cleanup line initialization and line closing.
https://bugs.webkit.org/show_bug.cgi?id=138273
Reviewed by Antti Koivisto.
This is in preparation to support multiple render elements.
Move line start and line end activities to dedicated functions.
Covered by existing tests.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::LineState::LineState): Add lineStartRunIndex to be more explicit
about whether a line advanced with new runs. Rename a few members. Introduce LineState::oveflowedFragment
so that line closing can handled separately.
(WebCore::SimpleLineLayout::LineState::commitAndCreateRun):
(WebCore::SimpleLineLayout::LineState::addUncommitted):
(WebCore::SimpleLineLayout::LineState::jumpTo):
(WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): Deleted. : Remove redundant function.
(WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace):
(WebCore::SimpleLineLayout::LineState::resetTrailingWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Add resetTrailingWhitespace()
so that all trailing whitespace handling is in one function.
(WebCore::SimpleLineLayout::initializeNewLine): Separate line start and line end initialization/reset.
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): This function manages all line ending activities.
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
(WebCore::SimpleLineLayout::initializeLine): Deleted.
* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Run::Run): Deleted.
2014-11-04 Tim Horton <timothy_horton@apple.com>
Implement yellow highlight over data detected items
https://bugs.webkit.org/show_bug.cgi?id=138340
<rdar://problem/18840102>
Reviewed by Anders Carlsson.
* platform/spi/mac/DataDetectorsSPI.h:
Add completionHandler SPI.
2014-11-04 Darin Adler <darin@apple.com>
Eliminate ResourceBuffer and use SharedBuffer directly instead
https://bugs.webkit.org/show_bug.cgi?id=138174
Reviewed by Antti Koivisto.
Refactoring, with test coverage across many existing tests.
* CMakeLists.txt: Deleted ResourceBuffer.cpp.
* WebCore.exp.in: Removed ResourceBuffer-related symbols, and updated symbol
for one function that used to take a PassRefPtr but now takes a reference instead.
* WebCore.vcxproj/WebCore.vcxproj: Deleted ResourceBuffer.cpp/.h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Deleted ResourceBuffer.mm/.cpp/.h.
* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMHTMLImageElement dataRepresentation:]): Use SharedBuffer directly.
* editing/ios/EditorIOS.mm:
(WebCore::Editor::writeImageToPasteboard): Ditto.
* editing/mac/EditorMac.mm:
(WebCore::Editor::writeImageToPasteboard): Ditto.
* html/ImageDocument.cpp:
(WebCore::ImageDocument::updateDuringParsing): Use SharedBuffer directly, and
also pass a reference only if non-null rather than passing a pointer.
(WebCore::ImageDocument::finishedParsing): Ditto. Added a missing null check.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent): Use SharedBuffer directly.
(WebCore::InspectorPageAgent::mainResourceContent): Ditto.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didFinishLoading): Ditto.
(WebCore::InspectorResourceAgent::didFailLoading): Ditto.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::mainResourceData): Use SharedBuffer directly,
and use the copy function rather than a hand-written alternative.
(WebCore::DocumentLoader::maybeCreateArchive): Ditto.
(WebCore::DocumentLoader::mainResource): Ditto.
(WebCore::DocumentLoader::subresource): Ditto.
(WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): Ditto.
* loader/DocumentLoader.h: Changed mainResourceData to return a
PassRefPtr<SharedBuffer>. Would be better if it returned a SharedBuffer&,
but it currently returns a newly created buffer when there is substitute
data and can also return null, even though many callers assume it will not!
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::dataReceived): Removed call to unused client
function bufferReceived.
(WebCore::MediaResourceLoader::notifyFinished): Removed unused buffer
argument to client function loadFinished.
* loader/ResourceBuffer.cpp: Removed.
* loader/ResourceBuffer.h: Removed.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::addDataOrBuffer): Use SharedBuffer directly.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::resourceData): Use SharedBuffer.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse): Use SharedBuffer.
(WebCore::SubresourceLoader::didReceiveDataOrBuffer): Ditto.
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::processNewCueData): Use SharedBuffer.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Ditto.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Ditto.
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::finishLoading): Use SharedBuffer.
* loader/cache/CachedCSSStyleSheet.h: Ditto.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::finishLoading): Ditto.
(WebCore::CachedFont::ensureCustomFontData): Ditto.
* loader/cache/CachedFont.h: Ditto.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didAddClient): Use SharedBuffer.
(WebCore::CachedImage::didRemoveClient): Ditto.
(WebCore::CachedImage::addIncrementalDataBuffer): Ditto. Changed to take
a reference rather than a pointer.
(WebCore::CachedImage::addDataBuffer): Ditto. Also added call through
to base class and changed to take a reference rather than a pointer.
(WebCore::CachedImage::addData): Ditto. Also added call through to base class.
(WebCore::CachedImage::finishLoading): Ditto.
* loader/cache/CachedImage.h: Ditto. Also changed the type of some bit fields
to be unsigned instead of unsigend char.
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::calculateIncrementalDataChunk): Use SharedBuffer.
(WebCore::CachedRawResource::addDataBuffer): Ditto. Changed to take
a reference rather than a pointer.
(WebCore::CachedRawResource::addData): Ditto.
(WebCore::CachedRawResource::finishLoading): Ditto.
(WebCore::CachedRawResource::canReuse): Ditto.
* loader/cache/CachedRawResource.h: Ditto.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource): Reordered data members due to change
in header.
(WebCore::CachedResource::addDataBuffer): Changed argument type.
(WebCore::CachedResource::finishLoading): Ditto.
(WebCore::CachedResource::didAddClient): Refactored to eliminate one extra hash
table lookup by using the return value from the remove function.
(WebCore::CachedResource::addClientToSet): Use std::make_unique directly instead
of using a function named "schedule" to allocate the callback object.
(WebCore::CachedResource::Callback::Callback): Changed function and data member
name.
(WebCore::CachedResource::Callback::cancel): Ditto.
(WebCore::CachedResource::Callback::timerFired): Ditto.
(WebCore::CachedResource::tryReplaceEncodedData): Changed to take a SharedBuffer&.
* loader/cache/CachedResource.h: Changed types to use SharedBuffer. Also made most
data members and one function member private instead of protected. Also renamed the
CachedResource::CachedResourceCallback function CachedResource::Callback and moved
its definition out of the CachedResource class definition.
* loader/cache/CachedResourceClient.h: Removed unneeded include.
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::finishLoading): Use SharedBuffer.
* loader/cache/CachedSVGDocument.h: Ditto. Made data members private.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::finishLoading): Use SharedBuffer.
* loader/cache/CachedScript.h: Ditto. Also fixed indenting and removed unneeded
forward declaration.
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::updateData): Added, so that finishLoading does not
call addDataBuffer.
(WebCore::CachedTextTrack::addDataBuffer): Take SharedBuffer, call updateData.
(WebCore::CachedTextTrack::finishLoading): Ditto.
* loader/cache/CachedTextTrack.h: Take out unneeded explicit override of the
destructor. Updated for above changes.
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::finishLoading): Updated to use SharedBuffer.
* loader/cache/CachedXSLStyleSheet.h: Took out unneeded includes, made everything
private rather than protected. Added an explicit virtual constructor so we can
compile without knowing how to ref/deref TextResourceDecoder.
* loader/cf/SubresourceLoaderCF.cpp:
(WebCore::SubresourceLoader::didReceiveDataArray): Updated to use SharedBuffer
and to call addDataBuffer only if there is a new data buffer.
* loader/cocoa/DiskCacheMonitorCocoa.h: Use SharedBuffer& instead of PassRefPtr.
* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::DiskCacheMonitor): Ditto.
(WebCore::DiskCacheMonitor::resourceBecameFileBacked): Ditto.
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::notifyFinished): Use SharedBuffer* instead of
RefPtr<ResourceBuffer>.
* loader/mac/ResourceBuffer.mm: Removed.
* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::didReceiveDataArray): Use SharedBuffer.
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::clear): Use a modern for loop.
(WebCore::SharedBuffer::copy): Return a PassRef instead of a PassRefPtr, since
this never returns null. Use modern for loops.
(WebCore::SharedBuffer::copyBufferAndClear): Use a modern for loop.
* platform/SharedBuffer.h: Changed copy to return PassRef instead of PassRefPtr.
Changed tryReplaceContentsWithPlatformBuffer to take a reference rather than
a pointer.
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Take a reference
instead of a pointer.
* platform/graphics/PlatformMediaResourceLoader.h: Removed unused function
bufferReceived and unneeded buffer argument from loadFinished. Also marked the
constructor explicit.
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
Removed include of ResourceBuffer.h.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): Use
SharedBuffer directly.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(CachedResourceStreamingClient::loadFinished): Updated for change to
PlatformMediaResourceLoaderClient.
* platform/mac/PasteboardMac.mm: Removed include of ResourceBuffer.h.
* platform/soup/SharedBufferSoup.cpp: Removed unused, unneeded
tryReplaceContentsWithPlatformBuffer function.
2014-11-04 Chris Dumez <cdumez@apple.com>
Use SPECIALIZE_TYPE_TRAITS_*() macro for StyleRuleGroup subclasses
https://bugs.webkit.org/show_bug.cgi?id=138345
Reviewed by Andreas Kling.
Use SPECIALIZE_TYPE_TRAITS_*() macro for StyleRuleGroup subclasses
instead of old-fashion toXXX() functions.
No new tests, no behavior change.
* css/CSSMediaRule.cpp:
(WebCore::CSSMediaRule::mediaQueries):
* css/CSSSupportsRule.cpp:
(WebCore::CSSSupportsRule::conditionText):
* css/StyleRule.h:
(isType):
(WebCore::toStyleRuleMedia): Deleted.
(WebCore::toStyleRuleSupports): Deleted.
(WebCore::toStyleRuleRegion): Deleted.
* css/WebKitCSSRegionRule.cpp:
(WebCore::WebKitCSSRegionRule::cssText):
2014-11-04 Andreas Kling <akling@apple.com>
RenderQuote shouldn't need a pre-destructor hook.
<https://webkit.org/b/138352>
Reviewed by Antti Koivisto.
The willBeDestroyed() hook in RenderQuote came from the time when it was
potential unsafe to access the RenderView from a renderer destructor.
Move the code to the plain ol' destructor instead.
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::~RenderQuote):
(WebCore::RenderQuote::willBeDestroyed): Deleted.
* rendering/RenderQuote.h:
2014-11-04 Csaba Osztrogonác <ossy@webkit.org>
Fix the !ENABLE(VIDEO) build after r175380
https://bugs.webkit.org/show_bug.cgi?id=138322
Reviewed by Benjamin Poulain.
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::dispatchLoadEvent):
2014-11-03 Philippe Normand <pnormand@igalia.com>
[LEAK] [GStreamer] Removing video element will not free assigned memory
https://bugs.webkit.org/show_bug.cgi?id=46560
Reviewed by Eric Carlson.
Moved the ::extraMemoryCost() implementation to the
MediaPlayerPivateInterface base class. This default implementation
is now shared between the various MediaPlayerPrivate backends,
excepted the AVF MediaSource player which still reports no extra
memory cost.
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::totalBytes): Make
totalBytes() part of the MediaPlayerPrivate interface.
(WebCore::MediaPlayerPrivateInterface::extraMemoryCost): Default
implementation.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Deleted.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2014-11-04 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
Fix animation of orient attribute on marker element
https://bugs.webkit.org/show_bug.cgi?id=137942
Reviewed by Dirk Schulze.
Fixed implementation of SVG animated angles and the SVG
marker element orient attribute.
SVG animated angle was missing the logic to support animation
from auto to a numeric angle value - this is now added.
The SVG marker element getter for orientType was not returning
the animated value for orientType so in some cases (i.e. when
the initial value and the animated values were of different types)
the animation was not being rendered - although it was running.
Tests: svg/animations/animate-marker-orienttype-1.html
svg/animations/animate-marker-orienttype-2.html
svg/animations/animate-marker-orienttype-3.html
* svg/SVGAnimatedAngle.cpp:
(WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
Added logic to support auto to angle animation.
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::orientType):
This method now returns the animated value if an animation is
running.
* svg/SVGMarkerElement.h:
2014-11-03 Chris Dumez <cdumez@apple.com>
Allow implicit conversion from Ref<T> to T&
https://bugs.webkit.org/show_bug.cgi?id=138331
Reviewed by Andreas Kling.
Remove unnecessary calls to Ref<T>::get() now that a Ref<T> can be
converted implicitly to a T&.
No new tests, no behavior change.
2014-11-03 Simon Fraser <simon.fraser@apple.com>
Non-fast scrollable region overlay offsets the overlay by topContentInset
https://bugs.webkit.org/show_bug.cgi?id=138344
Reviewed Tim Horton.
Offset the region by topContentInset, and make it not green.
* page/DebugPageOverlays.cpp:
(WebCore::NonFastScrollableRegionOverlay::updateRegion):
2014-11-03 Andreas Kling <akling@apple.com>
Clarify RenderListMarker ownership model.
<https://webkit.org/b/138329>
Reviewed by Antti Koivisto.
A RenderListMarker is either in-tree and owned by the tree, or out-of-tree
and owned by a RenderListItem.
This patch changes RenderListItem::m_marker to be a raw pointer, and removes
the special handling of list markers in RenderElement child teardown.
We also remove the willBeDestroyed() hook. It was used to clear out the
m_marker pointer, but this is now done in the regular ~RenderListItem()
destructor with an assertion for marker sanity. m_marker is automatically
nulled out by a didDestroyListMarker() callback on RenderListItem.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::destroyLeftoverChildren):
Removed special handling of list marker renderers when deleting a
RenderElement's children.
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::RenderListItem):
(WebCore::RenderListItem::~RenderListItem):
(WebCore::RenderListItem::styleDidChange):
(WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
(WebCore::RenderListItem::positionListMarker):
Made m_marker a raw pointer instead of a RenderPtr since the ownership
really switches between weak and strong reference.
(WebCore::RenderListItem::willBeDestroyed):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::~RenderListMarker):
Added a regular destructor to replace the willBeDestroyed() hook.
* rendering/RenderListItem.h:
(WebCore::RenderListItem::didDestroyListMarker):
Added. Called by ~RenderListMarker to null out RenderListItem::m_marker.
2014-11-03 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move WebCore/bridge to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=138280
Reviewed by Anders Carlsson.
Clean up OwnPtr in WebCore/bridge.
No new tests, no behavior changes.
* bridge/c/c_class.cpp:
(JSC::Bindings::CClass::methodNamed):
(JSC::Bindings::CClass::fieldNamed):
* bridge/c/c_class.h: Use std::unique_ptr instead of OwnPtr.
* bridge/objc/objc_class.h: ditto.
* bridge/objc/objc_class.mm:
(JSC::Bindings::ObjcClass::methodNamed):
(JSC::Bindings::ObjcClass::fieldNamed):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::callObjCFallbackObject):
* bridge/runtime_method.h:
2014-11-03 Dan Bernstein <mitz@apple.com>
Client certificate credentials with session persistence don’t work
https://bugs.webkit.org/show_bug.cgi?id=138330
Reviewed by Alexey Proskuryakov.
I think this is not testable with our test HTTP server.
* platform/network/CredentialStorage.cpp:
(WebCore::CredentialStorage::set): Don’t require a valid URL for client certificate
credentials, since they don’t apply to a specific path. Don’t save such credentials to
CFNetwork’s persistent storage (we only do that as a workaround for sharing credentials
with the media framework, and we don’t want to expand the scope of the workaround).
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::receivedCredential): Changed to use the Credential consturctor
that takes a Credential and a new persistence, so that this code works not only with
user+password credentials.
2014-11-03 Simon Fraser <simon.fraser@apple.com>
Add page overlays that show regions with mouseWheel event handlers, and the non-fast-scrollable region, and code to toggle them in MiniBrowser WK2
https://bugs.webkit.org/show_bug.cgi?id=138257
Reviewed by Tim Horton.
Add code for debugging page overlays that show the non-fast scrollable region,
and the region with wheel event handlers. The list of region types is intended
to be easily extensible.
A singleton DebugPageOverlays maintains a map of Frame -> vector of overlays.
A purely inline code path is provided so that DebugPageOverlays::didLayout() is
fast.
For each region type, a PageOverlay::Client subclass knows how to generate
the region, which is painted into a document-level page overlay.
Add a set of bitflags to Settings to control region visibility.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/DebugPageOverlays.cpp: Added.
(WebCore::RegionOverlay::overlay):
(WebCore::MouseWheelRegionOverlay::updateRegion):
(WebCore::NonFastScrollableRegionOverlay::updateRegion):
(WebCore::RegionOverlay::create):
(WebCore::RegionOverlay::RegionOverlay):
(WebCore::RegionOverlay::~RegionOverlay):
(WebCore::RegionOverlay::pageOverlayDestroyed):
(WebCore::RegionOverlay::willMoveToPage):
(WebCore::RegionOverlay::didMoveToPage):
(WebCore::RegionOverlay::drawRect):
(WebCore::RegionOverlay::mouseEvent):
(WebCore::RegionOverlay::didScrollFrame):
(WebCore::RegionOverlay::recomputeRegion):
(WebCore::DebugPageOverlays::shared):
(WebCore::indexOf):
(WebCore::DebugPageOverlays::ensureRegionOverlayForFrame):
(WebCore::DebugPageOverlays::showRegionOverlay):
(WebCore::DebugPageOverlays::hideRegionOverlay):
(WebCore::DebugPageOverlays::regionChanged):
(WebCore::DebugPageOverlays::regionOverlayForFrame):
(WebCore::DebugPageOverlays::updateOverlayRegionVisibility):
(WebCore::DebugPageOverlays::settingsChanged):
* page/DebugPageOverlays.h: Added.
(WebCore::DebugPageOverlays::hasOverlaysForFrame):
(WebCore::DebugPageOverlays::hasOverlays):
(WebCore::DebugPageOverlays::didLayout):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* page/Settings.h:
* page/Settings.in:
2014-11-03 Simon Fraser <simon.fraser@apple.com>
Video controls have lots of compositing layers
https://bugs.webkit.org/show_bug.cgi?id=138294
Reviewed by Eric Carlson.
After r175268 we get lots of separate small layers in the video
controls (but they pop into a single layer when opacity animates).
Fix this by putting an explicit z-index on -webkit-media-controls-panel
which is the element that animates opacity.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel):
2014-11-03 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r175406, r175413, and r175423.
https://bugs.webkit.org/show_bug.cgi?id=138327
Multipart tests are still broken (Requested by ap on #webkit).
Reverted changesets:
"Eliminate ResourceBuffer and use SharedBuffer directly
instead"
https://bugs.webkit.org/show_bug.cgi?id=138174
http://trac.webkit.org/changeset/175406
"Unreviewed, iOS build fix since 175406."
http://trac.webkit.org/changeset/175413
"Fix assertion in CachedResource::addDataBuffer"
http://trac.webkit.org/changeset/175423
2014-11-03 Chris Dumez <cdumez@apple.com>
Unreviewed, fix bad assertion in r175487.
I mistakenly used it != values.end() instead of it == values.end()
so the debug bots are crashing.
* css/StyleResolver.cpp:
(WebCore::createGridPosition):
2014-11-03 Csaba Osztrogonác <ossy@webkit.org>
Fix the !ENABLE(VIDEO) build after r175279
https://bugs.webkit.org/show_bug.cgi?id=138320
Reviewed by Jer Noble.
* page/ChromeClient.h:
2014-11-03 Chris Dumez <cdumez@apple.com>
Support modern range loops over CSSValueList
https://bugs.webkit.org/show_bug.cgi?id=138285
Reviewed by Andreas Kling.
Add support for modern range loops over CSSValueList objects.
Port the code base to using range loops for CSSValueList objects and
drop the CSSValueListInspector / CSSValueListIterator classes as they
are no longer needed.
No new tests, no behavior change.
2014-11-03 Andreas Kling <akling@apple.com>
RenderCounter shouldn't need a pre-destructor hook.
<https://webkit.org/b/138316>
Reviewed by Antti Koivisto.
RenderCounter will automatically register/unregister itself with
the RenderView when constructed/destroyed.
It was using a willBeDestroyed() hook because it used to be that you
couldn't get to the RenderView in the destructor. That's no longer
an issue as Document promises that RenderView is the last render tree
node to go away.
* rendering/RenderCounter.cpp:
(WebCore::RenderCounter::~RenderCounter):
(WebCore::RenderCounter::willBeDestroyed): Deleted.
* rendering/RenderCounter.h:
2014-11-03 Tim Horton <timothy_horton@apple.com>
Use FrameSnapshotting functions in FindController::getFindIndicatorBitmap
https://bugs.webkit.org/show_bug.cgi?id=138300
<rdar://problem/18855863>
Reviewed by Simon Fraser.
* WebCore.exp.in:
* page/FrameSnapshotting.cpp:
(WebCore::snapshotSelection):
Move knowledge that selectionBounds can be empty down to WebCore.
2014-11-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Show Selector's Specificity
https://bugs.webkit.org/show_bug.cgi?id=138189
Reviewed by Timothy Hatcher.
Test: inspector/css/selector-specificity.html
* css/CSSSelector.h:
Remove very stale comment. '*' is a starAtom now instead of a special -1 tag.
Made the specificity masks public class constants.
* inspector/InspectorStyleSheet.h:
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::buildArrayForComputedStyle):
(WebCore::InspectorStyle::styleWithProperties):
(WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
Drive by use release() in some cases to reduce ref count churn.
(WebCore::buildObjectForSelectorHelper):
(WebCore::selectorsFromSource):
(WebCore::InspectorStyleSheet::buildObjectForSelector):
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
Build CSSSelector objects for SelectorLists.
2014-11-03 Chris Dumez <cdumez@apple.com>
Move -webkit-shape-outside to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138296
Reviewed by Zoltan Horvath.
Move -webkit-shape-outside to the new StyleBuilder, using custom
code as it does not always call setShapeOutside().
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyShape::setValue): Deleted.
(WebCore::ApplyPropertyShape::applyValue): Deleted.
(WebCore::ApplyPropertyShape::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueWebkitShapeOutside):
2014-11-03 Alexey Proskuryakov <ap@apple.com>
REGRESSION: Using a media element changes window.name
https://bugs.webkit.org/show_bug.cgi?id=138278
rdar://problem/18704134
Apply the same fix to mediaControlsBase.js. I do not know who uses this file, but
there is no reason to have the bug there.
* Modules/mediacontrols/mediaControlsBase.js:
(Controller.prototype.addVideoListeners):
(Controller.prototype.removeVideoListeners):
(Controller.prototype.disconnectControls):
2014-11-03 Andreas Kling <akling@apple.com>
RenderLayerModelObject shouldn't need a pre-destructor hook.
<https://webkit.org/b/138314>
Reviewed by Antti Koivisto.
Move code from the willBeDestroyed() pre-destructor hook to the regular
~RenderLayerModelObject() destructor.
We just need to unregister the renderer from the FrameView's set of
viewport-constrained objects. That doesn't require being able to walk
the render tree or call virtuals, which is the main reason you'd use
willBeDestroyed().
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::~RenderLayerModelObject):
(WebCore::RenderLayerModelObject::willBeDestroyed): Deleted.
* rendering/RenderLayerModelObject.h:
2014-11-03 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
[EFL] Fix the build if LOG_DISABLED=0 in release mode
https://bugs.webkit.org/show_bug.cgi?id=138309
Reviewed by Chris Dumez.
* platform/efl/LoggingEfl.cpp:
2014-11-03 Chris Dumez <cdumez@apple.com>
Move 'zoom' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138297
Reviewed by Antti Koivisto.
Move 'zoom' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder by using custom code as it requires special handling.
No new tests, no behavior change.
* css/makeprop.pl:
Add support for Custom=All StyleBuilder option to indicate
that the property requires custom code to set the initial,
inherit and current values.
2014-11-03 Sungmann Cho <sungmann.cho@navercorp.com>
AX: Fix some minor typos related to the word "accessibility".
https://bugs.webkit.org/show_bug.cgi?id=138299
Reviewed by Chris Fleizach.
No new tests, no behavior change.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::shouldUseAccessibilityObjectInnerText):
(WebCore::AccessibilityNodeObject::textUnderElement):
(WebCore::shouldUseAccessiblityObjectInnerText): Deleted.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getRunAttributesFromAccessibilityObject):
(webkitAccessibleTextGetRunAttributes):
(getRunAttributesFromAccesibilityObject): Deleted.
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore):
2014-11-02 Chris Dumez <cdumez@apple.com>
Move string-typed properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138295
Reviewed by Antti Koivisto.
Move string-typed properties to the new StyleBuilder:
-webkit-hyphenate-character
-webkit-line-grid
-webkit-flow-into
-webkit-flow-from
No new tests, no behavior change.
2014-11-02 Chris Dumez <cdumez@apple.com>
Unreviewed, rebaseline bindings tests after r175462.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::constructJSTestObj):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
(WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionClassMethod2):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
(WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
(WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
(WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
(WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
(WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
(WebCore::jsTestObjPrototypeFunctionAny):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1):
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
(WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
(WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
2014-11-02 Chris Dumez <cdumez@apple.com>
Reduce the cost of argumentCount checks in the JS bindings
https://bugs.webkit.org/show_bug.cgi?id=138289
Reviewed by Sam Weinig.
Slightly reduce the cost of argumentCount checks in the JS bindings by
hinting to the compiler that it is UNLIKELY that those methods are
called with too few arguments.
I see a 3% progression on PerformanceTests/DOM/DOMDivWalk.html
performance test.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateArgumentsCountCheck):
2014-11-01 Alexey Proskuryakov <ap@apple.com>
REGRESSION: Using a media element changes window.name
https://bugs.webkit.org/show_bug.cgi?id=138278
rdar://problem/18704134
Reviewed by Jer Noble.
Test: fast/media/window-name.html
Use an actual variable for name (and while at it, for "item" as well).
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.addVideoListeners):
(Controller.prototype.removeVideoListeners):
(Controller.prototype.disconnectControls):
2014-11-01 Chris Dumez <cdumez@apple.com>
Move "direction" CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138288
Reviewed by Sam Weinig.
Move "direction" CSS property to the new StyleBuilder by using custom
code as it requires special handling to call
Document::setDirectionSetOnDocumentElement() when necessary.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyDirection::applyValue): Deleted.
(WebCore::ApplyPropertyDirection::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueDirection):
2014-11-01 Sam Weinig <sam@webkit.org>
Move the -webkit-transform property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138283
Reviewed by Chris Dumez.
Move the -webkit-transform property from StyleResolver to the new
generated StyleBuilder. Adds a converter for TransformOperations.
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTransform):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* css/TransformFunctions.cpp:
(WebCore::transformsForValue):
* css/TransformFunctions.h:
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
2014-11-01 Benjamin Poulain <bpoulain@apple.com>
Fix the specificity of the extended :not() selector
https://bugs.webkit.org/show_bug.cgi?id=138275
Reviewed by Andreas Kling.
The current draft says "The specificity of a :not() pseudo-class
is the specificity of the most specifc complex selector in its selector list."
It is still unclear how :not() plays with other new selectors. Until that is clarified,
this only handle the simple cases.
Tests: fast/css/not-self-specificity.html
fast/css/not-specificity-1.html
fast/css/not-specificity-2.html
fast/css/not-specificity-3.html
fast/css/not-specificity-4.html
fast/css/not-specificity-5.html
fast/css/not-specificity-6.html
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificityForOneSelector):
2014-10-31 Benjamin Poulain <bpoulain@apple.com>
Fix the Debug builds after r175446
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
2014-10-31 Dhi Aurrahman <diorahman@rockybars.com>
Add initial parsing functionality of :lang pseudo class in Selectors Level 4.
https://bugs.webkit.org/show_bug.cgi?id=138170
Reviewed by Benjamin Poulain.
Add initial parsing functionality of :lang pseudo class in Selectors Level 4,
as specified in [1].
It parses comma-separated list of string arguments. Currently, it throws error
on arguments with "*" (e.g. :lang(zh, *-hant)).
Add additional test file fast/selectors/lang-invalid.html along side the
fast/css/css-selector-text.html.
[1] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo
Test: fast/selectors/lang-invalid.html
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::setArgumentList):
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
(WebCore::appendArgumentList):
(WebCore::CSSSelector::selectorText):
(WebCore::CSSSelector::setArgumentList):
* css/CSSSelector.h:
(WebCore::CSSSelector::argumentList):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
2014-10-31 Chris Dumez <cdumez@apple.com>
StyleBuilder: Stop using custom code for -webkit-hyphenate-limit-lines
https://bugs.webkit.org/show_bug.cgi?id=138270
Reviewed by Antti Koivisto.
Stop using custom code for -webkit-hyphenate-limit-lines in the new
StyleBuilder. We don't really need to, we can just have a Converter
specific to this property.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertWebkitHyphenateLimitLines):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines): Deleted.
2014-10-31 Chris Dumez <cdumez@apple.com>
Support throttling of DOMTimers using nested setTimeout() calls
https://bugs.webkit.org/show_bug.cgi?id=138262
Reviewed by Gavin Barraclough.
Extend DOMTimers throttling support to timers that are using nested
setTimeout() calls instead of a setInterval(). To achieve this, this
patch introduces a NestedTimersVector singleton class where nested
timers are appended, and for which we potentially update the next
firing time, after the parent timer is done executing.
I have verified this helps on cnn.com for example, which has timers
interacting with non-visible plugins that are scheduled using nested
setTimeout() calls with a frequency of 150 / 200 ms.
* page/DOMTimer.cpp:
(WebCore::NestedTimersVector::NestedTimersVector):
(WebCore::NestedTimersVector::~NestedTimersVector):
(WebCore::NestedTimersVector::registerTimer):
(WebCore::NestedTimersVector::begin):
(WebCore::NestedTimersVector::end):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::updateThrottlingStateIfNecessary):
(WebCore::DOMTimer::fired):
* page/DOMTimer.h:
2014-10-31 Chris Dumez <cdumez@apple.com>
Move -webkit-marquee-increment property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138208
Reviewed by Andreas Kling.
Move -webkit-marquee-increment property from DeprecatedStyleBuilder to
the new StyleBuilder so that it is generated from CSSPropertyNames.in.
Custom code is used to set the value due to the !length.isUndefined()
check before calling setMarqueeIncrement().
Test: fast/css/webkit-marquee-increment-bad-value.html
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyLength::setValue): Deleted.
(WebCore::ApplyPropertyLength::applyValue): Deleted.
(WebCore::ApplyPropertyLength::createHandler): Deleted.
(WebCore::ApplyPropertyMarqueeIncrement::applyValue): Deleted.
(WebCore::ApplyPropertyMarqueeIncrement::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueWebkitMarqueeIncrement):
2014-10-31 Simon Fraser <simon.fraser@apple.com>
Brace cleanup in StyleResolver::adjustRenderStyle()
https://bugs.webkit.org/show_bug.cgi?id=138267
Reviewed by Chris Dumez.
No braces for single-line clauses.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
2014-10-31 Chris Dumez <cdumez@apple.com>
Fix several warnings reported by clang static analyzer in WebCore
https://bugs.webkit.org/show_bug.cgi?id=138258
Reviewed by Joseph Pecoraro.
Fix several warnings reported by clang static analyzer in WebCore
related to variable unnecessary assignments and scope.
No new tests, no behavior change.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getUpperLeftCorner):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* inspector/InspectorStyleTextEditor.cpp:
(WebCore::InspectorStyleTextEditor::replaceProperty):
* page/ContextMenuController.cpp:
(WebCore::openNewWindow):
* page/DragController.cpp:
(WebCore::createMouseEvent):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):
2014-10-31 Simon Fraser <simon.fraser@apple.com>
Whitespace cleanup in Screen.h
https://bugs.webkit.org/show_bug.cgi?id=138265
Reviewed by Chris Dumez.
No indent for namespaces. Mark 'final'. Fix * placement.
* page/Screen.h:
(WebCore::Screen::create):
2014-10-31 Simon Fraser <simon.fraser@apple.com>
Change the ScrollingThread code to use RunLoop::main().dispatch() rather than callOnMainThread(), which has Obj-C overhead
https://bugs.webkit.org/show_bug.cgi?id=138263
Reviewed by Geoffrey Garen.
callOnMainThread() uses -performSelector:onMainThread:withObject:waitUntilDone:, so
it's slightly more efficient to use RunLoop::main().dispatch().
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::invalidate):
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
(WebCore::ThreadedScrollingTree::handleWheelEventPhase):
2014-10-31 Benjamin Poulain <bpoulain@apple.com>
Pseudo classes with an escaped parenthesis generate invalid rules
https://bugs.webkit.org/show_bug.cgi?id=138266
Reviewed by Antti Koivisto.
Since the functional pseudo classes are part of the list of PseudoClassAndCompatibilityElement,
they could be created by the rule
pseudo:
':' IDENT
if the parenthesis is escaped. For example, with ":not\\(", the IDENT would be
"not(", CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector would
find a pseudo class type of PseudoClassNot, and the action would create an invalid
CSSSelector for a :not() without nested selector.
This patch fixes the issue by detecting the function case in
CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector().
An other solution would be to split PseudoClassAndCompatibilityElement into simple pseudo class
and functional pseudo classes. We may do that some day but at the moment it is a lot of work with
a little benefit.
Tests: fast/css/crash-on-incomplete-webkit-any.html
fast/css/pseudo-escaped-parenthesis.html
fast/selectors/invalid-functional-pseudo-class.html
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
2014-10-31 Chris Dumez <cdumez@apple.com>
Make CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement() faster
https://bugs.webkit.org/show_bug.cgi?id=138227
Reviewed by Benjamin Poulain.
Restructure CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement()
a bit to do less if checks. The previous implementation was doing 7 if
checks no matter the input value. The new implementation does less
if checks depending on the input type.
Also, the isImageControlsRootElement() was showing in the profiles so
I updated the condition to only do this virtual function call if the
input is an HTMLDivElement (which we can check more efficiently).
With the change, I see that we're spending about ~26% less time in
this method when running speedometer. However, the impact on the
overall score is within noise.
No new tests, no behavior change.
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2014-10-31 Antti Koivisto <antti@apple.com>
Fix assertion in CachedResource::addDataBuffer
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::addDataBuffer):
Don't call to base class if buffering mode changed (happens with some special top level document types).
2014-10-31 Said Abou-Hallawa <sabouhallawa@apple.com>
Remove webkit prefix from CSS columns.
https://bugs.webkit.org/show_bug.cgi?id=137132.
Reviewed by Dean Jackson.
CSS columns properties are ready for un-prefixing. There are still a couple
that we haven't implemented, such as the ones starting with "break-", so we're
just going to do the ones starting with "column-". The list of column un-
prefixed properties in this change set is:
- column-count
- column-fill
- column-gap
- column-progression
- column-rule
- column-rule-color
- column-rule-style
- column-rule-width
- column-span
- column-width
- columns
Tests: fast/multicol/column-box-alignment-rtl.html
fast/multicol/multicol-aliases.html
imported/w3c/css/multicol/multicol-basic-001.html
imported/w3c/css/multicol/multicol-basic-002.html
imported/w3c/css/multicol/multicol-basic-003.html
imported/w3c/css/multicol/multicol-basic-004.html
Add new un-prefixed column properties and make the -webkit* ones be aliases
to the new ones.
* css/CSSPropertyNames.in:
Use the new enums CSSPropertyColumn* instead of the prefixed ones.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isColorPropertyID):
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
* css/StylePropertyShorthand.cpp:
(WebCore::webkitColumnsShorthand):
(WebCore::webkitColumnRuleShorthand):
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
* css/StyleResolver.cpp:
(WebCore::isValidVisitedLinkProperty):
(WebCore::StyleResolver::applyProperty):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::paintColumnRules):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::colorIncludingFallback):
2014-10-31 Tim Horton <timothy_horton@apple.com>
Remove "Add to iPhoto" from the action menu's sharing menu
https://bugs.webkit.org/show_bug.cgi?id=138251
<rdar://problem/18837197>
Reviewed by Anders Carlsson.
* platform/spi/mac/NSSharingServiceSPI.h:
Add 'name' to the NSSharingService SPI header.
2014-10-31 Akos Kiss <akiss@inf.u-szeged.hu>
Fix type clash warning in supports_error rule of CSSGrammar.
https://bugs.webkit.org/show_bug.cgi?id=138248
Reviewed by Antti Koivisto.
Added explicit actions to supports_error rule in CSSGrammar.y.in since
the default actions caused bison to emit type clash warnings.
No new tests because there is no behavior change.
* css/CSSGrammar.y.in:
2014-10-31 Adrian Perez de Castro <aperez@igalia.com>
[GTK] Support script message handlers WebKitUserContentManager
https://bugs.webkit.org/show_bug.cgi?id=133730
Reviewed by Carlos Garcia Campos.
Support user script message handlers in WebKitUserContentManager.
This needs building with ENABLE_USER_MESSAGE_HANDLERS, for which
an option is added to the CMake build files. The option is disabled
globally by default, and the WebKitGTK port enables it. On the API
level, two new methods to register and unregister names are provided
in the "window.webkit" namespace, and on message reception the
"WebKitUserContentManager::script-message-received" signal is
emitted, using the registered names as signal detail.
* CMakeLists.txt: Conditionally add the needed files to the build
when the ENABLE_USER_MESSAGE_HANDLERS feature is enabled.
2014-10-31 Andrzej Badowski <a.badowski@samsung.com>
[ATK] Improve AccessibilityTableCell's determineAccessibilityRole function.
https://bugs.webkit.org/show_bug.cgi?id=137737
Reviewed by Chris Fleizach.
Use of new functions isRowHeaderCell and isColumnHeaderCell (bug 136818)
to more accurately determine accessibility role of the table cell.
Test: accessibility/table-cells-roles.html
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
Change to const.
* accessibility/AccessibilityARIAGridCell.h:
Change rowIndexRange function to const.
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
Use of isRowHeaderCell and isColumnHeaderCell to more accurately determine accessibility role (ATK).
(WebCore::AccessibilityTableCell::isColumnHeaderCell):
Add a case of direct placement a row in the table.
(WebCore::AccessibilityTableCell::isRowHeaderCell):
Add a case of direct placement a row in the table.
(WebCore::AccessibilityTableCell::rowIndexRange):
Change to const.
* accessibility/AccessibilityTableCell.h:
Change rowIndexRange function to const.
2014-10-30 Darin Adler <darin@apple.com>
Eliminate ResourceBuffer and use SharedBuffer directly instead
https://bugs.webkit.org/show_bug.cgi?id=138174
Reviewed by Antti Koivisto.
Refactoring, with test coverage across many existing tests.
* CMakeLists.txt: Deleted ResourceBuffer.cpp.
* WebCore.exp.in: Removed ResourceBuffer-related symbols, and updated symbol
for one function that used to take a PassRefPtr but now takes a reference instead.
* WebCore.vcxproj/WebCore.vcxproj: Deleted ResourceBuffer.cpp/.h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Deleted ResourceBuffer.mm/.cpp/.h.
* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMHTMLImageElement dataRepresentation:]): Use SharedBuffer directly.
* editing/ios/EditorIOS.mm:
(WebCore::Editor::writeImageToPasteboard): Ditto.
* editing/mac/EditorMac.mm:
(WebCore::Editor::writeImageToPasteboard): Ditto.
* html/ImageDocument.cpp:
(WebCore::ImageDocument::updateDuringParsing): Use SharedBuffer directly, and
also pass a reference only if non-null rather than passing a pointer.
(WebCore::ImageDocument::finishedParsing): Ditto. Added a missing null check.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent): Use SharedBuffer directly.
(WebCore::InspectorPageAgent::mainResourceContent): Ditto.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didFinishLoading): Ditto.
(WebCore::InspectorResourceAgent::didFailLoading): Ditto.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::mainResourceData): Use SharedBuffer directly,
and use the copy function rather than a hand-written alternative.
(WebCore::DocumentLoader::maybeCreateArchive): Ditto.
(WebCore::DocumentLoader::mainResource): Ditto.
(WebCore::DocumentLoader::subresource): Ditto.
(WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): Ditto.
* loader/DocumentLoader.h: Changed mainResourceData to return a
PassRefPtr<SharedBuffer>. Would be better if it returned a SharedBuffer&,
but it currently returns a newly created buffer when there is substitute
data and can also return null, even though many callers assume it will not!
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::dataReceived): Removed call to unused client
function bufferReceived.
(WebCore::MediaResourceLoader::notifyFinished): Removed unused buffer
argument to client function loadFinished.
* loader/ResourceBuffer.cpp: Removed.
* loader/ResourceBuffer.h: Removed.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::addDataOrBuffer): Use SharedBuffer directly.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::resourceData): Use SharedBuffer.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse): Use SharedBuffer.
(WebCore::SubresourceLoader::didReceiveDataOrBuffer): Ditto.
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::processNewCueData): Use SharedBuffer.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Ditto.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Ditto.
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::finishLoading): Use SharedBuffer.
* loader/cache/CachedCSSStyleSheet.h: Ditto.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::finishLoading): Ditto.
(WebCore::CachedFont::ensureCustomFontData): Ditto.
* loader/cache/CachedFont.h: Ditto.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didAddClient): Use SharedBuffer.
(WebCore::CachedImage::didRemoveClient): Ditto.
(WebCore::CachedImage::addIncrementalDataBuffer): Ditto. Changed to take
a reference rather than a pointer.
(WebCore::CachedImage::addDataBuffer): Ditto. Also added call through
to base class and changed to take a reference rather than a pointer.
(WebCore::CachedImage::addData): Ditto. Also added call through to base class.
(WebCore::CachedImage::finishLoading): Ditto.
* loader/cache/CachedImage.h: Ditto. Also changed the type of some bit fields
to be unsigned instead of unsigend char.
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::calculateIncrementalDataChunk): Use SharedBuffer.
(WebCore::CachedRawResource::addDataBuffer): Ditto. Changed to take
a reference rather than a pointer.
(WebCore::CachedRawResource::addData): Ditto.
(WebCore::CachedRawResource::finishLoading): Ditto.
(WebCore::CachedRawResource::canReuse): Ditto.
* loader/cache/CachedRawResource.h: Ditto.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource): Reordered data members due to change
in header.
(WebCore::CachedResource::addDataBuffer): Changed argument type.
(WebCore::CachedResource::finishLoading): Ditto.
(WebCore::CachedResource::didAddClient): Refactored to eliminate one extra hash
table lookup by using the return value from the remove function.
(WebCore::CachedResource::addClientToSet): Use std::make_unique directly instead
of using a function named "schedule" to allocate the callback object.
(WebCore::CachedResource::Callback::Callback): Changed function and data member
name.
(WebCore::CachedResource::Callback::cancel): Ditto.
(WebCore::CachedResource::Callback::timerFired): Ditto.
(WebCore::CachedResource::tryReplaceEncodedData): Changed to take a SharedBuffer&.
* loader/cache/CachedResource.h: Changed types to use SharedBuffer. Also made most
data members and one function member private instead of protected. Also renamed the
CachedResource::CachedResourceCallback function CachedResource::Callback and moved
its definition out of the CachedResource class definition.
* loader/cache/CachedResourceClient.h: Removed unneeded include.
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::finishLoading): Use SharedBuffer.
* loader/cache/CachedSVGDocument.h: Ditto. Made data members private.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::finishLoading): Use SharedBuffer.
* loader/cache/CachedScript.h: Ditto. Also fixed indenting and removed unneeded
forward declaration.
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::updateData): Added, so that finishLoading does not
call addDataBuffer.
(WebCore::CachedTextTrack::addDataBuffer): Take SharedBuffer, call updateData.
(WebCore::CachedTextTrack::finishLoading): Ditto.
* loader/cache/CachedTextTrack.h: Take out unneeded explicit override of the
destructor. Updated for above changes.
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::finishLoading): Updated to use SharedBuffer.
* loader/cache/CachedXSLStyleSheet.h: Took out unneeded includes, made everything
private rather than protected. Added an explicit virtual constructor so we can
compile without knowing how to ref/deref TextResourceDecoder.
* loader/cf/SubresourceLoaderCF.cpp:
(WebCore::SubresourceLoader::didReceiveDataArray): Updated to use SharedBuffer
and to call addDataBuffer only if there is a new data buffer.
* loader/cocoa/DiskCacheMonitorCocoa.h: Use SharedBuffer& instead of PassRefPtr.
* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::DiskCacheMonitor): Ditto.
(WebCore::DiskCacheMonitor::resourceBecameFileBacked): Ditto.
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::notifyFinished): Use SharedBuffer* instead of
RefPtr<ResourceBuffer>.
* loader/mac/ResourceBuffer.mm: Removed.
* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::didReceiveDataArray): Use SharedBuffer.
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::clear): Use a modern for loop.
(WebCore::SharedBuffer::copy): Return a PassRef instead of a PassRefPtr, since
this never returns null. Use modern for loops.
(WebCore::SharedBuffer::copyBufferAndClear): Use a modern for loop.
* platform/SharedBuffer.h: Changed copy to return PassRef instead of PassRefPtr.
Changed tryReplaceContentsWithPlatformBuffer to take a reference rather than
a pointer.
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Take a reference
instead of a pointer.
* platform/graphics/PlatformMediaResourceLoader.h: Removed unused function
bufferReceived and unneeded buffer argument from loadFinished. Also marked the
constructor explicit.
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
Removed include of ResourceBuffer.h.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): Use
SharedBuffer directly.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(CachedResourceStreamingClient::loadFinished): Updated for change to
PlatformMediaResourceLoaderClient.
* platform/mac/PasteboardMac.mm: Removed include of ResourceBuffer.h.
* platform/soup/SharedBufferSoup.cpp: Removed unused, unneeded
tryReplaceContentsWithPlatformBuffer function.
2014-10-30 Chris Dumez <cdumez@apple.com>
Move border-image-source / -webkit-mask-box-image-source to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138209
Reviewed by Andreas Kling.
Move border-image-source / -webkit-mask-box-image-source CSS properties
from DeprecatedStyleBuilder to the new StyleBuilder so that they are
now generated from CSSPropertyNames.in.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyBorderImageSource::applyValue): Deleted.
(WebCore::ApplyPropertyBorderImageSource::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertBorderImageSource):
2014-10-30 Jer Noble <jer.noble@apple.com>
[EME] Add Setting for accessing storage location for MediaKeys data
https://bugs.webkit.org/show_bug.cgi?id=138147
Reviewed by Brady Eidson.
Allow MediaPlayerPrivateAVFoundationObjC to query for the MediaKeys storage directory
by piping that request down from WebKit and WebKit2 into Settings.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaKeysStorageDirectory): Get the location from Settings and
append the current origin.
* html/HTMLMediaElement.h:
* page/Settings.h:
(WebCore::Settings::setMediaKeysStorageDirectory): Simple setter.
(WebCore::Settings::mediaKeysStorageDirectory): Simple accessor.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::mediaKeysStorageDirectory): Pass through to m_client.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerMediaKeysStorageDirectory): Default implementation.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Fetch the location from MediaPlayer.
(WebCore::sessionStorageDirectory): Deleted.
2014-10-30 Dana Burkart <dburkart@apple.com>
<rdar://problem/18821260> Prepare for the mysterious future
Reviewed by Lucas Forschler.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
2014-10-30 Simon Fraser <simon.fraser@apple.com>
Short-circuit repaints with empty rects
https://bugs.webkit.org/show_bug.cgi?id=138234
Reviewed by Zalan Bujtas.
Repaints with an empty rectangle are common enough that it's worth
short-circuiting them.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintUsingContainer):
2014-10-30 Chris Dumez <cdumez@apple.com>
Clean up virtual functions in css/
https://bugs.webkit.org/show_bug.cgi?id=138230
Reviewed by Benjamin Poulain.
Clean up virtual functions in css/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Using 'override' when appropriate
- Explicitly marking functions / destructors as virtual when they are
inherently virtual
- Making isXXX() virtual functions private on XXX classes to avoid
unnecessary type checks
No new tests, no behavior change.
* WebCore.exp.in:
* css/CSSBasicShapes.h:
* css/CSSCharsetRule.h:
* css/CSSComputedStyleDeclaration.h:
* css/CSSCrossfadeValue.h:
* css/CSSFilterImageValue.h:
* css/CSSFontFaceLoadEvent.h:
* css/CSSFontFaceRule.h:
* css/CSSFontFaceSource.h:
* css/CSSImportRule.h:
* css/CSSMediaRule.h:
* css/CSSPageRule.h:
* css/CSSRuleList.h:
(WebCore::StaticCSSRuleList::ref): Deleted.
(WebCore::StaticCSSRuleList::styleSheet): Deleted.
(WebCore::StaticCSSRuleList::length): Deleted.
(WebCore::StaticCSSRuleList::item): Deleted.
(WebCore::LiveCSSRuleList::ref): Deleted.
(WebCore::LiveCSSRuleList::deref): Deleted.
(WebCore::LiveCSSRuleList::length): Deleted.
(WebCore::LiveCSSRuleList::item): Deleted.
(WebCore::LiveCSSRuleList::styleSheet): Deleted.
* css/CSSStyleRule.h:
* css/CSSSupportsRule.h:
* css/CSSUnknownRule.h:
* css/FontLoader.h:
* css/PropertySetCSSStyleDeclaration.h:
(WebCore::PropertySetCSSStyleDeclaration::parentElement):
* css/WebKitCSSKeyframeRule.h:
* css/WebKitCSSViewportRule.h:
2014-10-30 Tim Horton <timothy_horton@apple.com>
Long spins under rangeExpandedAroundPosition on Yahoo Mail
https://bugs.webkit.org/show_bug.cgi?id=138223
<rdar://problem/18819547>
Reviewed by Enrica Casucci.
* WebCore.exp.in:
Export some things.
2014-10-30 Ada Chan <adachan@apple.com>
The Page's muted setting should not affect the HTMLMediaElement's 'muted' IDL attribute.
https://bugs.webkit.org/show_bug.cgi?id=138215
Reviewed by Eric Carlson.
Add m_muted in Page to keep track of the Page's muted state. Change AudioProducer::setMuted()
to pageMutedStateDidChange(). When that method is called, the AudioProducer is supposed to
update its muted state again taking the Page's muted state into account.
Add HTMLMediaElement::effectiveMuted(), which returns the effective muted state of the
HTMLMediaElement, taking the Page's muted state into account.
Test: media/video-muted-after-setting-page-muted-state.html
* dom/Document.cpp:
(WebCore::Document::pageMutedStateDidChange):
(WebCore::Document::setMuted): Deleted.
* dom/Document.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):
Set the MediaPlayer's muted state to the result of effectiveMuted() rather than m_muted.
(WebCore::HTMLMediaElement::updateVolume):
Ditto, and also make sure the MediaController's muted state does not override the Page's
muted state.
(WebCore::HTMLMediaElement::updatePlayState):
Set the MediaPlayer's muted state to the result of effectiveMuted() rather than muted().
(WebCore::HTMLMediaElement::pageMutedStateDidChange):
Call updateVolume(), which will update the MediaPlayer's muted state.
(WebCore::HTMLMediaElement::effectiveMuted):
Figure out the muted value taking Page's muted state into account.
* html/HTMLMediaElement.h:
* page/AudioProducer.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setMuted):
Update m_muted, and only iterate through the frames' documents to call pageMutedStateDidChange()
if m_muted changes.
* page/Page.h:
(WebCore::Page::isMuted):
* testing/Internals.cpp:
(WebCore::Internals::setPageMuted):
Expose a way to set the Page's muted state in Internals for testing.
* testing/Internals.h:
* testing/Internals.idl:
2014-10-30 Myles C. Maxfield <mmaxfield@apple.com>
Use references in calculateMinimumPageHeight() for non-optional arguments
https://bugs.webkit.org/show_bug.cgi?id=138231
Reviewed by Dean Jackson.
No new tests because there is no behavior change.
* rendering/RenderBlockFlow.cpp:
(WebCore::calculateMinimumPageHeight):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
2014-10-30 Chris Dumez <cdumez@apple.com>
Move -webkit-border-image / -webkit-mask-box-image to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138207
Reviewed by Andreas Kling.
Move -webkit-border-image / -webkit-mask-box-image CSS properties to
the new StyleBuilder so that they are now generated from
CSSPropertyNames.in.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyBorderImage::applyValue): Deleted.
(WebCore::ApplyPropertyBorderImage::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertBorderImage):
(WebCore::StyleBuilderConverter::convertBorderMask):
2014-10-30 Chris Dumez <cdumez@apple.com>
Optimize HTMLVideoElement / HTMLAudioElement type checks a bit
https://bugs.webkit.org/show_bug.cgi?id=138202
Reviewed by Benjamin Poulain.
Optimize HTMLVideoElement / HTMLAudioElement type checks a bit by:
1. Using is<HTMLMediaElement>() instead of
(is<HTMLVideoElement>() || is<HTMLAudioElement>()) if the caller is
interested in both video and audio elements. This is faster because
it ends up doing:
- virtual call to Element::isMediaElement()
instead of
- Node::isHTMLElement() +
virtual call to HTMLElement::isHTMLUnknownElement() +
2 * HTMLElement::hasTagName()
2. Updating HTMLVideoElement / HTMLAudioElement type traits
specializations to:
- Avoid doing any virtual function call if the input type is an
HTMLMediaElement (which is common in the code base).
- Speed up check if the input is an Element by doing:
- virtual call to Element::isMediaElement() +
HTMLElement::hasTagName()
instead of
- Node::isHTMLElement() +
virtual call to !HTMLElement::isHTMLUnknownElement() +
HTMLElement::hasTagName()
The speed stays the same if the input is a Node or an HTMLElement.
No new tests, no behavior change.
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
* dom/make_names.pl:
(defaultTagPropertyHash):
(printTypeHelpers):
* html/HTMLAudioElement.h:
(isType):
* html/HTMLImageLoader.cpp:
* html/HTMLTagNames.in:
* html/HTMLVideoElement.h:
(isType):
* page/ChromeClient.h:
2014-10-30 Myles C. Maxfield <mmaxfield@apple.com>
Migrate ComplexTextControllerCoreText to use SPI instead of WKSI
https://bugs.webkit.org/show_bug.cgi?id=138228
Reviewed by Simon Fraser.
No new tests because there is no behavior change.
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/spi/cocoa/CoreTextSPI.h: Added.
2014-10-30 Eric Carlson <eric.carlson@apple.com>
Add diagnostic logging to track page loads.
https://bugs.webkit.org/show_bug.cgi?id=138205
<rdar://problem/18173017>
Reviewed by Jer Noble.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame): Log page load success or failure.
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::pageLoadedKey): New.
* page/DiagnosticLoggingKeys.h:
2014-10-24 Philippe Normand <pnormand@igalia.com>
[GStreamer] Video resolution changes trigger a crash in the TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=137065
Reviewed by Gustavo Noronha Silva.
Switch to GstSample for buffer+caps communication between the
video sink and the player. Using a single object type for this
avoid issues where the caps might not correctly describe the
buffer contents anymore, for example when the video resolution is
changed.
* platform/graphics/gstreamer/ImageGStreamer.h: Use GstSample
instead of GstBuffer+GstCaps.
(WebCore::ImageGStreamer::createImage):
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp: Ditto.
(ImageGStreamer::ImageGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::mediaPlayerPrivateRepaintCallback): The repaint signal
now uses a GstSample instead of a GstBuffer.
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
Store the current sample instead of a buffer. Also renamed the
mutex protecting access to the sample.
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Ditto.
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize): Return
early if no sample is available. The caps used to get the video
size are store in the sample.
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Use
GstSample instead of GstBuffer.
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): Ditto.
(WebCore::MediaPlayerPrivateGStreamerBase::paint): Ditto.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp: Now store a
GstSample internally. Also removed the now useless current-caps property.
(_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Renamed the
mutex protecting access to the sample.
(_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Ditto.
(webkit_video_sink_init): Disable last-sample in basesink since we
already store one in our sink anyway.
(webkitVideoSinkTimeoutCallback): Switch to GstSample.
(webkitVideoSinkRender): Ditto.
(unlockSampleMutex): Ditto.
(webkitVideoSinkUnlock): Ditto.
(webkitVideoSinkUnlockStop): Ditto.
(webkitVideoSinkStop): Ditto!
(webkitVideoSinkStart): Ditto.
(webkit_video_sink_class_init): Drop current-caps property.
(webkitVideoSinkGetProperty): Deleted.
(unlockBufferMutex): Deleted.
2014-10-30 Carlos Garcia Campos <cgarcia@igalia.com>
FormDataBuilder should not use Document
https://bugs.webkit.org/show_bug.cgi?id=138172
Reviewed by Alexey Proskuryakov.
It's only used by encodingFromAcceptCharset() to fallback to
document input encoding. That method is only used by
FormSubmission::create(), so it could be moved as a static
function to FormSubmission.cpp.
* loader/FormSubmission.cpp:
(WebCore::encodingFromAcceptCharset):
(WebCore::FormSubmission::create):
* platform/network/FormDataBuilder.cpp:
(WebCore::FormDataBuilder::encodingFromAcceptCharset): Deleted.
* platform/network/FormDataBuilder.h:
2014-10-29 Said Abou-Hallawa <sabouhallawa@apple.com>
ASSERTION NOT REACHED because RenderStyle::setWordSpacing() does not handle a Length value of type 'Calculated'.
https://bugs.webkit.org/show_bug.cgi?id=138054.
Reviewed by Zalan Bujtas.
A Length of type 'Calculated' can be generated from blending two lengths of
different types. Setting the wordSpacing of the render style should be handled
correctly when the type of the new value is 'Calculated'.
Tests: css3/calculated-word-spacing.html.
Add a case for setting the render style wordSpacing to a <length> of type 'Calculated'.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setWordSpacing):
2014-10-29 Hunseop Jeong <hs85.jeong@samsung.com>
[CoordinatedGraphics] Use modern for-loops
https://bugs.webkit.org/show_bug.cgi?id=138168
Reviewed by Andreas Kling.
No new tests as there is no change in functionality.
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Use a modern for loop.
(WebCore::CompositingCoordinator::renderNextFrame):
(WebCore::CompositingCoordinator::paintToSurface):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: Use a modern for loop.
(WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
(WebCore::CoordinatedGraphicsLayer::flushCompositingState):
(WebCore::CoordinatedGraphicsLayer::syncChildren):
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::findFirstDescendantWithContentsRecursively):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp: Use a modern for loop.
(WebCore::CoordinatedImageBacking::updateVisibilityIfNeeded):
2014-10-29 Chris Dumez <cdumez@apple.com>
Final-ize more of TextFieldInputType's virtual functions
https://bugs.webkit.org/show_bug.cgi?id=138194
Reviewed by Andreas Kling.
Final-ize more of TextFieldInputType's virtual functions for
performance.
No new tests, no behavior change.
* html/TextFieldInputType.h:
2014-10-29 Chris Dumez <cdumez@apple.com>
Clean up virtual functions in inspector/
https://bugs.webkit.org/show_bug.cgi?id=138190
Reviewed by Andreas Kling.
Clean up virtual functions in inspector/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Explicitly marking functions / destructors as virtual when they are
inherently virtual
- Making isXXX() virtual functions private on XXX classes to avoid
unnecessary type checks
No new tests, no behavior change.
* inspector/InspectorApplicationCacheAgent.h:
(WebCore::InspectorApplicationCacheAgent::~InspectorApplicationCacheAgent): Deleted.
* inspector/InspectorCSSAgent.h:
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorFrontendClientLocal.h:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorPageAgent.h:
* inspector/InspectorReplayAgent.h:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorStyleSheet.h:
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.h:
* inspector/PageConsoleAgent.h:
* inspector/WorkerInspectorController.h:
2014-10-29 Andreas Kling <akling@apple.com>
Generalize dirtying of parent's line boxes when taking a renderer out of tree.
<https://webkit.org/b/138152>
Reviewed by Antti Koivisto.
Instead of calling dirtyLinesFromChangedChild() when certain types of renderers
are about to be destroyed, always do this in RenderElement::willBeRemovedFromTree().
This is part of an effort to make render tree teardown less incomprehensible.
We still don't bother at all if we're in the process of tearing down the entire
render tree, since that would be a waste of time.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::willBeRemovedFromTree):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::willBeDestroyed): Deleted.
* rendering/RenderReplaced.h:
2014-10-28 Ada Chan <adachan@apple.com>
Implement WKPageSetMuted(bool).
https://bugs.webkit.org/show_bug.cgi?id=138158
Reviewed by Anders Carlsson.
* WebCore.exp.in:
* page/Page.h:
2014-10-29 Alexey Proskuryakov <ap@apple.com>
Notify Settings object when its Page object goes away.
https://bugs.webkit.org/show_bug.cgi?id=138183
rdar://problem/18786900
Reviewed by Andreas Kling.
I could not make a test for this issue.
* page/Page.cpp:
(WebCore::Page::~Page):
* page/Settings.cpp:
(WebCore::setImageLoadingSettings):
(WebCore::Settings::Settings):
(WebCore::Settings::setTextAutosizingEnabled):
(WebCore::Settings::setTextAutosizingWindowSizeOverride):
(WebCore::Settings::setTextAutosizingFontScaleFactor):
(WebCore::Settings::setMediaTypeOverride):
(WebCore::Settings::setScriptEnabled):
(WebCore::Settings::setUserStyleSheetLocation):
(WebCore::Settings::setMinDOMTimerInterval):
(WebCore::Settings::minDOMTimerInterval):
(WebCore::Settings::domTimerAlignmentInterval):
(WebCore::Settings::setUsesPageCache):
(WebCore::Settings::setScreenFontSubstitutionEnabled):
(WebCore::Settings::setFontRenderingMode):
(WebCore::Settings::setDNSPrefetchingEnabled):
(WebCore::Settings::setStorageBlockingPolicy):
(WebCore::Settings::setBackgroundShouldExtendBeyondPage):
(WebCore::Settings::setScrollingPerformanceLoggingEnabled):
(WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):
(WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled):
(WebCore::Settings::setFontFallbackPrefersPictographs):
* page/Settings.h:
(WebCore::Settings::pageDestroyed):
2014-10-29 Zalan Bujtas <zalan@apple.com>
Remove invalid float from RootInlineBox.
https://bugs.webkit.org/show_bug.cgi?id=137707
Reviewed by Antti Koivisto.
In certain cases, floating boxes get attached to the last (root) inline box.
When this particular floating box gets destroyed, it also needs to be detached
from the last inline box.
1. Introduce RootInlineBox::removeFloat() (vs. RootInlineBox::appendFloat())
2. Ensure that it is called when the floating box is being destroyed.
Test: fast/inline/crash-when-inline-box-has-invalid-float.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::removeFloatingObject):
(WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout): During style recalc, while
tearing down the render tree, we can get to a state where a block element has both inline and block children.
It happens when the style change on an element makes sibling anonymous block wrappers detached.
In that case the markAllDescendantsWithFloatsForLayout() call does not get propagated down on the
block child elements as we return early at the childrenInline() check.
* rendering/RootInlineBox.h:
(WebCore::RootInlineBox::removeFloat):
2014-10-29 Antti Koivisto <antti@apple.com>
Factor cache validity computation functions out of CachedResource
https://bugs.webkit.org/show_bug.cgi?id=138156
Reviewed by Andreas Kling.
These can be used to implement cache logic on WebKit level.
* CMakeLists.txt:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* loader/CacheValidation.cpp: Added.
(WebCore::computeCurrentAge):
(WebCore::computeFreshnessLifetimeForHTTPFamily):
(WebCore::updateRedirectChainStatus):
(WebCore::redirectChainAllowsReuse):
* loader/CacheValidation.h: Added.
(WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):
* loader/cache/CachedResource.cpp:
(WebCore::updateResponseHeadersAfterRevalidation):
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::isExpired):
(WebCore::CachedResource::freshnessLifetime):
(WebCore::CachedResource::willSendRequest):
(WebCore::CachedResource::updateResponseAfterRevalidation):
(WebCore::CachedResource::redirectChainAllowsReuse):
(WebCore::currentAge): Deleted.
* loader/cache/CachedResource.h:
2014-10-29 Antti Koivisto <antti@apple.com>
Unreviewed, rolling out r175342.
a file ended up in a wrong directory
Reverted changeset:
"Factor cache validity computation functions out of
CachedResource"
https://bugs.webkit.org/show_bug.cgi?id=138156
http://trac.webkit.org/changeset/175342
2014-10-29 Antti Koivisto <antti@apple.com>
Factor cache validity computation functions out of CachedResource
https://bugs.webkit.org/show_bug.cgi?id=138156
Reviewed by Andreas Kling.
These can be used to implement cache logic on WebKit level.
* CMakeLists.txt:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* loader/CacheValidation.cpp: Added.
(WebCore::computeCurrentAge):
(WebCore::computeFreshnessLifetimeForHTTPFamily):
(WebCore::updateRedirectChainStatus):
(WebCore::redirectChainAllowsReuse):
* loader/CacheValidation.h: Added.
(WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):
* loader/cache/CachedResource.cpp:
(WebCore::updateResponseHeadersAfterRevalidation):
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::isExpired):
(WebCore::CachedResource::freshnessLifetime):
(WebCore::CachedResource::willSendRequest):
(WebCore::CachedResource::updateResponseAfterRevalidation):
(WebCore::CachedResource::redirectChainAllowsReuse):
(WebCore::currentAge): Deleted.
* loader/cache/CachedResource.h:
2014-10-28 Ada Chan <adachan@apple.com>
Add API to mute/unmute a page.
https://bugs.webkit.org/show_bug.cgi?id=138150
Reviewed by Eric Carlson.
No new tests, since it's difficult to test whether the Page has indeed been muted.
* dom/Document.cpp:
(WebCore::Document::setMuted):
Go through each AudioProducer and call setMuted() on it.
* dom/Document.h:
* page/AudioProducer.h:
Add setMuted(bool). HTMLMediaElement, the only derived class of AudioProducer so far,
has already implemented setMuted().
* page/Page.cpp:
(WebCore::Page::setMuted):
Go through all its frames and call setMuted() on each frame's Document.
* page/Page.h:
2014-10-29 Tim Horton <timothy_horton@apple.com>
Implement action menus for data detected items
https://bugs.webkit.org/show_bug.cgi?id=138178
<rdar://problem/18709436>
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Export a symbol from Position that we need.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/DataDetectorsSPI.h:
Add a combined SPI header for all of the random bits of DataDetectors that we use.
2014-10-29 Jer Noble <jer.noble@apple.com>
[EME] NULL-dereference crash in MediaKeys::setMediaElement().
https://bugs.webkit.org/show_bug.cgi?id=138177
Reviewed by Eric Carlson.
NULL-check m_mediaElement->player() before using. It may have been cleared if the HTMLMediaElement
has previously had stop() called.
* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::setMediaElement):
2014-10-29 Jer Noble <jer.noble@apple.com>
[EME] MediaKeySession resources persist across page reloads
https://bugs.webkit.org/show_bug.cgi?id=138176
Reviewed by Eric Carlson.
MediaKeySession is an ActiveDOMObject, so when told to stop() by our execution context,
close() the session, releasing all our resources.
* Modules/encryptedmedia/MediaKeySession.h:
2014-10-29 Jer Noble <jer.noble@apple.com>
[EME][Mac] MediaKeySession type "keyrelease" is ignored.
https://bugs.webkit.org/show_bug.cgi?id=138175
Reviewed by Eric Carlson.
To indicate that they would like to recevie expired session confirmation messages, clients
will create a MediaKeySession with a type parameter of "keyrelease". The code which validates
this type needs to be updated to recognize "keyrelease" as a valid type.
Also, the code which validates update() requests needs to allow updates containing the string
"acknowledged", so that clients can request the confirmation messages be discarded.
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::update):
2014-10-28 Ada Chan <adachan@apple.com>
Remove MediaSessionClient::hasMediaCharacteristics() and MediaSessionClient::mediaStateDidChange().
https://bugs.webkit.org/show_bug.cgi?id=138153
Reviewed by Jer Noble.
After http://trac.webkit.org/changeset/175273, Document no longer keeps a set of MediaSessions
and it doesn't need to query each MediaSession for its characteristics and play state.
MediaSessionClient::hasMediaCharacteristics() is no longer needed and MediaSessionClient::mediaStateDidChange()
can be removed if HTMLMediaElement calls Document::updateIsPlayingAudio() after m_playing has changed.
No new tests, no behavior change.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updatePlayState):
Call setPlaying() rather than setting m_playing directly.
(WebCore::HTMLMediaElement::setPlaying):
Update m_playing. If it has changed, call Document::updateIsPlayingAudio().
(WebCore::HTMLMediaElement::setPausedInternal):
Call setPlaying() rather than setting m_playing directly.
(WebCore::HTMLMediaElement::isPlayingAudio):
Call isPlaying() directly rather than checking the MediaSession's state.
* html/HTMLMediaElement.h:
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::setState):
MediaSessionClient::mediaStateDidChange() has been removed.
(WebCore::MediaSession::hasMediaCharacteristics): Deleted.
* platform/audio/MediaSession.h:
(WebCore::MediaSessionClient::mediaStateDidChange): Deleted.
* platform/audio/ios/AudioDestinationIOS.h:
* platform/audio/mac/AudioDestinationMac.h:
2014-10-29 Chris Dumez <cdumez@apple.com>
Clean up virtual functions in html/
https://bugs.webkit.org/show_bug.cgi?id=138166
Reviewed by Andreas Kling.
Clean up virtual functions in html/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Using 'override' when appropriate
- Explicitly marking functions / destructors as virtual when they are
inherently virtual
- Dropping virtual destructors when the class does not have subclasses
and mark the class as final, to get rid of unnecessary vtables
- Making isXXX() virtual functions private on XXX classes to avoid
unnecessary type checks
- De-virtualizing some functions that do not need to be virtual
- Dropping final for virtual functions in classes already marked as
final
No new tests, no behavior change.
* html/ButtonInputType.h:
* html/CheckboxInputType.h:
* html/ColorInputType.h:
* html/DOMSettableTokenList.h:
* html/DateInputType.h:
* html/DateTimeInputType.h:
* html/DateTimeLocalInputType.h:
* html/EmailInputType.h:
* html/FTPDirectoryDocument.h:
* html/HTMLAnchorElement.h:
* html/HTMLDetailsElement.cpp:
* html/HTMLFormControlElement.h:
* html/HTMLFormControlsCollection.h:
* html/HTMLFrameElement.h:
* html/HTMLFrameElementBase.h:
* html/HTMLFrameOwnerElement.h:
* html/HTMLInputElement.h:
* html/HTMLMarqueeElement.h:
* html/HTMLMediaElement.h:
* html/HTMLMediaSession.h:
(WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Deleted.
* html/HTMLMeterElement.h:
* html/HTMLNameCollection.h:
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLSpanElement.h:
* html/HTMLStyleElement.h:
* html/HTMLSummaryElement.cpp:
* html/HTMLSummaryElement.h:
* html/HTMLUnknownElement.h:
* html/HTMLVideoElement.h:
* html/HiddenInputType.h:
* html/ImageInputType.h:
* html/MediaKeyEvent.h:
* html/MonthInputType.h:
* html/NumberInputType.h:
* html/PasswordInputType.h:
* html/PublicURLManager.h:
* html/RadioInputType.h:
* html/ResetInputType.h:
* html/SubmitInputType.h:
* html/TelephoneInputType.h:
* html/TextInputType.h:
* html/TimeInputType.h:
* html/URLInputType.h:
* html/WeekInputType.h:
* html/canvas/ANGLEInstancedArrays.h:
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/DOMPath.h:
* html/canvas/EXTShaderTextureLOD.h:
* html/canvas/EXTTextureFilterAnisotropic.h:
* html/canvas/OESElementIndexUint.h:
* html/canvas/OESStandardDerivatives.h:
* html/canvas/OESTextureFloat.h:
* html/canvas/OESTextureFloatLinear.h:
* html/canvas/OESTextureHalfFloat.h:
* html/canvas/OESTextureHalfFloatLinear.h:
* html/canvas/OESVertexArrayObject.h:
* html/canvas/WebGLBuffer.h:
* html/canvas/WebGLCompressedTextureATC.h:
* html/canvas/WebGLCompressedTexturePVRTC.h:
* html/canvas/WebGLCompressedTextureS3TC.h:
* html/canvas/WebGLContextAttributes.h:
* html/canvas/WebGLContextEvent.h:
* html/canvas/WebGLDebugRendererInfo.h:
* html/canvas/WebGLDebugShaders.h:
* html/canvas/WebGLDepthTexture.h:
* html/canvas/WebGLDrawBuffers.h:
* html/canvas/WebGLFramebuffer.h:
(WebCore::WebGLFramebuffer::isFramebuffer): Deleted.
* html/canvas/WebGLLoseContext.h:
* html/canvas/WebGLProgram.h:
* html/canvas/WebGLRenderbuffer.h:
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLShader.h:
* html/canvas/WebGLSharedObject.h:
(WebCore::WebGLSharedObject::isFramebuffer): Deleted.
* html/canvas/WebGLTexture.h:
* html/canvas/WebGLVertexArrayObjectOES.h:
(WebCore::WebGLVertexArrayObjectOES::isVertexArray): Deleted.
* html/shadow/ImageControlsRootElement.h:
* html/shadow/InsertionPoint.h:
* html/shadow/MediaControlElementTypes.h:
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControls.h:
* html/shadow/MediaControlsApple.h:
* html/shadow/SpinButtonElement.h:
* html/track/AudioTrack.h:
* html/track/AudioTrackList.h:
* html/track/DataCue.h:
(WebCore::DataCue::cueType): Deleted.
* html/track/InbandDataTextTrack.h:
* html/track/InbandGenericTextTrack.h:
* html/track/InbandTextTrack.h:
* html/track/InbandWebVTTTextTrack.h:
* html/track/LoadableTextTrack.h:
* html/track/TextTrackList.h:
* html/track/TrackEvent.h:
* html/track/VTTCue.h:
(WebCore::VTTCueBox::setFontSizeFromCaptionUserPrefs):
* html/track/VTTRegion.h:
* html/track/VideoTrack.h:
* html/track/VideoTrackList.h:
* html/track/WebVTTParser.h:
(WebCore::WebVTTCueData::~WebVTTCueData): Deleted.
2014-10-17 Sergio Villar Senin <svillar@igalia.com>
ASSERTION FAILED: growthShare > 0 in WebCore::RenderGrid::distributeSpaceToTracks
https://bugs.webkit.org/show_bug.cgi?id=137772
Reviewed by Andreas Kling.
We're hitting the ASSERTION because if the number of tracks an
item spans does greatly exceed the available logical space, then
the result of the division availableLogicalSpace/numberOfTracks is
truncated to 0. So the ASSERTION was theoretically right because
the result has to be always >0 (as the dividend > 0) but the fact
that the result is a LayoutUnit forces us to accept 0 as a valid
outcome of the operation.
Test: fast/css-grid-layout/tracks-number-greatly-exceeding-available-size-crash.html
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::distributeSpaceToTracks):
2014-10-29 Chris Dumez <cdumez@apple.com>
Crash in CachedRawResource::canReuse() when reloading http://dnd.wizards.com/dungeons-and-dragons/story
https://bugs.webkit.org/show_bug.cgi?id=138164
Reviewed by Andreas Kling.
This patch fixes a crash when reloading the following URL:
http://dnd.wizards.com/dungeons-and-dragons/story
We were crashing in CachedRawResource::canReuse() because header.key
would sometimes be a null String and we would call
HashMap::get(nullString).
The real issue was that header.key was null in the first place, which
means that even though the HTTPHeaderMap iterator is valid, it->key
is a null String, which should never happen. There was a bug in the
HTTPHeaderMapConstIterator() constructor that would cause the
iterator key/value pair to not get initialized if the HTTPHeaderMap
contained *only* uncommon HTTP headers. This patch updates the
constructor so that we fall back to updating the key/value from the
uncommon header map, if we failed to initialized from the common
header map (because it was empty).
Test: http/tests/cache/xhr-uncommon-header.html
* platform/network/HTTPHeaderMap.h:
(WebCore::HTTPHeaderMap::HTTPHeaderMapConstIterator::HTTPHeaderMapConstIterator):
2014-10-28 Benjamin Poulain <benjamin@webkit.org>
CSS4 Selectors: Add the pseudo class :any-link
https://bugs.webkit.org/show_bug.cgi?id=138128
Reviewed by Andreas Kling.
Defined here: http://dev.w3.org/csswg/selectors4/#the-any-link-pseudo
After :link and :-webkit-any-link were fixed, :any-link behaves
exactly like :-webkit-any-link. All I had left to do here was
make them synonyms when evaluating selectors.
Defined here: http://dev.w3.org/csswg/selectors4/#the-any-link-pseudo
After :link and :-webkit-any-link were fixed, :any-link behaves
exactly like :-webkit-any-link. All I had left to do here was
make them synonyms when evaluating selectors.
Tests: fast/selectors/any-link-basics-2.html
fast/selectors/any-link-basics.html
fast/selectors/any-link-styling.html
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/RuleSet.cpp:
(WebCore::RuleSet::addRule):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::isCommonPseudoClassSelector):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
2014-10-28 Jer Noble <jer.noble@apple.com>
[EME][Mac] Adopt new AVStreamSession API: pass storageDirectoryAtURL at creation-time
https://bugs.webkit.org/show_bug.cgi?id=138149
Reviewed by Brent Fulgham.
AVStreamSession now requires its storage location at creation-time, rather than post-creation. This requires
us to move storage location code from CDMSessionMediaSourceAVFObjC to MediaPlayerPrivateMediaSourceAVFObjC.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Renamed.
(WebCore::CDMSessionMediaSourceAVFObjC::update):
(WebCore::sessionStorageDirectory): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::sessionStorageDirectory):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
2014-10-28 Geoffrey Garen <ggaren@apple.com>
All networking crashes on Mac 32bit
https://bugs.webkit.org/show_bug.cgi?id=138157
Reviewed by Andy Estes.
NEFilterSource content filtering is not available on 32bit, so
soft-linking fails at runtime. The simplest solution is just to disable
it at compile time.
* platform/ContentFilter.h:
2014-10-28 Jeremy Jones <jeremyj@apple.com>
Add optimized fullscreen mode.
https://bugs.webkit.org/show_bug.cgi?id=138044
Reviewed by Jer Noble.
Enable different types of fullscreen video behavior.
Add an enum parameter to enterVideoFullscreenForVideoElement for alternate types of fullscreen.
Add gesture for alternate fullscreen.
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::enterFullscreenOptimized): added
* Modules/mediacontrols/MediaControlsHost.h: added enterFullscreenOptimized
* Modules/mediacontrols/MediaControlsHost.idl: added enterFullscreenOptimized
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.handleBaseGestureChange): recognize alternate gesture
* WebCore.exp.in: added parameter to setupFullscreen
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::removedFrom) : replace m_isInVideoFullscreen with m_videoFullscreenType
(WebCore::HTMLMediaElement::stop) : ditto
(WebCore::HTMLMediaElement::isFullscreen) : ditto
(WebCore::HTMLMediaElement::enterFullscreen): add parameter to enterVideoFullscreenForVideoElement
(WebCore::HTMLMediaElement::exitFullscreen): replace m_isInVideoFullscreen with m_videoFullscreenType
(WebCore::HTMLMediaElement::enterFullscreenOptimized): added
* html/HTMLMediaElement.h: added enterFullscreenOptimized
* page/ChromeClient.h:
(WebCore::ChromeClient::enterVideoFullscreenForVideoElement): added parameter
* platform/ios/WebVideoFullscreenControllerAVKit.h: add parameter
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController enterFullscreen:type:]): add parameter
(-[WebVideoFullscreenController enterFullscreen:]): Deleted.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h: reorder protected to after public
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController player]): this stub is now required
(-[WebAVPlayerController layoutSublayersOfLayer:]): this is a better way to update video frames
(WebVideoFullscreenInterfaceAVKit::setupFullscreen): implement optimized fullscreen interface
(WebVideoFullscreenInterfaceAVKit::enterFullscreen): ditto
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): ditto
(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
2014-10-28 Chris Dumez <cdumez@apple.com>
Clean up virtual functions in accessibility/
https://bugs.webkit.org/show_bug.cgi?id=138148
Reviewed by Chris Fleizach.
Clean up virtual functions in accessibility/ by:
- Marking classes as final when suitable
- Marking virtual functions as final when suitable
- Dropping final on virtual functions in classes that are already final
- Make isXXX() virtual type checking functions in XXX classes to avoid
useless type checks
No new tests, no behavior change.
* accessibility/AccessibilityARIAGrid.h:
* accessibility/AccessibilityARIAGridCell.h:
* accessibility/AccessibilityARIAGridRow.h:
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityList.h:
* accessibility/AccessibilityListBox.h:
* accessibility/AccessibilityListBoxOption.h:
* accessibility/AccessibilityMediaControls.h:
* accessibility/AccessibilityMenuList.h:
* accessibility/AccessibilityMenuListOption.h:
* accessibility/AccessibilityMenuListPopup.h:
* accessibility/AccessibilityMockObject.h:
(WebCore::AccessibilityMockObject::setParent):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityProgressIndicator.h:
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilitySVGRoot.h:
* accessibility/AccessibilityScrollView.h:
* accessibility/AccessibilityScrollbar.h:
* accessibility/AccessibilitySearchFieldButtons.h:
* accessibility/AccessibilitySlider.h:
* accessibility/AccessibilitySpinButton.h:
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableCell.h:
* accessibility/AccessibilityTableColumn.h:
* accessibility/AccessibilityTableHeaderContainer.h:
* accessibility/AccessibilityTableRow.h:
2014-10-24 Jeffrey Pfau <jpfau@apple.com>
FrameProgressTracker expects Page to not have detached
https://bugs.webkit.org/show_bug.cgi?id=138061
Reviewed by Alexey Proskuryakov.
In some cases, a Page may be detached from a Frame before its
FrameLoader is torn down, causing FrameProgressTracker's destructor
to hit a null pointer.
No new tests; it is impossible to reliably simulate the null pointer
case without intrusive code changes.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker):
2014-10-27 Ada Chan <adachan@apple.com>
Introduce a new abstract class called AudioProducer and keep a set of AudioProducers
rather than the active MediaSessions in Document
https://bugs.webkit.org/show_bug.cgi?id=138107
Reviewed by Eric Carlson.
No new tests, no behavior change.
* WebCore.xcodeproj/project.pbxproj:
Add AudioProducer.h to the project.
* dom/Document.cpp:
(WebCore::Document::addAudioProducer):
(WebCore::Document::removeAudioProducer):
(WebCore::Document::updateIsPlayingAudio):
Go through the set of AudioProducers and see if any is playing audio.
Now that this method no longer refers to MediaSessions directly, this code
does not need to be guarded by #if ENABLE(VIDEO).
(WebCore::Document::registerMediaSession): Deleted.
(WebCore::Document::unregisterMediaSession): Deleted.
* dom/Document.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::registerWithDocument):
(WebCore::HTMLMediaElement::unregisterWithDocument):
(WebCore::HTMLMediaElement::isPlayingAudio):
Return whether this element is playing audio.
* html/HTMLMediaElement.h:
* page/AudioProducer.h: Added.
(WebCore::AudioProducer::~AudioProducer):
* page/Page.cpp:
(WebCore::Page::updateIsPlayingAudio):
This is no longer guarded with #if ENABLE(VIDEO) since the Document methods it calls
are no longer guarded.
* page/Page.h:
2014-10-28 Chris Dumez <cdumez@apple.com>
Unreviewed comment fix from r175267.
Fix namespace name in comment.
* css/StyleBuilderCustom.h:
2014-10-28 Jer Noble <jer.noble@apple.com>
REGRESSION(r171593) [Mac] Media controls create a large (and unnecessary) backing store
https://bugs.webkit.org/show_bug.cgi?id=137757
Reviewed by Eric Carlson.
In r171593, a <div> was added to the media controls which is only ever used on iOS. Instead
of creating and adding this <div> in mediaControlsApple.js (which is used on OS X), this
<div> should be created and added in mediaControlsiOS.js, which requires overloading
Controller.addControls.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel.hidden): Drive-by fix: allow the panel itself to be hidden.
(video::-webkit-media-controls-panel-composited-parent): Deleted.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls): Remove the composited parent.
(Controller.prototype.addControls): Ditto.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.createControls): Create the composited parent.
(ControllerIOS.prototype.addControls): Copied from (previous) apple.js.
2014-10-28 Chris Dumez <cdumez@apple.com>
Move "Number" CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138125
Reviewed by Antti Koivisto.
Move "Number" CSS properties from DeprecatedStyleBuilder to the new
StyleBuilder:
-webkit-hyphenate-limit-after
-webkit-hyphenate-limit-before
-webkit-shape-image-threshold
-webkit-hyphenate-limit-lines
They are now generated from CSSPropertyNames.in
For -webkit-hyphenate-limit-lines, I used custom code instead of
the Number converter as it required special handling for the id
value. This patch thus adds support for [Custom=Value] to
CSSPropertyNames.in and the custom code goes into
css/StyleBuilderCustom.h.
No new tests, no behavior change.
* WebCore.xcodeproj/project.pbxproj:
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyNumber::setValue): Deleted.
(WebCore::ApplyPropertyNumber::applyValue): Deleted.
(WebCore::ApplyPropertyNumber::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertNumber):
* css/StyleBuilderCustom.h: Added.
(WebCore::StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines):
* css/makeprop.pl:
2014-10-28 Zan Dobersek <zdobersek@igalia.com>
[WebCore] Remove uses of WTF::bind() in the Media Stream module
https://bugs.webkit.org/show_bug.cgi?id=138016
Reviewed by Eric Carlson.
Replace uses of WTF::bind() in the Media Stream module with C++11 lambdas.
Internal helper methods are removed in favor of inlining the code directly
into the lambdas. Range-based for-loops are deployed where appropriate.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::scheduleEventDispatch):
(WebCore::MediaStreamTrack::dispatchQueuedEvents): Deleted.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
(WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):
(WebCore::MediaStreamTrackSourcesRequest::callCompletionHandler): Deleted.
* Modules/mediastream/MediaStreamTrackSourcesRequest.h:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::constraintsValidated):
(WebCore::UserMediaRequest::userMediaAccessGranted):
(WebCore::UserMediaRequest::didCreateStream):
(WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
(WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
(WebCore::UserMediaRequest::requestPermission): Deleted.
(WebCore::UserMediaRequest::createMediaStream): Deleted.
(WebCore::UserMediaRequest::callSuccessHandler): Deleted.
(WebCore::UserMediaRequest::callErrorHandler): Deleted.
* Modules/mediastream/UserMediaRequest.h:
2014-10-28 Pascal Jacquemart <p.jacquemart@samsung.com>
Abandoned select option is reselected when shift selecting new options
https://bugs.webkit.org/show_bug.cgi?id=137553
Reviewed by Ryosuke Niwa.
Previous active selection is wrongly recorded by HTMLSelectElement after selecting a new item using
typeAhead. Fixed by clearing previously selected options before starting a new active selection.
Test: fast/forms/listbox-selection-after-typeahead.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::selectOption): Code re-ordering
2014-10-28 Milan Crha <mcrha@redhat.com>
Use constants from wtf/MathExtras.h
https://bugs.webkit.org/show_bug.cgi?id=137967
Reviewed by Darin Adler.
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::rotateCairoMatrixForVerticalOrientation):
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
(WebCore::RenderMathMLMenclose::updateLogicalHeight):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):
2014-10-28 David Hyatt <hyatt@apple.com>
Selection gap painting is ugly for ruby bases.
https://bugs.webkit.org/show_bug.cgi?id=138136
Reviewed by Dean Jackson.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::selectionGaps):
For ruby bases don't fill to the end of the block (in the block direction),
since ideographic baselines push that end below the text baseline.
(WebCore::RenderBlock::blockSelectionGaps):
* rendering/RenderBlockFlow.cpp:
Skip ruby bases for block selection gap filling.
2014-10-28 Zalan Bujtas <zalan@apple.com>
Speed up line parsing for simple line layout.
https://bugs.webkit.org/show_bug.cgi?id=137275
Reviewed by Antti Koivisto.
This patch speeds up the line parsing for simple line layout by
reducing the number of text measurement calls.
The parsing logic hasn't changed. We simply walk over
the whitespace/non-whitespace fragments and measure them to
figure out whether they fit.
The performance gain mainly comes from the more efficient line wrapping
so that we don't re-measure the fragment when it is pushed to
the next line.
No change in behaviour. (except the empty line-break run removal.)
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::skipWhitespace):
(WebCore::SimpleLineLayout::computeLineLeft):
(WebCore::SimpleLineLayout::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::TextFragment::isEmpty):
(WebCore::SimpleLineLayout::LineState::LineState):
(WebCore::SimpleLineLayout::LineState::commitAndCreateRun): adds uncommitted text to the line and creates a run out of it.
(WebCore::SimpleLineLayout::LineState::addUncommitted): appends fragment to the uncommitted text.
(WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): appends whitespace to the uncommitted text.
(WebCore::SimpleLineLayout::LineState::jumpTo): moves line's current position without committing text.
(WebCore::SimpleLineLayout::LineState::width): current width of the line including committed and uncommitted text.
(WebCore::SimpleLineLayout::LineState::fits): checks if committed + uncommitted text fits the line.
(WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace): post processing the trailing whitespace.
(WebCore::SimpleLineLayout::initializeLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine): breaks the fragments into 2 so that the first (sub)fragment fits the line.
(WebCore::SimpleLineLayout::nextFragment): returns the next valid fragment of the text.
(WebCore::SimpleLineLayout::createLineRuns): creates runs for the current line and returns when we can't fit more text on the line.
(WebCore::SimpleLineLayout::updateLineConstrains): updates left/right constrains for the current line.
(WebCore::SimpleLineLayout::createTextRuns): creates runs for the whole text.
(WebCore::SimpleLineLayout::isWhitespace): Deleted.
(WebCore::SimpleLineLayout::skipWhitespaces): Deleted.
(WebCore::SimpleLineLayout::measureWord): Deleted.
(WebCore::SimpleLineLayout::adjustRunOffsets): Deleted.
* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Run::Run):
2014-10-28 Alexey Proskuryakov <ap@apple.com>
Windows build fix.
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::switchToNewTestingSession): Use a WTF function
for getting current process ID instead of getpid().
2014-10-28 Mihnea Ovidenie <mihnea@adobe.com>
Clean up subtrees selection code
https://bugs.webkit.org/show_bug.cgi?id=137740
Reviewed by David Hyatt.
Clean up subtrees selection code. Add a new class SelectionSubtreeData
that keeps only the selection data. Have SelectionSubtreeRoot class embed
a SelectionSubtreeData member and keep the business logic methods.
No functionality changed therefore no new layout tests.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionStartEnd):
* rendering/RenderView.cpp:
(WebCore::RenderView::subtreeSelectionBounds):
(WebCore::RenderView::repaintSubtreeSelection):
(WebCore::RenderView::setSelection):
(WebCore::RenderView::splitSelectionBetweenSubtrees):
(WebCore::RenderView::updateSelectionForSubtrees):
(WebCore::RenderView::clearSubtreeSelection):
(WebCore::RenderView::applySubtreeSelection):
* rendering/RenderView.h:
* rendering/SelectionSubtreeRoot.cpp:
(WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
(WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
* rendering/SelectionSubtreeRoot.h:
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStart):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEnd):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionClear):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartEndPositions):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStart):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStartPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEnd):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEndPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::clearSelection):
(WebCore::SelectionSubtreeRoot::selectionData):
(WebCore::SelectionSubtreeRoot::setSelectionData):
(WebCore::SelectionSubtreeRoot::selectionStart): Deleted.
(WebCore::SelectionSubtreeRoot::selectionStartPos): Deleted.
(WebCore::SelectionSubtreeRoot::selectionEnd): Deleted.
(WebCore::SelectionSubtreeRoot::selectionEndPos): Deleted.
(WebCore::SelectionSubtreeRoot::selectionStartEndPositions): Deleted.
(WebCore::SelectionSubtreeRoot::selectionClear): Deleted.
(WebCore::SelectionSubtreeRoot::setSelectionStart): Deleted.
(WebCore::SelectionSubtreeRoot::setSelectionStartPos): Deleted.
(WebCore::SelectionSubtreeRoot::setSelectionEnd): Deleted.
(WebCore::SelectionSubtreeRoot::setSelectionEndPos): Deleted.
2014-10-28 Jer Noble <jer.noble@apple.com>
[Mac] The first software paint of a <video> element takes up to 2.5s.
https://bugs.webkit.org/show_bug.cgi?id=137754
Reviewed by Brent Fulgham.
It turns out that, if you pass nil to -[AVPlayerItemVideoOutput initWithPixelBufferAttributes:]
the video output will not attempt to conform the resulting pixel buffers into a particular format.
This means that adding such a video output to a AVPlayerItem should have almost no performance
penalty, since the video output does not even copy the resulting buffers, but rather just retains
and returns the ones from the AVPlayerLayer.
Create and attach an AVPlayerItemVideoOutput after creating the AVPlayerItem, but before attaching
the player item to the AVPlayer. This eliminates the reconfigure step which occurs after attaching
a video output to an already attached AVPlayerItem.
When creating the AVPlayerItemVideoOutput, pass in `nil` for the pixelBufferAttributes parameter.
Instead of blocking waiting for output from the AVPlayerItemVideoOutput during creating, block and
whait when asked to paint with the video output.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2014-10-28 Chris Dumez <cdumez@apple.com>
Move text decoration CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138121
Reviewed by Antti Koivisto.
Move text decoration CSS properties from DeprecatedStyleBuilder to the
new StyleBuilder so that they are generated from CSSPropertyNames.in.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyTextDecoration::applyValue): Deleted.
(WebCore::ApplyPropertyTextDecoration::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTextDecoration):
2014-10-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove GDK dependency from SharedTimerGtk
https://bugs.webkit.org/show_bug.cgi?id=138092
Reviewed by Martin Robinson.
It depends on GDK just to use GDK_PRIORITY_REDRAW constant, we can
use its value directly instead.
* PlatformGTK.cmake:
* platform/gtk/SharedTimerGtk.cpp:
(WebCore::setSharedTimerFireInterval):
2014-10-27 Andreas Kling <akling@apple.com>
Move RenderBlock::beingDestroyed() to RenderObject.
<https://webkit.org/b/138116>
Reviewed by Antti Koivisto.
Make "is being destroyed" a RenderObject concept instead of restricting
it to RenderBlocks. I'm guessing that this was specific to blocks due to
lack of bitfield space in RenderObject, and that's no longer an issue.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::willBeDestroyed):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::beingDestroyed): Deleted.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::destroy):
* rendering/RenderObject.h:
(WebCore::RenderObject::beingDestroyed):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
2014-10-27 Chris Fleizach <cfleizach@apple.com>
AX: input type=hidden is being exposed when aria-hidden=false
https://bugs.webkit.org/show_bug.cgi?id=138106
Reviewed by Benjamin Poulain.
If an input type=hidden was inside an aria-hidden=false, it would appear because
the lack of a RenderObject behind that object was not blocking its adoption into the AX tree.
We should explicity check for whether the type is hidden and then return an appropriate role.
Test: accessibility/input-type-hidden-in-aria-hidden-false.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):
2014-10-27 Alexey Proskuryakov <ap@apple.com>
https://trac.webkit.org/changeset/175233 broke many tests, fixing an incorrect '!'.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2014-10-24 David Hyatt <hyatt@apple.com>
text-combine needs to center text within the vertical space using glyph bounds
https://bugs.webkit.org/show_bug.cgi?id=138056
<rdar://problem/15403667>
Reviewed by Dean Jackson.
Added fast/text/tatechuyoko.html
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::RenderCombineText):
(WebCore::RenderCombineText::adjustTextOrigin):
(WebCore::RenderCombineText::combineText):
* rendering/RenderCombineText.h:
2014-10-27 Benjamin Poulain <benjamin@webkit.org>
Cleanup after r175213: fastGetAttribute().isNull() should be fastHasAttribute()
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
Darin spotted this mistake.
2014-10-27 Alexey Proskuryakov <ap@apple.com>
http/tests/cookies/third-party-cookie-relaxing.html is flaky on bots
https://bugs.webkit.org/show_bug.cgi?id=138098
Reviewed by Anders Carlsson.
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::switchToNewTestingSession):
Create a separate session for each WKTR/DRT process when testing.
2014-10-27 Chris Dumez <cdumez@apple.com>
Use separate HashMaps for common and uncommon headers in HTTPHeaderMap
https://bugs.webkit.org/show_bug.cgi?id=138079
Reviewed by Anders Carlsson.
Use separate HashMaps for common and uncommon headers in HTTPHeaderMap:
- a (faster) HashMap<HTTPHeaderMap, String> for common HTTP headers
- a HashMap<String, String, CaseFoldingHash> for uncommon ones
This avoids having to construct Strings from HTTPHeaderMap values for
storing. This also means we have less isolated String copies to do when
creating cross-thread data. The common headers HashMap should also be
a bit more efficient due to faster hashing and faster key comparison in
case of collision.
Some calls sites can also benefit from having direct access to common
headers of the request in HTTPHeaderName type.
This patch adds a new HTTPHeaderMapConstIterator iterator type for
HTTPHeaderMap so that call sites that do not need / want to distinguish
common / uncommon headers still do not need to. They can keep using
modern C++ loops over HTTPHeaderMap objects and get <String, String>
key/value pairs.
No new tests, no behavior change.
* loader/CrossOriginAccessControl.cpp:
(WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
Have isOnAccessControlSimpleRequestHeaderWhitelist() take a
HTTPHeaderName in argument instead of a String as only common headers
are in the whitelist.
(WebCore::isSimpleCrossOriginAccessRequest):
Call isOnAccessControlSimpleRequestHeaderWhitelist() only for common
HTTP headers.
* loader/CrossOriginAccessControl.h:
Have isOnAccessControlSimpleRequestHeaderWhitelist() take a
HTTPHeaderName in argument instead of a String as only common headers
are in the whitelist.
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
Call isOnAccessControlSimpleRequestHeaderWhitelist() only for common
HTTP headers.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
Call httpHeaderFields().commonHeaders().find() instead of
httpHeaderFields().find() as we are looking for a common header.
HTTPHeaderMap::find(HTTPHeaderName) was removed now that we have a
HashMap dedicated to common headers.
* loader/cache/CachedRawResource.cpp:
(WebCore::shouldIgnoreHeaderForCacheReuse):
Update argument type to be a HTTPHeaderName instead of a String as
only common HTTP headers can be ignored for cache reuse. The
implementation already dealt with HTTPHeaderName type and had to
call findHTTPHeaderName(). This is no longer needed now that the
call site now has direct access to common headers in HTTPHeaderName
type.
(WebCore::CachedRawResource::canReuse):
- Only call shouldIgnoreHeaderForCacheReuse() for common HTTP headers.
- Slightly optimize the second loop (the one over oldHeaderMap) to only
check that the key is present in newHeaderMap, without actually
comparing the String values. If the String values were different, the
first loop would have seen it already and we would have returned
early.
2014-10-27 Andreas Kling <akling@apple.com>
Devirtualize RenderDeprecatedFlexibleBox::isStretchingChildren().
<https://webkit.org/b/138096>
Reviewed by Chris Dumez.
This function is only ever called on a renderer after we've checked
that it's a RenderDeprecatedFlexibleBox, so make it non-virtual.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalHeight):
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderObject.h:
2014-10-27 Chris Dumez <cdumez@apple.com>
Reintroduce null check removed in r175222
https://bugs.webkit.org/show_bug.cgi?id=138087
Reviewed by Andreas Kling.
Reintroduce null check removed in r175222 as several layout tests are
crashing on the bots without them. At least the Pair pointer can be
null according to the assertion hits on the bots.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertRadius):
2014-10-27 Chris Dumez <cdumez@apple.com>
Move radius CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138087
Reviewed by Andreas Kling.
Move radius CSS properties from DeprecatedStyleBuilder to the new
StyleBuilder so that they are now generated from CSSPropertyNames.in.
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyBorderRadius::setValue): Deleted.
(WebCore::ApplyPropertyBorderRadius::applyValue): Deleted.
(WebCore::ApplyPropertyBorderRadius::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertRadius):
2014-10-27 Zan Dobersek <zdobersek@igalia.com>
Shrink MathMLOperatorDictionary::dictionary table
https://bugs.webkit.org/show_bug.cgi?id=137914
Reviewed by Darin Adler.
Improve packing of the Entry structure that's used for elements
of the MathMLOperatorDictionary::dictionary table. This drops the
size of the struct from 16 bytes to just 4 bytes, and shrinks the
size of the dictionary table from rougly 16 kB down to 4 kB.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::MathMLOperatorDictionary::ExtractKey):
(WebCore::RenderMathMLOperator::setOperatorProperties):
* rendering/mathml/RenderMathMLOperator.h:
2014-10-27 Andreas Kling <akling@apple.com>
Move canContainFixedPositionObjects() to RenderElement.
<https://webkit.org/b/138088>
Reviewed by Mihnea Ovidenie.
Only RenderElement can contain other renderers, so it's not really
natural to answer this question on RenderObject anyway.
Moving it to RenderElement lets it access more efficient getters
that don't have to handle the RenderText case.
* rendering/RenderElement.h:
(WebCore::RenderElement::canContainFixedPositionObjects):
* rendering/RenderObject.h:
(WebCore::RenderObject::canContainFixedPositionObjects): Deleted.
2014-10-26 Benjamin Poulain <benjamin@webkit.org>
Images with usemap should not have a link state
https://bugs.webkit.org/show_bug.cgi?id=138071
Reviewed by Andreas Kling.
Image tags were incorrectly getting a link state if a usemap is defined.
The <area> of the usemap is supposed to get the link state, but never the image.
Unfortunately, the Accessibility code was relying on the wrong behavior
to set the ImageMapRole, most of the patch is updating that code to get
the correct role without the link state.
Test: fast/selectors/images-with-usemap-should-not-match-link.html
The accessibility code is covered by a few tests in accessibility/.
The test accessibility/aria-used-on-image-maps.html ensure the <area>
elements also get the correct role.
* dom/Node.h:
(WebCore::Node::setIsLink):
(WebCore::Node::clearIsLink): Deleted.
Unused code.
(WebCore::Node::isLink):
Move with its setter for clarity.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
This is the bug.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
Here the branches for the role ImageMap where behind isLink() which would
never be valid after the fix.
My fix here was to use the same definition previously set by HTMLImageElement::parseAttribute(),
any usemap attribute qualifies the node for ImageMapRole.
(WebCore::AccessibilityRenderObject::anchorElement):
(WebCore::AccessibilityRenderObject::linkedUIElements):
(WebCore::AccessibilityRenderObject::url):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isAnchor): Deleted.
Something funny I discovered is the Accessibility code worked around the bug
by defining isAnchor() that exclude images from isLink().
Since isLink() will no longer be true for images, the hack can be removed.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::anchorElement):
(WebCore::AccessibilityNodeObject::isAnchor): Deleted.
* accessibility/AccessibilityNodeObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2014-10-26 Benjamin Poulain <benjamin@webkit.org>
Replace Element::didAffectSelector() by setNeedsStyleRecalc()
https://bugs.webkit.org/show_bug.cgi?id=138080
Reviewed by Andreas Kling.
Element::didAffectSelector() was probably an optimization at some point,
with the current code is does nothing more than setNeedsStyleRecalc().
* dom/Document.cpp:
(WebCore::Document::setCSSTarget):
* dom/Element.cpp:
(WebCore::Element::didAffectSelector): Deleted.
* dom/Element.h:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::disabledStateChanged):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::setIndeterminate):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::parseAttribute):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::parseAttribute):
(WebCore::HTMLOptionElement::setSelectedState):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::didElementStateChange):
2014-10-26 Andreas Kling <akling@apple.com>
Move some RenderObject member functions to RenderElement.
<https://webkit.org/b/138085>
Reviewed by Chris Dumez.
Move these two functions to RenderElement:
- handleDynamicFloatPositionChange()
- removeAnonymousWrappersForInlinesIfNecessary()
Also make childBecameNonInline() take a RenderElement& since
that's all we ever pass to it.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::childBecameNonInline):
* rendering/RenderBlock.h:
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::childBecameNonInline):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::handleDynamicFloatPositionChange):
(WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary):
* rendering/RenderElement.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::childBecameNonInline):
* rendering/RenderInline.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::handleDynamicFloatPositionChange): Deleted.
(WebCore::RenderObject::removeAnonymousWrappersForInlinesIfNecessary): Deleted.
* rendering/RenderObject.h:
2014-10-26 Andreas Kling <akling@apple.com>
Move continuation teardown from subclasses to RenderBoxModelObject.
<https://webkit.org/b/138081>
Reviewed by Antti Koivisto.
Let RenderBoxModelObject::willBeDestroyed() tear down any continuation
instead of having every subclass do this themselves.
Also added a RenderElement bit tracking whether the renderer has a
continuation. This avoids a hash lookup every time we destroy a
RenderBoxModelObject that didn't have a continuation.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
* rendering/RenderBoxModelObject.cpp:
(WebCore::continuationMap):
(WebCore::RenderBoxModelObject::willBeDestroyed):
(WebCore::RenderBoxModelObject::continuation):
(WebCore::RenderBoxModelObject::setContinuation):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
* rendering/RenderElement.h:
(WebCore::RenderElement::setHasContinuation):
(WebCore::RenderElement::hasContinuation):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):
2014-10-25 Benjamin Poulain <benjamin@webkit.org>
Remove a useless variable from SelectorCodeGenerator::generateElementMatchesSelectorList()
https://bugs.webkit.org/show_bug.cgi?id=138076
Reviewed by Alexey Proskuryakov.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
The variable elementAddressRegisterIndex was just needed for debugging, it is useless now.
2014-10-18 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: timelines should not count time elapsed while paused in the debugger
https://bugs.webkit.org/show_bug.cgi?id=136351
Reviewed by Timothy Hatcher.
To avoid counting time elapsed while the debugger is paused, timeline records should
keep track of time elapsed since the start of timeline capturing, rather than wall clock
timestamps. We can easily compute elapsed time by sharing a Stopwatch instance through the
inspector environment. The stopwatch runs with timelines and is paused with the debugger,
so subsequent time measurements will not include time elapsed while the debugger is paused.
This refactoring is safe because start and end times are only used to graph records; the
timestamp's actual value is irrelevant and is not displayed in the user interface. Date
timestamps are still included with network-related records as part of their header data.
No new tests, because we cannot reliably test timing changes induced by debugger pauses.
It is possible for records to accrue time before the debugger pauses or after it resumes.
* inspector/InspectorCSSAgent.cpp: Remove unnecessary include.
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::executionStopwatch): Add a shared stopwatch.
* inspector/InspectorController.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::timestamp): Redirect to the shared stopwatch.
(WebCore::InspectorPageAgent::domContentEventFired):
(WebCore::InspectorPageAgent::loadEventFired):
* inspector/InspectorPageAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::timestamp): Redirect to the shared stopwatch.
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::didReceiveResponse):
(WebCore::InspectorResourceAgent::didReceiveData):
(WebCore::InspectorResourceAgent::didFinishLoading):
(WebCore::InspectorResourceAgent::didFailLoading):
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorResourceAgent::didCloseWebSocket):
(WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
(WebCore::InspectorResourceAgent::didSendWebSocketFrame):
(WebCore::InspectorResourceAgent::didReceiveWebSocketFrameError):
* inspector/InspectorResourceAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::internalStart): Start and stop the stopwatch with timelines.
(WebCore::InspectorTimelineAgent::internalStop):
(WebCore::InspectorTimelineAgent::timestamp): Redirect to the shared stopwatch.
(WebCore::startProfiling):
(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::willCallFunction):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::TimelineTimeConverter::reset): Deleted.
* inspector/InspectorTimelineAgent.h:
(WebCore::TimelineTimeConverter::TimelineTimeConverter): Deleted.
(WebCore::TimelineTimeConverter::fromMonotonicallyIncreasingTime): Deleted.
(WebCore::InspectorTimelineAgent::timeConverter): Deleted.
* inspector/TimelineRecordFactory.cpp:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::executionStopwatch): Add a shared stopwatch.
* inspector/WorkerInspectorController.h:
2014-10-25 Dan Bernstein <mitz@apple.com>
Fix builds using the public SDK.
* platform/spi/cocoa/NSExtensionSPI.h:
2014-10-24 Said Abou-Hallawa <sabouhallawa@apple.com>
Clamp wordSpacing percentage value.
https://bugs.webkit.org/show_bug.cgi?id=129350.
Reviewed by Zalan Bujtas.
When the CSS wordSpacing property is percentage, its value has to be within the
pre-defined min/max values for the CSS length type. This is done the same way
the wordSpacing of type <length> is handled.
Tests: css3/infinite-word-spacing.html.
Move the definitions of minValueForCssLength and maxValueForCssLength from the
.cpp file to the .h file.
* css/CSSPrimitiveValue.cpp:
* css/CSSPrimitiveValue.h:
Clamp the wordSpacing value to minValueForCssLength and maxValueForCssLength when
its type is percentage.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyWordSpacing::applyValue):
2014-10-24 Chris Dumez <cdumez@apple.com>
[Mac] Use modern loops in ResourceRequestCocoa.mm
https://bugs.webkit.org/show_bug.cgi?id=138052
Reviewed by Darin Adler.
Use modern loops in ResourceRequestCocoa.mm and leverage Objective-C's
fast enumeration.
No new tests, no behavior change.
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest):
- Use NSDictionary's block-based enumeration as we enumerate both keys
and values and this is faster than using fast enumeration of the keys
then calling [NSDictionary objectForKey:]
- Use Objective C's fast enumeration for
contentDispositionEncodingFallbackArray as this is faster and shorter
than index based access. Also use reserveCapacity() /
uncheckedAppend() for m_responseContentDispositionEncodingFallbackArray
as we know how many elements were are going to append in the common
case.
(WebCore::ResourceRequest::doUpdatePlatformRequest):
- Use fast enumeration for [nsRequest allHTTPHeaderFields] dictionary
keys instead of calling [NSDictionary allKeys] and then doing
index-based iteration, to avoid copying the keys to a new array.
Also do a forward enumeration instead of a reverse one. I don't see
why a backward enumeration would be necessary here. We are not
modifying the NSDictionary we are iterating over as
[nsRequest allHTTPHeaderFields] makes a copy.
- Use a modern C++ loop for
m_responseContentDispositionEncodingFallbackArray.
2014-10-24 Zalan Bujtas <zalan@apple.com>
Replace INT_MIN/MAX / kFixedPointDenominator with intMin/MaxForLayoutUnit.
https://bugs.webkit.org/show_bug.cgi?id=138047
Reviewed by Andreas Kling.
No change in functionality.
* css/CSSPrimitiveValue.cpp:
2014-10-24 Alexey Proskuryakov <ap@apple.com>
REGRESSION(r174877): WebProcess sends an empty Cookies HTTP header
https://bugs.webkit.org/show_bug.cgi?id=138053
Reviewed by Chris Dumez.
Fixes existing tests.
* platform/network/mac/CookieJarMac.mm: (WebCore::cookiesForSession): Restore the
behavior of returning a null string when there are no cookies.
2014-10-24 Chris Dumez <cdumez@apple.com>
[Mac] Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
https://bugs.webkit.org/show_bug.cgi?id=138039
Reviewed by Darin Adler.
Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
for case-insensitive string comparison instead of converting to UTF-8 and then
using strcasecmp().
No new tests, no behavior change.
* platform/mac/QuickLookMac.mm:
(WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
2014-10-24 Chris Dumez <cdumez@apple.com>
Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest() / doUpdatePlatformHTTPBody()
https://bugs.webkit.org/show_bug.cgi?id=138049
Reviewed by Alexey Proskuryakov.
Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest()
/ doUpdatePlatformHTTPBody(). It turns out that about half the time, the
m_nsRequest member is already mutable so it is unnecessary to call
[NSURLRequest mutableCopy], we can just cast it to an NSMutableURLRequest* and
avoid copying.
This patch also moves the code to a new ensureMutableNSURLRequest() method to
avoid duplicating the logic.
I see that we spend ~21% less time in these 2 functions when loading
http://flickr.com/explore/ (39.6ms -> 31.2ms).
No new tests, no behavior change.
* platform/network/cf/ResourceRequest.h:
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::ensureMutableNSURLRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2014-10-24 Chris Dumez <cdumez@apple.com>
Move ComputeLength CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138036
Reviewed by Andreas Kling.
Move ComputeLength CSS properties from DeprecatedStyleBuilder to the
new StyleBuilder so that they are now generated. 3 Converters are
provided for these properties: ComputedLength / LineWidth / Spacing.
This is inspired by the following Blink revision by
<timloh@chromium.org>:
https://src.chromium.org/viewvc/blink?view=rev&revision=154012
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyComputeLength::setValue): Deleted.
(WebCore::ApplyPropertyComputeLength::applyValue): Deleted.
(WebCore::ApplyPropertyComputeLength::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertComputedLength):
(WebCore::StyleBuilderConverter::convertLineWidth):
(WebCore::StyleBuilderConverter::convertSpacing):
2014-10-24 Chris Dumez <cdumez@apple.com>
Make ScriptWrappable's destructor protected instead of public
https://bugs.webkit.org/show_bug.cgi?id=138037
Reviewed by Andreas Kling.
Make ScriptWrappable's destructor protected instead of public as it is
not virtual and this class is subclassed a lot.
No new tests, no behavior change.
* bindings/js/ScriptWrappable.h:
(WebCore::ScriptWrappable::~ScriptWrappable):
2014-10-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][Cairo] Remove GTK dependency of WidgetBackingStoreGtkX11
https://bugs.webkit.org/show_bug.cgi?id=138004
Reviewed by Gustavo Noronha Silva.
Rename all WidgetBackingStore* classes as
BackingStoreBackendCairo* since all of them are actually
BackingStore backends based on cairo, and move them from
platform/cairo and platform/gtk to platform/graphics/cairo.
BackingStoreBackendCairo is the base class that contains common
members like the surface and size. BackingStoreBackendCairoImpl is
the implementation using only cairo, and BackingStoreBackendCairoX11
using xlib. BackingStoreBackendCairoX11 receives all the X11
information it needs as constructor parameters, instead of using a
GtkWidget and GTK+ X11 API. BackingStoreBackendCairoImpl receives
the surface already created as constructor parameter, so that it
doesn't have any platform specific code now.
* PlatformEfl.cmake: Update compilation files.
* PlatformGTK.cmake: Ditto.
* platform/cairo/WidgetBackingStoreCairo.cpp: Removed.
* platform/graphics/cairo/BackingStoreBackendCairo.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStore.h.
(WebCore::BackingStoreBackendCairo::~BackingStoreBackendCairo):
(WebCore::BackingStoreBackendCairo::surface):
(WebCore::BackingStoreBackendCairo::size):
(WebCore::BackingStoreBackendCairo::BackingStoreBackendCairo):
* platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp: Added.
(WebCore::BackingStoreBackendCairoImpl::BackingStoreBackendCairoImpl):
(WebCore::BackingStoreBackendCairoImpl::~BackingStoreBackendCairoImpl):
(WebCore::BackingStoreBackendCairoImpl::scroll):
* platform/graphics/cairo/BackingStoreBackendCairoImpl.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStoreCairo.h.
* platform/graphics/cairo/BackingStoreBackendCairoX11.cpp: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.cpp.
(WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11):
(WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11):
(WebCore::BackingStoreBackendCairoX11::scroll):
* platform/graphics/cairo/BackingStoreBackendCairoX11.h: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.h.
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::cairoSurfaceGetDeviceScale):
* platform/graphics/cairo/CairoUtilities.h:
2014-10-23 Zalan Bujtas <zalan@apple.com>
WebContent crash at WebCore::RenderTextControl::textFormControlElement const.
https://bugs.webkit.org/show_bug.cgi?id=138035
Reviewed by Antti Koivisto.
NULL-check element().renderer() before using it.
* html/SearchInputType.cpp:
(WebCore::SearchInputType::didSetValueByUserEdit):
2014-10-23 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove HarfBuzzRun::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137945
Reviewed by Ryosuke Niwa.
As a step to use std::unique_ptr<>, this patch applies std::unique_ptr<> and std::make_unique<>.
Thus HarfBuzzRun::create() is needed no longer.
No new tests, no behavior changes.
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::collectHarfBuzzRuns):
* platform/graphics/harfbuzz/HarfBuzzShaper.h:
(WebCore::HarfBuzzShaper::HarfBuzzRun::create): Deleted.
2014-10-23 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewed iOS build fix
* editing/FrameSelection.cpp:
2014-10-23 Chris Dumez <cdumez@apple.com>
[Mac] Optimize URL::createCFURL() for the common case
https://bugs.webkit.org/show_bug.cgi?id=138030
Reviewed by Alexey Proskuryakov.
Optimize URL::createCFURL() for the common case by adding a fast path
for when the URL String is already 8-bit (common case).
When the string is 8-bit, we don't need to copy the bytes into a
temporary buffer and we can construct the CFURLRef directly from it.
This makes URL::createCFURL() ~34% faster on my machine.
No new tests, no behavior change.
* platform/mac/URLMac.mm:
(WebCore::URL::createCFURL):
2014-10-23 Myles C. Maxfield <mmaxfield@apple.com>
Carets in GMail and iCloud compositions are the foreground text color
https://bugs.webkit.org/show_bug.cgi?id=138029
Reviewed by Simon Fraser.
Previously, we were only checking whether the background colors of the foreground and background
elements were the same, rather than taking validity and opacity into consideration.
Test: editing/caret/color-span-inside-editable-background.html
* editing/FrameSelection.cpp:
(WebCore::disappearsIntoBackground):
(WebCore::CaretBase::paintCaret):
2014-10-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide a way to have alternate inspector agents
https://bugs.webkit.org/show_bug.cgi?id=137901
Reviewed by Brian Burg.
* Configurations/FeatureDefines.xcconfig:
2014-10-23 Simon Fraser <simon.fraser@apple.com>
Don't assume that style.overflowX() == style.overflowY()
https://bugs.webkit.org/show_bug.cgi?id=138028
Reviewed by Zalan Bujtas.
WebKit doesn't support independent overflow scroll/hidden on different axes,
but the RenderStyle does report the correct values. So check both overflowX()
and overflowY() in a couple of places where we need to.
* rendering/RenderLayerCompositor.cpp:
(WebCore::styleHasTouchScrolling):
(WebCore::styleChangeRequiresLayerRebuild):
2014-10-23 Chris Dumez <cdumez@apple.com>
Get rid of unnecessary vtables in WebKit
https://bugs.webkit.org/show_bug.cgi?id=138024
Reviewed by Benjamin Poulain.
Get rid of unnecessary vtables in WebKit by de-virtualizing destructors
when possible and marking the class as final to make sure people don't
subclass it.
No new tests, no behavior change.
* WebCore.exp.in:
* css/WebKitCSSMatrix.h:
* css/WebKitCSSMatrix.idl:
* html/canvas/WebGLContextGroup.h:
* html/canvas/WebGLGetInfo.h:
* html/canvas/WebGLUniformLocation.h:
(WebCore::WebGLUniformLocation::~WebGLUniformLocation): Deleted.
* html/canvas/WebGLUniformLocation.idl:
* inspector/DOMPatchSupport.h:
* inspector/InspectorHistory.h:
* inspector/InspectorStyleSheet.h:
* page/WheelEventDeltaTracker.h:
* page/scrolling/ScrollLatchingState.h:
* platform/audio/Biquad.h:
* platform/graphics/Pattern.h:
2014-10-23 Chris Dumez <cdumez@apple.com>
Clean up virtual functions in dom/
https://bugs.webkit.org/show_bug.cgi?id=138019
Reviewed by Benjamin Poulain.
Clean up virtual functions in dom/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Using 'override' when appropriate
- Explicitly marking functions / destructors as virtual when they are
inherently virtual
- Making isXXX() virtual functions private on XXX classes to avoid
unnecessary type checks
- Dropping final for virtual functions in classes already marked as
final
No new tests, no behavior change.
* WebCore.exp.in:
* dom/AutocompleteErrorEvent.h:
* dom/BeforeLoadEvent.h:
(WebCore::BeforeLoadEventInit::BeforeLoadEventInit):
* dom/BeforeTextInsertedEvent.h:
* dom/ClipboardEvent.h:
* dom/CompositionEvent.h:
* dom/CustomEvent.h:
* dom/DeviceMotionController.h:
(WebCore::DeviceMotionController::~DeviceMotionController): Deleted.
* dom/DeviceMotionEvent.h:
* dom/DeviceOrientationController.h:
(WebCore::DeviceOrientationController::~DeviceOrientationController): Deleted.
* dom/DeviceOrientationEvent.h:
* dom/Document.h:
* dom/DocumentFragment.h:
* dom/ErrorEvent.h:
* dom/FocusEvent.h:
* dom/HashChangeEvent.h:
* dom/KeyboardEvent.h:
* dom/LiveNodeList.h:
* dom/MessageEvent.h:
* dom/MessagePort.h:
* dom/MouseEvent.h:
* dom/MouseRelatedEvent.h:
* dom/MutationEvent.h:
* dom/NamedFlowCollection.h:
* dom/OverflowEvent.h:
* dom/PageTransitionEvent.h:
* dom/PendingScript.h:
* dom/PopStateEvent.h:
* dom/RawDataDocumentParser.h:
(WebCore::RawDataDocumentParser::finish): Deleted.
(WebCore::RawDataDocumentParser::flush): Deleted.
(WebCore::RawDataDocumentParser::insert): Deleted.
(WebCore::RawDataDocumentParser::append): Deleted.
* dom/ScriptableDocumentParser.h:
* dom/SecurityPolicyViolationEvent.h:
* dom/TextEvent.h:
* dom/TouchEvent.h:
* dom/TransitionEvent.h:
* dom/UIEvent.h:
* dom/WebKitAnimationEvent.h:
* dom/WebKitTransitionEvent.h:
* dom/WheelEvent.h:
* page/DeviceController.h:
(WebCore::DeviceController::~DeviceController):
2014-10-23 Tim Horton <timothy_horton@apple.com>
Add some SPI headers for NSExtension and NSSharingService{Picker}
https://bugs.webkit.org/show_bug.cgi?id=138027
Reviewed by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/cocoa/NSExtensionSPI.h: Added.
* platform/spi/mac/NSSharingServicePickerSPI.h: Added.
* platform/spi/mac/NSSharingServiceSPI.h: Added.
Add modern SPI headers for NSExtension, and NSSharingService{Picker}.
* rendering/RenderThemeMac.mm:
Replace redefinitions with an SPI header #import.
2014-10-23 Eric Carlson <eric.carlson@apple.com>
[Mac] don't update caption user style sheet during parsing
https://bugs.webkit.org/show_bug.cgi?id=137983
rdar://problem/18735366
Reviewed by Jer Noble.
No new tests, existing tests cover the changes.
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF): Initialize m_updateStyleSheetTimer.
(WebCore::CaptionUserPreferencesMediaAF::updateTimerFired): Call updateCaptionStyleSheetOveride.
(WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges): Prime a timer to update
the captions style sheet after a slight delay.
2014-10-23 Chris Dumez <cdumez@apple.com>
Move remaining Length-type properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138012
Reviewed by Antti Koivisto.
Move remaining Length-type properties from DeprecatedStyleBuilder to
the new StyleBuilder so that they are now generated from
CSSPropertyNames.in as well. The patch introduces a couple of type
converters for those: "LengthSizing / LengthMaxSizing".
No new tests, no behavior change.
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertLengthSizing):
(WebCore::StyleBuilderConverter::convertLengthMaxSizing):
2014-10-23 Jer Noble <jer.noble@apple.com>
[Mac] Safari cannot play 'audio/amr' content.
https://bugs.webkit.org/show_bug.cgi?id=137894
Reviewed by Eric Carlson.
Test: media/media-can-play-case-insensitive.html
Sites are returning 'video/amr' for AMR audio content, but the IANA spec says 'audio/AMR', which is also what
AVFoundation claims to support. However, MIME types are supposed to be case-insensitive. When creating our
mime type cache, case-fold to lower all MIME types given to us by our media frameworks.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::mimeTypeCache):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::addFileTypesToCache):
2014-10-23 Chris Dumez <cdumez@apple.com>
Move Length-type CSS properties from DeprecatedStyleBuilder to the new Style Builder
https://bugs.webkit.org/show_bug.cgi?id=138000
Reviewed by Andreas Kling.
Move most Length-type CSS properties from DeprecatedStyleBuilder to the
new Style Builder so that they are now generated. This patch adds
support for a "Converter" option in CSSPropertyNames.in that can be
used to specify a type converter function in
css/StyleBuilderConverter.h. This patch adds support for Length and
LengthOrAuto converters so that most Length-type properties can now be
generated.
Another converter (likely called "LengthSizing") will be needed to
generate the remaining Length-type properties. This will be taken care
of in a follow-up patch.
This patch is inspired by the following Blink revision by
<timloh@chromium.org>:
https://src.chromium.org/viewvc/blink?view=rev&revision=150500
No new tests, no behavior change.
* WebCore.xcodeproj/project.pbxproj:
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/SVGCSSPropertyNames.in:
* css/StyleBuilder.h:
* css/StyleBuilderConverter.h: Added.
(WebCore::StyleBuilderConverter::convertLength):
(WebCore::StyleBuilderConverter::convertLengthOrAuto):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* css/makeprop.pl:
2014-10-23 Zan Dobersek <zdobersek@igalia.com>
Const-ify static s_resourceType members in RenderSVGResource* classes
https://bugs.webkit.org/show_bug.cgi?id=137911
Reviewed by Andreas Kling.
Make s_resourceType static members in RenderSVGResource* classes const.
Also update the resourceType() methods, where necessary, so that they
return the s_resourceType constant.
* rendering/svg/RenderSVGResourceClipper.cpp:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceLinearGradient.cpp:
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.cpp:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.cpp:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.cpp:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGResourceSolidColor.cpp:
* rendering/svg/RenderSVGResourceSolidColor.h:
2014-10-23 Zan Dobersek <zdobersek@igalia.com>
[TexMap] Clean up virtual method declarations in GraphicsLayerTextureMapper
https://bugs.webkit.org/show_bug.cgi?id=137957
Reviewed by Martin Robinson.
Added override notation to the GraphicsLayerTextureMapper methods that are
overriding the base methods from the GraphicsLayer class and don't have it yet.
Also reordered these methods to follow the order of declaration in the
GraphicsLayer class.
Removed ::setName() and ::willBeDestroyed() methods since they just called
the base class' methods.
Also removed the ::solidColor() and ::changeMask() methods. The first one was
only called in one place which can reference the m_solidColor member directly,
and the second one wasn't used at all.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::GraphicsLayerTextureMapper::setName): Deleted.
(WebCore::GraphicsLayerTextureMapper::willBeDestroyed): Deleted.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::GraphicsLayerTextureMapper::solidColor): Deleted.
(WebCore::GraphicsLayerTextureMapper::usesContentsLayer): Deleted.
(WebCore::GraphicsLayerTextureMapper::platformLayer): Deleted.
(WebCore::GraphicsLayerTextureMapper::changeMask): Deleted.
2014-10-23 Krzysztof Czech <k.czech@samsung.com>
AX: Do the early return when role is different than UnknownRole
https://bugs.webkit.org/show_bug.cgi?id=137880
Reviewed by Chris Fleizach.
We do not need to call ariaRoleAttribute() to check whether m_ariaRole is different than UnknownRole.
Just check m_ariaRole instead.
No new tests, no behavior change, just some cleanup
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::determineAccessibilityRole):
2014-10-23 Yusuke Suzuki <utatane.tea@gmail.com>
CSS JIT: Implement :matches
https://bugs.webkit.org/show_bug.cgi?id=137947
Reviewed by Benjamin Poulain.
Initial patch for supporting :matches in CSS JIT.
In this patch, we implement :matches
by leveraging the generalized nested backtracking implementation.
Tests: fast/selectors/matches-backtracking.html
fast/selectors/matches-complex.html
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::hasAnyCombinators):
(WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
(WebCore::SelectorCompiler::computeBacktrackingInformation):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesMatchesPseudoClass):
2014-10-23 Milan Crha <mcrha@redhat.com>
RenderThemeGtk::mediaControlsScript() is not defined when VIDEO is disabled.
<https://webkit.org/b/137970>.
Reviewed by Carlos Garcia Campos.
* rendering/RenderThemeGtk.cpp:
2014-10-22 Milan Crha <mcrha@redhat.com>
Do not include GraphicsContext3D.h when 3D_GRAPHICS is not used.
<https://webkit.org/b/137969>.
Reviewed by Carlos Garcia Campos.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2014-10-22 Milan Crha <mcrha@redhat.com>
Do not build WidgetBackingStoreGtkX11 when not used.
<https://webkit.org/b/137972>.
Reviewed by Carlos Garcia Campos.
* platform/gtk/WidgetBackingStoreGtkX11.cpp:
* platform/gtk/WidgetBackingStoreGtkX11.h:
2014-10-22 Simon Fraser <simon.fraser@apple.com>
[iOS] Toggling overflow:scroll to hidden on element with -webkit-overflow-scrolling:touch can cause children to disappear
https://bugs.webkit.org/show_bug.cgi?id=137999
rdar://problem/18425550
Reviewed by Zalan Bujtas.
When toggling overflow from scroll to hidden on an element with -webkit-overflow-scrolling:touch,
we'd fail to do a compositing layer rebuild, which caused various issues like unparented
descendants, and misplaced and unrepainted content.
This happened because we'd get to RenderLayerBacking::updateConfiguration() via styleChanged
with the view needing layout, so never hit the updateScrollingLayers() code, and the subsequent
updateCompositingLayers() would be a no-op.
Fix by explicitly triggering a layer rebuild when style changes such that the touch-scrollability
of an element changes, as we do for changes in clip.
Test: compositing/scrolling/touch-scroll-to-clip.html
* rendering/RenderLayerCompositor.cpp:
(WebCore::isScrollableOverflow):
(WebCore::styleHasTouchScrolling):
(WebCore::styleChangeRequiresLayerRebuild):
2014-10-22 Chris Dumez <cdumez@apple.com>
Clean up virtual functions in rendering/
https://bugs.webkit.org/show_bug.cgi?id=137984
Reviewed by Darin Adler.
Clean up virtual functions in rendering/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Using 'override' when appropriate
- Explicitly marking functions / destructors as virtual when they are
inherently virtual
- Dropping virtual destructors when the class does not have subclasses
and mark the class as final, to get rid of unnecessary vtables
- Making isXXX() virtual functions private on XXX classes to avoid
unnecessary type checks
- De-virtualizing some functions that do not need to be virtual
- Dropping final for virtual functions in classes already marked as
final
No new tests, no behavior change.
* html/shadow/SliderThumbElement.cpp:
* rendering/AutoTableLayout.h:
* rendering/ClipPathOperation.h:
(WebCore::ClipPathOperation::type):
(WebCore::ClipPathOperation::isSameType):
* rendering/EllipsisBox.h:
* rendering/FixedTableLayout.h:
* rendering/InlineElementBox.h:
* rendering/RenderBlockFlow.h:
* rendering/RenderCombineText.h:
* rendering/RenderCounter.h:
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.h:
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.h:
* rendering/RenderLayerFilterInfo.h:
* rendering/RenderLineBreak.h:
* rendering/RenderMarquee.h:
* rendering/RenderMediaControlElements.h:
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderQuote.h:
* rendering/RenderRegion.h:
(WebCore::RenderRegion::renderName): Deleted.
* rendering/RenderReplica.h:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.h:
* rendering/RenderScrollbar.h:
* rendering/RenderScrollbarPart.h:
* rendering/RenderScrollbarTheme.h:
(WebCore::RenderScrollbarTheme::~RenderScrollbarTheme): Deleted.
(WebCore::RenderScrollbarTheme::scrollbarThickness): Deleted.
(WebCore::RenderScrollbarTheme::buttonsPlacement): Deleted.
(WebCore::RenderScrollbarTheme::supportsControlTints): Deleted.
(WebCore::RenderScrollbarTheme::shouldCenterOnThumb): Deleted.
(WebCore::RenderScrollbarTheme::initialAutoscrollTimerDelay): Deleted.
(WebCore::RenderScrollbarTheme::autoscrollTimerDelay): Deleted.
(WebCore::RenderScrollbarTheme::registerScrollbar): Deleted.
(WebCore::RenderScrollbarTheme::unregisterScrollbar): Deleted.
* rendering/RenderSnapshottedPlugIn.h:
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextFragment.h:
* rendering/RenderThemeGtk.h:
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeWin.h:
* rendering/RenderVideo.h:
* rendering/TextAutosizer.h:
* rendering/TrailingFloatsRootInlineBox.h:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLMenclose.h:
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRadicalOperator.h:
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLScripts.h:
* rendering/mathml/RenderMathMLToken.h:
* rendering/mathml/RenderMathMLUnderOver.h:
* rendering/shapes/BoxShape.h:
* rendering/shapes/PolygonShape.h:
* rendering/shapes/RasterShape.h:
* rendering/shapes/RectangleShape.h:
* rendering/style/BasicShapes.h:
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::computeIntrinsicDimensions): Deleted.
* rendering/svg/RenderSVGBlock.h:
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.h:
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGRootInlineBox.h:
2014-10-22 Jer Noble <jer.noble@apple.com>
REGRESSION(r175000): Crash in SourceBufferPrivateAVFObjC::destroyParser()
https://bugs.webkit.org/show_bug.cgi?id=137990
Reviewed by Alexey Proskuryakov.
NULL-check m_mediaSource before using.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::destroyParser):
2014-10-22 Said Abou-Hallawa <sabouhallawa@apple.com>
SVG loaded through html <img> can't request to load any external resources.
https://bugs.webkit.org/show_bug.cgi?id=137762.
Reviewed by Daniel Bates.
SVG images have unique security rules that prevent them from loading any external
resources. This patch enforces these rules in CachedResourceLoader::canRequest for
all non-data-uri resources.
The fix and the tests are ported but modified a little from the chromium fix:
http://src.chromium.org/viewvc/blink?view=rev&rev=176084
Test: http/tests/security/svg-image-with-cached-remote-image.html
http/tests/security/svg-image-with-css-cross-domain.html
For the SVG image, prevent loading any external sub-resource except for data urls.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):
2014-10-21 Ada Chan <adachan@apple.com>
MediaPlayerPrivateAVFoundation::hasAudio() returns false even when there is an audible AVMediaSelectionOption selected
https://bugs.webkit.org/show_bug.cgi?id=137935
Reviewed by Eric Carlson.
Set hasAudio to true if there's a selected audible AVMediaSelectionOption
after the call to updateAudioTracks(). Ditto for video.
Test: http/tests/media/hls/hls-audio-tracks-has-audio.html
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
* testing/Internals.cpp:
(WebCore::Internals::mediaElementHasCharacteristic):
* testing/Internals.h:
* testing/Internals.idl:
Add internals.mediaElementHasCharacteristic for the new test.
2014-10-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove WidgetBackingStoreCairo::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137943
Reviewed by Darin Adler.
WidgetBackingStoreCairo::create() can be replaced by std::make_unique<>.
Thus this patch removes it, then use std::make_unique<>|std::unique_ptr<>.
No new tests, no behavior changes.
* platform/cairo/WidgetBackingStoreCairo.cpp:
(WebCore::WidgetBackingStoreCairo::create): Deleted.
* platform/cairo/WidgetBackingStoreCairo.h:
* platform/gtk/WidgetBackingStoreGtkX11.cpp:
(WebCore::WidgetBackingStoreGtkX11::create): Deleted.
* platform/gtk/WidgetBackingStoreGtkX11.h:
2014-10-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove TextCheckerEnchant::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137944
Reviewed by Darin Adler.
TextCheckerEnchant::create() can be replaced by std::make_unique<> and std::unique_ptr<>.
No new tests, no behavior change.
* platform/text/enchant/TextCheckerEnchant.h:
(WebCore::TextCheckerEnchant::create): Deleted.
2014-10-22 Chris Dumez <cdumez@apple.com>
Avoid confusion between AccessibilityObject::isTable() / isAccessibilityTable()
https://bugs.webkit.org/show_bug.cgi?id=137899
Reviewed by Darin Adler.
Avoid confusion between AccessibilityObject::isTable() and
isAccessibilityTable(). isTable() is equivalent to
is<AccessibilityTable>(), while isAccessibilityTable() is an
AccessibilityTable that is exposed as an AccessibilityTable to the
platform.
This patch is renaming isAccessibilityTable() to
isExposableThroughAccessibility(), makes it non-virtual and defines it
on AccessibilityTable only, for clarity.
This patch also renames isTableExposableThroughAccessibility() to
computeIisTableExposableThroughAccessibility() as it is called only
once to initialize the m_isExposableThroughAccessibility data member.
No new tests, no behavior change.
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityARIAGrid.h:
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::parentTable):
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
(WebCore::AccessibilityARIAGridCell::columnIndexRange):
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::disclosedRows):
(WebCore::AccessibilityARIAGridRow::disclosedByRow):
(WebCore::AccessibilityARIAGridRow::parentTable):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::shouldUseAccessiblityObjectInnerText):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
(WebCore::appendChildrenToArray):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isAccessibilityTable): Deleted.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::ariaSelectedRows):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::AccessibilityTable):
(WebCore::AccessibilityTable::init):
(WebCore::AccessibilityTable::isExposableThroughAccessibility):
(WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
(WebCore::AccessibilityTable::addChildren):
(WebCore::AccessibilityTable::tableLevel):
(WebCore::AccessibilityTable::roleValue):
(WebCore::AccessibilityTable::computeAccessibilityIsIgnored):
(WebCore::AccessibilityTable::title):
(WebCore::AccessibilityTable::isAccessibilityTable): Deleted.
(WebCore::AccessibilityTable::isTableExposableThroughAccessibility): Deleted.
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::isTableCell):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
(WebCore::AccessibilityTableColumn::addChildren):
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::addChildren):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::isTableRow):
(WebCore::AccessibilityTableRow::parentTable):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetNChildren):
(webkitAccessibleRefChild):
(webkitAccessibleGetAttributes):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2014-10-22 Chris Dumez <cdumez@apple.com>
Avoid repeated is<MutableStyleProperties>() checks in StyleProperties
https://bugs.webkit.org/show_bug.cgi?id=137978
Reviewed by Andreas Kling.
Reduce the amount of is<MutableStyleProperties>() checks in
StyleProperties by:
- Removing the checks in each method of StyleProperties::PropertyReference,
and replace them by a single check in StyleProperties::propertyAt().
- Providing faster propertyCount() / propertyAt() / isEmpty() methods on
MutableStyleProperties / ImmutableStyleProperties as a lot of callers use
tight typing.
- Using tighter typing at call sites whenever possible.
Ideally, we could be able to use iterators instead of propertyCount() /
propertyAt() but this is not trivial to do efficiently as the
representation in memory is fundamentally different for MutableStyleProperties
/ ImmutableStyleProperties. We may be able to do better longer term, but
this is already more efficient short term at least.
No new tests, no behavior change.
* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::MutableStyleProperties):
(WebCore::StyleProperties::PropertyReference::cssText):
* css/StyleProperties.h:
(WebCore::StyleProperties::PropertyReference::PropertyReference):
(WebCore::StyleProperties::PropertyReference::id):
(WebCore::StyleProperties::PropertyReference::shorthandID):
(WebCore::StyleProperties::PropertyReference::isImportant):
(WebCore::StyleProperties::PropertyReference::isInherited):
(WebCore::StyleProperties::PropertyReference::isImplicit):
(WebCore::StyleProperties::PropertyReference::value):
(WebCore::StyleProperties::PropertyReference::toCSSProperty):
(WebCore::StyleProperties::isEmpty):
(WebCore::ImmutableStyleProperties::isEmpty):
(WebCore::MutableStyleProperties::isEmpty):
(WebCore::ImmutableStyleProperties::propertyAt):
(WebCore::MutableStyleProperties::propertyAt):
(WebCore::StyleProperties::propertyAt):
(WebCore::StyleProperties::propertyCount):
(WebCore::StyleProperties::PropertyReference::propertyMetadata): Deleted.
(WebCore::StyleProperties::PropertyReference::propertyValue): Deleted.
* editing/EditingStyle.cpp:
(WebCore::removePropertiesInStyle):
(WebCore::EditingStyle::removePropertiesInElementDefaultStyle):
2014-10-22 Eric Carlson <eric.carlson@apple.com>
[Mac][MediaStream] clean up bit rot
https://bugs.webkit.org/show_bug.cgi?id=137976
Reviewed by Jer Noble.
No new tests, this just gets the Mac port compiling again.
* Modules/mediastream/MediaStream.h: Add a virtual destructor to Observer since it has
a virtual method.
* WebCore.exp.in: Export RTCPeerConnectionHandler::create and RTCPeerConnectionHandlerMock::create(WebCore::RTCPeerConnectionHandlerClient*),
they are both use by Internals for testing.
* WebCore.xcodeproj/project.pbxproj: Add RTC and MediaStream files.
* html/HTMLMediaElement.h: Forward declare MediaStream instead of including MediaStream.h.
* platform/mediastream/RTCPeerConnectionHandler.h: EXPORT the create method.
* platform/mock/MediaConstraintsMock.cpp:
(WebCore::isSupported): Make static.
(WebCore::isValid): Ditto.
* platform/mock/RTCPeerConnectionHandlerMock.h: EXPORT the create method.
2014-10-22 Chris Dumez <cdumez@apple.com>
[Mac][WK2] Fix applicationIsSafari() detection
https://bugs.webkit.org/show_bug.cgi?id=137893
Reviewed by Alexey Proskuryakov.
I noticed when profiling Safari on Mac that we were exercising a code
path we shouldn't because it is meant for other applications that
Safari.
The detection relies on the applicationIsSafari() function in
RuntimeApplicationChecks.cpp. This was in some cases returning false on
my machine even though I was running Safari so I investigated a bit and
noticed that the check relies on the main bundle identifier string and
is doing:
isSafari = mainBundleIsEqualTo("com.apple.Safari")
|| mainBundleIsEqualTo("com.apple.WebProcess");
This WebProcess detection is very unreliable because:
- It matches other apps than Safari's WebProcesses
- The bundle name for the WebProcess is sometimes
"com.apple.WebKit.WebContent" or
"com.apple.WebKit.WebContent.Development".
The solution used in this patch is to move the applicationIsSafari()
check to the UIProcess so that the check actually succeeds reliably.
The call site for applicationIsSafari() was in
ResourceRequest::useQuickLookResourceCachingQuirks(). This match
removes that logic from ResourceRequest and move it to
FrameLoaderClient as only the FrameLoader is interested in this
information. The logic to determine if we should use QuickLook
resource caching quirks is moved to a new QuickLook class under
platform/ as the code needs to be shared between WebKit and WebKit2.
On WebKit2, we make use that code on the UIProcess side and pass
the flag as a parameter when constructing the WebProcess. The flag
is then stored on the WebProcess and queried by WebFrameLoaderClient.
Previously, we would spend ~1% of the WebProcess cpu time (when loading
apple.com) trying to detect if we should use QuickLook resource caching
quirks even though that check was supposed to be disabled and return
early when running Safari.
No new tests, not easily testable.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy):
* loader/FrameLoaderClient.h:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsSafari):
Remove "com.apple.WebProcess" bundle name matching as this causes false
positives (matches other applications than Safari's WebProcesses) and
it is no longer needed now that applicationIsSafari() is always called
from the UIProcess.
* platform/mac/QuickLookMac.h: Added.
* platform/mac/QuickLookMac.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
(WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
* platform/network/cf/ResourceRequest.h:
* platform/network/ios/ResourceRequestIOS.mm:
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::initQuickLookResourceCachingQuirks): Deleted.
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
2014-10-22 Shivakumar JM <shiva.jm@samsung.com>
XMLHttpRequest should support attribute responseURL as per latest XHR spec.
https://bugs.webkit.org/show_bug.cgi?id=136938
Reviewed by Alexey Proskuryakov.
Tests: http/tests/xmlhttprequest/basic-auth-responseURL.html
http/tests/xmlhttprequest/cross-origin-redirect-responseURL.html
http/tests/xmlhttprequest/redirect-credentials-responseURL.html
http/tests/xmlhttprequest/xmlhttprequest-responseURL.html
XMLHttpRequest should support attribute responseURL
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseURL):
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequest.idl:
2014-10-22 Chris Dumez <cdumez@apple.com>
Add initial support for generating the StyleBuilder from CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=137910
Reviewed by Andreas Kling.
Add initial support for generating the StyleBuilder from
CSSPropertyNames.in. This is a first step towards getting rid of the
legacy DeprecatedStyleBuilder class and having everything defined in one
place (CSSPropertyNames.in).
This patch updates makeprop.pl script to generate a StyleBuilder.cpp
file that generate a the StyleBuilder::applyProperty() method
implementation using a huge switch statement for all the CSS
properties. With this patch, we are now generating the new StyleBuilder
code for all the "simple" CSS properties (i.e. those that were using
ApplyPropertyDefault<> in DeprecatedStyleBuilder.cpp). I am using a
"NewStyleBuilder" option in CSSPropertyNames.in for properties that
we generate to help with improving incrementally the generator. Once
we are able to generate all properties, this transition option will
do away and become the default.
By default, the generator will make an educated guess for the type
name, the getter, the setter and the initial function of each property.
For example, for the border-collapse property, it will use:
- TypeName: EBorderCollapse (i.e. 'E' + PropertyId)
- Getter: borderCollapse() (i.e. PropertyId with first letter lowercased)
- Setter: setBorderCollapse() (i.e. 'set' + PropertyId)
- Initial: initialBorderCollapse() (i.e. 'initial' + PropertyId)
This works for most properties. For properties that need
special-casing, developers can use the following options in
CSSPropertyNames.in:
- TypeName: Overrides the type name
- Getter: Overrides the getter name
- Setter: Overrides the setter name
- Initial: Overrides the initial function name
- NameForMethods: Overrides the Getter / Setter / Initial function
names. For e.g. "NameForMethods=OverflowWrap" will use
"overflowWrap() / setOverflowWrap() / initialOverflowWrap()".
The patch is inspired by the following Blink revision by
<timloh@chromium.org>:
https://src.chromium.org/viewvc/blink?view=rev&revision=150424
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyVerticalAlign::createHandler):
(WebCore::ApplyPropertyDisplay::applyInitialValue):
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleBuilder.h: Added.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::applyProperty):
* css/makeprop.pl:
* rendering/style/RenderStyle.h:
Move the initialXXX() methods that were in NonInheritedFlags to
RenderStyle class, with the other initialXXX() methods to facilitate
code generation.
* rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::StyleMultiColData):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2014-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GStreamer debug build after r175050.
Explicitly include wtf/MainThread.h.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2014-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
[GStreamer] Do not use CachedResourceLoader, SecurityOrigin, ResourceBuffer and other WebCore types
https://bugs.webkit.org/show_bug.cgi?id=137064
Reviewed by Philippe Normand.
Move the media resource loader to a new class in WebCore/loader
that inherits from a PlatformMediaResourceLoader class defined in
the platform layer. The platform specific behaviour is implemented
using a client also defined in the platform layer, implemented by
every media backend, and used by the WebCore MediaResourceLoader.
* CMakeLists.txt: Add new files to compilation.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):
Create a MediaResourceLoader.
(WebCore::HTMLMediaElement::mediaPlayerCORSMode): Deleted. This is
no longer used.
* html/HTMLMediaElement.h:
* loader/MediaResourceLoader.cpp: Added.
(WebCore::MediaResourceLoader::MediaResourceLoader):
(WebCore::MediaResourceLoader::~MediaResourceLoader):
(WebCore::MediaResourceLoader::start): Start a new load for the
given request and load options.
(WebCore::MediaResourceLoader::stop): Stop the load if needed.
(WebCore::MediaResourceLoader::setDefersLoading):
(WebCore::MediaResourceLoader::responseReceived): Handle CORS
access check and notify the client about the response.
(WebCore::MediaResourceLoader::dataReceived): Notify the client.
(WebCore::MediaResourceLoader::notifyFinished): Ditto.
(WebCore::MediaResourceLoader::getOrCreateReadBuffer): Ask the
client to create the read buffer.
* loader/MediaResourceLoader.h: Added.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::createResourceLoader): Call
mediaPlayerCreateResourceLoader() if there's a client.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerCreateResourceLoader):
(WebCore::MediaPlayerClient::mediaPlayerCORSMode): Deleted.
* platform/graphics/PlatformMediaResourceLoader.h: Added.
(WebCore::PlatformMediaResourceLoaderClient::responseReceived):
(WebCore::PlatformMediaResourceLoaderClient::dataReceived):
(WebCore::PlatformMediaResourceLoaderClient::bufferReceived):
(WebCore::PlatformMediaResourceLoaderClient::accessControlCheckFailed):
(WebCore::PlatformMediaResourceLoaderClient::loadFailed):
(WebCore::PlatformMediaResourceLoaderClient::loadFinished):
(WebCore::PlatformMediaResourceLoaderClient::getOrCreateReadBuffer):
(WebCore::PlatformMediaResourceLoader::~PlatformMediaResourceLoader):
(WebCore::PlatformMediaResourceLoader::stop):
(WebCore::PlatformMediaResourceLoader::setDefersLoading):
(WebCore::PlatformMediaResourceLoader::didPassAccessControlCheck):
(WebCore::PlatformMediaResourceLoader::PlatformMediaResourceLoader):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStop): Also delete the PlatformMediaResourceLoader.
(webKitWebSrcStart): Create a new resource loader using
MediaPlayer::createResourceLoader() with a new
CachedResourceStreamingClient as client.
(webKitWebSrcNeedDataMainCb): Call setDefersLoading() for the
resource loader if there's one.
(webKitWebSrcEnoughDataMainCb): Ditto.
(webKitSrcPassedCORSAccessCheck): Return didPassAccessControlCheck.
(StreamingClient::handleResponseReceived): Remove the CORS check
result parameter since that's now handled by MediaResourceLoader.
(CachedResourceStreamingClient::CachedResourceStreamingClient):
(CachedResourceStreamingClient::~CachedResourceStreamingClient):
(CachedResourceStreamingClient::getOrCreateReadBuffer):
(CachedResourceStreamingClient::responseReceived): Update didPassAccessControlCheck.
(CachedResourceStreamingClient::dataReceived):
(CachedResourceStreamingClient::accessControlCheckFailed): Log the
error and stop the load.
(CachedResourceStreamingClient::loadFailed): Log the error if it
was not a cancellation.
(CachedResourceStreamingClient::loadFinished):
(ResourceHandleStreamingClient::didReceiveResponse):
(CachedResourceStreamingClient::setDefersLoading): Deleted.
(CachedResourceStreamingClient::notifyFinished): Deleted.
2014-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move GtkInputMethodFilter from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137884
Reviewed by Gustavo Noronha Silva.
Remove GtkInputMethodFilter.
* PlatformGTK.cmake:
* platform/gtk/GtkInputMethodFilter.cpp: Removed.
* platform/gtk/GtkInputMethodFilter.h: Removed.
2014-10-22 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
Match spec for font-weight: bolder|lighter
https://bugs.webkit.org/show_bug.cgi?id=137919
Reviewed by Andreas Kling.
This patch is a merge of Blink's
https://chromiumcodereview.appspot.com/15994009
Currently, bolder and lighter change font-weight in a non-compliant way.
The spec (http://www.w3.org/TR/css3-fonts/#bolderlighter) defines
exactly what the computed values should be given the inherited weight values,
so we should match those.
The removed FIXME's for selecting the next lightest/heaviest weight from
the used font family seems to refer to behaviour from
CSS1 (http://www.w3.org/TR/CSS1/#font-weight), while this is replaced
with a simpler procedure for resolving bolder and lighter in font weights
in CSS2 (http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight) and CSS3 (link above).
and https://codereview.chromium.org/137813004
According to http://dev.w3.org/csswg/css-fonts/#font-weight-prop, the computed
weight of 'lighter' and 'bolder' are based on the inherited 'font-weight', so set
that inherited weight before calculating 'lighter' and 'bolder'.
Tests: css3/font-weight-multiple-selectors.html
css3/font-weight.html
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontWeight::applyValue):
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::lighterWeight):
(WebCore::FontDescription::bolderWeight):
2014-10-22 Rohit Kumar <kumar.rohit@samsung.com>
[GTK]: Fix unused parameter build warnings in WebCore/platform module
https://bugs.webkit.org/show_bug.cgi?id=137921
Reviewed by Carlos Garcia Campos.
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::PerAxisData::PerAxisData):
(WebCore::ScrollAnimatorNone::animationTimerFired):
2014-10-22 Dhi Aurrahman <diorahman@rockybars.com>
Add relList to the anchor, area and link elements
https://bugs.webkit.org/show_bug.cgi?id=137860
Reviewed by Darin Adler and Chris Dumez.
Add relList to reflect the rel content attribute for anchor[1],
area[2] and link[3] elements.
[1] https://html.spec.whatwg.org/multipage/semantics.html#dom-a-rellist
[2] https://html.spec.whatwg.org/multipage/embedded-content.html#dom-area-rellist
[3] https://html.spec.whatwg.org/multipage/semantics.html#dom-link-rellist
Tests: fast/dom/rel-list-gc.html
fast/dom/rel-list.html
perf/rel-list-remove.html
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitString::set):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):
(WebCore::HTMLAnchorElement::relList):
(WebCore::HTMLAnchorElement::setRel): Deleted.
* html/HTMLAnchorElement.h:
* html/HTMLAnchorElement.idl:
* html/HTMLAreaElement.idl:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):
(WebCore::HTMLLinkElement::relList):
* html/HTMLLinkElement.h:
* html/HTMLLinkElement.idl:
* html/RelList.cpp: Added.
(WebCore::RelList::RelList):
(WebCore::RelList::ref):
(WebCore::RelList::deref):
(WebCore::RelList::length):
(WebCore::RelList::item):
(WebCore::RelList::element):
(WebCore::RelList::updateRelAttribute):
(WebCore::RelList::containsInternal):
(WebCore::RelList::value):
(WebCore::RelList::setValue):
* html/RelList.h: Added.
2014-10-21 Andy Estes <aestes@apple.com>
One more iOS build fix after r175013.
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::createFontPlatformData):
2014-10-21 Benjamin Poulain <bpoulain@apple.com>
CSS Rule features are ignored for nested CSS Selector lists
https://bugs.webkit.org/show_bug.cgi?id=137908
Reviewed by Andreas Kling.
When Rule feature sets were collected, any selector list nested inside an other
selector list was ignored when collecting properties of the CSS Selector.
As a result, style was not invalidated properly when any property listed in
the nested selectors.
This patch fixes the issue by make RuleFeatureSet::collectFeaturesFromSelector()
recursive, evaluating every chain of every selector lists.
Tests: fast/css/class-style-invalidation-optimization.html
fast/css/direct-adjacent-style-sharing-1.html
fast/css/direct-adjacent-style-sharing-2.html
fast/css/direct-adjacent-style-sharing-3.html
fast/css/id-style-invalidation-optimization.html
fast/selectors/class-style-update-with-not.html
fast/selectors/class-style-update-with-nth-child-of.html
fast/selectors/class-style-update.html
* css/RuleFeature.cpp:
(WebCore::recursivelyCollectFeaturesFromSelector):
(WebCore::RuleFeatureSet::collectFeaturesFromSelector):
* css/RuleFeature.h:
* css/RuleSet.cpp:
(WebCore::collectFeaturesFromRuleData):
2014-10-21 Tim Horton <timothy_horton@apple.com>
Try to fix the iOS build after r175013.
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::createFontPlatformData):
2014-10-21 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr | std::make_unique in FontCacheFoo
https://bugs.webkit.org/show_bug.cgi?id=137905
Reviewed by Darin Adler.
Clean up PassOwnPtr|OwnPtr using std::unique_ptr|std::make_unique.
No new tests, no behavior changes.
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::getCachedFontPlatformData):
* platform/graphics/FontCache.h:
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::createFontPlatformData):
2014-10-21 Ada Chan <adachan@apple.com>
Calling WebCore::Page::setMediaVolume(0) does not mute videos as expected.
https://bugs.webkit.org/show_bug.cgi?id=137305
Reviewed by Darin Adler.
This was broken in http://trac.webkit.org/changeset/154970. To fix this (but not break
GStreamer), remove the "if (m_volumeInitialized)" check before updating the MediaPlayer's
volume to the value multiplied with the Page's mediaVolume. This should not affect GStreamer's
behavior because MediaPlayerPrivateGStreamerBase::setStreamVolumeElement does nothing unless
m_volumeInitialized is true.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateVolume):
2014-10-21 Jer Noble <jer.noble@apple.com>
[EME][Mac] Update to match new AVStreamSession API and requirements.
https://bugs.webkit.org/show_bug.cgi?id=137923
Reviewed by Eric Carlson.
The session identifier has moved from AVStreamDataParser to -[AVStreamSession contentProtectionSessionIdentifier]
and the property is no longer KVObservable. A new notification key has been added in place of KVO.
Additionally, the requirements for using AVStreamDataParser with AVStreamSession have changed. It is now
required that AVStreamDataParsers be added to an AVStreamSession before the
-streamSession:didProvideContentKeyRequestInitializationData:forTrackID delegate method is called. A
-streamParserWillProvideContentKeyRequestInitializationData:forTrackID delegate has been added, and
an AVStreamSession must be created and the AVStreamDataParser added to it during the scope of that delegate
method.
To facilitate this, the MediaPlayerPrivateMediaSourceAVFObjC object will lazily create and own a AVStreamSession
object when requested. The SourceBufferPrivateAVFObjC object will listen for the -willProvide delegate call
and will add its AVStreamDataParser to that AVStreamSession when called.
The CDMSessionMediaSourceAVFObjC object is no longer responsible for creating the AVStreamSession, and because
the session identifier has moved from many AVStreamDataParsers to a single AVStreamSession, the
CDMSessionMediaSourceAVFObjCObserver class can become much simpler, as it only has to observe a single object.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(-[CDMSessionMediaSourceAVFObjCObserver dealloc]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver invalidate]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver observeValueForKeyPath:ofObject:change:context:]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver contentProtectionSessionIdentifierChanged:]): Added.
(WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Call setStreamSession(nullptr).
(WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): The sessionId is now a value in the dictionary, not the key.
(WebCore::CDMSessionMediaSourceAVFObjC::update): No longer create an AVStreamSession.
(WebCore::CDMSessionMediaSourceAVFObjC::setStreamSession): Add and remove observers as appropriate.
(WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): No longer add or remove parsers from AVStreamSessions.
(WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasStreamSession): Simple getter.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Lazy initializing getter.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): Call setStreamSession().
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVStreamDataParserListener streamParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Synchronously pass to SourceBufferPrivateAVFObjC.
(WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID): Add the parser to an AVStreamSession.
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID): Check the trackId.
* platform/mac/SoftLinking.h:
2014-10-21 Jaehun Lim <ljaehun.lim@samsung.com>
'true' isn't a valid value for justify-self
https://bugs.webkit.org/show_bug.cgi?id=137913
Reviewed by Andreas Kling.
Merged from Blink (patch by dstockwell):
<https://src.chromium.org/viewvc/blink?view=rev&revision=174638>
CSS Box Alignment Module Level 3:
http://dev.w3.org/csswg/css-align/#justify-self-property
No new tests, modify existing test case.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseJustifySelf):
2014-10-21 Michael Saboff <msaboff@apple.com>
Add operator==(PropertyName, const char*)
https://bugs.webkit.org/show_bug.cgi?id=137925
Reviewed by Mark Lam.
Use new == operator to compare a PropertyName with a string literal.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
2014-10-21 Chris Dumez <cdumez@apple.com>
Unreviewed iOS build fix after r174921.
Export new symbol after function rename.
* WebCore.exp.in:
* WebCore.order:
2014-10-21 Chris Dumez <cdumez@apple.com>
Unreviewed iOS build fix after r174921.
Remove symbol from export files that no longer exists.
* WebCore.exp.in:
* WebCore.order:
2014-10-21 peavo@outlook.com <peavo@outlook.com>
[Curl] Optimization; avoid string reallocation.
https://bugs.webkit.org/show_bug.cgi?id=137920
Reviewed by Brent Fulgham.
Profiling reveals that the cookiesForDOM function is spending time on removing a character from a string.
* platform/network/curl/CookieJarCurl.cpp:
(WebCore::domainMatch):
(WebCore::addMatchingCurlCookie):
2014-10-21 Joanmarie Diggs <jdiggs@igalia.com>
AX: [ATK] CSS-generated text content not exposed to assistive technologies
https://bugs.webkit.org/show_bug.cgi?id=137669
Reviewed by Chris Fleizach.
Do not use a text iterator to get the text for elements which include
pseudo elements.
Test: accessibility/css-content-attribute.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
2014-10-21 Chris Dumez <cdumez@apple.com>
REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
https://bugs.webkit.org/show_bug.cgi?id=137916
Reviewed by Csaba Osztrogonác.
Fix the !ENABLE(VIDEO) build by adding an #if ENABLE(VIDEO) where
needed.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
2014-10-21 Zalan Bujtas <zalan@apple.com>
REGRESSION: Google Search (mobile) video thumbnails are too large.
https://bugs.webkit.org/show_bug.cgi?id=137895
Reviewed by Simon Fraser.
This patch fixes layer clipping when an ancestor layer has border-radius clipping.
In cases, where the current layer has non-radius cliprect, while an ancestor layer
has border-radius clipping, we only use the border-radius rect to clip.
Test: fast/clip/overflow-hidden-with-border-radius-overflow-clipping-parent.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
(WebCore::RenderLayer::restoreClip):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRect::ClipRect):
(WebCore::ClipRect::effectedByRadius):
(WebCore::ClipRect::setEffectedByRadius):
(WebCore::ClipRect::operator==):
(WebCore::ClipRect::operator!=):
(WebCore::ClipRect::intersect):
(WebCore::ClipRect::hasRadius): Deleted.
(WebCore::ClipRect::setHasRadius): Deleted.
2014-10-20 Michael Saboff <msaboff@apple.com>
Don't create cached functions for HTMLDocument.write*()
https://bugs.webkit.org/show_bug.cgi?id=137906
Reviewed by Darin Adler.
Made it so that JSHTMLDocument::write() and ::writeln() are always created for every prototype.
This is similar to the change in r174847.
This change is alread covered by the tests:
LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html
LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html
LayoutTests/http/tests/security/aboutBlank/security-context-write.html
LayoutTests/http/tests/security/aboutBlank/security-context-writeln.html
LayoutTests/http/tests/xmlhttprequest/request-from-popup.html
LayoutTests/http/tests/navigation/new-window-redirect-history.html
LayoutTests/http/tests/misc/window-open-then-write.html
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
* html/HTMLDocument.idl:
2014-10-21 Chris Dumez <cdumez@apple.com>
REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
https://bugs.webkit.org/show_bug.cgi?id=137916
Unreviewed build fix. Add missing header include.
* rendering/RenderLayerBacking.cpp:
2014-10-21 Jer Noble <jer.noble@apple.com>
REGRESSION (r170808): Volume slider in built-in media controls only changes volume when thumb is released, not while dragging
https://bugs.webkit.org/show_bug.cgi?id=137805
Reviewed by Dan Bernstein.
Test: media/video-volume-slider-drag.html
Respond to the 'input' event rather than the 'change' event for the volume slider, so that
volume changes are continuous during drag operations.
Also listen for both 'input' and 'change' events for the timeline slider, doing fastSeek()
during 'input' and setting an explicit currentTime during 'change'. This is the same behavior
as current, but using 'change' instead of 'mouseup' to do the final currentTime change.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls):
(Controller.prototype.handleTimelineInput):
(Controller.prototype.handleTimelineChange):
(Controller.prototype.handleTimelineMouseUp):
(Controller.prototype.handleVolumeSliderInput):
(Controller.prototype.handlePlayButtonClicked): Deleted.
(Controller.prototype.handleMaxButtonClicked): Deleted.
2014-10-21 Manuel Rego Casasnovas <rego@igalia.com>
ASSERTION FAILED: !gridWasPopulated() in WebCore::RenderGrid::placeItemsOnGrid
https://bugs.webkit.org/show_bug.cgi?id=136939
Reviewed by Darin Adler.
In some particular situations computeIntrinsicLogicalWidths() is called
in the middle of layoutGridItems(). In these cases we do not need to
populate the grid again, so we should avoid calling placeItemsOnGrid().
In addition, we do not need to clean the grid either, as that will be
done later by layoutGridItems().
Test: fast/css-grid-layout/grid-was-populated-assert.html
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths): Avoid calls to
placeItemsOnGrid() and clearGrid() if the grid was already populated.
* rendering/RenderGrid.h: Move gridWasPopulated() header out of the
debug ifdefs.
2014-10-21 Zan Dobersek <zdobersek@igalia.com>
[Cairo] Make dashPattern, dotPattern in GraphicsContext::setPlatformStrokeStyle() const
https://bugs.webkit.org/show_bug.cgi?id=137912
Reviewed by Carlos Garcia Campos.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setPlatformStrokeStyle): Make the two static variables
constants since their value doesn't change after initialization.
2014-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Several labels are white instead of black
https://bugs.webkit.org/show_bug.cgi?id=137803
Reviewed by Martin Robinson.
Recent GTK+ versions require to explicitly set the state before
getting a color.
* rendering/RenderThemeGtk.cpp:
(WebCore::styleColor): Helper function to get a color from a
GtkStylecontext that explicitly sets the state before getting the color.
(WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor): Use styleColor().
(WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor): Ditto.
(WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor): Ditto.
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor): Ditto.
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::systemColor): Ditto.
2014-10-20 YongGeol Jung <yg48.jung@samsung.com>
[Coordinated Graphics] '-webkit-mask-image: -webkit-gradient' doesn't work for AC layer.
https://bugs.webkit.org/show_bug.cgi?id=125326
Reviewed by Gyuyoung Kim.
Mask layer hasn't requested to synchronize with AC layer in CoordinatedGraphics so far.
That's why the mask layer isn't shown under CoordinatedGraphics.
Thus this patch lets the mask layer synchronize with the AC layer whenever AC layer is updated.
Below layout test case is related to this issue when --pixel test is enabled.
Unfortunately EFL WebKitTestRunner doesn't support AC mode yet.
When EFL test framework supports AC mode, the test will be passed.
Test: compositing/masks/mask-of-clipped-layer.html
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
2014-10-17 Jeffrey Pfau <jpfau@apple.com>
Ensure attached frame count doesn't exceed the maximum allowed frames
https://bugs.webkit.org/show_bug.cgi?id=136457
Reviewed by Alexey Proskuryakov.
Test: fast/frames/exponential-frames.html
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::isURLAllowed):
2014-10-20 Chris Dumez <cdumez@apple.com>
ResourceRequest deserialization unnecessarily calls partitionName() on encoded cache partition
https://bugs.webkit.org/show_bug.cgi?id=137797
Reviewed by Darin Adler.
ResourceRequest deserialization was unnecessarily calling partitionName()
on the decoded cache partition. In the deserialization case, we already
know the cache partition is a valid partition name so we can bypass the
call to partitionName() (which is fairly expensive) for performance.
This patch adds a setDomainForCachePartion() method to ResourceRequest
that calls partitionName() on the domain argument, and moves all the
callers of setCachedPartition() to this new setter, except
ArgumentCoder<ResourceRequest>::decode().
This patch updates the setCachedPartition() to merely set the
m_cachePartition member, without calling partitionName() on the
argument. There is also a new assertion in place to make sure the
argument is a valid partition name.
No new tests, no behavior change.
* html/DOMURL.cpp:
(WebCore::DOMURL::revokeObjectURL):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::replayXHR):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::addImageToCache):
(WebCore::MemoryCache::removeImageFromCache):
* loader/cache/MemoryCache.h:
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::domainForCachePartition):
(WebCore::SecurityOrigin::cachePartition): Deleted.
Rename cachePartition() getter to domainForCachePartition() to make it
clear it returns a domain and not a partition name. As such, the caller
should then use ResourceRequest::setDomainForCachePartition(), not
setCachePartition().
* page/SecurityOrigin.h:
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::setCachePartition):
(WebCore::ResourceRequest::setDomainForCachePartition):
2014-10-20 Youenn Fablet <youenn.fablet@crf.canon.fr>
Tighten XMLHttpRequest setRequestHeader value check
https://bugs.webkit.org/show_bug.cgi?id=128593
Reviewed by Darin Adler.
Test: http/tests/xmlhttprequest/set-bad-headervalue.html
* platform/network/HTTPParsers.cpp:
(WebCore::isValidHTTPHeaderValue): Updated header values check according RFC 7230.
(WebCore::isValidHTTPToken): Renamed variable name and updated RFC related comment.
2014-10-20 Michael Saboff <msaboff@apple.com>
Make post checkin suggested changes to r174847
https://bugs.webkit.org/show_bug.cgi?id=137885
Reviewed by Mark Lam.
Eliminated the creation of a temporary Identifier when comparing propertyName to "open".
Made the suggested post checkin change to put the declaration of "entry" into the if.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
2014-10-20 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for SpinButtonElement
https://bugs.webkit.org/show_bug.cgi?id=137896
Reviewed by Gyuyoung Kim.
Use is<>() / downcast<>() for SpinButtonElement instead of
isSpinButtonElement() / static_cast for consistency with the rest of
the code and for safety.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
* html/shadow/SpinButtonElement.h:
(isType):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isSpinUpButtonPartPressed):
(WebCore::RenderTheme::isHovered):
(WebCore::RenderTheme::isSpinUpButtonPartHovered):
2014-10-20 Roger Fong <roger_fong@apple.com>
Use glFlush instead of glFinish when drawing WebGL output to screen.
https://bugs.webkit.org/show_bug.cgi?id=137897.
<rdar://problem/15846550>
Reviewed by Brent Fulgham.
Passes all conformance tests.
Performance tested by http://threejs.org/examples/#webgl_performance and Unity WebGL performance tests.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::prepareTexture):
Use glFlush instead of glFinish. glFinish is a blocking operation pushed out queued up WebGL operations and then waits until
every operation has completed before returning and every pixel has been updated. This causes severe performance problems,
about a 10 fps difference on http://threejs.org/examples/#webgl_performance. glFlush, like glFinish,
forces all queued WebGL operations to take place, but returns immediately. Switching to glFlush does not seem
make our rendering quality any worse for the handful of sites I've tested and makes our performance on WebGL much better.
However, we should continue to be on the watch for any potential rendering issues after this lands.
2014-10-20 Benjamin Poulain <bpoulain@apple.com>
Generalize the compilation of :not() to support arbitrary selector lists
https://bugs.webkit.org/show_bug.cgi?id=137843
Reviewed by Andreas Kling.
This builds :not() on top of the code created for :nth-child(An+B of selectorList)
to support any selector list.
The tests for the JIT were added previously:
-not-boundaries.html
-not-backtracking.html
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
Any :not() of a selector is handled through a simple selector list. Cases like
:not(foo, bar) simply generate not([fragmentFoo, bragmentBar]).
Old cases like :not(foo):not(bar) simply add those cases to the selector list,
generating not([fragmentFoo, bragmentBar]).
(WebCore::SelectorCompiler::minimumRegisterRequirements):
Register pressure is now tracked through computeBacktrackingMemoryRequirements.
(WebCore::SelectorCompiler::hasAnyCombinators):
(WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
(WebCore::SelectorCompiler::computeBacktrackingInformation):
Abstract the code creating Selector Lists from :nth-child(of). Use that for :not()
and :nth-child(of).
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesNotPseudoClass):
2014-10-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr<>|make_unique<> in PluginView::scheduleRequest()
https://bugs.webkit.org/show_bug.cgi?id=137874
Reviewed by Andreas Kling.
No new tests, no behavior change.
* plugins/PluginView.cpp:
(WebCore::PluginView::requestTimerFired):
(WebCore::PluginView::scheduleRequest): Replace PassOwnPtr with std::unique_ptr.
(WebCore::PluginView::load): Create PluginRequest using std::make_unique.
* plugins/PluginView.h:
2014-10-20 Beth Dakin <bdakin@apple.com>
Speculative build fix.
* platform/spi/mac/NSViewSPI.h:
2014-10-20 Beth Dakin <bdakin@apple.com>
Add support for action menus
https://bugs.webkit.org/show_bug.cgi?id=137891
rdar://problem/18451638
rdar://problem/18694470
Reviewed by Anders Carlsson.
New SPI that is needed for this.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac: Added.
* platform/spi/mac/NSViewSPI.h: Added.
2014-10-20 Dean Jackson <dino@apple.com>
[Mac] Support "inverted-colors" and "monochrome" media feature.
https://bugs.webkit.org/show_bug.cgi?id=137535
<rdar://problem/18586398>
Rolling out the Windows part of this to fix the build.
* platform/win/PlatformScreenWin.cpp:
(WebCore::screenHasInvertedColors): Revert to a stub function.
2014-10-20 Chris Dumez <cdumez@apple.com>
Unreviewed EFL / GTK build fix after r174898.
Add missing header include.
* accessibility/AccessibilityARIAGrid.cpp:
2014-10-20 Dean Jackson <dino@apple.com>
[Mac] Support "inverted-colors" and "monochrome" media feature.
https://bugs.webkit.org/show_bug.cgi?id=137535
<rdar://problem/18586398>
Reviewed by Brent Fulgham.
Add a new media query from CSS Level 4, "inverted-colors", and
implement the Apple backends for the "monochrome" media query.
The platform code went into PlatformScreenMac, which already
had a screenIsMonochrome method. This now calls into Core
Graphics via SPI. I added a screenHasInvertedColors
method which tests for inversion. On iOS, there is public API
for both queries. On Windows, we try to use CoreGraphics.
At the moment neither of these media queries re-evaluate
automatically if the user changes their mode. The page will
need to be reloaded. It is possible to detect a change on iOS,
but not OS X.
https://bugs.webkit.org/show_bug.cgi?id=137868
I decided to not add an ENABLE flag for this, mostly because it
is such an isolated feature and seems very unlikely to be
controversial. I don't expect the syntax to change. (I'm sure
this comment will come back to haunt me.)
Testing this automatically is slightly tricky. We'd need
to expose SPI to invert the user's screen, but then we get
inverted images from our testing which could interfere with concurrent
operations. Instead I've included some tests that exercise
the "false" parts of the media query, with explanations as
to why they would fail if the display is inverted.
Tests: fast/media/mq-inverted-colors.html
fast/media/mq-monochrome.html
* css/CSSValueKeywords.in: Add the "inverted" keyword for "inverted-colors".
* css/MediaFeatureNames.h: Add the "inverted-colors" feature name.
* css/MediaQueryEvaluator.cpp:
(WebCore::inverted_colorsMediaFeatureEval): Implementation of the new media query.
* css/MediaQueryExp.cpp:
(WebCore::featureWithCSSValueID): The new query takes an id...
(WebCore::featureWithoutValue): ... or no value.
* platform/PlatformScreen.h: Add "screenHasInvertedColors".
* platform/efl/PlatformScreenEfl.cpp:
(WebCore::screenHasInvertedColors): Stub implementation.
* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::screenHasInvertedColors): Ditto.
* platform/ios/PlatformScreenIOS.mm:
(WebCore::screenHasInvertedColors): Call into the platform accessibility API.
(WebCore::screenIsMonochrome): Ditto.
* platform/mac/PlatformScreenMac.mm:
(WebCore::screenIsMonochrome): Call into the CoreGraphics SPI.
(WebCore::screenHasInvertedColors): Call into the CoreGraphics SPI.
* platform/win/PlatformScreenWin.cpp:
(WebCore::screenHasInvertedColors): Call into CoreGraphics if we're using it.
2014-10-20 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Accessibility objects
https://bugs.webkit.org/show_bug.cgi?id=137286
Reviewed by Darin Adler.
Use is<>() / downcast<>() for Accessibility objects and clean up the
surrounding code.
No new tests, no behavior change.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedImageMapUIElement):
(WebCore::AXObjectCache::notificationPostTimerFired):
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addTableCellChild):
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::parentTable):
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::disclosedRows):
(WebCore::AccessibilityARIAGridRow::disclosedByRow):
(WebCore::AccessibilityARIAGridRow::parentTable):
* accessibility/AccessibilityARIAGridRow.h:
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityList.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/AccessibilityMenuList.h:
* accessibility/AccessibilityMenuListOption.h:
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
* accessibility/AccessibilityMenuListPopup.h:
* accessibility/AccessibilityMockObject.h:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::textUnderElement):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.cpp:
(WebCore::appendChildrenToArray):
(WebCore::AccessibilityObject::scrollViewAncestor):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::getDocumentLinks):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
(WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
(WebCore::AccessibilityRenderObject::addImageMapChildren):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
(WebCore::AccessibilityRenderObject::remoteSVGRootElement):
(WebCore::AccessibilityRenderObject::ariaSelectedRows):
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilitySVGRoot.h:
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::addChildScrollbar):
* accessibility/AccessibilityScrollView.h:
* accessibility/AccessibilityScrollbar.h:
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::addChildren):
* accessibility/AccessibilitySlider.h:
* accessibility/AccessibilitySpinButton.cpp:
(WebCore::AccessibilitySpinButton::addChildren):
(WebCore::AccessibilitySpinButtonPart::press):
* accessibility/AccessibilitySpinButton.h:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):
(WebCore::AccessibilityTable::addChildrenFromSection):
(WebCore::AccessibilityTable::headerContainer):
(WebCore::AccessibilityTable::columnHeaders):
(WebCore::AccessibilityTable::rowHeaders):
(WebCore::AccessibilityTable::cellForColumnAndRow):
* accessibility/AccessibilityTable.h:
Make isAccessibilityTable() public and mark as final so that callers
can benefit from tighter typing, as isAccessibilityTable() is
stricter than isTable(). isTable() indicates that the object is an
AccessibilityTable and is equivalent to is<AccessibilityTable>(object).
isAccessibilityTable() is equivalent to "isTable() && renderer()".
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::parentTable):
* accessibility/AccessibilityTableCell.h:
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
(WebCore::AccessibilityTableColumn::addChildren):
* accessibility/AccessibilityTableColumn.h:
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::addChildren):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::parentTable):
(WebCore::AccessibilityTableRow::headerObject):
* accessibility/AccessibilityTableRow.h:
* accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
(webkitAccessibleSelectionClearSelection):
(webkitAccessibleSelectionSelectAllSelection):
* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(core):
(cell):
(cellAtIndex):
(webkitAccessibleTableGetIndexAt):
(webkitAccessibleTableGetNColumns):
(webkitAccessibleTableGetNRows):
(webkitAccessibleTableGetColumnHeader):
(webkitAccessibleTableGetRowHeader):
* accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
(webkitAccessibleTableCellGetColumnHeaderCells):
(webkitAccessibleTableCellGetRowHeaderCells):
(webkitAccessibleTableCellGetColumnSpan):
(webkitAccessibleTableCellGetRowSpan):
(webkitAccessibleTableCellGetPosition):
* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetElement):
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):
(-[WebAccessibilityObjectWrapper scrollViewParent]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* rendering/RenderMenuList.cpp:
(RenderMenuList::didUpdateActiveOption):
2014-10-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Generate all Inspector domains together in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=137748
Reviewed by Brian Burg.
After moving the json files into JavaScriptCore update the includes,
and names of functions that were previously prefixed.
* CMakeLists.txt:
* DerivedSources.make:
* ForwardingHeaders/inspector/InspectorBackendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorFrontendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Removed.
* ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Removed.
* ForwardingHeaders/inspector/InspectorJSProtocolTypes.h: Removed.
* ForwardingHeaders/inspector/InspectorProtocolTypesBase.h: Added.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.xcodeproj/project.pbxproj:
* inspector/CommandLineAPIHost.cpp:
* inspector/InspectorApplicationCacheAgent.cpp:
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
* inspector/InspectorCSSAgent.h:
* inspector/InspectorController.cpp:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseResource.cpp:
* inspector/InspectorDatabaseResource.h:
* inspector/InspectorFrontendClientLocal.cpp:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorLayerTreeAgent.cpp:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorPageAgent.h:
* inspector/InspectorReplayAgent.cpp:
* inspector/InspectorReplayAgent.h:
* inspector/InspectorResourceAgent.cpp:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorStyleSheet.cpp:
* inspector/InspectorStyleSheet.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::addRecordToTimeline):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
* inspector/InspectorWorkerAgent.h:
* inspector/PageRuntimeAgent.h:
* inspector/TimelineRecordFactory.cpp:
* inspector/WorkerInspectorController.cpp:
2014-10-20 Andy Estes <aestes@apple.com>
Fix the GTK build.
* dom/RenderedDocumentMarker.h:
2014-10-19 Antti Koivisto <antti@apple.com>
Avoid unnecessary NSURLResponse construction for QuickLook on iOS
https://bugs.webkit.org/show_bug.cgi?id=137876
Reviewed by Andy Estes.
QuickLook specific code path creates NSURLResponse in the web process for every response.
It is rarely needed so this is unnecessary work.
* WebCore.exp.in:
* platform/network/ios/QuickLook.h:
* platform/network/ios/QuickLook.mm:
(WebCore::isMainResourceLoader):
(WebCore::QuickLookHandle::shouldCreateForMIMEType):
Separate function for testing if QuickLookHandle is needed.
(WebCore::QuickLookHandle::create):
Switch the interface to take ResourceResponse.
2014-10-20 Andy Estes <aestes@apple.com>
Fix the iOS build.
* WebCore.xcodeproj/project.pbxproj:
* dom/RenderedDocumentMarker.h:
* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot):
2014-10-20 Benjamin Poulain <benjamin@webkit.org>
Update the <link>'s link status
https://bugs.webkit.org/show_bug.cgi?id=137861
Reviewed by Chris Dumez.
In the latest HTML spec, <link> has the link status
if it has a 'href' attribute, exactly like <a> and <area>:
https://html.spec.whatwg.org/multipage/scripting.html#selector-link
This patch updates WebKit accordingly.
Tests: fast/css/link-basics.html
fast/selectors/link-basics-xhtml.xhtml
fast/selectors/link-basics.html
fast/selectors/webkit-any-link-basics.html
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):
2014-10-20 Chris Dumez <cdumez@apple.com>
[Mac] Optimize cookiesForDOM() by filtering and serializing cookies in a single pass
https://bugs.webkit.org/show_bug.cgi?id=137869
Reviewed by Darin Adler.
Optimize cookiesForDOM() by filtering and serializing in 1 pass instead of 2.
Previously, when accessing document.cookie, we ended up doing the following:
1. Call wkHTTPCookiesForURL() to get an NSArray of NSHTTPCookies.
2. Call filterCookies() to filter out cookies that are httpOnly or with an
empty name, thus allocating a new NSMutableArray.
3. Call NSHTTPCookie's requestHeaderFieldsWithCookies() to serialize the
cookies
4. Construct a WTF::String from the NSString*
There were several inefficiencies here:
1. We needed to pre-filter the cookies and allocate a new NSMutableArray
before calling requestHeaderFieldsWithCookies()
2. requestHeaderFieldsWithCookies() does more things that we actually need.
It constructs a Dictionary of header fields, of which we query the
"Cookie" field, even though we merely want a ';'-separated string
representation of the cookies in "key=value" form.
With this patch, we now take care of the string serialization ourselves,
using a StringBuilder as it is trivial to do. This also allows us to filter
out the httpOnly/invalid cookies as we do the serialization instead of
having a first pass to do so.
When scrolling the http://www.apple.com/iphone/ entire page down, then up,
se were spending ~13.1% of the NetworkProcess time in cookiesForDOM()
(~96ms) on my machine. With the patch, we spend ~23% less time in
cookiesForDOM() (~74ms).
No new tests, no behavior change.
* platform/network/mac/CookieJarMac.mm:
(WebCore::cookiesForSession):
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):
2014-10-19 Chris Dumez <cdumez@apple.com>
Kill toRenderedDocumentMarker() by using tighter typing
https://bugs.webkit.org/show_bug.cgi?id=137858
Reviewed by Darin Adler.
Kill toRenderedDocumentMarker() by using tighter typing. This method
was doing no type validation, just a static_cast<>().
No new tests, no behavior change.
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addTextMatchMarker):
(WebCore::DocumentMarkerController::markersFor):
(WebCore::DocumentMarkerController::markersInRange):
(DocumentMarkerController::hasMarkers):
* dom/DocumentMarkerController.h:
* dom/RenderedDocumentMarker.h:
(WebCore::toRenderedDocumentMarker): Deleted.
* editing/AlternativeTextController.cpp:
(WebCore::markersHaveIdenticalDescription):
(WebCore::AlternativeTextController::respondToChangedSelection):
(WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
(WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
(WebCore::AlternativeTextController::applyDictationAlternative):
* editing/CompositeEditCommand.cpp:
(WebCore::copyMarkers):
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
* editing/Editor.cpp:
(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
(WebCore::Editor::selectionStartHasMarkerFor):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::paintDocumentMarkers):
* rendering/InlineTextBox.h:
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* testing/Internals.cpp:
(WebCore::Internals::markerAt):
(WebCore::Internals::markerRangeForNode):
(WebCore::Internals::markerDescriptionForNode):
* testing/Internals.h:
2014-10-19 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for all remaining RenderObject subclasses
https://bugs.webkit.org/show_bug.cgi?id=137845
Reviewed by Darin Adler.
Use is<>() / downcast<>() for all remaining RenderObject subclasses and
clean up the surrounding code.
No new tests, no behavior change.
* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::progressElement):
(WebCore::AccessibilityProgressIndicator::meterElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::layoutCount):
(WebCore::AccessibilityRenderObject::widgetForAttachmentView):
(WebCore::AccessibilityRenderObject::visiblePositionForPoint):
* dom/Document.cpp:
(WebCore::widgetForElement):
* dom/Position.cpp:
(WebCore::Position::getInlineBoxAndOffset):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::overset):
(WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
* editing/FrameSelection.cpp:
(WebCore::isFrameElement):
* html/HTMLEmbedElement.cpp:
(WebCore::findWidgetRenderer):
* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
(WebCore::HTMLFrameOwnerElement::renderWidget):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::renderMeter):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::supportsFocus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::renderEmbeddedObject):
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::renderProgress):
* html/PluginDocument.cpp:
(WebCore::PluginDocument::pluginWidget):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineElement::defaultEventHandler):
(WebCore::MediaControlTextTrackContainerElement::updateSizes):
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadSubframe):
* page/Frame.cpp:
(WebCore::Frame::ownerRenderer):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::passSubframeEventToSubframe):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::passSubframeEventToSubframe):
(WebCore::widgetForEventTarget):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::applyEdjeRTLState):
* rendering/InlineTextBox.cpp:
(WebCore::fontToUse):
(WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove):
(WebCore::InlineTextBox::paint):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::collapseAnonymousBoxChild):
(WebCore::RenderBlock::simplifiedLayout):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::hitTestFloats):
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::scroll):
(WebCore::RenderBox::nodeAtPoint):
(WebCore::RenderBox::repaintLayerRectsForImage):
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
* rendering/RenderCombineText.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::adjustStyleDifference):
(WebCore::addLayers):
(WebCore::RenderElement::removeLayers):
(WebCore::RenderElement::moveLayers):
(WebCore::RenderElement::setNeedsPositionedMovementLayout):
(WebCore::RenderElement::renderNamedFlowThreadWrapper):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::hasCompositingRegionDescendant):
(WebCore::RenderFlowThread::regionForCompositedLayer):
(WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
(WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::addForcedRegionBreak):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
(WebCore::transparencyClipBox):
(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateAfterWidgetResize):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::isRestartedPlugin):
(WebCore::isCompositedPlugin):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::RenderLayerBacking::containsPaintedContent):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::requiresCompositingLayer):
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):
(WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
(WebCore::RenderLayerCompositor::requiresCompositingForFrame):
* rendering/RenderLayerModelObject.h:
* rendering/RenderLineBreak.h:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet):
(WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet):
(WebCore::RenderMultiColumnFlowThread::layout):
(WebCore::RenderMultiColumnFlowThread::addRegionToThread):
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
(WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut):
(WebCore::RenderMultiColumnFlowThread::setPageBreak):
(WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
(WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox):
(WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
(WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::nextSiblingMultiColumnSet):
(WebCore::RenderMultiColumnSet::previousSiblingMultiColumnSet):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::checkRegionStyle):
(WebCore::RenderNamedFlowFragment::namedFlowThread):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::updateWritingMode):
(WebCore::addFragmentToList):
(WebCore::RenderNamedFlowThread::addRegionToThread):
(WebCore::RenderNamedFlowThread::removeRegionFromThread):
(WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock):
(WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
(WebCore::RenderNamedFlowThread::checkInvalidRegions):
(WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
(WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderObject.cpp:
(WebCore::scheduleRelayoutForSubtree):
(WebCore::RenderObject::setLayerNeedsFullRepaint):
(WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
(WebCore::RenderObject::repaintUsingContainer):
(WebCore::RenderObject::selectionRoot):
(WebCore::RenderObject::shouldUseTransformFromContainer):
(WebCore::RenderObject::getTransformFromContainer):
(WebCore::RenderObject::isRooted):
(WebCore::RenderObject::willBeDestroyed):
(WebCore::RenderObject::isComposited):
(WebCore::RenderObject::currentRenderNamedFlowFragment):
* rendering/RenderObject.h:
* rendering/RenderProgress.h:
* rendering/RenderRuby.cpp:
(WebCore::lastRubyRun):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::rubyRun):
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::removeChild):
* rendering/RenderRubyRun.h:
* rendering/RenderSlider.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache):
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::calculateProgressRect):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintProgressBar):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMeter):
(WebCore::RenderThemeMac::paintProgressBar):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintMeter):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintMeter):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList):
(WebCore::writeLayers):
* rendering/RenderVideo.h:
* rendering/RenderView.cpp:
(WebCore::SelectionIterator::checkForSpanner):
(WebCore::isComposited):
* rendering/RenderView.h:
* rendering/RenderWidget.h:
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleText):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipLeadingWhitespace):
* testing/Internals.cpp:
(WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
2014-10-19 Chris Dumez <cdumez@apple.com>
Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar
https://bugs.webkit.org/show_bug.cgi?id=137854
Reviewed by Darin Adler.
Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar instead of a
custom toRenderScrollbar() function, for consistency.
No new tests, no behavior change.
* rendering/RenderScrollbar.h:
(isType):
(WebCore::toRenderScrollbar): Deleted.
* rendering/RenderScrollbarTheme.cpp:
(WebCore::RenderScrollbarTheme::minimumThumbLength):
(WebCore::RenderScrollbarTheme::backButtonRect):
(WebCore::RenderScrollbarTheme::forwardButtonRect):
(WebCore::RenderScrollbarTheme::trackRect):
(WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
(WebCore::RenderScrollbarTheme::willPaintScrollbar):
(WebCore::RenderScrollbarTheme::didPaintScrollbar):
(WebCore::RenderScrollbarTheme::paintScrollbarBackground):
(WebCore::RenderScrollbarTheme::paintTrackBackground):
(WebCore::RenderScrollbarTheme::paintTrackPiece):
(WebCore::RenderScrollbarTheme::paintButton):
(WebCore::RenderScrollbarTheme::paintThumb):
2014-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move GtkDragAndDropHelper from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137422
Reviewed by Martin Robinson.
Remove ClipboardUtilitiesGtk and GtkDragAndDropHelper.
* PlatformGTK.cmake:
* platform/gtk/ClipboardUtilitiesGtk.cpp: Removed.
* platform/gtk/ClipboardUtilitiesGtk.h: Removed.
* platform/gtk/GtkDragAndDropHelper.cpp: Removed.
* platform/gtk/GtkDragAndDropHelper.h: Removed.
2014-10-19 Roger Fong <roger_fong@apple.com>
Unreviewed. Style fix following r174855.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
2014-10-18 Antti Koivisto <antti@apple.com>
REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
https://bugs.webkit.org/show_bug.cgi?id=137855
Reviewed by Dan Bernstein.
We lose the sniffed MIME type for the response when synthesizing an NSURLResponse. Sniffing requires
backchannel data that the synthesized response doesn't have.
Test: http/tests/mime/mime-type-sniff.html
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::initNSURLResponse):
When synthesizing NSURLResponse explicitly set the Content-type header to the sniffed type.
2014-10-18 Chris Dumez <cdumez@apple.com>
[Mac] Use Fast enumeration consistently in WebFontCache.mm
https://bugs.webkit.org/show_bug.cgi?id=137791
Reviewed by Darin Adler.
Use fast enumeration consistently in WebFontCache.mm as this results in
more efficient, concise and safer code.
No new tests, no behavior change.
* platform/mac/WebFontCache.mm:
(+[WebFontCache getTraits:inFamily:]):
Reserve Vector capacity before the loop as we know how many traits we
are going to append. Also use uncheckedAppend() for performance.
(+[WebFontCache internalFontWithFamily:traits:weight:size:]):
2014-10-18 Chris Fleizach <cfleizach@apple.com>
AX: Tables with <colgroups> are not reporting table column headers
https://bugs.webkit.org/show_bug.cgi?id=137846
Reviewed by Mario Sanchez Prada.
The code to search for header objects was getting stuck on anonymous RenderTableSections.
We also need to check more rows for headers, in case the first row or more is not visible or is empty.
Test: accessibility/table-column-headers-with-captions.html
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
(WebCore::AccessibilityTableColumn::headerObjectForSection):
2014-10-18 KwangHyuk Kim <hyuki.kim@samsung.com>
[EFL] build break occurs on webkit efl build.
https://bugs.webkit.org/show_bug.cgi?id=137844
Reviewed by Gyuyoung Kim.
As local variable elementAddressRegisterIndex is assigned but not used, there is build break for the webkit efl.
No new tests because it's just to fix build break.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
2014-10-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Apply std::unique_ptr to FooFont classes
https://bugs.webkit.org/show_bug.cgi?id=137769
Reviewed by Andreas Kling.
As a step to use std::unique_ptr, this patch applies std::unique_ptr to Font classes.
No new tests, no behavior changes.
* platform/graphics/Font.cpp:
(WebCore::retrieveOrAddCachedFontGlyphs):
(WebCore::Font::createLayout):
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::DerivedFontData::create):
* platform/graphics/SimpleFontData.h:
Remove create() factory function because public ctor and std::make_unique<> can replace it.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::Font::createLayout):
2014-10-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr in WebCore/bindings
https://bugs.webkit.org/show_bug.cgi?id=137808
Reviewed by Andreas Kling.
Clean up PassOwnPtr|OwnPtr in WebCore/bindings by using std::unique_ptr, std::make_unique
and WTF::move.
No new tests, no behavior changes.
* bindings/generic/ActiveDOMCallback.h:
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::handleInitMessageEvent):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::create):
* bindings/js/SerializedScriptValue.h:
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::interruptAndRunTask):
* bindings/js/WorkerScriptDebugServer.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
2014-10-16 Roger Fong <roger_fong@apple.com>
Calling glReadPixels with BGRA format on an NVIDIA machine with an opaque context returns the wrong alpha values.
https://bugs.webkit.org/show_bug.cgi?id=137793.
<rdar://problem/15408133>
Reviewed by Dean Jackson.
This fixes conformance test context/context-attribute-preserve-drawing-buffer.html.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
On an NVIDIA machine, when the context has alpha turned off, call glReadPixels with RGBA format and then convert to RGBA.
2014-10-17 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for all SVG RenderObjects
https://bugs.webkit.org/show_bug.cgi?id=137840
Reviewed by Benjamin Poulain.
Use is<>() / downcast<>() for all SVG RenderObjects and clean up the
surrounding code.
No new tests, no behaviro change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::supportsPath):
(WebCore::AccessibilityRenderObject::elementPath):
* page/FrameView.cpp:
(WebCore::FrameView::applyOverflowToViewport):
(WebCore::FrameView::forceLayoutParentViewIfNeeded):
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients):
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::styleDidChange):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::addResourceForClientInvalidation):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::collectLayoutAttributes):
(WebCore::RenderSVGText::subtreeChildWillBeRemoved):
(WebCore::RenderSVGText::subtreeTextDidChange):
(WebCore::updateFontInAllDescendants):
* rendering/svg/RenderSVGText.h:
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::mapLocalToContainer):
(WebCore::SVGRenderSupport::pushMappingToContainer):
(WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeStyle):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::bufferForeground):
* rendering/svg/SVGResourcesCycleSolver.cpp:
(WebCore::SVGResourcesCycleSolver::resolveCycles):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::renderSVGText):
(WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::svgAttributeChanged):
* svg/SVGElement.cpp:
(WebCore::SVGElement::svgAttributeChanged):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::svgAttributeChanged):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::svgAttributeChanged):
(WebCore::SVGImageElement::didAttachRenderers):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::svgAttributeChanged):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::svgAttributeChanged):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::svgAttributeChanged):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):
(WebCore::SVGSVGElement::currentViewBoxRect):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::setContainerSize):
(WebCore::SVGImage::containerSize):
2014-10-17 Chris Dumez <cdumez@apple.com>
Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
https://bugs.webkit.org/show_bug.cgi?id=137836
Reviewed by Andreas Kling.
Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms().
This function is only called from WidthIterator::applyFontTransforms(),
which already makes sure to call applyTransforms() if isSVGFont()
returns false. This patch replaces the check with a simple assertion.
No new tests, no behavior change.
* platform/graphics/SimpleFontData.h:
* svg/SVGFontData.h:
2014-10-17 Michael Saboff <msaboff@apple.com>
Don't create cached functions that access lexicalGlobalObject()
https://bugs.webkit.org/show_bug.cgi?id=137839
Reviewed by Geoffrey Garen.
Made it so that all the JSDOMWindow special functions blur(), close(), focus() and postMessage()
are always created as needed for every prototype. Made it so that JSHTMLDocument does
the same for open(). Updated test to account for these methods not being cached
Updated tests accordingly.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot): Updated to always create cached versions of the
special functions.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot): Added to create an uncached open() method when
it is first accessed.
* html/HTMLDocument.idl: Added CustomGetOwnPropertySlot and implemented it in JSHTMLDocumentCustom.cpp.
2014-10-17 Simon Fraser <simon.fraser@apple.com>
[iOS] Speculative fix for a crash under RenderLayerCompositor::updateScrollCoordinatedLayer()
https://bugs.webkit.org/show_bug.cgi?id=137837
rdar://problem/18545452
Reviewed by Tim Horton.
Crash logs suggest that an iframe's RenderView's RenderLayer's backing can be null
in a call to updateScrollCoordinatedLayer(), so add an assertion (to help find a reproducible case)
and a null check.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::attachScrollingNode):
2014-10-17 Andreas Kling <akling@apple.com>
Re-arrange parentheses for compilation purposes.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
2014-10-17 Andreas Kling <akling@apple.com>
Unreviewed build fix after r174838.
Use StackAllocator::addressOf() instead of the old way of grabbing at a stack reference.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
2014-10-17 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderBox
https://bugs.webkit.org/show_bug.cgi?id=137804
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for RenderBox and clean up the surrounding
code.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
(WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
(WebCore::AccessibilityRenderObject::scrollTo):
* bindings/objc/DOMHTML.mm:
(-[DOMHTMLElement scrollYOffset]):
(-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):
* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMNode borderRadii]):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::sizingBox):
(WebCore::computedTransform):
(WebCore::zoomAdjustedPaddingOrMarginPixelValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getLowerRightCorner):
* dom/Document.cpp:
(WebCore::Document::webkitWillEnterFullScreenForElement):
* dom/Element.cpp:
(WebCore::Element::scrollByUnits):
* dom/Node.cpp:
(WebCore::Node::defaultEventHandler):
* dom/Position.cpp:
(WebCore::endsOfNodeAreVisuallyDistinctPositions):
* editing/DeleteButtonController.cpp:
(WebCore::isDeletableElement):
* editing/EditorCommand.cpp:
(WebCore::verticalScrollDistance):
* editing/FrameSelection.cpp:
(WebCore::CaretBase::paintCaret):
* editing/TextIterator.cpp:
(WebCore::fullyClipsContents):
(WebCore::shouldEmitExtraNewlineForNode):
* editing/htmlediting.cpp:
(WebCore::absoluteBoundsForLocalCaretRect):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::isFocusable):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::updateAutoscrollRenderer):
* page/EventHandler.cpp:
(WebCore::EventHandler::startPanScrolling):
* page/FrameView.cpp:
(WebCore::FrameView::embeddedContentBox):
* page/GestureTapHighlighter.cpp:
* page/SpatialNavigation.cpp:
(WebCore::isScrollableNode):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::baselinePosition):
* plugins/PluginView.cpp:
(WebCore::PluginView::invalidateWindowlessPluginRect):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::logicalHeight):
(WebCore::InlineBox::adjustPosition):
* rendering/InlineElementBox.cpp:
(WebCore::InlineElementBox::deleteLine):
(WebCore::InlineElementBox::extractLine):
(WebCore::InlineElementBox::attachLine):
(WebCore::InlineElementBox::paint):
(WebCore::InlineElementBox::nodeAtPoint):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::addReplacedChildOverflow):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedNormalFlowLayout):
(WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
(WebCore::RenderBlock::clearPercentHeightDescendantsFrom):
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
(WebCore::RenderBlock::addFocusRingRects):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlockFlow::layoutLineBoxes):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::findAutoscrollable):
(WebCore::computeBlockStaticDistance):
(WebCore::RenderBox::positionForPoint):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBox.h:
(WebCore::RenderBox::previousSiblingBox):
(WebCore::RenderBox::nextSiblingBox):
(WebCore::RenderBox::parentBox):
(WebCore::RenderBox::firstChildBox):
(WebCore::RenderBox::lastChildBox):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
(WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::removeChildInternal):
(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::repaintAfterLayoutIfNeeded):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::findLegend):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
(WebCore::RenderFlowThread::currentActiveRenderBox):
* rendering/RenderFlowThread.h:
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::unwrapRenderer):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::layoutShadowControls):
(WebCore::RenderImage::computeIntrinsicRatioInformation):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::absoluteRects):
(WebCore::RenderInline::addFocusRingRects):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::perspectiveTransform):
(WebCore::RenderLayer::perspectiveOrigin):
(WebCore::parentLayerCrossFrame):
(WebCore::RenderLayer::enclosingScrollableLayer):
(WebCore::RenderLayer::resize):
(WebCore::RenderLayer::scrollsOverflow):
(WebCore::computeReferenceBox):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateTransform):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::resetContentsRect):
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
(WebCore::RenderLayerBacking::contentsBox):
(WebCore::RenderLayerBacking::backgroundBoxForPainting):
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::startTransition):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::rangeIntersectsRect):
* rendering/RenderMediaControlElements.cpp:
(WebCore::RenderMediaVolumeSliderContainer::layout):
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::firstColumnSetOrSpanner):
(WebCore::RenderMultiColumnFlowThread::nextColumnSetOrSpannerSiblingOf):
(WebCore::RenderMultiColumnFlowThread::previousColumnSetOrSpannerSiblingOf):
(WebCore::RenderMultiColumnFlowThread::resolveMovedChild):
(WebCore::isValidColumnSpanner):
(WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::getRanges):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeRectForRepaint):
(WebCore::RenderObject::showRegionsInformation):
(WebCore::RenderObject::showRenderObject):
(WebCore::RenderObject::mapLocalToContainer):
(WebCore::RenderObject::pushMappingToContainer):
(WebCore::RenderObject::mapAbsoluteToLocalPoint):
(WebCore::RenderObject::addAnnotatedRegions):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::nodeAtPoint):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::baselinePosition):
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::baselinePosition):
(WebCore::centerRectVerticallyInParentInputElement):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::baselinePosition):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::baselinePosition):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintSearchFieldCancelButton):
(WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeWin::paintSearchFieldResultsButton):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
(WebCore::externalRepresentation):
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::setLineBreakInfo):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleOutOfFlowPositioned):
(WebCore::BreakingContext::handleFloat):
(WebCore::BreakingContext::handleReplaced):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipTrailingWhitespace):
(WebCore::LineBreaker::skipLeadingWhitespace):
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::layout):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::embeddedContentBox):
2014-10-17 Andreas Kling <akling@apple.com>
Get rid of wrapperContext() in DOM bindings.
<https://webkit.org/b/137834>
Reviewed by Chris Dumez.
The "wrapper context" is always the DOMWrapperWorld, and since we're passing that around
already, we don't need a separate mechanism to get at the context.
The context is extra data stored in the DOM object's JSC::Weak (the wrapper GC object.)
* bindings/js/JSDOMBinding.h:
(WebCore::setInlineCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::wrapperContext): Deleted.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
2014-10-17 Benjamin Poulain <benjamin@webkit.org>
Make a better use of the available registers when compiling nested selector lists
https://bugs.webkit.org/show_bug.cgi?id=137802
Reviewed by Andreas Kling.
Previously, when compiling a nested selector list, the compiler would start by pushing all
the allocated registers to the stack to free them for the compiled selector list.
While neat to ensure register allocation is correct, this is very inefficient.
This patch brings the first step for reducing the overhead. Instead of pushing everything
to the stack, we just push as many registers as we need for compiling the selector list.
In most cases, we have so many registers that we don't even need to push anything to the stack.
Test: fast/selectors/nth-child-of-register-requirement.html
* cssjit/SelectorCompiler.cpp:
Add an explicit type for SelectorList to keep information aggregated from all
SelectorFragmentList inside it.
SelectorFragmentList is also extended to include its register and stack requirements.
This information is then used to create a SelectorList and to compile the SelectorFragmentList.
(WebCore::SelectorCompiler::hasAnyCombinators):
We only change the elementAddressRegister when moving over combinators. This is used to detect
if a selector list clobber the elementAddressRegister or leave it untouched.
(WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
(WebCore::SelectorCompiler::computeBacktrackingInformation):
Instead of returning a BacktrackingMemoryRequirements, update the SelectorFragmentList and SelectorList directly.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
This is where the fun happen.
First step is keep the input untouched. For now it is simply pushed on the stack. This can be improved later.
Then we find how many allocated registers we need to save to compile the input selector list. We push those registers
to the stack and give them back to the register allocator.
With enough registers we can now compile the nested selector list. The code has changed a bit for efficiency. Instead
of creating a shortcut for success case, the code now exit on error and proceed on success. This is the general pattern
of SelectorCompiler and it is quite a bit more efficient in the common cases.
Finally, we reallocate the registers and get their values back from the stack. The "tail" is duplicated but that's fine
because in the vast majority of cases it is 1 or 2 pop.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::push):
2014-10-17 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for StyleImage
https://bugs.webkit.org/show_bug.cgi?id=137824
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for StyleImage and clean up the surrouding
code.
No new tests, no behavior change.
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::detachPendingImage):
(WebCore::CSSCursorImageValue::cachedImage):
(WebCore::CSSCursorImageValue::cachedImageURL):
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::detachPendingImage):
(WebCore::CSSImageSetValue::~CSSImageSetValue):
(WebCore::CSSImageSetValue::cachedImageSet):
(WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::detachPendingImage):
(WebCore::CSSImageValue::cachedImage):
(WebCore::CSSImageValue::hasFailedOrCanceledSubresources):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingShapeImage):
(WebCore::StyleResolver::loadPendingImages):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForProperties):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleCachedImageSet.h:
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StyleImage.h:
* rendering/style/StylePendingImage.h:
2014-10-17 Dean Jackson <dino@apple.com>
[Media] Always update controls for <audio> since they are always visible
https://bugs.webkit.org/show_bug.cgi?id=137829
<rdar://problem/18693987>
Reviewed by Brent Fulgham.
Revision 174756 made a change to only update the display of the controls
while they are visible. However, <audio> elements didn't detect visibility
the same way, since their controls do not auto-hide.
Change controlsAreHidden to check if we're an audio element.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.controlsAreHidden): Audio elements do not auto-hide their controls.
2014-10-17 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Accelerated compositing is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=137345
Reviewed by Brent Fulgham.
This patch is based on GTK, and the texture mapper graphics layer type.
* WebCore.vcxproj/copyForwardingHeaders.cmd: Copy texmap headers.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: Added method and flag indicating whether animation has started.
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::addAnimation):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h: Ditto.
(WebCore::GraphicsLayerTextureMapper::startedAnimation):
* platform/graphics/texmap/TextureMapperShaderProgram.cpp: Use same precision for uniform in vertex shader as in fragment shader.
Otherwise glLinkProgram() will fail, and nothing will be rendered.
2014-10-17 Alexey Proskuryakov <ap@apple.com>
[iOS] Crash when load is canceled while waiting for the user to type HTTP authentication credentials
https://bugs.webkit.org/show_bug.cgi?id=137826
rdar://problem/17329599
Reviewed by Brady Eidson.
No new tests, as we don't have a way to simulate details of user interaction with
an auth dialog.
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
(WebCore::ResourceHandle::receivedRequestToPerformDefaultHandling):
(WebCore::ResourceHandle::receivedChallengeRejection):
Added null checks before passing m_connection for CFNetwork functions, making this
match what Mac code does when sending a message to a nil receiver.
2014-10-17 Simon Fraser <simon.fraser@apple.com>
Fix the iOS build.
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
(WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption):
2014-10-16 Jer Noble <jer.noble@apple.com>
[Mac] Represent AVMediaSelectionOptions as AudioTracks
https://bugs.webkit.org/show_bug.cgi?id=137474
Reviewed by Brent Fulgham.
Test: http/tests/media/hls/hls-audio-tracks.html
Support selecting audio "tracks" in HLS streams by exposing AVMediaSelectionOptions
as entries in the video's AudioTrackList.
AVMediaSessionGroups and AVPlayerItems don't have KVO or notifications to track when options
are selected and deselected, so wrap AVMediaSessionGroup and AVMediaSessionOption in C++
wrappers. Each AVMediaSelectionGroup can have only one AVMediaSelectionOption selected at a
time, so the wrapper will take care of answering which AVMediaSelectionOption is currently
selected, as without KVO notifications, asking the AVMediaSelectionGroup directly is
inconsistent. Because setting the selected option multiple times in the same run-loop can
cause flakiness, coalesce calls to setSelectedOption() by setting a one-shot timer to do
the actual selection in the next run-loop.
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Added.
(WebCore::MediaSelectionOptionAVFObjC::avMediaSelectionOption):
(WebCore::MediaSelectionOptionAVFObjC::clearGroup): Clear backpointer to group from option.
(WebCore::MediaSelectionGroupAVFObjC::selectedOption): Simple accessor.
(WebCore::MediaSelectionGroupAVFObjC::options): Simple accessor.
(WebCore::MediaSelectionGroupAVFObjC::avMediaSelectionGroup): Simple accessor.
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: Added.
(WebCore::MediaSelectionOptionAVFObjC::create): Simple factory method.
(WebCore::MediaSelectionOptionAVFObjC::MediaSelectionOptionAVFObjC): Simple constructor.
(WebCore::MediaSelectionOptionAVFObjC::setSelected): Pass through to MediaSelectionGroupAVFObjC.
(WebCore::MediaSelectionOptionAVFObjC::selected): Ditto.
(WebCore::MediaSelectionOptionAVFObjC::index): Return index of this object in the group's object.
(WebCore::MediaSelectionGroupAVFObjC::create):
(WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC):
(WebCore::MediaSelectionGroupAVFObjC::~MediaSelectionGroupAVFObjC):
(WebCore::MediaSelectionGroupAVFObjC::updateOptions): Discover added or removed options.
(WebCore::MediaSelectionGroupAVFObjC::setSelectedOption): Set a one shot timer to coalesce multiple calls.
(WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired): Set the selected AVSelectionOption.
Modify AVTrackPrivateAVFObjCImpl to support both AVPlayerItemTracks and these new
MediaSelectionOptionAVFObjC objects.
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
(WebCore::AVTrackPrivateAVFObjCImpl::mediaSelectionOption): Simple accessor.
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
(WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl): Simple constructor.
(WebCore::AVTrackPrivateAVFObjCImpl::~AVTrackPrivateAVFObjCImpl): Simple destructor.
(WebCore::AVTrackPrivateAVFObjCImpl::enabled): Use MediaSelectionOptionAVFObjC, if present.
(WebCore::AVTrackPrivateAVFObjCImpl::setEnabled): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::audioKind): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::videoKind): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::index): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::id): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::label): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::language): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption): Ditto.
(WebCore::AVTrackPrivateAVFObjCImpl::trackID): Ditto.
Allow AudioTrackPrivateAVFObjC and VideoTrackPrivateAVFObjC to be created with
a MediaSelectionOptionAVFObjC.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
(WebCore::AudioTrackPrivateAVFObjC::create): Takes a MediaSelectionOptionAVFObjC.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Simple constructor.
(WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption): Create a new AVTrackPrivateAVFObjCImpl.
(WebCore::AudioTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
(WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): Simple constructor.
(WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption): Create a new AVTrackPrivateAVFObjCImpl.
(WebCore::VideoTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
Because IDs are not necessarily unique across AVPlayerItemTracks and AVMediaSelectionOptions,
use the index of the track or option instead of it's self-declared ID for ordering for the
trackIndex.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
Rather than making allowing the AVPlayerItem to automatically select the "best"
AVMediaSelectionOption, select the automatic options when creating the AVPlayerItem
and thereafter allow the users manual selections "stick".
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayerItem):
Determine whether any MediaSelectionOptionsAVFObjC have been added or removed and send trackChange events accordingly.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::determineChangedTracksFromNewTracksAndOldItems): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Search for updated selection options.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Return selection group, if available.
(WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Filter out AVPlayerItemTracks without
AVAssetTracks, as these will be represented by MediaSelectionGroupObjCs instead.
Add new files to project.
* WebCore.xcodeproj/project.pbxproj:
2014-10-17 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL] window.screen.width returns wrong value if more displays are available
https://bugs.webkit.org/show_bug.cgi?id=137778
Reviewed by Gyuyoung Kim.
ecore_x_screen_size_get() retrieves the size of Ecore_X_Screen, for example,
having two displays of 1680x1050, it will return 3360x1050.
Unlike EFL's MiniBrowser, Firefox and Chrome return screen of the current display.
No new tests. Hardware specific bug including multiple displays.
* platform/efl/PlatformScreenEfl.cpp:
(WebCore::screenRect):
Use ecore's xrandr to determine the screen on which browser window is displayed.
2014-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
https://bugs.webkit.org/show_bug.cgi?id=137782
Reviewed by Sergio Villar Senin.
* platform/gtk/SharedTimerGtk.cpp:
(WebCore::setSharedTimerFireInterval): Use microseconds instead of
milliseconds.
2014-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move touch events handling from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137735
Reviewed by Sergio Villar Senin.
Remove GtkTouchContextHelper.
* PlatformGTK.cmake:
* platform/gtk/GtkTouchContextHelper.cpp: Removed.
* platform/gtk/GtkTouchContextHelper.h: Removed.
2014-10-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove unused function in WorkerThreadableLoader.h
https://bugs.webkit.org/show_bug.cgi?id=137811
Reviewed by Csaba Osztrogonác.
mainThreadCreateLoader() isn't used anywhere. Even there is no implementation.
* loader/WorkerThreadableLoader.h:
2014-10-15 Yusuke Suzuki <utatane.tea@gmail.com>
CSS Selectors Level 4: Implement :matches in SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=137393
Reviewed by Benjamin Poulain.
In this patch, we introduce initial :matches implementation.
In this current implementation, we don't consider pseudo elements.
Test: fast/selectors/querySelector-matches.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
2014-10-16 Yusuke Suzuki <utatane.tea@gmail.com>
CSS JIT: Introduce StackAllocator::addressOf
https://bugs.webkit.org/show_bug.cgi?id=137771
Reviewed by Benjamin Poulain.
Introduce StackAllocator::addressOf and drop offsetToStackReference, it's too primitive.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::loadCheckingContext):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::addressOf):
(WebCore::StackAllocator::offsetToStackReference):
2014-10-16 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r169024): Undetermined text is not displayed in the search field of Adobe Help Website
https://bugs.webkit.org/show_bug.cgi?id=137679
rdar://problem/18450335
Reviewed by Enrica Casucci.
Test: platform/mac/editing/input/selected-composed-text-painting.html
* rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): We do not paint
selection beckground for unconfirmed text with underlines, so we should use a regular
style for text painting, as well.
2014-10-16 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for BasicShape subclasses
https://bugs.webkit.org/show_bug.cgi?id=137766
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for BasicShape subclasses and clean up the
surrounding code.
No new tests, no behavior change.
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):
(WebCore::basicShapeForValue):
* css/BasicShapeFunctions.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::shapePropertyValue):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
* rendering/ClipPathOperation.h:
(WebCore::ShapeClipPathOperation::create):
Take a PassRef<BasicShape> in argument to make it obvious it is never
null.
(WebCore::ShapeClipPathOperation::basicShape):
Return a reference instead of a pointer as it can never return null.
(WebCore::ShapeClipPathOperation::windRule):
(WebCore::ShapeClipPathOperation::pathForReferenceRect):
Make it non-const due to the const-correctness of Ref::get().
(WebCore::ShapeClipPathOperation::ShapeClipPathOperation):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape):
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computedShape):
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShape::canBlend):
(WebCore::BasicShapeCircle::blend):
(WebCore::BasicShapeEllipse::blend):
(WebCore::BasicShapePolygon::blend):
(WebCore::BasicShapeInset::blend):
* rendering/style/BasicShapes.h:
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2014-10-16 Chris Dumez <cdumez@apple.com>
Leverage the new RenderElement::m_isCSSAnimating flag in more places
https://bugs.webkit.org/show_bug.cgi?id=137786
Reviewed by Simon Fraser.
Leverage the new RenderElement::m_isCSSAnimating flag that was introduced
in r174703 in more places, for performance. This avoids doing extra work
for renderers on which we are not running animations on. This patch also
updates the API a bit to use more references instead of pointers, making
it clear the RenderElement cannot be null and thus avoiding unnecessary
null checks.
No new tests, no behavior change.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computeRenderStyleForProperty):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
(WebCore::AnimationControllerPrivate::clear):
(WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
(WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
(WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
(WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
(WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
(WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
(WebCore::AnimationController::cancelAnimations):
(WebCore::AnimationController::updateAnimations):
(WebCore::AnimationController::getAnimatedStyleForRenderer):
(WebCore::AnimationController::notifyAnimationStarted):
(WebCore::AnimationController::isRunningAnimationOnRenderer):
(WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::willBeDestroyed):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::currentTransform):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::notifyAnimationStarted):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
(WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
2014-10-16 Adrien Destugues <pulkomandy@gmail.com>
Missing RefPtr.release() calls in TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=137777
Reviewed by Chris Dumez.
No new tests: no functional change, cleanup/optimization.
Avoids useless ref/deref cycle when returning from functions.
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::acquireTextureFromPool):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintIntoSurface):
2014-10-16 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for ContentData subclasses
https://bugs.webkit.org/show_bug.cgi?id=137768
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for ContentData subclasses.
No new tests, no behavior change.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::contentToCSSValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingImages):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
* rendering/style/ContentData.h:
(WebCore::operator==):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setContent):
2014-10-16 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r174744.
https://bugs.webkit.org/show_bug.cgi?id=137790
Caused another WebGL conformance test to fail (Requested by
rfong on #webkit).
Reverted changeset:
"glReadPixels on NVIDIA cards returns the wrong values for the
alpha channel when alpha is off."
https://bugs.webkit.org/show_bug.cgi?id=137752
http://trac.webkit.org/changeset/174744
2014-10-16 Tim Horton <timothy_horton@apple.com>
Implement selection services menu for Legacy WebKit
https://bugs.webkit.org/show_bug.cgi?id=137582
<rdar://problem/18604241>
Reviewed by Brady Eidson.
* WebCore.exp.in:
* editing/Editor.h:
* editing/ios/EditorIOS.mm:
(WebCore::Editor::replaceSelectionWithAttributedString):
* editing/mac/EditorMac.mm:
(WebCore::Editor::replaceSelectionWithAttributedString):
Add replaceSelectionWithAttributedString, which replaces the selection
with the given attributed string (converting to plain text if the destination
is not richly editable).
2014-10-16 Alexey Proskuryakov <ap@apple.com>
Crashes in ResourceHandleCFURLConnectionDelegateWithOperationQueue due to unimplemented retain/release
https://bugs.webkit.org/show_bug.cgi?id=137779
rdar://problem/18679320
Reviewed by Brady Eidson.
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegate::retain):
(WebCore::ResourceHandleCFURLConnectionDelegate::release):
(WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
Implemented retain/release. They are necessary, as ResourceHandle goes away when
it's canceled, and there is noone else to keep the client object alive but
CFURLConnection itself.
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
Added a FIXME about potential improvements that I spotted while invsestigating this.
2014-10-15 Andrei Bucur <abucur@adobe.com>
ASSERTION FAILED in WebCore::RenderFlowThread::getRegionRangeForBox
https://bugs.webkit.org/show_bug.cgi?id=135563
Reviewed by David Hyatt.
The new multi-column code doesn't work correctly when the document contains nested fragmentation
contexts. The problem is the current flow thread concept that can store only one RenderFlowThread
at a time and use it during layout.
The stored flow thread is always correct for regions because named flow threads are absolutley positioned
so every child renderer is contained inside them (with the expcetion of fixed positioned elements which are
treated separately).
For multi-column elements this is no longer the case. An absolutely positioned element inside a static
multi-column element will be contained by a block outside the fragmentation context. It can even be
contained by a different multi-column element in the case of nested flow threads.
The patch below explores a solution that's not based on a current flow thread stored globally. The proposed
patch makes every block to store a pointer to its fragmentation context and a flag that states if this pointer
needs to be updated or not. If the renderer is not a block it will get its flow thread from the containing
block. Once the containing flow thread is requested for the block, the pointer is computed and cached until
invalidated:
- when a subtree is removed from a flow thread
- when the position property of an element inside a flow thread changes
The process is recursive and it doesn't affect elements that are not nested inside a flow thread. If a block
changes position from relative to static, any element that was contained by it can only be contained by an
ancestor of the block. This ancestor will still be outside of any flow thread. This ensures that non-fragmentation
code is not affected from a performance perspective.
The patch affects the results of the performance tests:
- the regions layout tests have a decreased performance raging from 2% to 5-6%
- the regions selection tests have an increased performance raging from 1-2% to 10%
- the multicolumn layout tests (now pending review in b137687) have an increased performance
raging from 1.8% to 5%
Tests: fast/multicol/multicol-all-positioned-crash.html
fast/multicol/multicol-transform-containing-block.html
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::FlowThreadController):
* rendering/FlowThreadController.h:
(WebCore::FlowThreadController::currentRenderFlowThread): Deleted.
(WebCore::FlowThreadController::setCurrentRenderFlowThread): Deleted.
* rendering/LayoutState.h:
(WebCore::LayoutState::currentRenderFlowThread):
(WebCore::LayoutState::setCurrentRenderFlowThread):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlockRareData::RenderBlockRareData):
(WebCore::RenderBlock::styleWillChange):
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::collapseAnonymousBoxChild):
(WebCore::RenderBlock::cachedFlowThreadContainingBlock):
(WebCore::RenderBlock::cachedFlowThreadContainingBlockNeedsUpdate):
(WebCore::RenderBlock::setCachedFlowThreadContainingBlockNeedsUpdate):
(WebCore::RenderBlock::updateCachedFlowThreadContainingBlock):
(WebCore::RenderBlock::locateFlowThreadContainingBlock):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::styleWillChange):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::borderBoxRectInRegion):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
(WebCore::RenderFlowThread::repaintRectangleInRegions):
(WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer): Deleted.
(WebCore::CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer): Deleted.
(WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler): Deleted.
(WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler): Deleted.
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::showRegionsInformation):
(WebCore::RenderObject::insertedIntoTree):
(WebCore::RenderObject::removeFromRenderFlowThread):
(WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
(WebCore::RenderObject::invalidateFlowThreadContainingBlockIncludingDescendants):
(WebCore::RenderObject::currentRenderNamedFlowFragment):
(WebCore::RenderObject::locateFlowThreadContainingBlock):
(WebCore::RenderObject::locateFlowThreadContainingBlockNoCache): Deleted.
(WebCore::RenderObject::removeFromRenderFlowThreadRecursive): Deleted.
* rendering/RenderObject.h:
(WebCore::RenderObject::flowThreadContainingBlock):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::computeOverflowFromFlowThread):
* rendering/RenderView.cpp:
(WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
(WebCore::RenderView::popLayoutStateForCurrentFlowThread):
* rendering/RenderView.h:
2014-10-15 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for list-related render objects
https://bugs.webkit.org/show_bug.cgi?id=137764
Reviewed by Benjamin Poulain.
Use is<>() / downcast<>() for list-related render objects and clean up
the surrounding code.
No new tests, no behavior change.
* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::visibleChildren):
(WebCore::AccessibilityListBox::elementAccessibilityHitTest):
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::elementRect):
* accessibility/AccessibilityObject.cpp:
(WebCore::renderListItemContainerForNode):
* accessibility/atk/WebKitAccessibleHyperlink.cpp:
(getRangeLengthForObject):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(accessibilityObjectLength):
(offsetAdjustmentForListItem):
(webkitAccessibleTextGetText):
* editing/BreakBlockquoteCommand.cpp:
(WebCore::BreakBlockquoteCommand::doApply):
* html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::didAttachRenderers):
(WebCore::HTMLLIElement::parseValue):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::nextSelectableListIndexPageAway):
(WebCore::HTMLSelectElement::scrollToSelection):
(WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
(WebCore::HTMLSelectElement::selectOption):
(WebCore::HTMLSelectElement::platformHandleKeydownEvent):
(WebCore::HTMLSelectElement::menuListDefaultEventHandler):
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* html/HTMLSelectElementWin.cpp:
(WebCore::HTMLSelectElement::platformHandleKeydownEvent):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformPrepareForWheelEvents):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
* rendering/RenderCounter.cpp:
(WebCore::planCounter):
* rendering/RenderListBox.h:
* rendering/RenderListItem.cpp:
(WebCore::nextListItem):
(WebCore::previousListItem):
* rendering/RenderListItem.h:
* rendering/RenderListMarker.h:
* rendering/RenderMenuList.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::markerTextForListItem):
* rendering/TextAutoSizing.cpp:
(WebCore::TextAutoSizingValue::adjustNodeSizes):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
* testing/Internals.cpp:
(WebCore::Internals::isSelectPopupVisible):
2014-10-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr for CachedResource
https://bugs.webkit.org/show_bug.cgi?id=137736
Reviewed by Darin Adler.
No new tests, no behavior change.
* loader/cache/CachedResource.cpp: Use std::unique_ptr instead of PassOwnPtr|OwnPtr.
(WebCore::CachedResource::removeClient):
* loader/cache/CachedResource.h: Set ctor from private to public.
(WebCore::CachedResource::CachedResourceCallback::schedule):
2014-10-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move TextCodec classes to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=137738
Reviewed by Darin Adler.
Replace uses of PassOwnPtr in code under TextCodecFoo class with std::unique_ptr.
To do this, ctor of TextCodecFoo classes is changed from private to public. Besides
related classes follow this change as well.
No new tests, no behavior change.
* html/parser/HTMLMetaCharsetParser.h:
* loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::setEncoding):
(WebCore::TextResourceDecoder::flush):
* loader/TextResourceDecoder.h:
* platform/text/TextCodec.h:
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::create):
* platform/text/TextCodecICU.h:
* platform/text/TextCodecLatin1.cpp:
(WebCore::newStreamingTextDecoderWindowsLatin1):
* platform/text/TextCodecUTF16.cpp:
(WebCore::newStreamingTextDecoderUTF16LE):
(WebCore::newStreamingTextDecoderUTF16BE):
* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::create):
* platform/text/TextCodecUTF8.h:
* platform/text/TextCodecUserDefined.cpp:
(WebCore::newStreamingTextDecoderUserDefined):
* platform/text/TextEncodingRegistry.cpp:
(WebCore::newTextCodec):
* platform/text/TextEncodingRegistry.h:
* platform/text/mac/TextCodecMac.cpp:
(WebCore::newTextCodecMac):
2014-10-15 Dean Jackson <dino@apple.com>
[Media] Reduce style updates (painting) in controls
https://bugs.webkit.org/show_bug.cgi?id=137763
<rdar://problem/17833045>
Reviewed by Simon Fraser.
Media controls were causing a lot of repaints they were
constantly updating the style of the widgets, the value
of the forms, or the text in the display.
This is necessary when the controls are visible, but not
necessary when they are hidden. Return immediately in that case.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls): Initialise the slider to a zero value.
(Controller.prototype.handleDurationChange): Force an update even though we might be hidden.
(Controller.prototype.updateProgress): Don't update if we're hidden.
(Controller.prototype.updateTime): Ditto.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.updateProgress): Ditto.
2014-10-15 Chris Dumez <cdumez@apple.com>
[Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel) - Part 2
https://bugs.webkit.org/show_bug.cgi?id=137721
Reviewed by Darin Adler.
Follow-up patch to r174717 addressing review comments made after the patch landed:
- Use modern C++ loop
- Remove explicit calls to String(NSString*) constructor
No new tests, no new tests.
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::platformLazyInit):
2014-10-15 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for InlineBox subclasses
https://bugs.webkit.org/show_bug.cgi?id=137749
Reviewed by Darin Adler.
Use is<>() / downcast<>() for InlineBox subclasses and clean up the
surrounding code.
No new tests, no behavior change.
* dom/Position.cpp:
(WebCore::Position::upstream):
(WebCore::Position::downstream):
* editing/VisibleUnits.cpp:
(WebCore::wordBreakIteratorForMinOffsetBoundary):
(WebCore::wordBreakIteratorForMaxOffsetBoundary):
(WebCore::visualWordPosition):
(WebCore::startPositionForLine):
(WebCore::endPositionForLine):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::root):
(WebCore::InlineBox::nextLeafChild):
(WebCore::InlineBox::prevLeafChild):
(WebCore::InlineBox::nextLeafChildIgnoringLineBreak):
* rendering/InlineBox.h:
* rendering/InlineElementBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::getFlowSpacingLogicalWidth):
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
(WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
(WebCore::InlineFlowBox::requiresIdeographicBaseline):
(WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
(WebCore::InlineFlowBox::computeLogicalBoxHeights):
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
(WebCore::InlineFlowBox::computeMaxLogicalTop):
(WebCore::InlineFlowBox::flipLinesInBlockDirection):
(WebCore::InlineFlowBox::computeOverflow):
(WebCore::InlineFlowBox::firstLeafChild):
(WebCore::InlineFlowBox::lastLeafChild):
(WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
(WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::positionForBox):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::firstRootBox):
(WebCore::RenderBlockFlow::lastRootBox):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::createLineBoxes):
(WebCore::RenderBlockFlow::constructLine):
(WebCore::setLogicalWidthForTextRun):
(WebCore::computeExpansionForJustifiedText):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
(WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine):
(WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
* rendering/RenderText.cpp:
(WebCore::RenderText::localCaretRect):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::isHyphenated):
(WebCore::RootInlineBox::ascentAndDescentForBox):
* rendering/RootInlineBox.h:
(WebCore::RootInlineBox::nextRootBox):
(WebCore::RootInlineBox::prevRootBox):
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::localCaretRect):
(WebCore::RenderSVGInlineText::positionForPoint):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::positionForPoint):
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::paintSelectionBackground):
(WebCore::SVGInlineFlowBox::paint):
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* rendering/svg/SVGInlineFlowBox.h:
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeRenderSVGTextBox):
(WebCore::writeSVGInlineTextBoxes):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::paint):
(WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
(WebCore::SVGRootInlineBox::layoutChildBoxes):
(WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
* rendering/svg/SVGRootInlineBox.h:
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::collectTextBoxesInFlowBox):
2014-10-15 Roger Fong <roger_fong@apple.com>
glReadPixels on NVIDIA cards returns the wrong values for the alpha channel when alpha is off.
https://bugs.webkit.org/show_bug.cgi?id=137752.
<rdar://problem/15408133>
Reviewed by Brent Fulgham.
This change fixed the 1.0.2 conformance test: context/context-attribute-preserve-drawing-buffer.html
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
Manually set the alpha channel to 255 when alpha is off on the rendering context.
2014-10-13 Chris Fleizach <cfleizach@apple.com>
AX: Going back is broken for VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=137382
Reviewed by Darin Adler.
There were two issues preventing VoiceOver from navigating when using page history to go back/forward.
1) Existing AXLoadComplete does not get fired when you just move through page history.
There were existing frameLoad notifications used by GTK. I think we should use those which seem more reliable.
2) The AccessibilityScrollView cached its children, but on some history page loads, that cache was never cleared out.
Rather than trying to find those places to clear out the cache, it's easier to just add the elements to the children
array everytime it's asked for. Since there's only ever 3 elements (web area + 2 scroll bars) this should not be a performance hit.
Tests are not possible since they require monitoring notifications across multiple page loads.
* accessibility/AXObjectCache.h:
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::updateChildrenIfNecessary):
* accessibility/ios/AXObjectCacheIOS.mm:
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
* dom/Document.cpp:
(WebCore::Document::implicitClose):
2014-10-15 Simon Fraser <simon.fraser@apple.com>
Sometimes can't scroll overflow:scroll areas in subframes
https://bugs.webkit.org/show_bug.cgi?id=137746
rdar://problem/18603560
Reviewed by Tim Horton.
r169733 introduced a regression which caused us to no longer update the non-fast
scrollable region on every layout in subframes, by adding a bogus isMainFrame() check.
Revert to the previous code.
Test: platform/mac-wk2/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout.html
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2014-10-15 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for TransformOperation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137731
Reviewed by Darin Adler.
Use is<>() / downcast<>() for TransformOperation subclasses and clean
up the surrounding code.
No new tests, no behavior change.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::validateTransformOperations):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::getTransformFunctionValue):
* platform/graphics/transforms/IdentityTransformOperation.h:
* platform/graphics/transforms/Matrix3DTransformOperation.cpp:
(WebCore::Matrix3DTransformOperation::operator==):
* platform/graphics/transforms/Matrix3DTransformOperation.h:
* platform/graphics/transforms/MatrixTransformOperation.cpp:
(WebCore::MatrixTransformOperation::operator==):
(WebCore::MatrixTransformOperation::blend):
* platform/graphics/transforms/MatrixTransformOperation.h:
* platform/graphics/transforms/PerspectiveTransformOperation.cpp:
(WebCore::PerspectiveTransformOperation::operator==):
(WebCore::PerspectiveTransformOperation::blend):
* platform/graphics/transforms/PerspectiveTransformOperation.h:
* platform/graphics/transforms/RotateTransformOperation.cpp:
(WebCore::RotateTransformOperation::operator==):
(WebCore::RotateTransformOperation::blend):
* platform/graphics/transforms/RotateTransformOperation.h:
* platform/graphics/transforms/ScaleTransformOperation.cpp:
(WebCore::ScaleTransformOperation::operator==):
(WebCore::ScaleTransformOperation::blend):
* platform/graphics/transforms/ScaleTransformOperation.h:
* platform/graphics/transforms/SkewTransformOperation.cpp:
(WebCore::SkewTransformOperation::operator==):
(WebCore::SkewTransformOperation::blend):
* platform/graphics/transforms/SkewTransformOperation.h:
* platform/graphics/transforms/TransformOperation.h:
* platform/graphics/transforms/TranslateTransformOperation.cpp:
(WebCore::TranslateTransformOperation::operator==):
(WebCore::TranslateTransformOperation::blend):
* platform/graphics/transforms/TranslateTransformOperation.h:
2014-10-15 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine
https://bugs.webkit.org/show_bug.cgi?id=137727
Reviewed by Darin Adler.
Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::selectedText):
(WebCore::AccessibilityRenderObject::selectedTextRange):
(WebCore::AccessibilityRenderObject::setSelectedTextRange):
(WebCore::AccessibilityRenderObject::visiblePositionForIndex):
(WebCore::AccessibilityRenderObject::indexForVisiblePosition):
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleReplacedElement):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::forwardEvent):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::customStyleForRenderer):
* page/EventHandler.cpp:
(WebCore::EventHandler::capsLockStateMayHaveChanged):
* page/ios/FrameIOS.mm:
(WebCore::ancestorRespondingToScrollWheelEvents):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.h:
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
2014-10-15 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for ClipPathOperation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137733
Reviewed by Mihnea Ovidenie.
Use is<>() / downcast<>() for ClipPathOperation subclasses.
No new tests, no behavior change.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyClipPath::applyValue):
* rendering/ClipPathOperation.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2014-10-15 Chris Dumez <cdumez@apple.com>
[Mac] Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable()
https://bugs.webkit.org/show_bug.cgi?id=137723
Reviewed by Simon Fraser.
Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable() instead
of CFDictionaryGetValue() as we are not actually interested in the
value.
No new tests, no behavior change.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::isSizeAvailable):
2014-10-15 Mihnea Ovidenie <mihnea@adobe.com>
Use modern loops in subtrees selection code
https://bugs.webkit.org/show_bug.cgi?id=137688
Reviewed by Andreas Kling.
No new tests as no change in functionality.
* rendering/RenderView.cpp:
(WebCore::RenderView::splitSelectionBetweenSubtrees):
(WebCore::RenderView::updateSelectionForSubtrees):
(WebCore::RenderView::clearSubtreeSelection):
(WebCore::RenderView::applySubtreeSelection):
* rendering/RenderView.h:
2014-10-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Clean up unnecessary PassOwnPtr.h inclusion
https://bugs.webkit.org/show_bug.cgi?id=137726
Reviewed by Chris Dumez.
No new tests, no behavior changes.
* dom/Document.h: Remove PassOwnPtr.h inclusion.
* loader/ResourceBuffer.h: ditto.
* loader/cocoa/DiskCacheMonitorCocoa.mm: ditto.
* page/scrolling/AxisScrollSnapOffsets.h: ditto.
* page/scrolling/ScrollingStateScrollingNode.h: ditto.
* platform/ColorChooserClient.h: ditto.
* platform/ScrollableArea.cpp: ditto.
* platform/ScrollbarThemeClient.h: ditto.
* platform/SharedBuffer.cpp: ditto.
* platform/Supplementable.h: ditto.
* platform/graphics/surfaces/GraphicsSurface.h: ditto.
* platform/graphics/surfaces/GraphicsSurfaceToken.h: ditto.
* platform/graphics/win/WKCAImageQueue.cpp: ditto.
* platform/win/CursorWin.cpp: ditto.
2014-10-14 Chris Dumez <cdumez@apple.com>
Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
https://bugs.webkit.org/show_bug.cgi?id=137728
Reviewed by Benjamin Poulain.
Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
instead of a RenderObject*. The argument passed is never null and the type
should be a RenderElement as the argument is a container.
No new tests, no behavior change.
* editing/htmlediting.cpp:
(WebCore::localCaretRectInRendererForCaretPainting):
* page/GestureTapHighlighter.cpp:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::pushMappingToContainer):
(WebCore::RenderBox::offsetFromContainer):
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::computeRectForRepaint):
(WebCore::RenderInline::offsetFromContainer):
(WebCore::RenderInline::mapLocalToContainer):
(WebCore::RenderInline::pushMappingToContainer):
* rendering/RenderInline.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::offsetFromContainer):
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::offsetFromContainer):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetFromContainer):
(WebCore::RenderObject::offsetFromAncestorContainer):
* rendering/RenderObject.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::offsetFromContainer):
* rendering/RenderTableCell.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::convertToPaintingRect):
2014-10-14 Jer Noble <jer.noble@apple.com>
REGRESSION (r159208): Crash when clicking scrubber after navigating away/back to video
https://bugs.webkit.org/show_bug.cgi?id=137715
Reviewed by Darin Adler.
Simple null-check of m_player in refreshCachedTime.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::refreshCachedTime):
2014-10-14 Chris Dumez <cdumez@apple.com>
[Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel)
https://bugs.webkit.org/show_bug.cgi?id=137721
Reviewed by Geoffrey Garen.
There were several inefficiencies with the Mac implementation of
ResourceResponse::platformLazyInit(InitLevel):
1. We end up initializing uncommon fields even if called with
'CommonFieldsOnly' initLevel.
2. If called with 'AllFields' initLevel (and if currently
uninitialized), we end up populating m_httpHeaderFields twice, once
with only the common headers, then a second time with ALL the
headers. We can skip the common-header case in this case to avoid
wasting CPU time.
This patch addresses both inefficiencies and cleans up the code a
little bit to reduce variable scope and to use fast enumeration of
header names.
As a result, we spend almost twice as little time in platformLazyInit()
when loading msn.com (~30ms -> ~18ms).
No new tests, no behavior change.
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::platformLazyInit):
2014-10-14 Zalan Bujtas <zalan@apple.com>
REGRESSION (Safari 7.1/8.0): Border-radius and overflow hidden renders incorrectly.
https://bugs.webkit.org/show_bug.cgi?id=137205
Reviewed by Simon Fraser.
Child layer should not reset radius clipping behaviour.
Test: fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
2014-10-14 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for PlatformCAAnimation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137722
Reviewed by Simon Fraser.
Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
up the surrounding code.
No new tests, no behavior change.
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::fadeIn):
(WebCore::ServicesOverlayController::Highlight::fadeOut):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::moveOrCopyLayerAnimation):
(WebCore::GraphicsLayerCA::updateAnimations):
(WebCore::GraphicsLayerCA::setAnimationOnLayer):
(WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCAAnimation.h:
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCAAnimationMac.h:
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
(PlatformCAAnimationMac::copy):
(PlatformCAAnimationMac::copyTimingFunctionFrom):
(PlatformCAAnimationMac::copyFromValueFrom):
(PlatformCAAnimationMac::copyToValueFrom):
(PlatformCAAnimationMac::copyValuesFrom):
(PlatformCAAnimationMac::copyKeyTimesFrom):
(PlatformCAAnimationMac::copyTimingFunctionsFrom):
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::addAnimationForKey):
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
(PlatformCAAnimationWin::copy):
(PlatformCAAnimationWin::copyTimingFunctionFrom):
(PlatformCAAnimationWin::copyFromValueFrom):
(PlatformCAAnimationWin::copyToValueFrom):
(PlatformCAAnimationWin::copyValuesFrom):
(PlatformCAAnimationWin::copyKeyTimesFrom):
(PlatformCAAnimationWin::copyTimingFunctionsFrom):
* platform/graphics/ca/win/PlatformCAAnimationWin.h:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::addAnimationForKey):
* platform/graphics/ca/win/PlatformCALayerWin.h:
2014-10-14 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderInline
https://bugs.webkit.org/show_bug.cgi?id=137704
Reviewed by Darin Adler.
Use is<>() / downcast<>() for RenderInline and clean up the surrounding
code.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::firstChildInContinuation):
* editing/SimplifyMarkupCommand.cpp:
(WebCore::SimplifyMarkupCommand::doApply):
* inspector/InspectorOverlay.cpp:
(WebCore::buildRendererHighlight):
* page/FrameView.cpp:
(WebCore::FrameView::paintContents):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::removeLineBoxFromRenderObject):
(WebCore::InlineFlowBox::extractLineBoxFromRenderObject):
(WebCore::InlineFlowBox::attachLineBoxToRenderObject):
(WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
(WebCore::InlineFlowBox::nodeAtPoint):
(WebCore::InlineFlowBox::paint):
* rendering/InlineIterator.h:
(WebCore::bidiFirstSkippingEmptyInlines):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::inlineElementContinuation):
(WebCore::RenderBlock::addFocusRingRects):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::constructBidiRunsForSegment):
(WebCore::RenderBlockFlow::layoutLineBoxes):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::offsetFromContainer):
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBoxModelObject.cpp:
(WebCore::accumulateInFlowPositionOffsets):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::willBeRemovedFromTree):
* rendering/RenderElement.h:
(WebCore::RenderElement::dirtyLinesFromChangedChild):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):
(WebCore::RenderInline::updateAlwaysCreateLineBoxes):
(WebCore::RenderInline::clippedOverflowRectForRepaint):
* rendering/RenderInline.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
* rendering/RenderLineBoxList.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::insertedIntoTree):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
(WebCore::RenderRegion::visualOverflowRectForBox):
(WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
* rendering/RenderRegion.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::willBeDestroyed):
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::removeAllFromParent):
(WebCore::RenderTextLineBoxes::dirtyRange):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::inlineLogicalWidth):
(WebCore::BreakingContext::handleEmptyInline):
* rendering/line/LineInlineHeaders.h:
(WebCore::requiresLineBox):
(WebCore::setStaticPositions):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paint):
2014-10-14 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix after r174710.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
2014-10-14 Dan Bernstein <mitz@apple.com>
URLs that start with http:/// and https:/// lose two slashes when parsed, causing assertion failure and inconsistent behavior
https://bugs.webkit.org/show_bug.cgi?id=137718
Reviewed by Alexey Proskuryakov.
Added cases to fast/loader/url-parse-1.html.
* platform/URL.cpp:
(WebCore::URL::parse): In hierarchical schemes other than file:, ignore any additional
slashes after the ://, as prescribed by the authority-ignore-slashes state in the current
URL spec.
2014-10-14 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix after r174698 and r174709.
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem):
(WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2014-10-14 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix after r174698
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
2014-10-14 Myles C. Maxfield <mmaxfield@apple.com>
Improve debug description of WAKViews
https://bugs.webkit.org/show_bug.cgi?id=137716
Reviewed by Simon Fraser.
No new tests because there is no behavior change.
* platform/ios/wak/WAKView.mm:
(-[WAKView description]):
* platform/ios/wak/WKView.h:
* platform/ios/wak/WKView.mm:
(WKViewGetOrigin):
2014-10-14 Chris Dumez <cdumez@apple.com>
Introduce an isCSSAnimated flag on RenderElement for performance
https://bugs.webkit.org/show_bug.cgi?id=137583
Reviewed by Simon Fraser.
I noticed when profiling the ebay.com page load that isRunningAnimationOnRenderer()
and isRunningAcceleratedAnimationOnRenderer() were called frequently, causing
~4.7 millions m_compositeAnimations HashMap lookups.
This patch introduces an isCSSAnimated flag on RenderElement to return early if
there is no animation on the renderer, thus avoiding HashMap lookups. This reduces
the number of HashMap lookups from ~4.7 millions to ~68k. On my machine, I see
the following performance improvements:
- isRunning*AnimationOnRenderer() / computeCompositingRequirements()
- before: ~45ms / ~90ms
- after: ~4ms / ~30ms
No new tests, no behavior change.
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
(WebCore::AnimationControllerPrivate::clear):
(WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
(WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
(WebCore::AnimationController::isRunningAnimationOnRenderer):
(WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
* rendering/RenderElement.h:
(WebCore::RenderElement::isCSSAnimating):
(WebCore::RenderElement::setIsCSSAnimating):
2014-10-14 Dean Jackson <dino@apple.com>
Crash in WebCore::UserGestureIndicator::processingUserGesture with WebWorkers
https://bugs.webkit.org/show_bug.cgi?id=137676
<rdar://problem/15735049>
Reviewed by Alexey Proskuryakov.
Remove the code I added that tracks the timestamp of the most recent
user gesture from the event handling dispatch, as it was both
a silly place to do it and it originally crashed when events were fired from
Worker threads (although this was fixed in r152238).
It's now recorded by going through UserGestureIndicator, which is good because
it knows when a user has triggered an event. Its constructor now takes
a pointer to Document, and updates the timestamp there if necessary.
Not all UserGestureIndicator instances needed to reset the timestamp; Those did
not have to pass along the Document.
This is untestable due to the fix mentioned above.
* WebCore.exp.in: Change constructor signature.
* accessibility/AccessibilityNodeObject.cpp: Pass a pointer to the Document into the UserGestureIndicator.
(WebCore::AccessibilityNodeObject::increment):
(WebCore::AccessibilityNodeObject::decrement):
* accessibility/AccessibilityObject.cpp: Ditto.
(WebCore::AccessibilityObject::press):
* dom/Document.cpp:
(WebCore::Document::updateLastHandledUserGestureTimestamp): Renamed.
* dom/Document.h:
* dom/EventTarget.cpp: Remove the code to update the timestamp.
(WebCore::EventTarget::fireEventListeners):
* dom/UserGestureIndicator.cpp:
(WebCore::UserGestureIndicator::UserGestureIndicator): If there is a Document and
this is a user gesture, then reset the timestamp.
* dom/UserGestureIndicator.h:
* page/EventHandler.cpp: Pass a pointer to the Document.
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::handleTouchEvent):
* rendering/HitTestResult.cpp: Ditto.
(WebCore::HitTestResult::toggleMediaFullscreenState):
(WebCore::HitTestResult::enterFullscreenForVideo):
2014-10-14 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed gardening. Ignore Visual Studio *.sdf files.
* WebCore.vcxproj: Modified property svn:ignore.
2014-10-14 Brent Fulgham <bfulgham@apple.com>
[Win] Enable Encrypted Media Support
https://bugs.webkit.org/show_bug.cgi?id=137710
<rdar://problem/18652699>
Reviewed by Jer Noble.
This feature is covered by existing media tests.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::destroyAVFWrapper): Remove redundant ASSERT.
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(displayOnMainThreadContext::displayOnMainThreadContext): Added.
(redispatchOnMainQueue): Added.
(PlatformCALayerWinInternal::displayCallback): Check if a display
call is happening on a background queue, and re-dispatch on the
main thread if necessary.
2014-10-14 Chris Dumez <cdumez@apple.com>
[Mac] Avoid unnecessary dictionary lookup in ImageSource::isSizeAvailable()
https://bugs.webkit.org/show_bug.cgi?id=137701
Reviewed by Simon Fraser.
The CG implementation of ImageSource::isSizeAvailable() was looking up
both the width and the height keys in the dictionary before determining
if the size is available. We can abort early and return false if the
first key (the width) is missing, thus avoiding an extra dictionary
lookup in this case.
This is a small win but ImageSource::isSizeAvailable() is called quite
frequently during page loads
No new tests, no behavior change.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::isSizeAvailable):
2014-10-14 Myles C. Maxfield <mmaxfield@apple.com>
Remove unnecessary logging from SimpleFontData
https://bugs.webkit.org/show_bug.cgi?id=137699
Reviewed by Andreas Kling.
Because of web fonts, fonts that don't have a glyph page 0 are common and expected. Printing out a
message is not helpful, especially if you're not dealing with a font-related piece of WebKit.
No new tests because there is no behavior change.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::platformGlyphInit):
2014-10-14 Martin Hock <mhock@apple.com>
Update ViewportConfiguration whenever its size attributes change
https://bugs.webkit.org/show_bug.cgi?id=137682
rdar://problem/18643655
Reviewed by Benjamin Poulain.
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::setMinimumLayoutSize):
(WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI):
2014-10-14 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Processing Instruction Nodes appear poorly in DOM Tree
https://bugs.webkit.org/show_bug.cgi?id=137681
Reviewed by Timothy Hatcher.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForNode):
Include the nodeName, localName, and nodeValue (string data)
properties for processing instruction nodes.
2014-10-14 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderFrame / RenderFrameSet
https://bugs.webkit.org/show_bug.cgi?id=137696
Reviewed by Darin Adler.
Use is<>() / downcast<>() for RenderFrame / RenderFrameSet.
No new tests, no behavior change.
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::defaultEventHandler):
* rendering/RenderFrame.cpp:
(WebCore::RenderFrame::updateFromElement):
* rendering/RenderFrame.h:
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::computeEdgeInfo):
(WebCore::RenderFrameSet::positionFramesWithFlattening):
* rendering/RenderFrameSet.h:
2014-10-14 Youenn Fablet <youennf@gmail.com>
[XHR] Abort method execution when m_loader->cancel() in internalAbort() caused reentry
https://bugs.webkit.org/show_bug.cgi?id=126975
Reviewed by Alexey Proskuryakov.
Merging https://chromium.googlesource.com/chromium/blink/+/0d75daf2053631518606ae15daaece701a25b2c4
Ensuring new test from https://codereview.chromium.org/76133002/ is passing.
Test: http/tests/xmlhttprequest/reentrant-cancel-abort.html
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::open): exit early if internalAbort asks so
(WebCore::XMLHttpRequest::abort): exit early if internalAbort asks so
(WebCore::XMLHttpRequest::internalAbort): ask calling function to exit early if a new loader is created during the cancellation of the loader (potential reentrant case through window.onload callback)
(WebCore::XMLHttpRequest::didTimeout): exit early if internalAbort asks so
* xml/XMLHttpRequest.h:
2014-10-14 Alejandro G. Castro <alex@igalia.com>
Multiple refactors in RenderMathMLOperator
https://bugs.webkit.org/show_bug.cgi?id=137611
Reviewed by Darin Adler.
The changes include:
- Rename m_operator to m_textContent.
- Make most of the functions private, we needed to create some
public member functions to be able to make the some funtions private
and move trailingSpaceError to RenderMathMLOperator.
- Fix incorrect capitalization of setOperatorProperties function.
- Make all data members private and move them to the end of the
class defition.
No new tests as no change in functionality.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::RenderMathMLOperator):
(WebCore::RenderMathMLOperator::setOperatorProperties): Renamed,
incorrect capitalization
(WebCore::RenderMathMLOperator::stretchTo):
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
(WebCore::RenderMathMLOperator::rebuildTokenContent):
(WebCore::RenderMathMLOperator::updateFromElement):
(WebCore::RenderMathMLOperator::updateOperatorProperties):
(WebCore::RenderMathMLOperator::shouldAllowStretching):
(WebCore::RenderMathMLOperator::updateStyle):
(WebCore::RenderMathMLOperator::trailingSpaceError):
(WebCore::RenderMathMLOperator::SetOperatorProperties): Deleted.
(WebCore::RenderMathMLOperator::advanceForGlyph): Deleted.
(WebCore::RenderMathMLOperator::updateTokenContent): Deleted.
(WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack): Deleted.
* rendering/mathml/RenderMathMLOperator.h:
(WebCore::RenderMathMLOperator::setLeadingSpace): Added.
(WebCore::RenderMathMLOperator::setTrailingSpace): Added.
(WebCore::RenderMathMLOperator::textContent): Added.
(WebCore::RenderMathMLOperator::isInvisibleOperator):
* rendering/mathml/RenderMathMLRadicalOperator.cpp:
(WebCore::RenderMathMLRadicalOperator::setOperatorProperties):
Renamed, incorrect capitalization
(WebCore::RenderMathMLRadicalOperator::SetOperatorProperties): Deleted.
(WebCore::RenderMathMLRadicalOperator::trailingSpaceError): Deleted.
* rendering/mathml/RenderMathMLRadicalOperator.h:
2014-10-14 Alejandro G. Castro <alex@igalia.com>
Changes in the stretchy attribute do not update rendering
https://bugs.webkit.org/show_bug.cgi?id=136883
Reviewed by Darin Adler.
Test: mathml/presentation/mo-stretch-update.html
We need to relayout when a change in the stretchy attribute
happens.
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::parseAttribute): Parse the
modifications of the stretchy attribute.
* mathml/MathMLTextElement.h:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::setOperatorFlagAndScheduleLayoutIfNeeded):
Add function that receives the value instead of looking for it and
checks if the change should schedule a layout.
(WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
(WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue):
Add function that receives the value instead of looking for it.
* rendering/mathml/RenderMathMLOperator.h:
2014-10-14 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderImage
https://bugs.webkit.org/show_bug.cgi?id=137683
Reviewed by Mihnea Ovidenie.
Use is<>() / downcast<>() for RenderImage.
No new tests, no behavior change.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeText):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addImageMapChildren):
(WebCore::AccessibilityRenderObject::remoteSVGRootElement):
* bindings/objc/DOM.mm:
(-[DOMElement image]):
(-[DOMElement _imageTIFFRepresentation]):
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleReplacedElement):
* editing/cocoa/HTMLConverter.mm:
(fileWrapperForElement):
* editing/gtk/EditorGtk.cpp:
(WebCore::getImageForElement):
* editing/ios/EditorIOS.mm:
(WebCore::getImage):
* editing/mac/EditorMac.mm:
(WebCore::getImage):
* html/HTMLAnchorElement.cpp:
(WebCore::appendServerMapMousePosition):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::setFocus):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::didAttachRenderers):
(WebCore::HTMLImageElement::createImageControls):
(WebCore::HTMLImageElement::destroyImageControls):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::didAttachRenderers):
(WebCore::HTMLVideoElement::parseAttribute):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::altAttributeChanged):
(WebCore::ImageInputType::attach):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::size):
* html/shadow/mac/ImageControlsRootElementMac.cpp:
(WebCore::RenderImageControls::updateLogicalWidth):
(WebCore::RenderImageControls::computeLogicalHeight):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::renderImageResource):
* page/ContextMenuController.cpp:
(WebCore::imageFromImageElementNode):
* page/DragController.cpp:
(WebCore::getCachedImage):
(WebCore::getImage):
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeImage):
(WebCore::getCachedImage):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::image):
* rendering/RenderImage.h:
* rendering/RenderImageResource.cpp:
(WebCore::RenderImageResource::getImageSize):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
(WebCore::RenderLayerBacking::updateImageContents):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::createShapeForImage):
2014-10-14 Andrzej Badowski <a.badowski@samsung.com>
[AX] Improve AccessibilityTableCell columnHeaders and rowHeaders functions.
https://bugs.webkit.org/show_bug.cgi?id=136818
Reviewed by Chris Fleizach.
Take into account that <th> elements can be both the column headers and row headers
improved the operation of two functions: columnHeaders and rowHeaders.
Test: accessibility/table-headers.html
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::isColumnHeaderCell):
A new function that helps the main goal.
(WebCore::AccessibilityTableCell::isRowHeaderCell):
A new function that helps the main goal.
(WebCore::AccessibilityTableCell::columnHeaders):
Use isColumnHeaderCell instead of isTableHeaderCell.
(WebCore::AccessibilityTableCell::rowHeaders):
Use isRowHeaderCell also includes <th> row header element next to the scope attribute.
* accessibility/AccessibilityTableCell.h:
Adds new functions to the header file.
2014-10-14 Csaba Osztrogonác <ossy@webkit.org>
Fix the !ENABLE(VIDEO) build after r174353
https://bugs.webkit.org/show_bug.cgi?id=137655
Reviewed by Darin Adler.
* dom/Document.cpp:
* dom/Document.h:
* page/Page.cpp:
* page/Page.h:
2014-10-14 peavo@outlook.com <peavo@outlook.com>
[Curl] Compile error in CurlDownload.cpp.
https://bugs.webkit.org/show_bug.cgi?id=137654
Reviewed by Philippe Normand.
A template specialization is not needed anymore.
* platform/network/curl/CurlDownload.cpp:
2014-10-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused stale Page protocol methods
https://bugs.webkit.org/show_bug.cgi?id=137678
Reviewed by Andreas Kling.
* inspector/InspectorClient.h:
(WebCore::InspectorClient::canShowDebugBorders): Deleted.
(WebCore::InspectorClient::setShowDebugBorders): Deleted.
(WebCore::InspectorClient::canShowFPSCounter): Deleted.
(WebCore::InspectorClient::setShowFPSCounter): Deleted.
(WebCore::InspectorClient::canContinuouslyPaint): Deleted.
(WebCore::InspectorClient::setContinuousPaintingEnabled): Deleted.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::canShowDebugBorders): Deleted.
(WebCore::InspectorPageAgent::setShowDebugBorders): Deleted.
(WebCore::InspectorPageAgent::canShowFPSCounter): Deleted.
(WebCore::InspectorPageAgent::setShowFPSCounter): Deleted.
(WebCore::InspectorPageAgent::canContinuouslyPaint): Deleted.
(WebCore::InspectorPageAgent::setContinuousPaintingEnabled): Deleted.
* inspector/InspectorPageAgent.h:
* inspector/protocol/Page.json:
2014-10-13 Eric Carlson <eric.carlson@apple.com>
[iOS] Refactor AirPlay monitoring code
https://bugs.webkit.org/show_bug.cgi?id=137645
<rdar://problem/18444817>
Reviewed by Jer Noble.
Refactor AirPlay route change monitoring code:
+ Have MediaSessionManager register/unregister for route changes depending on the state of
all sessions so it does the right thing when there is more than one media element.
+ Make HTMLMediaElement unregister with MediaSession as soon as the media player is cleared
because there can be no wireless playback without a player.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement): Call mediaSession->setHasPlaybackTargetAvailabilityListeners
when there are target availability changed listeners.
(WebCore::HTMLMediaElement::clearMediaPlayer): Ditto.
(WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): New, media session client method.
* html/HTMLMediaElement.h:
* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::HTMLMediaSession): Initialize m_hasPlaybackTargetAvailabilityListeners.
(WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Remember whether or not
the client has a target availability listener and tell the media session manager to reconfigure
itself instead of telling it to start or stop listening for route changes so it does the
right thing when there is more than one media element.
* html/HTMLMediaSession.h:
(WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Return true when the client
has a target availability listener, false otherwise.
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::wirelessRoutesAvailableDidChange): Inform the client that routes have changed.
* platform/audio/MediaSession.h:
(WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
(WebCore::MediaSessionClient::wirelessRoutesAvailableDidChange):
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Implement it.
* platform/audio/MediaSessionManager.h:
(WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
(WebCore::MediaSessionManager::hasWirelessTargetsAvailable):
(WebCore::MediaSessionManager::sessions):
(WebCore::MediaSessionManager::startMonitoringAirPlayRoutes): Deleted.
(WebCore::MediaSessionManager::stopMonitoringAirPlayRoutes): Deleted.
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Start or stop monitoring
for route changes depending on client state.
(WebCore::MediaSessionManageriOS::startMonitoringAirPlayRoutes): Deleted.
(WebCore::MediaSessionManageriOS::stopMonitoringAirPlayRoutes): Deleted.
2014-10-13 Chris Dumez <cdumez@apple.com>
[Mac] Return value of createImageSourceOptions() is leaked in ImageSourceCG
https://bugs.webkit.org/show_bug.cgi?id=137677
Reviewed by Simon Fraser.
The return value of createImageSourceOptions() was leaked in
ImageSourceCG.cpp. It was returning a CFDictionaryRef created using
CFDictionaryCreate(). Therefore, the return value should have been
released but wasn't.
This patch makes createImageSourceOptions() return a
RetainPtr<CFDictionaryRef> to make sure the CFDictionaryRef properly
gets released after use.
No new tests, no behavior change.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::createImageSourceOptions):
(WebCore::imageSourceOptions):
(WebCore::ImageSource::isSizeAvailable):
(WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::orientationAtIndex):
(WebCore::ImageSource::getHotSpot):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::createFrameAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):
2014-10-13 Yusuke Suzuki <utatane.tea@gmail.com>
CSS JIT: Implement :visited pseudo class
https://bugs.webkit.org/show_bug.cgi?id=135293
Reviewed by Benjamin Poulain.
This patch implements CSS JIT for :visited. And it makes :not(:link) JIT-ed.
Following the design discussed at the other bug[1], implemented :visited JIT
without tracking VisitedMatchEnabled state.
In this patch, we change the semantics of :visited / :link
inside functional pseudo classes for further CSS Selector Level 4 extensions.
Edge cases are tested by the existing tests.
:not(:link)
fast/history/link-inside-not.html
:not(:visited)
fast/history/visited-inside-not.html
:-webkit-any(:link)
fast/history/link-inside-any.html
:-webkit-any(:visited)
fast/history/visited-inside-any.html
[1]: https://bugs.webkit.org/show_bug.cgi?id=135639
Test: fast/history/link-inside-not-inside-any.html
To cover the :-webkit-any(:not(:link)), added new tests.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::constructFragments):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateRightmostTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
2014-10-13 Chris Dumez <cdumez@apple.com>
Use modern loops in RenderLayerCompositor
https://bugs.webkit.org/show_bug.cgi?id=137670
Reviewed by Simon Fraser.
Use modern range for-loops in RenderLayerCompositor.
No new tests, no behavior change.
* rendering/RenderLayerCompositor.cpp:
(WebCore::OverlapMapContainer::overlapsLayers):
(WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
(WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
(WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
(WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTreeForNamedFlowFixed):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
(WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
(WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
(WebCore::RenderLayerCompositor::recursiveRepaintLayer):
(WebCore::resetTrackedRepaintRectsRecursive):
(WebCore::RenderLayerCompositor::layerHas3DContent):
(WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
(WebCore::RenderLayerCompositor::registerAllScrollingLayers):
(WebCore::RenderLayerCompositor::unregisterAllScrollingLayers):
2014-10-13 Chris Dumez <cdumez@apple.com>
Drop unnecessary overlapMap null checks in computeCompositingRequirements()
https://bugs.webkit.org/show_bug.cgi?id=137668
Reviewed by Andreas Kling.
Drop unnecessary overlapMap null checks in computeCompositingRequirements().
The function is never called with a null overlapMap so we can make the
argument a reference and drop all the null checks.
No new tests, no behavior change.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
* rendering/RenderLayerCompositor.h:
2014-10-13 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for PlatformCALayer subclasses
https://bugs.webkit.org/show_bug.cgi?id=137661
Reviewed by Simon Fraser.
Use is<>() / downcast<>() for PlatformCALayer subclasses and clean up
the surrounding code.
No new tests, no behavior change.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::updateContentsRects):
(WebCore::GraphicsLayerCA::updateReplicatedLayers):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
(WebCore::GraphicsLayerCA::fetchCloneLayers): Deleted.
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::TileCoverageMap):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::ensureTilesForRect):
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::clone):
(PlatformCALayerMac::appendSublayer):
(PlatformCALayerMac::insertSublayer):
(PlatformCALayerMac::replaceSublayer):
(PlatformCALayerMac::adoptSublayers):
(PlatformCALayerMac::copyFiltersFrom):
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::setRootChildLayer):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::clone):
(PlatformCALayerWin::rootLayer):
(PlatformCALayerWin::appendSublayer):
(PlatformCALayerWin::insertSublayer):
(PlatformCALayerWin::replaceSublayer):
(PlatformCALayerWin::adoptSublayers):
(PlatformCALayerWin::copyFiltersFrom):
* platform/graphics/ca/win/PlatformCALayerWin.h:
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::insertSublayer):
* platform/graphics/ca/win/PlatformCALayerWinInternal.h:
2014-10-13 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Filter / FilterOperation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137644
Reviewed by Darin Adler.
Use is<>() / downcast<>() for Filter / FilterOperation subclasses.
No new tests, no behavior change.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForFilter):
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
(PlatformCAFilters::filterValueForOperation):
(PlatformCAFilters::colorMatrixValueForFilter):
* platform/graphics/filters/Filter.h:
* platform/graphics/filters/FilterOperation.cpp:
(WebCore::DefaultFilterOperation::operator==):
(WebCore::ReferenceFilterOperation::operator==):
(WebCore::BasicColorMatrixFilterOperation::blend):
(WebCore::BasicColorMatrixFilterOperation::operator==):
(WebCore::BasicComponentTransferFilterOperation::blend):
(WebCore::BasicComponentTransferFilterOperation::operator==):
(WebCore::BlurFilterOperation::operator==):
(WebCore::BlurFilterOperation::blend):
(WebCore::DropShadowFilterOperation::operator==):
(WebCore::DropShadowFilterOperation::blend):
* platform/graphics/filters/FilterOperation.h:
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::outsets):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build):
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
(WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
* svg/graphics/filters/SVGFilter.h:
(isType):
2014-10-13 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Table render objects
https://bugs.webkit.org/show_bug.cgi?id=137641
Reviewed by Mihnea Ovidenie.
Use is<>() / downcast<>() for table-related render objects and clean
up the surrounding code.
No new tests, no behavior change.
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::tableElement):
(WebCore::AccessibilityTable::isDataTable):
(WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
(WebCore::AccessibilityTable::addChildren):
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::parentTable):
(WebCore::AccessibilityTableCell::rowIndexRange):
(WebCore::AccessibilityTableCell::columnIndexRange):
(WebCore::AccessibilityTableCell::titleUIElement):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removeNode):
* editing/TextIterator.cpp:
(WebCore::shouldEmitTabBeforeNode):
(WebCore::shouldEmitNewlinesBeforeAndAfterNode):
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::parseAttribute):
(WebCore::HTMLTableCellElement::cellAbove):
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::parseAttribute):
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::parseAttribute):
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::shouldScaleColumns):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::addChild):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild):
(WebCore::RenderTable::layout):
(WebCore::RenderTable::firstColumn):
(WebCore::RenderTable::recalcSections):
(WebCore::RenderTable::sectionAbove):
(WebCore::RenderTable::sectionBelow):
(WebCore::RenderTable::bottomSection):
* rendering/RenderTable.h:
* rendering/RenderTableCaption.cpp:
(WebCore::RenderTableCaption::table):
* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::nextCell):
(WebCore::RenderTableCell::previousCell):
(WebCore::RenderTableRow::firstCell):
(WebCore::RenderTableRow::lastCell):
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::table):
(WebCore::RenderTableCol::enclosingColumnGroup):
(WebCore::RenderTableCol::nextColumn):
* rendering/RenderTableCol.h:
Make updateFromElement() public to allow the callers to use tighter
typing and devitualize the call as the class is final.
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::addChild):
* rendering/RenderTableRow.h:
(WebCore::RenderTableSection::firstRow):
(WebCore::RenderTableSection::lastRow):
(WebCore::RenderTableRow::nextRow):
(WebCore::RenderTableRow::previousRow):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addChild):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::paintCell):
* rendering/RenderTableSection.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::writeTextRun):
(WebCore::writeSimpleLine):
2014-10-08 Jer Noble <jer.noble@apple.com>
MediaPlayer::characteristicChanged() is not called when new tracks are found in SourceBufferPrivateAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=137533
Reviewed by Darin Adler.
When a new AVAsset is returned out of the AVStreamDataParser, notify the HTMLMediaElement that
characteristics of the player may have changed.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::characteristicsChanged):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
2014-10-13 Jer Noble <jer.noble@apple.com>
[iOS] Stop listening for wireless playback target availability when the default controls are hidden.
https://bugs.webkit.org/show_bug.cgi?id=137633
Reviewed by Dean Jackson.
In order to minimize the excess bandwidth and power consumption required for actively listening
for wireless playback target availablity, unregister for those notifications while the controls
are hidden due to playback, or when the element's document is hidden.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.createBase): Register for document visiblity change notfications.
(ControllerIOS.prototype.setControlsType): Call updateShouldListenForPlaybackTargetAvailabilityEvent()
instead of setShouldListenForPlaybackTargetAvailabilityEvent()
(ControllerIOS.prototype.hideControls): Ditto.
(ControllerIOS.prototype.showControls): Ditto.
(ControllerIOS.prototype.updateStatusDisplay): Ditto.
(ControllerIOS.prototype.handleVisibilityChange): Ditto.
(ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent): Added. Only listen
for target availability when the video has no errors, is not in the initial "big play button"
controls state, and when the controls are not hidden.
* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Explicitly set the discoveryMode to "disabled"
rather than waiting for the autoreleasepool to destroy our routing controller.
2014-10-13 Simon Fraser <simon.fraser@apple.com>
iOS DRT snapshots are limited to the page visible area
https://bugs.webkit.org/show_bug.cgi?id=137650
Reviewed by Daniel Bates.
LegacyTileCache drawing was limited to the window's visible area, found by
crawling up the layer hierarchy to the root layer. This caused test snapshots to
be missing non-composited content outside the iPhone visible area, which hinders
testing.
Fix by adding a test-only mode where the window visible area is the entire window.
* platform/ios/wak/WAKWindow.h:
* platform/ios/wak/WAKWindow.mm:
(-[WAKWindow setEntireWindowVisibleForTesting:]):
(-[WAKWindow _visibleRectRespectingMasksToBounds:]):
2014-10-13 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Make RenderNamedFlowFragment::computeStyleInRegion const
https://bugs.webkit.org/show_bug.cgi?id=137604
Reviewed by Andrei Bucur.
The method computeStyleInRegion should be const as it does not modify
the state of the RenderNamedFlowFragment instance. Make pointers to
the region used for styling const along the way. No new tests as no
change in functionality.
* css/ElementRuleCollector.h:
(WebCore::ElementRuleCollector::ElementRuleCollector):
(WebCore::ElementRuleCollector::setRegionForStyling):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::initForStyleResolve):
(WebCore::StyleResolver::styleForElement):
* css/StyleResolver.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::computeStyleInRegion):
* rendering/RenderNamedFlowFragment.h:
2014-09-30 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Pass the valid set of tracks to grow beyond growth limits
https://bugs.webkit.org/show_bug.cgi?id=137253
Reviewed by Darin Adler.
Section 10.4 of the specs describe how to resolve content based
track sizing functions. Among others it describes the "distribute
extra space" algorithm. The 3rd bullet of that algorithm specifies
how to distribute (and also the target tracks) the extra space
once all the tracks have reached their growth limits.
Our implementation had 2 problems. First we were not passing a
valid subset of tracks (instead we were always using all of
them). Now we use a function that filters the right tracks to be
the target of the extra space distribution depending on whether
we're computing the min track function or the max track function.
Secondly the algorithm that was distributing the extra space was
not using that list of passed in tracks (it iterated over all of
them). From now on it will use the set of tracks selected using
the filter function described above.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
(WebCore::RenderGrid::distributeSpaceToTracks):
* rendering/RenderGrid.h:
* rendering/style/GridTrackSize.h:
(WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
(WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
2014-10-12 Mike West <mkwst@chromium.org>
Referrer Policy: Update <meta name="referrer"> values to match the spec
https://bugs.webkit.org/show_bug.cgi?id=137635
Reviewed by Jochen Eisinger.
The Referrer Policy specification ([Working Draft][WD], [Editor's
draft[ED]) defines different keywords than we originally
implemented. We should support them in the interests of clarity and
interoperability with other browsers implementing the specification.
[WD]: http://www.w3.org/TR/referrer-policy/#referrer-policy-delivery-meta
[ED]: http://w3c.github.io/webappsec/specs/referrer-policy/#referrer-policy-delivery-meta
This patch is a port of Blink's https://codereview.chromium.org/607433002/
Tests: http/tests/security/referrer-policy-conflicting-policies.html
http/tests/security/referrer-policy-https-no-referrer-when-downgrade.html
http/tests/security/referrer-policy-https-no-referrer.html
http/tests/security/referrer-policy-https-unsafe-url.html
http/tests/security/referrer-policy-no-referrer-when-downgrade.html
http/tests/security/referrer-policy-no-referrer.html
* dom/Document.cpp:
(WebCore::Document::processReferrerPolicy):
2014-10-12 Dhi Aurrahman <diorahman@rockybars.com>
Support activation behavior of link element
https://bugs.webkit.org/show_bug.cgi?id=137597
Reviewed by Benjamin Poulain.
Support activation behavior of link elements as defined in [1],
i.e. to follow the hyperlink created by the link element when it is fully active.
[1] https://html.spec.whatwg.org/multipage/semantics.html#the-link-element
Tests: fast/dom/html-link-element-activation-behavior-on-element-click.html
fast/dom/html-link-element-activation-behavior-on-mouse-click.html
fast/dom/html-link-element-activation-behavior-url-is-null.html
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::triggerActivationBehavior):
* dom/MouseEvent.h:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::defaultEventHandler):
(WebCore::isLinkClick): Deleted.
* html/HTMLAnchorElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::defaultEventHandler):
(WebCore::HTMLLinkElement::handleClick):
* html/HTMLLinkElement.h:
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):
2014-10-11 KwangHyuk Kim <hyuki.kim@samsung.com>
[EFL] Enable WebP support.
https://bugs.webkit.org/show_bug.cgi?id=136156
Reviewed by Gyuyoung Kim.
Add WebP library and inlcude path to WebCore path for WK2 Efl.
No new tests since existing feature is just enabled for WK2 Efl.
* PlatformEfl.cmake:
2014-10-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Split GMainLoopSource moving thread safe implementation to its own class GThreadSafeMainLoopSource
https://bugs.webkit.org/show_bug.cgi?id=137485
Reviewed by Sergio Villar Senin.
Use GThreadSafeMainLoopSource for GStreamer sources, since they
can be used from different threads. Also update GMutexLocker
usages, since it's now a template.
* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::createBus):
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkTimeoutCallback):
(webkitVideoSinkRender):
(unlockBufferMutex):
(webkitVideoSinkUnlockStop):
(webkitVideoSinkStart):
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcGetProperty):
(webKitWebSrcStop):
(webKitWebSrcStart):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetUri):
(webKitWebSrcSetUri):
(webKitWebSrcNeedDataMainCb):
(webKitWebSrcNeedDataCb):
(webKitWebSrcEnoughDataMainCb):
(webKitWebSrcEnoughDataCb):
(webKitWebSrcSeekDataCb):
(webKitWebSrcSetMediaPlayer):
(StreamingClient::createReadBuffer):
(StreamingClient::handleResponseReceived):
(StreamingClient::handleDataReceived):
(StreamingClient::handleNotifyFinished):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):
2014-10-10 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Image subclasses
https://bugs.webkit.org/show_bug.cgi?id=137625
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for Image subclasses.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::remoteSVGRootElement):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):
(WebCore::CachedImage::createImage):
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.h:
* platform/mac/DragImageMac.mm:
(WebCore::createDragImageFromImage):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::embeddedContentBox):
* svg/graphics/SVGImage.h:
2014-10-10 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderElement
https://bugs.webkit.org/show_bug.cgi?id=137622
Reviewed by Benjamin Poulain.
Use is<>() / downcast<>() for RenderElement and clean up the
surrounding code.
No new tests, no behavior change.
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computeRenderStyleForProperty):
* dom/Node.cpp:
(WebCore::Node::materializeRareData):
* dom/Position.cpp:
(WebCore::isNonTextLeafChild):
(WebCore::searchAheadForBetterMatch):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didRecalcStyle):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
* editing/htmlediting.cpp:
(WebCore::isEmptyTableCell):
* rendering/InlineIterator.h:
(WebCore::bidiNextShared):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::getFirstLetter):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::layout):
* rendering/RenderCounter.cpp:
(WebCore::RenderCounter::rendererRemovedFromTree):
(WebCore::RenderCounter::rendererSubtreeAttached):
(showCounterRendererTree):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::insertChildInternal):
(WebCore::RenderElement::removeChildInternal):
(WebCore::RenderElement::findNextLayer):
(WebCore::RenderElement::layout):
* rendering/RenderElement.h:
(WebCore::RenderObject::isRenderLayerModelObject):
(WebCore::RenderObject::isBoxModelObject):
(WebCore::RenderObject::isRenderBlock):
(WebCore::RenderObject::isRenderBlockFlow):
(WebCore::RenderObject::isRenderReplaced):
(WebCore::RenderObject::isRenderInline):
(WebCore::RenderObject::style):
(WebCore::RenderObject::firstLineStyle):
(WebCore::ContainerNode::renderer):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::paint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::computeChildrenStyleInRegion):
(WebCore::RenderNamedFlowFragment::setObjectStyleInRegion):
(WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::clearNeedsLayout):
(WebCore::RenderObject::willBeDestroyed):
(WebCore::RenderObject::collectAnnotatedRegions):
* rendering/RenderVTTCue.cpp:
(WebCore::RenderVTTCue::initializeLayoutParameters):
(WebCore::RenderVTTCue::repositionGenericCue):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::addChild):
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::addChild):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::rebuildTokenContent):
(WebCore::RenderMathMLOperator::updateStyle):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::addChild):
(WebCore::RenderMathMLRoot::layout):
* rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::addChild):
(WebCore::RenderMathMLToken::updateTokenContent):
(WebCore::RenderMathMLToken::updateStyle):
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::layout):
* rendering/svg/RenderSVGResource.cpp:
(WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
* rendering/svg/RenderSVGText.cpp:
(WebCore::findPreviousAndNextAttributes):
(WebCore::RenderSVGText::subtreeStyleDidChange):
(WebCore::updateFontInAllDescendants):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientWasAddedToTree):
(WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
* rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
(WebCore::SVGTextLayoutAttributesBuilder::rebuildMetricsForTextRenderer):
* rendering/svg/SVGTextLayoutAttributesBuilder.h:
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer):
(WebCore::SVGTextMetricsBuilder::measureTextRenderer):
(WebCore::SVGTextMetricsBuilder::walkTree):
(WebCore::SVGTextMetricsBuilder::buildMetricsAndLayoutAttributes):
* rendering/svg/SVGTextMetricsBuilder.h:
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
(WebCore::SVGTextRunRenderingContext::drawSVGGlyphs):
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::applySVGGlyphSelection):
2014-10-10 Benjamin Poulain <benjamin@webkit.org>
Update :nth-child(An+B of selector-list) to the latest specification
https://bugs.webkit.org/show_bug.cgi?id=137593
Reviewed by Andreas Kling.
Following my implementation feedback on :nth-child(An+B of selector-list),
the CSS WG decided to change the definition such that the current element on which
the selector is matched must also match the selector list in :nth-child().
This patch updates the implementation accordingly.
Test: fast/selectors/nth-child-of-chained-3.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::matchSelectorList):
* css/SelectorChecker.h:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
2014-10-10 Chris Dumez <cdumez@apple.com>
Drop RENDER_OBJECT_TYPE_CASTS() for a lot of RenderObject subclasses
https://bugs.webkit.org/show_bug.cgi?id=137594
Reviewed by Darin Adler.
Drop RENDER_OBJECT_TYPE_CASTS() for RenderObject subclasses that no
longer needed it or that required very few changes to do so. This will
make sure developers start using is<>() / downcast<>() for those
classes.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
(WebCore::AccessibilityRenderObject::stringValue):
(WebCore::AccessibilityRenderObject::titleUIElement):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didAttachRenderers):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::reset):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::defaultEventHandler):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::updateSnapshot):
(WebCore::HTMLPlugInImageElement::checkSnapshotStatus):
* html/SearchInputType.cpp:
(WebCore::SearchInputType::addSearchResult):
(WebCore::SearchInputType::didSetValueByUserEdit):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerTextElement::renderer):
(WebCore::TextControlInnerTextElement::customStyleForRenderer):
(WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
* page/FrameView.cpp:
(WebCore::FrameView::isInChildFrameWithFrameFlattening):
* rendering/RenderButton.h:
* rendering/RenderCounter.h:
* rendering/RenderDetailsMarker.h:
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.h:
* rendering/RenderHTMLCanvas.h:
* rendering/RenderIFrame.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::contentsBox):
* rendering/RenderMedia.h:
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::attachQuote):
* rendering/RenderQuote.h:
* rendering/RenderReplaced.h:
* rendering/RenderScrollbarPart.h:
* rendering/RenderSearchField.h:
* rendering/RenderSnapshottedPlugIn.h:
* rendering/RenderTableCaption.h:
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
* rendering/RenderVideo.cpp:
(WebCore::rendererPlaceholder):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::updateCounterIfNeeded):
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
(WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
* rendering/svg/RenderSVGTextPath.h:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::repaintRectForRendererInLocalCoordinatesExcludingSVGShadow):
(WebCore::SVGRenderSupport::checkForSVGRepaintDuringLayout):
(WebCore::updateObjectBoundingBox):
(WebCore::layoutSizeOfNearestViewportChanged):
(WebCore::SVGRenderSupport::transformToRootChanged):
(WebCore::SVGRenderSupport::rendererHasSVGShadow):
(WebCore::SVGRenderSupport::setRendererHasSVGShadow):
* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::beginTextPathLayout):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::svgAttributeChanged):
(WebCore::SVGPathElement::pathSegListChanged):
(WebCore::SVGPathElement::getBBox):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::currentViewportSize):
2014-10-10 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for GraphicsLayer subclasses
https://bugs.webkit.org/show_bug.cgi?id=137595
Reviewed by Darin Adler.
Use is<>() / downcast<>() for GraphicsLayer subclasses and clean up the
surrounding code.
No new tests, no behavior change.
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::Highlight):
(WebCore::ServicesOverlayController::Highlight::fadeIn):
(WebCore::ServicesOverlayController::Highlight::fadeOut):
* platform/graphics/GraphicsLayer.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::removeFromParent):
(WebCore::GraphicsLayerCA::setMaskLayer):
(WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::updateMaskLayer):
(WebCore::GraphicsLayerCA::replicatedLayerRoot):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
(WebCore::GraphicsLayerCA::propagateLayerChangeToReplicas):
(WebCore::GraphicsLayerCA::fetchCloneLayers):
* platform/graphics/ca/GraphicsLayerCA.h:
2014-10-10 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderBoxModelObject
https://bugs.webkit.org/show_bug.cgi?id=137587
Reviewed by Mihnea Ovidenie.
Use is<>() / downcast<>() for RenderBoxModelObject and clean up the
surrounding code.
No new tests, no behavior change.
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::renderBoxModelObject):
(WebCore::isInlineWithContinuation):
(WebCore::firstChildConsideringContinuation):
(WebCore::lastChildHasContinuation):
(WebCore::AccessibilityRenderObject::nextSibling):
(WebCore::AccessibilityRenderObject::widget):
(WebCore::AccessibilityRenderObject::renderObjectIsObservable):
(WebCore::AccessibilityRenderObject::observableObject):
(WebCore::msaaRoleForRenderer):
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* dom/Node.cpp:
(WebCore::Node::renderBox):
(WebCore::Node::renderBoxModelObject):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsFastPath):
* page/PrintContext.cpp:
(WebCore::enclosingBoxModelObject):
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::freezeAtTime):
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::startAnimation):
(WebCore::ImplicitAnimation::pauseAnimation):
(WebCore::ImplicitAnimation::endAnimation):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::startAnimation):
(WebCore::KeyframeAnimation::pauseAnimation):
(WebCore::KeyframeAnimation::endAnimation):
* page/ios/FrameIOS.mm:
(WebCore::Frame::overflowScrollPositionChangedForNode):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
* rendering/InlineBox.h:
(WebCore::InlineBox::boxModelObject):
* rendering/InlineElementBox.h:
(WebCore::InlineElementBox::renderer):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::renderer):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::baselinePosition):
(WebCore::InlineTextBox::lineHeight):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildToContinuation):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced):
* rendering/RenderBoxModelObject.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::addChildToContinuation):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
(WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::destroy):
(WebCore::RenderObject::offsetParent):
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::base):
2014-10-10 Zan Dobersek <zdobersek@igalia.com>
Remove CrossThreadTask
https://bugs.webkit.org/show_bug.cgi?id=137570
Reviewed by Darin Adler.
Replace uses of CrossThreadTask with C++11 lambdas. The initializations
of cross-thread copies are rather verbose at the moment, but should look
better once we can switch to using C++14 init capture for lambdas.
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/CrossThreadTask.h: Removed.
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
(WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
(WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
(WebCore::WorkerThreadableLoader::MainThreadBridge::~MainThreadBridge): Deleted.
(WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader): Deleted.
(WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy): Deleted.
(WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCancel): Deleted.
(WebCore::workerGlobalScopeDidSendData): Deleted.
(WebCore::workerGlobalScopeDidReceiveResponse): Deleted.
(WebCore::workerGlobalScopeDidReceiveData): Deleted.
(WebCore::workerGlobalScopeDidFinishLoading): Deleted.
(WebCore::workerGlobalScopeDidFail): Deleted.
(WebCore::workerGlobalScopeDidFailAccessControlCheck): Deleted.
(WebCore::workerGlobalScopeDidFailRedirectCheck): Deleted.
* loader/WorkerThreadableLoader.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeRequestFromCache):
(WebCore::MemoryCache::removeRequestFromSessionCaches):
(WebCore::MemoryCache::removeRequestFromCacheImpl): Deleted.
(WebCore::MemoryCache::removeRequestFromSessionCachesImpl): Deleted.
(WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Deleted.
(WebCore::MemoryCache::crossThreadRemoveRequestFromSessionCaches): Deleted.
* loader/cache/MemoryCache.h:
2014-10-10 Zan Dobersek <zdobersek@igalia.com>
Avoid defaulting to capture-by-value for C++11 lambdas in WebCore
https://bugs.webkit.org/show_bug.cgi?id=137565
Reviewed by Darin Adler.
C++11 lambas should avoid defaulting to capturing used variables by value as that
can lead to unintended captures that, in worst cases, result in lambdas that are
not self-contained and end up operating on dangling pointers.
Explicitly stating the variables that are to be copied by value can also serve as
a checklist of variables that are actually intented for use in the lambda body.
* Modules/quota/StorageErrorCallback.cpp:
(WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
* Modules/webdatabase/Database.cpp:
(WebCore::Database::~Database):
(WebCore::Database::runTransaction):
(WebCore::Database::scheduleTransactionCallback):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabase):
* Modules/webdatabase/SQLCallbackWrapper.h:
(WebCore::SQLCallbackWrapper::clear):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
(WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
(WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
(WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Peer::send):
(WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
* bindings/js/JSCallbackData.h:
(WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
* bindings/js/JSDOMGlobalObjectTask.cpp:
(WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
* dom/StringCallback.cpp:
(WebCore::StringCallback::scheduleCallback):
* fileapi/FileReader.cpp:
(WebCore::FileReader::abort):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::postListenerTask):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
(WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
(WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
* workers/WorkerEventQueue.cpp:
(WebCore::WorkerEventQueue::enqueueEvent):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
(WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
(WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
(WebCore::WorkerMessagingProxy::reportPendingActivity):
2014-10-10 Zan Dobersek <zdobersek@igalia.com>
Remove MainThreadTask
https://bugs.webkit.org/show_bug.cgi?id=137563
Reviewed by Darin Adler.
Replace the remaining uses of MainThreadTask with C++11 lambdas.
Remove the MainThreadTask header from the build.
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/MainThreadTask.h: Removed.
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownloadManager::downloadThread):
(WebCore::CurlDownload::didReceiveHeader):
(WebCore::CurlDownload::didReceiveData):
2014-10-10 Andrzej Badowski <a.badowski@samsung.com>
[ATK] Changing the mapping of ARIA rowheader and columnheader into respective ATK roles.
https://bugs.webkit.org/show_bug.cgi?id=136150
Reviewed by Chris Fleizach.
Expose ColumnHeaderRole and RowHeaderRole objects into ATK.
Test: accessibility/table-roles-hierarchy.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
Platforms based on ATK: added distinction of roles for the <th> elements.
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
Platforms based on ATK: the return value is determined in the ancestor.
* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
In addition to CellRole also included ColumnHeaderRole and RowHeaderRole.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
Changing the mapping of ARIA rowheader and columnheader into respective ATK roles.
(getInterfaceMaskFromObject):
In addition to CellRole also included ColumnHeaderRole and RowHeaderRole.
2014-10-09 Carlos Garcia Campos <cgarcia@igalia.com>
MediaPlayer should use a reference for the MediaPlayerClient
https://bugs.webkit.org/show_bug.cgi?id=137552
Reviewed by Darin Adler.
The MediaPlayer client is set on constructor by HTMLMediaElement
and cleared on HTMLMediaElement destructor that also frees the
MediaPlayer object. Since the client will never be null while the
MediaPlayer player is alive, we can use a reference and remove all
the unneeded null checks. The member has also been renamed to m_client.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::parseAttribute):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::MediaPlayer):
(WebCore::MediaPlayer::~MediaPlayer):
(WebCore::MediaPlayer::loadWithNextMediaEngine):
(WebCore::MediaPlayer::inMediaDocument):
(WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
(WebCore::MediaPlayer::networkStateChanged):
(WebCore::MediaPlayer::readyStateChanged):
(WebCore::MediaPlayer::volumeChanged):
(WebCore::MediaPlayer::muteChanged):
(WebCore::MediaPlayer::timeChanged):
(WebCore::MediaPlayer::sizeChanged):
(WebCore::MediaPlayer::repaint):
(WebCore::MediaPlayer::durationChanged):
(WebCore::MediaPlayer::rateChanged):
(WebCore::MediaPlayer::playbackStateChanged):
(WebCore::MediaPlayer::firstVideoFrameAvailable):
(WebCore::MediaPlayer::characteristicChanged):
(WebCore::MediaPlayer::keyAdded):
(WebCore::MediaPlayer::keyError):
(WebCore::MediaPlayer::keyMessage):
(WebCore::MediaPlayer::keyNeeded):
(WebCore::MediaPlayer::referrer):
(WebCore::MediaPlayer::userAgent):
(WebCore::MediaPlayer::graphicsDeviceAdapter):
(WebCore::MediaPlayer::cachedResourceLoader):
(WebCore::MediaPlayer::addAudioTrack):
(WebCore::MediaPlayer::removeAudioTrack):
(WebCore::MediaPlayer::addTextTrack):
(WebCore::MediaPlayer::removeTextTrack):
(WebCore::MediaPlayer::addVideoTrack):
(WebCore::MediaPlayer::removeVideoTrack):
(WebCore::MediaPlayer::outOfBandTrackSources):
(WebCore::MediaPlayer::shouldWaitForResponseToAuthenticationChallenge):
(WebCore::MediaPlayer::handlePlaybackCommand):
(WebCore::MediaPlayer::sourceApplicationIdentifier):
(WebCore::MediaPlayer::doesHaveAttribute):
(WebCore::MediaPlayer::mediaPlayerNetworkInterfaceName):
(WebCore::MediaPlayer::getRawCookies):
(WebCore::MediaPlayer::setWirelessVideoPlaybackDisabled): Deleted.
(WebCore::MediaPlayer::audioSourceProvider): Deleted.
(WebCore::MediaPlayer::engineDescription): Deleted.
(WebCore::MediaPlayer::notifyTrackModeChanged): Deleted.
(WebCore::MediaPlayer::totalFrameDelay): Deleted.
(WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine): Deleted.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayer::create):
(WebCore::MediaPlayer::platformVolumeConfigurationRequired):
(WebCore::MediaPlayer::client):
(WebCore::MediaPlayer::mediaPlayerClient): Deleted.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode):
(WebCore::MediaPlayerPrivateAVFoundation::setUpVideoRendering):
(WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStart):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
(WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering):
(WebCore::MediaPlayerPrivateQTKit::prepareForRendering):
(WebCore::MediaPlayerPrivateQTKit::sawUnsupportedTracks):
2014-10-09 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Make RenderFlowThread::regionAtBlockOffset const
https://bugs.webkit.org/show_bug.cgi?id=137555
Reviewed by David Hyatt.
Make the method const and remove autoGenerateRegionsToBlockOffset method as it
is not used by region-based multicolumn code. Also removed the RegionAutoGenerationPolicy
parameter in the process and the call sites. Make const some of the methods that call
regionAtBlockOffset.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::regionForCompositedLayer):
(WebCore::RenderFlowThread::regionAtBlockOffset):
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
(WebCore::RenderFlowThread::pageLogicalTopForOffset):
(WebCore::RenderFlowThread::pageLogicalWidthForOffset):
(WebCore::RenderFlowThread::pageLogicalHeightForOffset):
(WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
(WebCore::RenderFlowThread::mapFromFlowToRegion):
(WebCore::RenderFlowThread::computedRegionRangeForBox):
* rendering/RenderFlowThread.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::regionAtBlockOffset):
(WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
(WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion):
(WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset): Deleted.
* rendering/RenderMultiColumnFlowThread.h:
2014-10-09 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for FontData subclasses
https://bugs.webkit.org/show_bug.cgi?id=137591
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for FontData subclasses.
No new tests, no behavior change.
* platform/graphics/FontData.h:
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::releaseFontData):
(WebCore::FontGlyphs::determinePitch):
* platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::initializePage):
* platform/graphics/SegmentedFontData.h:
(isType):
* platform/graphics/SimpleFontData.h:
(isType):
2014-10-09 Simon Fraser <simon.fraser@apple.com>
Revert part of r174543 that broke grid layout tests.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::specifiedValueForGridTrackBreadth):
2014-10-09 Dean Jackson <dino@apple.com>
Computed style for clip is wrong with respect to auto
https://bugs.webkit.org/show_bug.cgi?id=137567
Reviewed by Simon Fraser.
Make sure that the computed style of clip returns the
correct value when the input is "auto", or in this
case "rect(auto, auto, auto, auto)". Before this
patch it returned "rect(0px, 0px, 0px, 0px)" which
was completely wrong.
Test: fast/css/computed-clip-with-auto-rect.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::autoOrZoomAdjustedValue): Helper function to make the correct keyword or length.
(WebCore::specifiedValueForGridTrackBreadth): It can use the helper too.
(WebCore::ComputedStyleExtractor::propertyValue): If the
top/right/bottom/left is "auto", add that identifier
to the output rectangle.
2014-10-09 Chris Dumez <cdumez@apple.com>
Use RenderObject::firstChildSlow() / lastChildSlow() less
https://bugs.webkit.org/show_bug.cgi?id=137573
Reviewed by Andreas Kling.
Use RenderObject::firstChildSlow() / lastChildSlow() less by using
tighter typing at call sites whenever possible to be able to call the
faster RenderElement::firstChild() / lastChild() instead.
This patch also uses more references instead of pointers when possible.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::firstChildIsInlineContinuation):
(WebCore::AccessibilityRenderObject::previousSibling):
(WebCore::lastChildHasContinuation):
(WebCore::AccessibilityRenderObject::nextSibling):
* page/FrameView.cpp:
(WebCore::countRenderedCharactersInRenderObjectWithThreshold):
(WebCore::FrameView::renderedCharactersExceed):
* rendering/RenderElement.h:
* rendering/RenderRuby.cpp:
(WebCore::isAnonymousRubyInlineBlock):
(WebCore::isRubyBeforeBlock):
(WebCore::isRubyAfterBlock):
* rendering/svg/RenderSVGInline.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::layout):
* rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
(WebCore::SVGTextLayoutAttributesBuilder::collectTextPositioningElements):
(WebCore::SVGTextLayoutAttributesBuilder::buildCharacterDataMap):
* rendering/svg/SVGTextLayoutAttributesBuilder.h:
* svg/SVGTextPositioningElement.cpp:
(WebCore::SVGTextPositioningElement::elementFromRenderer):
* svg/SVGTextPositioningElement.h:
2014-10-09 Roger Fong <roger_fong@apple.com>
Build fix for Win EWS bots.
* testing/Internals.idl: Move enum declaration to the top of the file.
2014-10-09 Said Abou-Hallawa <sabouhallawa@apple.com>
RenderMathMLUnderOver adds spacing to the child operator indefinitely when resizing the window.
https://bugs.webkit.org/show_bug.cgi?id=137330
Reviewed by Darin Adler.
The layout for the <mundercover> math object happens in two separate passes. The first pass runs
the layout for the two children and then calculates the maximum child width. It then sets the
stretch size for the math operator child. And finally it runs the second layout pass by calling
the base class layout() function. The base class function then runs the layout for the children
rendering blocks. In the operator child function computePreferredLogicalWidths(), the stretch
size is used to adjust the width (or the height) of the operator. Then it adds the leading and
trailing spaces and the total will be the operator child width.
When resizing or zooming the window, the render objects are just invalidated but marked as 'needs-
Layout'. The problem is happening because the stretch size of the math operator is not reset
before running the layout. The old logical width (or height) of the the math operator child which
is equal to the stretch size plus the leading and trailing spaces for is compared with the glyph
size if the old logical width ( or height) is larger, it is set to be the stretch size. When it
is used again because of invalidation, new leading and trailing spaces are included in the new
logical width. So with every zooming-in or out or window resizing, new leading and trailing
spaces are added to the logical width of the math operator child or the math <munderober> object.
Ensure the stretch size of the math operator render object is reset before running its layout.
Running the layout means either the page is just loaded or it's invalidated which means, no
layout stall data should be used.
Test: mathml/opentype/munderover-window-resize.html
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::resetStretchSize):
* rendering/mathml/RenderMathMLOperator.h:
resetStretchSize() sets the stretch size to its original value when the class is created.
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::layout):
Make sure the operator stretch size is reset before calling its layout. Also make sure the new
maximum stretch size to the operator objects that were invalid and needsLayout.
2014-10-09 Dean Jackson <dino@apple.com>
Remove ENABLE_CSS3_CONDITIONAL_RULES
https://bugs.webkit.org/show_bug.cgi?id=137571
Reviewed by Simon Fraser.
We have good enough support for @supports that
it should be a consistent part of the platform. Remove
the compile-time guard.
* Configurations/FeatureDefines.xcconfig:
* WebCore.exp.in:
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/objc/DOMCSS.mm:
(kitClass):
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::detectAtToken):
(WebCore::CSSParser::detectSupportsToken):
(WebCore::CSSParser::realLex):
* css/CSSParser.h:
* css/CSSRule.h:
* css/CSSRule.idl:
* css/CSSSupportsRule.cpp:
* css/CSSSupportsRule.h:
* css/CSSSupportsRule.idl:
* css/DOMWindowCSS.cpp:
* css/DOMWindowCSS.h:
* css/DOMWindowCSS.idl:
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::collect):
* css/RuleSet.cpp:
(WebCore::RuleSet::addChildRules):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy):
(WebCore::StyleRuleBase::createCSSOMWrapper):
(WebCore::StyleRuleSupports::StyleRuleSupports):
* css/StyleRule.h:
(WebCore::toStyleRuleSupports):
* css/StyleSheetContents.cpp:
(WebCore::childRulesHaveFailedOrCanceledSubresources):
* inspector/InspectorStyleSheet.cpp:
(flattenSourceData):
(WebCore::asCSSRuleList):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::css):
* page/DOMWindow.h:
* page/DOMWindow.idl:
2014-10-09 Benjamin Poulain <benjamin@webkit.org>
Add the baseline implementation of :not(selectorList)
https://bugs.webkit.org/show_bug.cgi?id=137548
Reviewed by Andreas Kling.
This patch extend the pseudo class :not() to support the new definition
in CSS Selectors level 4.
Instead of supporting a single simple selector, :not() now support
an arbitrary selector list, excepted pseudo elements.
One side effect of this change is :visited and :link are no longer supported
inside :not(). The reason has to do with complexity and performance.
Since :not() and :matches() can have arbitrary selector list, keeping track of
:visited and :link can have many combination superposing, some valid, some invalid.
Supporting :visited and :link should be possible by chaning the way we handle
them for style resolution, but given the limited use cases for such features
I'll wait to see if there is any interest before changing everything.
This patch only covers SelectorChecker to keep things simple. The CSS JIT
will come later.
Tests: fast/css/not-basics.html
fast/css/parsing-css-not-1.html
fast/css/parsing-css-not-2.html
fast/css/parsing-css-not-3.html
fast/css/parsing-css-not-4.html
fast/css/parsing-css-not-5.html
fast/css/parsing-css-not-6.html
fast/css/parsing-css-not-7.html
fast/css/parsing-css-not-8.html
fast/css/parsing-css-not-9.html
fast/css/parsing-css-nth-child-of-4.html
fast/selectors/not-basics.html
fast/selectors/not-nested.html
fast/selectors/not-selector-list.html
* css/CSSGrammar.y.in:
Rename selectorListDoesNotMatchAnyPseudoElement() to selectorListDoesNotMatchAnyPseudoElement()
since both :not() and :nth-child(An+B of selectorList) have the same requirements at the moment.
* css/CSSParserValues.cpp:
(WebCore::selectorListMatchesPseudoElement):
The patch adding :matches() introduced the possibility of putting pseudo element
arbitrary deep in a sequence of nested :matches(). Since this case is forbidded
by :not() and :nth-child(An+B of selectorList), selectorListMatchesPseudoElement()
now becomes recursive to find those pseudo elements.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
CSSOM for the extended :not().
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::determineLinkMatchType):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
Disable the new capabilities from the JIT for now.
2014-10-09 Tim Horton <timothy_horton@apple.com>
Move ServicesOverlayController to WebCore
https://bugs.webkit.org/show_bug.cgi?id=137416
<rdar://problem/18546283>
Reviewed by Anders Carlsson.
Move ServicesOverlayController from WebKit2 to WebCore, as it can be used by both Legacy WebKit and WebKit2.
* WebCore.xcodeproj/project.pbxproj:
* editing/Editor.cpp:
(WebCore::Editor::scanSelectionForTelephoneNumbers):
* editing/SelectionRectGatherer.cpp:
(WebCore::SelectionRectGatherer::Notifier::~Notifier):
Notify ServicesOverlayController of changes via Page instead of EditorClient.
* page/ChromeClient.h:
(WebCore::ChromeClient::handleTelephoneNumberClick):
(WebCore::ChromeClient::handleSelectionServiceClick):
(WebCore::ChromeClient::hasRelevantSelectionServices):
Add ChromeClient functions for services actions.
* page/EditorClient.h:
(WebCore::EditorClient::selectedTelephoneNumberRangesChanged): Deleted.
(WebCore::EditorClient::selectionRectsDidChange): Deleted.
Remove EditorClient functions for notifying ServicesOverlayController of changes,
because it lives in WebCore proper now.
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::servicesOverlayController):
Keep a ServicesOverlayController on Page.
* page/PageOverlay.cpp:
(WebCore::PageOverlay::mouseEvent):
Use windowToContents instead of rootViewToContents; events come in in window coordinates.
* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::updateSettingsForLayer):
Get Settings from MainFrame, not Page.
* page/Settings.in:
Add servicesControlsEnabled setting.
* page/mac/ServicesOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h.
* page/mac/ServicesOverlayController.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm.
Moved from WebKit2. Mostly mechanical changes, plus:
- Use windowToContents instead of rootViewToContents; events come in in window coordinates.
- Cut off rebuild* if serviceControlsEnabled setting is false
- Don't create the overlay if serviceControlsEnabled setting is false
- Send click events via ChromeClient.
- Tie our lifetime to MainFrame instead of Page, and get lots of things from MainFrame instead.
* platform/Logging.h:
Add Services logging channel (moved from WebKit2).
2014-10-09 Brent Fulgham <bfulgham@apple.com>
[Win] Unreviewed build fix: Revert r174378
Roll back this change, as it didn't fix the EWS builders, and has only
served to make Windows builds take forever.
* WebCore.vcxproj/WebCoreGenerated.make: Don't delete all generated content
every time we build.
2014-10-09 Chris Dumez <cdumez@apple.com>
Unreviewed GTK build fix after r174504.
Missing header include.
* rendering/svg/SVGTextQuery.cpp:
2014-10-09 Myles C. Maxfield <mmaxfield@apple.com>
Remove second-to-last client of WebFontCache
https://bugs.webkit.org/show_bug.cgi?id=137550
Reviewed by Darin Adler.
No new tests because no behavior change.
* WebCore.exp.in:
* platform/graphics/FontCache.h: Allow migration of client to getCachedFontData()
2014-10-09 Chris Dumez <cdumez@apple.com>
[Mac] Spending too much time mapping desired font families to available ones
https://bugs.webkit.org/show_bug.cgi?id=137539
Reviewed by Darin Adler.
While profiling the load of weather.com, I noticed that we are spending
quite a bit of time trying to map the font family requested to a font
that is available on the system. The process involves:
1. Doing a linear search of all the installed font families and do a
case-insensitive string comparison for each of them until we find a
match,
2. Then, if we don't find a match, do another linear search of the
fonts' postscript names this time and do again a case-insensitive
string comparison for each of them.
This process is costly and the fonts requested by weather.com are not
available, causing us to do 2 linear searches and a lot of string
comparisons (accounting for ~2% of the WebProcess CPU time for the page
load). As a result, we end up spending ~90ms in
internalFontWithFamily() when loading weather.com.
This patch introduces a cache for the mapping between desired font
families and available font families. This cuts the time spent in
internalFontWithFamily() in half (~45ms). The cache gets invalidated
when fonts are installed / uninstalled on the system so we don't break
that scenario. The cache is also limited in size to avoid using too
much memory.
No new tests, but manual testing making sure the cache gets invalidated
when installing a font on the system.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::invalidateFontCache):
* platform/mac/WebFontCache.h:
* platform/mac/WebFontCache.mm:
(desiredFamilyToAvailableFamilyDictionary):
(rememberDesiredFamilyToAvailableFamilyMapping):
(+[WebFontCache internalFontWithFamily:traits:weight:size:]):
(+[WebFontCache invalidate]):
2014-10-09 Bear Travis <betravis@adobe.com>
[CSS Font Loading] Decrement the font loading count before notifying callbacks
https://bugs.webkit.org/show_bug.cgi?id=137401
Reviewed by Alexey Proskuryakov.
In the callbacks, it should appear that font load has completed. This is
accessed through loading(), which relies on the current number of
fonts loading via JS and CSS.
Unskipping the failing test http/tests/webfont/fontloader-loading-attribute.html
test which tests this.
* css/FontLoader.cpp:
(WebCore::LoadFontCallback::notifyLoaded):
2014-10-09 Chris Dumez <cdumez@apple.com>
Unreviewed Windows build fix after r174506.
We no longer needed to dereference as it is a reference instead of a
pointer now.
* page/win/EventHandlerWin.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
2014-10-09 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Widget subclasses
https://bugs.webkit.org/show_bug.cgi?id=137549
Reviewed by Darin Adler.
Use is<>() / downcast<>() for Widget subclasses and clean up the
surrounding code.
No new tests, no behavior change.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreate):
* accessibility/AccessibilityObject.cpp:
(WebCore::appendAccessibilityObject):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::visiblePositionForPoint):
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::webAreaObject):
(WebCore::AccessibilityScrollView::documentFrameView):
(WebCore::AccessibilityScrollView::parentObject):
(WebCore::AccessibilityScrollView::parentObjectIfExists):
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::pluginScriptObjectFromPluginViewBase):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::appendFormData):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::canProcessDrag):
(WebCore::HTMLPlugInElement::isKeyboardFocusable):
(WebCore::HTMLPlugInElement::isUserObservable):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting):
(WebCore::HTMLPlugInImageElement::subframeLoaderDidCreatePlugIn):
* html/HTMLPlugInImageElement.h:
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadPlugin):
* page/DragController.cpp:
(WebCore::DragController::operationForLoad):
* page/EventHandler.cpp:
(WebCore::EventHandler::subframeForTargetNode):
(WebCore::EventHandler::handleWheelEvent):
* page/EventHandler.h:
* page/Frame.cpp:
(WebCore::Frame::frameForWidget):
* page/FrameView.cpp:
(WebCore::FrameView::hasCustomScrollbars):
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
(WebCore::FrameView::convertToContainingView):
(WebCore::FrameView::convertFromContainingView):
(WebCore::FrameView::removeChild):
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::pluginViews):
* page/efl/EventHandlerEfl.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::passWheelEventToWidget):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passWheelEventToWidget):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
* page/win/EventHandlerWin.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
* platform/ScrollView.cpp:
(WebCore::ScrollView::removeChild):
(WebCore::ScrollView::setHasHorizontalScrollbar):
(WebCore::ScrollView::setHasVerticalScrollbar):
* platform/ScrollView.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::root):
Uninline as root() because Widget::root() returns a FrameView now and
it is impossible to include FrameView.h in Scrollbar.h without causing
a cycle.
* platform/Scrollbar.h:
* platform/Widget.cpp:
(WebCore::Widget::root):
Use tighter typing and return a FrameView instead of a ScrollView.
(WebCore::Widget::removeFromParent):
* platform/Widget.h:
* platform/efl/WidgetEfl.cpp:
(WebCore::Widget::setCursor):
* platform/gtk/PlatformScreenGtk.cpp:
* platform/gtk/WidgetGtk.cpp:
(WebCore::Widget::setCursor):
* platform/mac/PlatformScreenMac.mm:
(WebCore::displayFromWidget):
* platform/mac/WidgetMac.mm:
(WebCore::Widget::setCursor):
* platform/win/WidgetWin.cpp:
(WebCore::Widget::setCursor):
* plugins/PluginViewBase.h:
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::updatePluginWidget):
(WebCore::PluginView::paintIntoTransformedContext):
(WebCore::PluginView::paintWindowedPluginIntoContext):
(WebCore::PluginView::paint):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::setNPWindowRect):
(WebCore::PluginView::snapshot):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing):
(WebCore::RenderEmbeddedObject::nodeAtPoint):
(WebCore::RenderEmbeddedObject::scroll):
* rendering/RenderFrameBase.h:
(WebCore::RenderFrameBase::childView):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::layerWillBeDestroyed):
(WebCore::RenderLayerBacking::updateConfiguration):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
* rendering/RenderWidget.cpp:
(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
(WebCore::RenderWidget::paintContents):
(WebCore::RenderWidget::setOverlapTestResult):
(WebCore::RenderWidget::updateWidgetPosition):
(WebCore::RenderWidget::nodeAtPoint):
(WebCore::RenderWidget::embeddedContentBox):
2014-10-09 Carlos Garcia Campos <cgarcia@igalia.com>
Layering violation: MediaPlayer should not reference/use FrameView
https://bugs.webkit.org/show_bug.cgi?id=21562
Reviewed by Darin Adler.
Remove FrameView dependency from MediaPlayer.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerIsInMediaDocument): Check if
the element document is a media document.
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::MediaPlayer): Remove m_frameView initialization.
(WebCore::MediaPlayer::inMediaDocument): Use the MediaPlayerClient
to check if the media player is in a media document.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerIsInMediaDocument):
(WebCore::MediaPlayer::setFrameView): Deleted.
(WebCore::MediaPlayer::frameView): Deleted.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode):
Do not check if the media player has a frame view, checking whether it's visible
is enough.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
Remove unneeded header include.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Ditto.
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Ditto.
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::~RenderVideo): Do not call MediaPlayer::setFrameView().
(WebCore::RenderVideo::updatePlayer): Ditto.
2014-10-09 Christophe Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderBlockFlow
https://bugs.webkit.org/show_bug.cgi?id=137545
Reviewed by Darin Adler.
Use is<>() / downcast<>() for RenderBlockFlow and clean up the
surrounding code.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
* dom/Element.cpp:
(WebCore::Element::renderNamedFlowFragment):
(WebCore::Element::webkitGetRegionFlowRanges):
* editing/Editor.cpp:
(WebCore::Editor::hasBidiSelection):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForRegionHighlight):
(WebCore::buildObjectForElementInfo):
* rendering/EllipsisBox.h:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::innerTextIfTruncated):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removeChild):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock):
(WebCore::RenderBlockFlow::marginValuesForChild):
(WebCore::RenderBlockFlow::collapseMargins):
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
(WebCore::RenderBlockFlow::handleAfterSideOfBlock):
(WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild):
(WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo):
(WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout):
(WebCore::RenderBlockFlow::adjustForBorderFit):
(WebCore::getHeightForLineCount):
* rendering/RenderBlockFlow.h:
(WebCore::RenderElement::isRenderNamedFlowFragmentContainer):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::createLineBoxes):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::removeFlowChildInfo):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::expandClipRectForRegionAndReflection):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
(WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
(WebCore::RenderMultiColumnSet::columnGap):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::fragmentContainer):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::adjustComputedFontSizesOnBlocks):
(WebCore::RenderObject::resetTextAutosizing):
(WebCore::RenderObject::showLineTreeForThis):
(WebCore::RenderObject::showRenderSubTreeAndMark):
* rendering/RenderText.cpp:
(WebCore::RenderText::setText):
(WebCore::RenderText::ensureLineBoxes):
(WebCore::RenderText::simpleLineLayout):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
(WebCore::RootInlineBox::blockFlow):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::computeTextBoundingBox):
(WebCore::SimpleLineLayout::computeTextFirstRunLocation):
(WebCore::SimpleLineLayout::collectTextAbsoluteRects):
(WebCore::SimpleLineLayout::collectTextAbsoluteQuads):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::flowBoxForRenderer):
2014-10-09 Philip Chimento <philip.chimento@gmail.com>
[GTK] Netscape plugin API symbol used outside feature guards
https://bugs.webkit.org/show_bug.cgi?id=137385
Reviewed by Philippe Normand.
* plugins/PluginPackage.cpp:
(WebCore::PluginPackage::unload): Add guards for Netscape Plugin
API around symbol, so that it compiles OK when the API is not
available.
2014-10-08 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions]Remove unused parameter in adjustRegionBoundsFromFlowThreadPortionRect
https://bugs.webkit.org/show_bug.cgi?id=137518
Reviewed by Andrei Bucur.
This method is used only by region code in accelerated compositing.
The first parameter for the method was introduced with the intent to be used for multicolumn,
but without being actually used in multicolumn code. Also make the method const.
No new tests as no change in functionality.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect):
* rendering/RenderRegion.h:
2014-10-08 Andreas Kling <akling@apple.com>
[Mac] Show repaint counters in tile coverage map.
<https://webkit.org/b/137544>
Reviewed by Simon Fraser.
Add repaint counters to the tile layers in the "tiled scrolling
indicator" display. This will be helpful for diagnosing issues with
excessive tile repaints outside the visible viewport.
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setNeedsDisplayInRect):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::drawTileMapContents):
2014-10-08 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewed build fix after r174480. Broke iOS build.
* rendering/RenderObject.cpp:
(WebCore::includeNonFixedHeight):
2014-10-08 Myles C. Maxfield <litherum@gmail.com>
Inline ruby does not get justified correctly
https://bugs.webkit.org/show_bug.cgi?id=137421
Reviewed by Dave Hyatt.
We justify text in two passes: one counts expansion opportunities within a line,
and the other doles out widths and expansion amounts to constituent inline boxes.
This patch simply modifies both passes to descend into ruby bases. Once it has
done so, we then re-layout the ruby run with the newly found width.
Tests: fast/ruby/ruby-justification-hittest.html
fast/ruby/ruby-justification.html
* rendering/InlineBox.h:
(WebCore::InlineBox::setExpansion): updateRubyForJustifiedText() has to set the
expansion for an inline box, so make setExpansion() public.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::updateRubyForJustifiedText): Given values that have already been
computed in computeInlineDirectionPositionsForSegment(), adjust the widths and
expansion values for all the various pieces of ruby.
(WebCore::computeExpansionForJustifiedText): Call updateRubyForJustifiedText() if
necessary.
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): When
counting expansion opportunities in a line, include ruby bases.
* rendering/RenderRubyRun.h: Fix grammar in comment.
* rendering/RenderText.cpp:
(WebCore::RenderText::stringView): Give default arguments to function.
* rendering/RenderText.h: Ditto.
2014-10-08 Dean Jackson <dino@apple.com>
PopupMenus should indicate if they are using a custom rendering
https://bugs.webkit.org/show_bug.cgi?id=137543
<rdar://problem/18544212>
Reviewed by Beth Dakin.
On Yosemite there is an animation as a popup menu closes. We can't use
this when there is a custom rendering, since the animation doesn't match
the final result. Implement this by hooking into the existing code
for hiding the arrows during animation - a WebKitSystemInterface update
will implement the other side.
* platform/mac/WebCoreSystemInterface.h: Rename parameter to be more clear.
* platform/mac/WebCoreSystemInterface.mm:
* rendering/RenderMenuList.cpp:
(RenderMenuList::menuStyle): We need to check that we are a native-looking
button, not just something with appearance.
2014-10-08 Christophe Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderBlock objects
https://bugs.webkit.org/show_bug.cgi?id=137512
Reviewed by Darin Adler.
Use is<>() / downcast<>() for RenderBlock objects and clean up the
surrounding code.
No new tests, no behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::firstChildConsideringContinuation):
(WebCore::lastChildConsideringContinuation):
(WebCore::AccessibilityRenderObject::firstChild):
(WebCore::startOfContinuations):
(WebCore::endOfContinuations):
(WebCore::childBeforeConsideringContinuations):
(WebCore::AccessibilityRenderObject::previousSibling):
(WebCore::AccessibilityRenderObject::nextSibling):
(WebCore::nextContinuation):
(WebCore::AccessibilityRenderObject::renderParentObject):
(WebCore::AccessibilityRenderObject::anchorElement):
(WebCore::AccessibilityRenderObject::setValue):
* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMNode containsOnlyInlineObjects]):
(-[DOMNode isSelectableBlock]):
(-[DOMHTMLElement structuralComplexityContribution]):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridTrackList):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
* editing/TextIterator.cpp:
(WebCore::TextIterator::shouldRepresentNodeOffsetZero):
* page/ios/FrameIOS.mm:
(WebCore::Frame::preferredHeight):
* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::containingBlockForFixedPosition):
(WebCore::containingBlockForAbsolutePosition):
(WebCore::containingBlockForObjectInFlow):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleWillChange):
(WebCore::RenderBlock::continuationBefore):
(WebCore::RenderBlock::splitBlocks):
(WebCore::RenderBlock::addChildIgnoringContinuation):
(WebCore::canMergeAnonymousBlock):
(WebCore::canMergeContiguousAnonymousBlocks):
(WebCore::RenderBlock::collapseAnonymousBoxChild):
(WebCore::RenderBlock::removeChild):
(WebCore::RenderBlock::blockElementContinuation):
(WebCore::RenderBlock::blockSelectionGaps):
(WebCore::RenderBlock::blockBeforeWithinSelectionRoot):
(WebCore::isChildHitTestCandidate):
(WebCore::RenderBlock::firstLineBlock):
(WebCore::findFirstLetterBlock):
(WebCore::RenderBlock::childBecameNonInline):
(WebCore::RenderBlock::hasMarginBeforeQuirk):
(WebCore::RenderBlock::hasMarginAfterQuirk):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
(WebCore::RenderBlockFlow::estimateLogicalTopPosition):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
(WebCore::RenderBlockFlow::markSiblingsWithFloatsForLayout):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::positionNewFloatOnLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
(WebCore::computeInlineStaticDistance):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderBoxModelObject.cpp:
(WebCore::accumulateInFlowPositionOffsets):
(WebCore::RenderBoxModelObject::moveChildTo):
(WebCore::RenderBoxModelObject::moveChildrenTo):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::propagateStyleToAnonymousChildren):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::unwrapRenderer):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::inlineElementContinuation):
(WebCore::updateStyleOfAnonymousBlockContinuations):
(WebCore::RenderInline::styleDidChange):
(WebCore::nextContinuation):
(WebCore::RenderInline::splitFlow):
(WebCore::RenderInline::positionForPoint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderListItem.cpp:
(WebCore::getParentOfFirstLineBox):
(WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
(WebCore::RenderListItem::positionListMarker):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::maxPageLogicalHeight):
* rendering/RenderObject.cpp:
(WebCore::includeNonFixedHeight):
(WebCore::RenderObject::checkBlockPositionedObjectsNeedLayout):
(WebCore::RenderObject::containingBlock):
(WebCore::RenderObject::handleDynamicFloatPositionChange):
(WebCore::RenderObject::removeAnonymousWrappersForInlinesIfNecessary):
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderRuby.cpp:
(WebCore::rubyBeforeBlock):
(WebCore::rubyAfterBlock):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::moveInlineChildren):
(WebCore::RenderRubyBase::moveBlockChildren):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processSubtree):
(WebCore::TextAutosizer::processContainer):
(WebCore::TextAutosizer::measureDescendantTextWidth):
(WebCore::TextAutosizer::findDeepestBlockContainingAllText):
(WebCore::TextAutosizer::findFirstTextLeafNotInCluster):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::layout):
2014-10-08 Jer Noble <jer.noble@apple.com>
Unreviewed follow-up fix for r174460. Do not register for KVOs if the object does not respond to the requested property.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]):
(-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]):
(-[CDMSessionMediaSourceAVFObjCObserver invalidate]):
2014-10-08 Dean Jackson <dino@apple.com>
Add deprecation warning for CSSKeyframesRule::appendRule
https://bugs.webkit.org/show_bug.cgi?id=137532
<rdar://problem/18585745>
Reviewed by Brent Fulgham.
In r173982 (webkit.org/b/57910) we added insertRule to match
the spec. We should print a warning to the JS console suggesting
users move to insertRule.
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::WebKitCSSKeyframesRule::appendRule): Add a message to the system
console.
* css/WebKitCSSKeyframesRule.h:
2014-10-08 Myles C. Maxfield <mmaxfield@apple.com>
Text drawn with an SVG font has no spaces when word-rounding hacks are enabled
https://bugs.webkit.org/show_bug.cgi?id=137463
Reviewed by Darin Adler.
When rounding hacks are enabled, we use the "adjusted space width" instead of the
regular space width. However, the SVG-font-specific implementation of the
SimpleFontData constructor doesn't initialize this value, so it was getting set
to an undefined value (which happened to be close to 0 in my tests).
Test: svg/text/svg-font-word-rounding-hacks-spaces.html
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
(WebCore::CSSFontFaceSource::ensureFontData):
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData):
(WebCore::CachedFont::getSVGFontById):
* platform/graphics/SimpleFontData.h:
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::initializeFontData):
2014-10-08 Brent Fulgham <bfulgham@apple.com>
[Win] Resolve various static analyzer warnings in WebCore.
https://bugs.webkit.org/show_bug.cgi?id=137526
Reviewed by Dean Jackson.
A series of small changes to resolve various issues found by the MSVC static analyzer.
* inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::clear): Add assertion that it->value should never be null.
* page/SessionIDHash.h:
(WTF::HashTraits<WebCore::SessionID>::constructDeletedValue): Add explicit cast to avoid
compiler warning.
(WTF::HashTraits<WebCore::SessionID>::isDeletedValue): Ditto.
* page/win/FrameCGWin.cpp:
(WebCore::imageFromRect): Resolve static analyzer warnings by initializing bits, and
checking the return value of ::CreateDIBSection, which return nullptr on error.
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(printLayer): Use correct MSVC format specifier for size_t.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::getLinkedFonts): Handle possibility that a font link key does not exist.
(WebCore::FontCache::systemFallbackForCharacters): Handle error case when a valid code page
does not exist for a given character.
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::containsCharacters): Handle error cases for mapping to the CP_ACP code page,
and related failures when attempting to access the contents of a given code page.
* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::itemizeShapeAndPlace): Handle possible failure in the
ScriptItemize API call.
(WebCore::UniscribeController::shapeAndPlaceItem): Ditto for ScriptXtoCP API call.
* platform/win/BString.h: Use consistent SAL annotations for our typedeof of BSTR as in
the system header.
* platform/win/COMPtr.h: Ditto for HRESULT.
* platform/win/DragImageCGWin.cpp:
(WebCore::allocImage): Handle case of failing CreateDIBSection API call.
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::show): Handle case of failing SystemParamtersInfo API call.
(WebCore::PopupMenuWin::wndProc): Ditto.
2014-10-07 Jer Noble <jer.noble@apple.com>
[EME][Mac] Update CDMSessionMediaSourceAVFObjC to match new API provided by AVStreamSession
https://bugs.webkit.org/show_bug.cgi?id=137469
Reviewed by Brent Fulgham.
Update our forward declaration to match the API provided by AVStreamSession.
AVStreamSession now takes an error: parameter in its initialiazer. It also provides the
sessionIdentifier used by the CDM, which CDMSessionMediaSourceAVFObjC will use as the
value of sessionId. Having this identifier allows us to fire a
secure-proof-of-key-release message after the client calls MediaKeySession.close().
Because this call will now generate messages, which have to be responded to in order
to remove those proofs from storage, do not clear the CDMSession from MediaKeySession
after calling close().
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::~MediaKeySession):
(WebCore::MediaKeySession::close):
(WebCore::MediaKeySession::setError): Deleted.
(WebCore::MediaKeySession::sessionId): Deleted.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
(WebCore::CDMSessionMediaSourceAVFObjC::setSessionId):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(-[CDMSessionMediaSourceAVFObjCListener initWithParent:]):
(-[CDMSessionMediaSourceAVFObjCObserver dealloc]):
(-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]):
(-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]):
(-[CDMSessionMediaSourceAVFObjCObserver invalidate]):
(-[CDMSessionMediaSourceAVFObjCListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
(WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC):
(WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
(WebCore::CDMSessionMediaSourceAVFObjC::update):
(WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer):
(WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer):
2014-10-08 Chris Dumez <cdumez@apple.com>
Unreviewed build fix after r174456.
I was comparing a signed int to an unsigned one.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::shouldAutoActivateFontIfNeeded):
2014-10-08 Christophe Dumez <cdumez@apple.com>
[Mac] We are spending a lot of time loading fonts when loading weather.com
https://bugs.webkit.org/show_bug.cgi?id=137454
Reviewed by Darin Adler.
We are spending a lot of time loading fonts when loading weather.com:
~4.2% of WebProcess's cpu time in FontCache::getCachedFrontData().
In particular, we are spending a lot of time doing font auto-activation
because we don't have the Open Sans fonts installed and weather.com is
trying to load those.
Before this patch, we were doing font auto-activation ~250 times when
loading weather.com, even though the site is loading ~10 distinct font
families.
This patch adds a cache of font families we already tried to
auto-activate so that we don't try again. This results in ~10 font
auto-activations when loading weather.com instead of 250. It reduces
the amount of time spent in getCachedFrontData() to 62.6ms from 276ms
(4.4x less) when loading weather.com.
No new tests, no behavior change.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::shouldAutoActivateFontIfNeeded):
(WebCore::FontCache::createFontPlatformData):
* platform/mac/WebFontCache.h:
* platform/mac/WebFontCache.mm:
(+[WebFontCache fontWithFamily:traits:weight:size:shouldAutoActivateIfNeeded:]):
(+[WebFontCache fontWithFamily:traits:weight:size:]):
(+[WebFontCache fontWithFamily:traits:size:]):
2014-10-08 Darin Adler <darin@apple.com>
ASSERTION FAILED: underlyingStringIsValid()
https://bugs.webkit.org/show_bug.cgi?id=137502
Reviewed by Anders Carlsson.
* rendering/RenderTreeAsText.cpp:
(WebCore::quoteAndEscapeNonPrintables): Take a StringView instead of a String.
(WebCore::writeTextRun): Ditto.
(WebCore::writeSimpleLine): Ditto.
* rendering/RenderTreeAsText.h: Removed unneeded include, tweaked formatting,
changed quoteAndEscapeNonPrintables to take a StringView.
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow): Tighten code using a modern for loop.
(WebCore::SimpleLineLayout::showLineLayoutForFlow): Update to work with a
StringView result for SimpleLineLayout::RunResolver::Run::text.
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::text): Changed return type to
StringView to fix the lifetime bug and also to improve performance by getting
rid of the need to allocate and destroy a StringImpl object.
2014-10-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Call requestScrollPositionUpdate() instead of delegatedScrollRequested() in ScrollView::scrollTo()
https://bugs.webkit.org/show_bug.cgi?id=137478
Reviewed by Benjamin Poulain.
As r174380 did, ScrollView::scrollTo() also calls requestScrollPositionUpdate() instead of delegatedScrollRequested().
delegatedScrollRequested() will be only called by requestScrollPositionUpdate(), and it needs to be merged by existing
other scroll request function.
No new tests, no behavior changes.
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollTo):
2014-10-08 Dean Jackson <dino@apple.com>
Safari 8 on OSX 10.10 does not run WebGL in Retina HiDPI mode.
https://bugs.webkit.org/show_bug.cgi?id=134854
<rdar://problem/18465263>
Reviewed by Tim Horton.
The NSOpenGLLayer has to have its contentScale property
set accordingly when on a retina display. Do this by
adding another value to the GraphicsContext3D creation
attribute dictionary, representing the device pixel ratio.
Then, when we come to draw into the layer, make sure
we set our GL viewport to the correct value.
This is currently untestable because:
- we can't just read from the GL buffer as it is always correct
- WebGL isn't working in reftests
- a layer dump doesn't show the change since it was done in a CALayer subclass.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create): Pass the devicePixelRatio into the attribute dictionary.
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::Attributes::Attributes): Add a devicePixelRatio attribute.
* platform/graphics/mac/WebGLLayer.h: New property to save us looking up the attributes
each frame.
* platform/graphics/mac/WebGLLayer.mm:
(-[WebGLLayer initWithGraphicsContext3D:]): Store the devicePixelRatio, and set our
contents scale appropriately.
(-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Draw into
a correctly sized backbuffer.
(-[WebGLLayer copyImageSnapshotWithColorSpace:]): Generate an image of the correct size.
2014-10-07 Simon Fraser <simon.fraser@apple.com>
Roll-over Changelogs.
* ChangeLog-2014-10-07: Copied from Source/WebCore/ChangeLog.
== Rolled over to ChangeLog-2014-10-07 ==