blob: e81f011172604628fc2fdd3c57f18e31a7a36d02 [file] [log] [blame]
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 ==