2014-02-11 Piotr Grad
[GStreamer] High playback rate causes crash
https://bugs.webkit.org/show_bug.cgi?id=128453
Reviewed by Philippe Normand.
To high playback rate passed to GStreamer was causing crash.
Added guard in setRate method.
Test: media/video-extreme-playbackrate-crash.html
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setRate):
2014-02-05 Ryuan Choi
MediaPlayerPrivateGStreamerBase should have virtual destructor
https://bugs.webkit.org/show_bug.cgi?id=128238
Reviewed by Carlos Garcia Campos.
MediaPlayerPrivateGStreamer inherit MediaPlayerPrivateGStreamerBase.
So MediaPlayerPrivateGStreamerBase should have virtual destructor.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: Made destructor as virtual.
2014-01-08 Alberto Garcia
Fix some compilation warnings
https://bugs.webkit.org/show_bug.cgi?id=126635
Reviewed by Csaba Osztrogonác.
Remove code that is no longer being used.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/gtk/PopupMenuGtk.cpp:
* platform/gtk/RedirectedXCompositeWindow.h:
2013-12-30 Carlos Garcia Campos
[SOUP] willSendRequest doesn't work after a redirect
https://bugs.webkit.org/show_bug.cgi?id=126290
Reviewed by Martin Robinson.
The problem is that we are creating the new soup request for the
redirect before calling ResourceHandleClient::willSendRequest() so
that any change made to the request by the client is ignored.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::doRedirect): Create the new soup request and soup
message for the redirect after calling willSendRequest() on the
client.
2013-12-06 Lukasz Gajowy
[ATK] Missing aria roles mappings
https://bugs.webkit.org/show_bug.cgi?id=117729
Reviewed by Mario Sanchez Prada.
Added a few mappings from ARIA roles to ATK roles.
Test: accessibility/aria-mappings.html
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
2013-12-23 Zan Dobersek
webkit gtk 2.2.3 stable tarball compilation error
https://bugs.webkit.org/show_bug.cgi?id=125987
Reviewed by Gustavo Noronha Silva.
Only try including and using GDK_IS_WAYLAND_DISPLAY if the Wayland support has been
enabled and when not compiling with GTK+ 2 (which occurs when building for libPlatformGtk2).
* platform/graphics/GLContext.cpp:
(WebCore::GLContext::createContextForWindow):
2013-09-10 Mario Sanchez Prada
[GTK] Test /webkit/atk/getTextInParagraphAndBodyModerate fails
https://bugs.webkit.org/show_bug.cgi?id=105538
Reviewed by Chris Fleizach.
Expose '\n' for linebreaks when they were explicitly set by the
author of the web content with a tag.
Tests: accessibility/paragraph-with-linebreaks.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::shouldAddSpaceBeforeAppendingNextElement): Helper
function to decide when to append spaces when building the text
under an element, considering line breaks.
(WebCore::AccessibilityNodeObject::textUnderElement): Use the
shouldAddSpaceBeforeAppendingNextElement() function here.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Return the
renderer's text for accessibility objects exposing elements.
* html/parser/HTMLParserIdioms.h:
(WebCore::isHTMLSpaceButNotLineBreak): New helper function, useful
to be passed to other functions like simplifyWhiteSpace().
2013-12-06 Roger Fong
Hook into some shader symbol logic following the ANGLE update in r159533.
https://bugs.webkit.org/show_bug.cgi?id=125332.
Reviewed by Brent Fulgham.
No new functionality added.
* html/canvas/WebGLRenderingContext.cpp: Add some error checking for errors related to
shader symbols that exist across both vertex and fragment shaders.
(WebCore::WebGLRenderingContext::linkProgram):
* platform/graphics/ANGLEWebKitBridge.cpp: Add logic for handling varyings
and add new fields to the ANGLEShaderSymbol struct.
(WebCore::getSymbolInfo):
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/GraphicsContext3D.h: Add those same fields to the SymbolInfo struct
as well so that we can access them from our shader source map.
Also add a map of varyings along side the uniforms and attributes.
(WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo):
(WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap):
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::areProgramSymbolsValid): Will be filled in later, this method
will use the shader source map to check for issues with unused varyings and precisions
mismatches of shader symbols that exist across both the vertex and fragment shaders.
2013-10-04 Dean Jackson
[WebGL] program should not be able to link if a bad shader is attached
https://bugs.webkit.org/show_bug.cgi?id=94036
Reviewed by Darin Adler.
If you attempt to link a program when bad shaders are attached, the
link should fail. WebGL also requires that the previously linked
program should remain intact. We were doing the former, but not
the latter.
Fix this by not calling glLinkProgram if we know we have bad
shaders, and synthesize a bad link status instead.
Test: WebGL conformance test conformance/programs/program-test.html
(found in LayoutTests/webgl)
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::compileShader): Mark a shader as valid
if it compiled ok.
(WebCore::WebGLRenderingContext::linkProgram): Don't call into GraphicsContext3D::linkProgram
if we know that we don't have valid shaders.
* html/canvas/WebGLShader.cpp:
(WebCore::WebGLShader::WebGLShader): Initialize m_isValid.
* html/canvas/WebGLShader.h:
(WebCore::WebGLShader::isValid): New member variable getter and setter.
(WebCore::WebGLShader::setValid):
2013-11-19 Roger Fong
Update ANGLE sources.
https://bugs.webkit.org/show_bug.cgi?id=124615.
Reviewed by Dean Jackson.
Tests covered by Khronos WebGL conformance tests.
* platform/graphics/ANGLEWebKitBridge.cpp: Resolve a build error that resulted from updating ANGLE.
(WebCore::getSymbolInfo):
(WebCore::ANGLEWebKitBridge::compileShaderSource):
2013-12-07 Gustavo Noronha Silva
ubuntu software center hits _XReadEvents() error
https://bugs.webkit.org/show_bug.cgi?id=123480
Reviewed by Martin Robinson.
* platform/gtk/WidgetBackingStoreGtkX11.cpp:
(WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11): clear the surface
before freeing the associated pixmap.
2013-12-10 Gustavo Noronha Silva
[GTK] REGRESSION: www.yahoo.com redirects to the mobile version after UA change
https://bugs.webkit.org/show_bug.cgi?id=125444
Reviewed by Martin Robinson.
* platform/gtk/UserAgentGtk.cpp:
(WebCore::platformVersionForUAString): more correctly pretend we're Mac OS X.
(WebCore::standardUserAgent): ditto.
2013-11-14 Aloisio Almeida Jr
[Cairo] Avoid extra copy when drawing images
https://bugs.webkit.org/show_bug.cgi?id=124209
Reviewed by Martin Robinson.
To solve the bug #58309 a cairo subsurface is being used to limit the
source image boundaries.
In many cases, when a cairo subsurface is used for drawing an image,
it occurs an image copy, causing performance penalty. In the case of
the function PlatformContextCairo::drawSurfaceToContext, the image
copy always happens.
So, we should use the subsurface only when it's really necessary.
In cases where we're drawing the whole image, the subsurface is
unnecessary.
The proposed patch avoid the use of subsurfaces when sampling the whole
image.
No new tests. It's an enhancement. Already covered by existing tests.
* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::drawSurfaceToContext):
2013-08-29 Arnaud Renevier
[cairo] canvas drawing on itself doesn't work with accelerated canvas
https://bugs.webkit.org/show_bug.cgi?id=118808
Reviewed by Martin Robinson.
When copying an accelerated image, we try to get its dimensions with
cairo_image_surface_get_width/cairo_image_surface_get_height. As
surface is not an image, this returns width and height of 0.
Many other places use cairo_image_surface_get although the surface may
be a gl surface.
This patch fixes those issues by implementing a cairoSurfaceSize
helper that returns the surface size whatever type it is.
It use cairo_surface_create_similar instead of
cairo_image_surface_create in copyCairoImageSurface. It also calls
cairo_paint in encodeImage when a drawing over a black background is
needed.
It copies the surface to an image surface if needed in extractImage.
No new tests. Covered by existing tests.
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::BitmapImage):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::checkForSolidColor):
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::copyCairoImageSurface):
(WebCore::cairoSurfaceSize):
* platform/graphics/cairo/CairoUtilities.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/gtk/GdkCairoUtilities.cpp:
(cairoSurfaceToGdkPixbuf):
* platform/graphics/gtk/GdkCairoUtilities.h:
* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::encodeImage):
* platform/graphics/gtk/ImageGtk.cpp:
(WebCore::BitmapImage::getGdkPixbuf):
* platform/gtk/DragIcon.cpp:
(WebCore::DragIcon::setImage):
2013-12-02 Andres Gomez
[GTK] Fails to build with freetype 2.5.1
https://bugs.webkit.org/show_bug.cgi?id=125074
Reviewed by Carlos Garcia Campos.
FreeType specifies a canonical way of including their own
headers. Now, we are following this recommendation so the
compilation won't be broken again due to an upgrade in FeeType's
including paths.
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
* platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
2013-11-21 Carlos Garcia Campos
[GTK] Cannot scroll in option menu when it larger than the screen
https://bugs.webkit.org/show_bug.cgi?id=124671
Reviewed by Martin Robinson.
The problem is that the popup menu is not resized to fit in the
screen, so it doesn't scroll and some of the items are offscreen
so they can't be selected either. GTK+ automatically resizes the
popup menus to fit in the work area, but only when the menu is
already positioned.
* platform/gtk/GtkPopupMenu.cpp:
(WebCore::GtkPopupMenu::popUp): Schedule a resize of the popup
menu right after showing it once it has a position.
2013-11-20 Víctor Manuel Jáquez Leal
[GTK] Remove Chromium as user agent and claim to be Safari in OS X
https://bugs.webkit.org/show_bug.cgi?id=124229
Reviewed by Martin Robinson.
http://www.duolingo.com/ doesn't get render correctly because it uses
Chrome/Chromium specific variables, added after it was forked. Because
of this, it is necessary to remove the Chrome/Chromium identification
in the user agent. Also, from now on, by default, The GTK+ port will
claim to be Safari in OS X to avoid loading wrong resources.
* platform/gtk/UserAgentGtk.cpp:
(WebCore::standardUserAgent):
2013-09-24 Lorenzo Tilve
[GTK] Fix compilation problems when setting ENABLE_DRAG_SUPPORT = FALSE
https://bugs.webkit.org/show_bug.cgi?id=121782
Reviewed by Martin Robinson.
Disabled drag functions.
* page/gtk/EventHandlerGtk.cpp:
* platform/gtk/PasteboardGtk.cpp:
2013-08-28 Chris Curtis
https://bugs.webkit.org/show_bug.cgi?id=119548
Refactoring Exception throws.
Reviewed by Geoffrey Garen.
Gets column information from the error object for reporting exceptions.
* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackFromException):
Moved setting an exception into the vm, These functions changed to use the new functionality.
* bindings/js/JSAudioBufferSourceNodeCustom.cpp:
(WebCore::JSAudioBufferSourceNode::setBuffer):
* bindings/js/JSBiquadFilterNodeCustom.cpp:
(WebCore::JSBiquadFilterNode::setType):
* bindings/js/JSCryptoCustom.cpp:
(WebCore::JSCrypto::getRandomValues):
* bindings/js/JSDOMBinding.cpp:
(WebCore::setDOMException):
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::setFunctionVariableValue):
* bindings/js/JSJavaScriptCallFrameCustom.cpp:
(WebCore::JSJavaScriptCallFrame::evaluate):
(WebCore::JSJavaScriptCallFrame::setVariableValue):
* bindings/js/JSNodeFilterCondition.cpp:
(WebCore::JSNodeFilterCondition::acceptNode):
* bindings/js/JSOscillatorNodeCustom.cpp:
(WebCore::JSOscillatorNode::setType):
* bindings/js/JSPannerNodeCustom.cpp:
(WebCore::JSPannerNode::setPanningModel):
(WebCore::JSPannerNode::setDistanceModel):
* bindings/js/JSSVGLengthCustom.cpp:
(WebCore::JSSVGLength::convertToSpecifiedUnits):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::getObjectParameter):
(WebCore::JSWebGLRenderingContext::getAttachedShaders):
(WebCore::JSWebGLRenderingContext::getExtension):
(WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
(WebCore::JSWebGLRenderingContext::getParameter):
(WebCore::JSWebGLRenderingContext::getProgramParameter):
(WebCore::JSWebGLRenderingContext::getShaderParameter):
(WebCore::JSWebGLRenderingContext::getUniform):
(WebCore::dataFunctionf):
(WebCore::dataFunctioni):
(WebCore::dataFunctionMatrix):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::open):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneBase::throwStackOverflow):
(WebCore::CloneDeserializer::throwValidationError):
(WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
(WebCore::WorkerScriptController::setException):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
(JSC::Bindings::CInstance::invokeMethod):
(JSC::Bindings::CInstance::invokeDefaultMethod):
(JSC::Bindings::CInstance::invokeConstruct):
(JSC::Bindings::CInstance::toJSPrimitive):
* bridge/objc/objc_instance.mm:
(ObjcInstance::invokeMethod):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcArray::setValueAt):
(JSC::Bindings::ObjcArray::valueAt):
* bridge/objc/objc_utility.mm:
(JSC::Bindings::throwError):
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtField::valueFromInstance):
(JSC::Bindings::QtField::setValueToInstance):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::put):
(JSC::RuntimeArray::putByIndex):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::throwInvalidAccessError):
2013-09-13 Gustavo Noronha Silva
[GTK] Move to the new web inspector
https://bugs.webkit.org/show_bug.cgi?id=120647
Reviewed by Carlos Garcia Campos.
No tests for the new inspector UI as of yet.
* GNUmakefile.am: no longer install the deprecated inspector UI files.
* WebCore.exp.in: add SchemeRegistry symbol that is now used.
2013-09-11 Mario Sanchez Prada
[GTK] Remove Gail dependency from build system for GTK3
https://bugs.webkit.org/show_bug.cgi?id=119673
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Removed GAIL_CFLAGS.
* PlatformGTK.cmake: Removed GAIL3_INCLUDE_DIRS and GAIL3_LIBRARIES.
2013-09-11 Mario Sanchez Prada
[GTK] Get rid of Pango/Gail dependencies in accessibility for ATK
https://bugs.webkit.org/show_bug.cgi?id=114867
Reviewed by Martin Robinson.
Removed all trace of Gail and Pango specific code from the AtkText
implementation, now everything has been reimplemented.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetTextForOffset): Removed fallback code
relying in Gail/Pango, now all the related code has been
removed. Also, replaced the collection of if statements with a
switch, for better readability of the code.
2013-09-10 Mario Sanchez Prada
[GTK] Reimplement atk_text_get_text_*_offset for LINE boundaries
https://bugs.webkit.org/show_bug.cgi?id=114872
Reviewed by Gustavo Noronha Silva.
Re-implement these functions without using GailTextUtil nor Pango.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(lineAtPositionForAtkBoundary): New helper function to find the
line at a given position considering values of AtkTextBoundary.
(webkitAccessibleTextLineForBoundary): New function,
implementing atk_text_get_text_*_offset for LINE.
(webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
LINE boundaries with webkitAccessibleTextLineForBoundary().
2013-09-04 Mario Sanchez Prada
[GTK] Reimplement atk_text_get_text_*_offset for SENTENCE boundaries
https://bugs.webkit.org/show_bug.cgi?id=114873
Reviewed by Chris Fleizach.
Re-implement these functions without using GailTextUtil nor Pango.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextWordForBoundary): Renamed from webkitAccessibleTextGetWordForBoundary,
to keep it consistent with names for new functions.
(isSentenceBoundary): Helper function to know when we are either
at the beginning or the end of a sentence.
(isWhiteSpaceBetweenSentences): It returns true if we are in the
middle of a white space between sentences. Useful for implementing
the SENTENCE_END boundary type.
(sentenceAtPositionForAtkBoundary): New helper function to find the
sentence at a given position considering values of AtkTextBoundary.
(webkitAccessibleTextSentenceForBoundary): New function,
implementing atk_text_get_text_*_offset for SENTENCE.
(webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
SENTENCE boundaries with webkitAccessibleTextSentenceForBoundary().
2013-09-14 Alberto Garcia
Missing allow-none introspection annotation for DomDocument.evaluate method
https://bugs.webkit.org/show_bug.cgi?id=118310
Reviewed by Martin Robinson.
Add (allow-none) introspection annotation to parameters that can
be NULL.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):
2013-09-14 Alberto Garcia
[GTK] WebKitGTK+ is linking against libxslt in too many places
https://bugs.webkit.org/show_bug.cgi?id=121356
Reviewed by Martin Robinson.
Don't use LIBXSLT_CFLAGS when compiling libWebCorePlatform and
libWebCoreGtk, no source files use libxslt there.
* GNUmakefile.am:
2013-09-06 Anders Carlsson
Stop using fastNew/fastDelete in WebCore
https://bugs.webkit.org/show_bug.cgi?id=120867
Reviewed by Geoffrey Garen.
Using fastNew/fastDelete can be dangerous, especially when put into a smart pointer
such as OwnPtr which uses regular delete. Because of this I'd like to remove fastNew/fastDelete.
Turns out it's only used in a couple of places in WebCore, so just use new/delete here instead.
* platform/audio/FFTFrame.h:
* platform/audio/gstreamer/FFTFrameGStreamer.cpp:
(WebCore::FFTFrame::FFTFrame):
(WebCore::FFTFrame::~FFTFrame):
(WebCore::FFTFrame::doFFT):
(WebCore::FFTFrame::doInverseFFT):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkDispose):
2013-09-09 Claudio Saavedra
[GTK] ghost cursor when mouse hovers over an image file in a tab
https://bugs.webkit.org/show_bug.cgi?id=120675
Reviewed by Carlos Garcia Campos.
No new tests, covered by existing.
* platform/gtk/CursorGtk.cpp:
(WebCore::createNamedCursor): Use new gdk_cursor_new_from_surface()
when compiling against GTK+ 3.9.12 or newer.
2013-09-04 Zan Dobersek
[GTK] Add support for the Wayland build target
https://bugs.webkit.org/show_bug.cgi?id=120627
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.list.am: Reorder the Source/WebCore/plugins/np* source files.
The X11-specific source files should only be included if the X11 target is being built. PluginPackageNone and
PluginViewNone source files must be included in non-X11-target builds. Other source files that were previously
guarded with the TARGET_X11 conditional should also be built for the Wayland target, so the new TARGET_X11_OR_WAYLAND
conditional is used. If neither of those two targets is being built we fall back to adding source files to the build
as necessary by the actual build target.
* platform/gtk/GtkVersioning.c:
(gdk_screen_get_monitor_workarea): Additionally guard bits of code that depend on the GDK_WINDOWING_X11 macro being
defined - these should only be built when building the X11 target, checked for with PLATFORM(X11).
2013-09-04 Claudio Saavedra
[GTK] Color of input button's text broken with recent gnome-themes-standard
https://bugs.webkit.org/show_bug.cgi?id=120581
Reviewed by Carlos Garcia Campos.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::getStyleContext): add the "text-button" class.
(WebCore::RenderThemeGtk::systemColor): Use the ACTIVE state flag,
as this is the one actually used for button labels.
2013-09-04 Andre Moreira Magalhaes
[GStreamer] cannot play live streams
https://bugs.webkit.org/show_bug.cgi?id=116831
Reviewed by Philippe Normand.
Fix issues with rtsp streams embedded on not loading.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
Do not reset pipeline to READY state on STATE_CHANGE_ASYNC when entering PAUSED state for
live streams, otherwise we enter an endless loop of READY->PAUSED->READY->PAUSED when
starting playback.
2013-09-05 Andre Moreira Magalhaes
[Qt][WK1] REGRESSION(r154988): compositing/video/video-with-invalid-source.html
https://bugs.webkit.org/show_bug.cgi?id=120683
Reviewed by Philippe Normand.
Do not set pipeline state to NULL on MediaPlayerPrivateGStreamer::loadingFailed()
otherwise the bus is flushed and we never get a GST_MESSAGE_ERROR when failing to
load uris.
Also restore previous behaviour (before r154988) of not invoking loadingFailed() for
all failed manual state change attempts.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
Do not call loadingFailed() if state change fails as all manual state changes are
now done with changePipelineState().
(WebCore::MediaPlayerPrivateGStreamer::play):
(WebCore::MediaPlayerPrivateGStreamer::pause):
(WebCore::MediaPlayerPrivateGStreamer::seek):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
Restore previous behaviour (before changeset r154988) when calling changePipelineState().
(WebCore::MediaPlayerPrivateGStreamer::updateStates):
Do nothing if changing to READY on EOS (same behaviour as setting to NULL as it was before
changeset r154988).
(WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
Do not set pipeline state to NULL so we properly get GST_MESSAGE_ERROR on loading failures.
2013-09-03 Andre Moreira Magalhaes
[GStreamer] Don't set state to NULL until element is destroyed
https://bugs.webkit.org/show_bug.cgi?id=117354
Reviewed by Philippe Normand.
Don't set playbin to NULL until it is going to be destroyed or if we stay
for too long on the READY state. Instead only set the state to READY as this
allows much faster state changes to PAUSED/PLAYING again. playbin internally
caches some state that is destroyed when setting it to NULL.
This state is independent of the URI and it is even possible to change the
URI in READY state.
To avoid having resources (e.g. audio devices) open indefinitely,
when setting the state to READY we create a timeout and if the timeout
is reached we reset the pipeline state to NULL to free resources.
Also now all state changes use the changePipelineState method instead of setting
the playbin state directly with gst_element_set_state, so we have a better control
of when we are requesting state changes.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mediaPlayerPrivateReadyStateTimeoutCallback):
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::commitLoad):
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
(WebCore::MediaPlayerPrivateGStreamer::setRate):
(WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2013-09-04 Andre Moreira Magalhaes
REGRESSION(r154977): Do not urlencode soup message on ResourceRequest::toSoupMessage()
https://bugs.webkit.org/show_bug.cgi?id=120681
Reviewed by Martin Robinson.
Do not call soup_message_set_uri with soupURI() (url encoded uri) on
ResourceRequest::toSoupMessage().
* platform/network/soup/ResourceRequest.h:
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessageMembers):
(WebCore::ResourceRequest::updateSoupMessage):
(WebCore::ResourceRequest::toSoupMessage):
Split common code from updateSoupMessage/toSoupMessage into updateSoupMessageMembers.
2013-09-03 Andre Moreira Magalhaes
[gstreamer] Disable HTTP request "Accept-Encoding:" header field on gstreamer source element to avoid receiving the wrong size when retrieving data
https://bugs.webkit.org/show_bug.cgi?id=115354
Reviewed by Philippe Normand.
Also disable Accept-Encoding on ResourceRequest::toSoupMessage accordingly.
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::toSoupMessage):
Call ResourceRequest::updateSoupMessage from ResourceRequest::toSoupMessage so that the
Accept-Encoding header is also respected.
2013-09-03 Xabier Rodriguez Calvar
[GStreamer] Video player sets system volume to 100%
https://bugs.webkit.org/show_bug.cgi?id=118974
Reviewed by Philippe Normand.
In order to preserve the system volume we need to keep track of
the volume being initialized in the HTMLMediaElement and then just
setting the volume to the sink when initializing the pipeline if
that volume was changed before.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialized
attribute to false.
(WebCore::HTMLMediaElement::setVolume): Set the attribute to true
when volume is changed.
(WebCore::HTMLMediaElement::updateVolume): Set the volume only if
volume was initialized.
(WebCore::HTMLMediaElement::mediaPlayerPlatformVolumeConfigurationRequired):
Platform volume configuration is required only if volume was not
initialized before.
* html/HTMLMediaElement.h: Added attribute and interface method.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerPlatformVolumeConfigurationRequired):
Declared and added default implementation for the interface method.
(WebCore::MediaPlayer::platformVolumeConfigurationRequired):
Asked the client, meaning the HTMLMediaElement if the platform
volume configuration is required.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::mediaPlayerPrivateVolumeChangedCallback): Added log.
(WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Added log.
(WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
Set the volume only if not platform volume is required and added log.
2013-09-01 Xabier Rodriguez Calvar
Volume slider value should be 0 when audio is muted
https://bugs.webkit.org/show_bug.cgi?id=120553
Reviewed by Eric Carlson.
Fixed the problem of showing a non empty slider when audio is
muted.
Test: media/volume-bar-empty-when-muted.html.
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::reset): Use setSliderVolume.
(WebCore::MediaControls::changedVolume): Use setSliderVolume.
(WebCore::MediaControls::setSliderVolume): Added to set the volume
to 0 when muted and to its value otherwise.
* html/shadow/MediaControls.h: Added setSliderVolume.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::reset): Used setSliderVolume and
setFullscreenSliderVolume.
(WebCore::MediaControlsApple::changedVolume): Used
setFullscreenSliderVolume.
(WebCore::MediaControlsApple::setFullscreenSliderVolume): Added to
set the volume to 0 when muted and to its value otherwise.
* html/shadow/MediaControlsApple.h: Added setFullscreenSliderVolume
* html/shadow/MediaControlsBlackBerry.cpp:
(WebCore::MediaControlsBlackBerry::reset): Used setSliderVolume.
2013-08-27 Andre Moreira Magalhaes
[gstreamer] Make sure gstreamer source element is thread-safe
https://bugs.webkit.org/show_bug.cgi?id=115352
Reviewed by Philippe Normand.
GStreamer source element may be created by any gstreamer element on any thread by calling
gst_element_make_from_uri with the URIs handled by the source element.
This patch makes sure the gstreamer source element is thread-safe to avoid issues with it
being created outside the main thread.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webkit_web_src_init):
(webKitWebSrcDispose):
(webKitWebSrcFinalize):
(webKitWebSrcSetProperty):
(webKitWebSrcGetProperty):
(removeTimeoutSources):
(webKitWebSrcStop):
(webKitWebSrcStart):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetUri):
(webKitWebSrcSetUri):
(webKitWebSrcNeedDataMainCb):
(webKitWebSrcNeedDataCb):
(webKitWebSrcEnoughDataMainCb):
(webKitWebSrcEnoughDataCb):
(webKitWebSrcSeekMainCb):
(webKitWebSrcSeekDataCb):
(webKitWebSrcSetMediaPlayer):
(StreamingClient::StreamingClient):
(StreamingClient::~StreamingClient):
(StreamingClient::createReadBuffer):
(StreamingClient::handleResponseReceived):
(StreamingClient::handleDataReceived):
(StreamingClient::handleNotifyFinished):
(CachedResourceStreamingClient::CachedResourceStreamingClient):
(CachedResourceStreamingClient::~CachedResourceStreamingClient):
(CachedResourceStreamingClient::loadFailed):
(CachedResourceStreamingClient::setDefersLoading):
(CachedResourceStreamingClient::getOrCreateReadBuffer):
(CachedResourceStreamingClient::responseReceived):
(CachedResourceStreamingClient::dataReceived):
(CachedResourceStreamingClient::notifyFinished):
(ResourceHandleStreamingClient::ResourceHandleStreamingClient):
(ResourceHandleStreamingClient::~ResourceHandleStreamingClient):
(ResourceHandleStreamingClient::loadFailed):
(ResourceHandleStreamingClient::setDefersLoading):
(ResourceHandleStreamingClient::getOrCreateReadBuffer):
(ResourceHandleStreamingClient::willSendRequest):
(ResourceHandleStreamingClient::didReceiveResponse):
(ResourceHandleStreamingClient::didReceiveData):
(ResourceHandleStreamingClient::didFinishLoading):
(ResourceHandleStreamingClient::didFail):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):
Make element thread-safe, add support to use the element without a player associated (e.g.
the DASH plugin using the webkitsrc to download fragments), use GMutexLocker to simplify
locks and other general improvements.
2013-06-19 Andre Moreira Magalhaes
Adjust internal size on gstreamer source element when receiving data if necessary
https://bugs.webkit.org/show_bug.cgi?id=116534
Reviewed by Philippe Normand.
If the size received in didReceiveResponse is smaller than the actual size of the received data
update the internal size and the appsrc size to the proper value.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(StreamingClient::didReceiveData):
2013-08-28 Gustavo Noronha Silva
Unreviewed build fix - copy/paste failure, copied too much.
* bindings/gobject/WebKitDOMCustom.h:
2013-08-28 Gustavo Noronha Silva
[GTK] HTMLElement lost setID and getID - need to add compatibility symbols
https://bugs.webkit.org/show_bug.cgi?id=120440
Reviewed by Martin Robinson.
No tests, just adding compatibility symbols.
setID and getID were removed, and the parent class (Element) ones should be used instead.
We need to keep our ABI compatible, though, so add compatibility symbols.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_element_get_id):
(webkit_dom_html_element_set_id):
* bindings/gobject/WebKitDOMCustom.h:
2013-08-27 Xabier Rodriguez Calvar
[GTK] Volume slider shows incorrect track when muted
https://bugs.webkit.org/show_bug.cgi?id=120253
Reviewed by Philippe Normand.
When painting the volume bar, consider that it could be muted even
then volume is different than zero.
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack): Asign
painted volume as 0 when media is muted.
2013-08-26 Sam Weinig
EditorInternalCommand should use Frame& where possible
https://bugs.webkit.org/show_bug.cgi?id=120340
Reviewed by Andreas Kling.
Only isSupportedFromDOM still takes a Frame*, as it still has callers that expect null to work.
* dom/UserTypingGestureIndicator.cpp:
* dom/UserTypingGestureIndicator.h:
* editing/Editor.cpp:
* editing/EditorCommand.cpp:
* page/EventHandler.cpp:
2013-08-26 Ryosuke Niwa
Elements in a node list of the form element's name getter should not be added to the past names map
https://bugs.webkit.org/show_bug.cgi?id=120279
Reviewed by Darin Adler.
Don't add the element in the named items to the past names map when there are multiple elements.
This matches IE10's behavior and the specified behavior in HTML5:
http://www.w3.org/TR/2013/WD-html51-20130528/forms.html#dom-form-nameditem
Test: fast/forms/past-names-map-should-not-contain-nodelist-item.html
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getNamedElements):
2013-08-26 Ryosuke Niwa
Windows build fix after r154658.
* page/AutoscrollController.cpp:
(WebCore::getMainFrame):
2013-08-26 Andreas Kling
Page::mainFrame() should return a reference.
Reviewed by Antti Koivisto.
Page always creates the main Frame by itself now, so it will never be null during the Page's lifetime.
Let Page::mainFrame() return Frame& and remove a sea of null checks.
2013-08-26 Sam Weinig
Remove two unnecessary .get()s.
Reviewed by Anders Carlsson.
* editing/Editor.h:
(WebCore::Editor::killRing):
(WebCore::Editor::spellChecker):
2013-08-26 Joseph Pecoraro
Web Inspector: We should regenerate InspectorBackendCommands.js for Legacy Inspector.json versions
https://bugs.webkit.org/show_bug.cgi?id=120242
Reviewed by Timothy Hatcher.
- Update the Inspector.json CodeGenerator to include an output_js_dir.
- Cleanup multiple trailing newlines in some of the generated files.
- Provide a way to not verify runtime casts, needed for Legacy inputs.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* inspector/CodeGeneratorInspector.py:
(resolve_all_types):
(SmartOutput.close):
2013-08-26 Sam Weinig
AlternativeTextController should hold onto Frame as a reference
https://bugs.webkit.org/show_bug.cgi?id=120327
Reviewed by Andreas Kling.
While in the area I also:
- Reference-ified Editor::killRing().
- Const-ified Editor::m_killRing, Editor::m_spellChecker, and Editor::m_alternativeTextController.
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::AlternativeTextController):
(WebCore::AlternativeTextController::stopPendingCorrection):
(WebCore::AlternativeTextController::isSpellingMarkerAllowed):
(WebCore::AlternativeTextController::applyAlternativeTextToRange):
(WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
(WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
(WebCore::AlternativeTextController::timerFired):
(WebCore::AlternativeTextController::handleAlternativeTextUIResult):
(WebCore::AlternativeTextController::rootViewRectForRange):
(WebCore::AlternativeTextController::respondToChangedSelection):
(WebCore::AlternativeTextController::respondToAppliedEditing):
(WebCore::AlternativeTextController::respondToUnappliedEditing):
(WebCore::AlternativeTextController::alternativeTextClient):
(WebCore::AlternativeTextController::editorClient):
(WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
(WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
(WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
(WebCore::AlternativeTextController::insertDictatedText):
(WebCore::AlternativeTextController::applyDictationAlternative):
* editing/AlternativeTextController.h:
(WebCore::AlternativeTextController::UNLESS_ENABLED):
* editing/Editor.cpp:
(WebCore::Editor::Editor):
(WebCore::Editor::addToKillRing):
* editing/Editor.h:
(WebCore::Editor::killRing):
* editing/EditorCommand.cpp:
(WebCore::executeYank):
(WebCore::executeYankAndSelect):
2013-08-23 Andy Estes
Fix issues found by the Clang Static Analyzer
https://bugs.webkit.org/show_bug.cgi?id=120230
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj: Removed FoundationExtras.h.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Removed CFAutoreleaseHelper().
(AXTextMarkerRange): Used HardAutorelease() instead of
CFAutoreleaseHelper().
(AXTextMarkerRangeStart): Ditto.
(AXTextMarkerRangeEnd): Ditto.
(textMarkerForVisiblePosition): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFMovieObserver initWithCallback:]): Called [super init]
first so that we don't later use ivars from the wrong self.
(-[WebCoreAVFLoaderDelegate initWithCallback:]): Ditto.
* platform/mac/FoundationExtras.h: Removed.
* platform/mac/KURLMac.mm:
(WebCore::KURL::operator NSURL *): Used WTF's HardAutorelease().
* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::mapHostNameWithRange): Used HardAutorelease() instead of
WebCoreCFAutorelease().
(WebCore::URLWithData): Ditto.
(WebCore::userVisibleString): Ditto.
(WebCore::URLByRemovingComponentAndSubsequentCharacter): Used Vector<>
with an inline capacity rather than heap-allocating a buffer.
* platform/mac/WebCoreObjCExtras.h: Used HardAutorelease() instead of
WebCoreCFAutorelease().
* platform/text/mac/StringImplMac.mm:
(WTF::StringImpl::operator NSString *): Used WTF's HardAutorelease().
2013-08-26 Pratik Solanki
Page::console() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120320
Reviewed by Darin Adler.
Page::m_console is never NULL so console() can just return a reference.
* css/CSSParser.cpp:
(WebCore::CSSParser::logError):
* dom/Document.cpp:
(WebCore::Document::addConsoleMessage):
(WebCore::Document::addMessage):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::pageConsole):
* page/Page.h:
(WebCore::Page::console):
* xml/XSLStyleSheetLibxslt.cpp:
(WebCore::XSLStyleSheet::parseString):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::docLoaderFunc):
2013-08-26 Rob Buis
Lonely stop crashes
https://bugs.webkit.org/show_bug.cgi?id=87964
Reviewed by Darin Adler.
Provide a nodeAtFloatPoint implementation for RenderSVGGradientStop to avoid hitting the assert in RenderObject::nodeAtFloatPoint.
Test: svg/custom/stop-crash-hittest.svg
* rendering/svg/RenderSVGGradientStop.h:
2013-08-26 Sam Weinig
Editor::spellChecker() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120325
Reviewed by Anders Carlsson.
* editing/Editor.cpp:
(WebCore::Editor::Editor):
* editing/Editor.h:
(WebCore::Editor::spellChecker):
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::SpellChecker):
(WebCore::SpellChecker::client):
(WebCore::SpellChecker::isAsynchronousEnabled):
(WebCore::SpellChecker::didCheck):
(WebCore::SpellChecker::didCheckSucceed):
* editing/SpellChecker.h:
* page/EditorClient.h:
* testing/Internals.cpp:
(WebCore::Internals::lastSpellCheckRequestSequence):
(WebCore::Internals::lastSpellCheckProcessedSequence):
2013-08-26 Bem Jones-Bey
Optimize FloatIntervalSearchAdapter::collectIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=120237
Reviewed by David Hyatt.
This is a port of 3 Blink patches:
https://codereview.chromium.org/22463002 (By shatch@chromium.org)
https://chromiumcodereview.appspot.com/22909005 (By me)
https://chromiumcodereview.appspot.com/23084002 (By me)
shatch optimized FloatIntervalSearchAdapter by having it store the
outermost float instead of making a bunch of calls to
logical(Left/Right/Bottom)ForFloat, and then only making that call
once when heightRemaining needs to be computed.
I noticed that now we were storing both the last float encountered and
the outermost float, and that the behavior for shape-outside wasn't
significantly changed by using the outermost float instead of the last
float encountered (and in most cases, using the outermost float gives
more reasonable behavior). Since this isn't covered in the spec yet, I
changed shape-outside to use the outermost float, making it so that we
only need to store one float pointer when walking the placed floats
tree, and keeping the performance win.
Also while changing updateOffsetIfNeeded, removed const, since that is
a lie. Nothing about that method is const.
Test: fast/shapes/shape-outside-floats/shape-outside-floats-outermost.html
* rendering/RenderBlock.cpp:
(WebCore::::updateOffsetIfNeeded):
(WebCore::::collectIfNeeded):
(WebCore::::getHeightRemaining):
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine):
(WebCore::RenderBlock::logicalRightFloatOffsetForLine):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
(WebCore::RenderBlock::FloatIntervalSearchAdapter::outermostFloat):
2013-08-26 Alexey Proskuryakov
[Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail
https://bugs.webkit.org/show_bug.cgi?id=113094
Reviewed by Darin Adler.
Mac platform implementation has checks for pasteboard change count, but it
didn't use to update the count when writing to pasteboad from JavaScript.
* platform/PasteboardStrategy.h: Changed changeCount function to return a long
instead of an int, as the underlying Mac type is NSInteger. Changed all methods
that modify the pasteboard to return a new change count.
* platform/PlatformPasteboard.h: Changed all methods that modify the pasteboard
to return a new change count.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::clear): Update m_changeCount.
(WebCore::Pasteboard::writeSelectionForTypes): Ditto.
(WebCore::Pasteboard::writePlainText): Ditto.
(WebCore::writeURLForTypes): Ditto.
(WebCore::Pasteboard::writeURL): Ditto.
(WebCore::writeFileWrapperAsRTFDAttachment): Ditto.
(WebCore::Pasteboard::writeImage): Ditto.
(WebCore::Pasteboard::writePasteboard): Ditto.
(WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
(WebCore::Pasteboard::writeString): Ditto.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::changeCount): Changed returned type to long to avoid
data loss.
(WebCore::PlatformPasteboard::copy): Return new change count.
(WebCore::PlatformPasteboard::addTypes): Ditto.
(WebCore::PlatformPasteboard::setTypes): Ditto.
(WebCore::PlatformPasteboard::setBufferForType): Ditto.
(WebCore::PlatformPasteboard::setPathnamesForType): Ditto.
(WebCore::PlatformPasteboard::setStringForType): Ditto. Replaced -[NSURL writeToPasteboard:]
with an equivalent implemnentation that tells use whether writing was successful.
There is difference with invalid URL string handling - we used to silently ignore
such requets, but set pasteboard content to empty URL now.
2013-08-26 Rob Buis
Computed style of fill/stroke properties incorrect on references
https://bugs.webkit.org/show_bug.cgi?id=114761
Reviewed by Darin Adler.
The computed style of the fill and stroke properties did not include
the url() function. Added the url() string to output.
Updated existing tests to cover the issue.
* css/CSSPrimitiveValue.cpp: Cleanup.
(WebCore::CSSPrimitiveValue::customCssText):
* svg/SVGPaint.cpp: Added "url("
(WebCore::SVGPaint::customCssText):
2013-08-26 Zan Dobersek
Prettify generated build guards in HTMLElementFactory.cpp
https://bugs.webkit.org/show_bug.cgi?id=120310
Reviewed by Darin Adler.
Build guards should wrap the constructor definitions without empty lines between
the guards and the constructor code. Similarly, build guards for addTag calls
shouldn't put an empty line after the build guard closure.
* dom/make_names.pl:
(printConstructorInterior):
(printConstructors):
(printFunctionInits):
2013-08-26 Robert Hogan
Avoid painting every non-edge collapsed border twice over
https://bugs.webkit.org/show_bug.cgi?id=119759
Reviewed by David Hyatt.
Every collapsed border that isn't on the edge of a table gets painted at least twice, once by each
adjacent cell. The joins are painted four times. This is unnecessary and results in tables with semi-transparent
borders getting rendered incorrectly - each border adjoing two cells is painted twice and ends up darker than it should be.
Fixing the overpainting at joins is another day's work. This patch ensures each collapsed border inside a table is only
painted once. It does this by only allowing cells at the top and left edge of the table to paint their top and left collapsed borders.
All the others can only paint their right and bottom collapsed border. This works because the borders are painted from bottom right to top left.
Tests: fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl.html
fast/table/border-collapsing/collapsed-borders-adjoining-sections.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintCollapsedBorders):
2013-08-26 Andreas Kling
Unreviewed build fix.
* page/Page.cpp:
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
2013-08-26 Brent Fulgham
Unreviewed buid fix.
* page/Page.cpp:
(WebCore::Page::setNeedsRecalcStyleInAllFrames): Remove extra '{' character.
2013-08-26 Pratik Solanki
PageGroup::groupSettings() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120319
Reviewed by Andreas Kling.
PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
* Modules/indexeddb/IDBFactory.cpp:
* page/PageGroup.h:
(WebCore::PageGroup::groupSettings):
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::localStorageNamespace):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::groupSettings):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
2013-08-26 Andreas Kling
WebCore: Let Page create the main Frame.
Reviewed by Anders Carlsson.
Previously, Frame::create() would call Page::setMainFrame() when constructing the
main Frame for a Page. Up until that point, Page had a null mainFrame().
To guarantee that Page::mainFrame() is never null, we re-order things so that
Page is responsible for creating its own main Frame. We do this at the earliest
possible point; in the Page constructor initializer list.
Constructing a Frame requires a FrameLoaderClient*, so I've added such a field to
the PageClients struct.
When creating a WebKit-layer frame, we now wrap the already-instantiated
Page::mainFrame() instead of creating a new Frame.
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
Add an EmptyFrameLoaderClient to the PageClients constructed here.
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
Updated to wrap Page::mainFrame() in a FrameView instead of creating their
own Frame manually.
* page/Frame.cpp:
(WebCore::Frame::create):
* page/Page.h:
Remove Page::setMainFrame() and the only call site.
* page/Page.cpp:
(WebCore::Page::Page):
Construct Page::m_mainFrame in the initializer list.
(WebCore::Page::PageClients::PageClients):
Add "FrameLoaderClient* loaderClientForMainFrame" to PageClients.
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
Null-check the Frame::document() before calling through on it. This would
otherwise crash when changing font-related Settings before calling init() on
the Frame (like InspectorOverlay does.)
2013-08-26 Brent Fulgham
[Windows] Unreviewed build fix.
* rendering/RenderMediaControls.cpp: Remove references to QuickTime controls
that are no longer part of WKSI.
(wkHitTestMediaUIPart):
(wkMeasureMediaUIPart):
(wkDrawMediaUIPart):
(wkDrawMediaSliderTrack):
2013-08-26 Gurpreet Kaur
document.body.scrollTop & document.documentElement.scrollTop differ cross-browser
Reviewed by Darin Adler.
Webkit always uses document.body.scrollTop whether quirks or
standard mode. Similiar behaviour is for document.body.scrollLeft.
As per the specification webkit should return document.body.scrollTop
for quirks mode and document.documentElement.scrollTop for standard mode.
Same for document.body.scrollLeft and document.documentElement.scrollLeft.
Tests: fast/dom/Element/scrollLeft-Quirks.html
fast/dom/Element/scrollLeft.html
fast/dom/Element/scrollTop-Quirks.html
fast/dom/Element/scrollTop.html
* dom/Element.cpp:
(WebCore::Element::scrollLeft):
(WebCore::Element::scrollTop):
If the element does not have any associated CSS layout box or the element
is the root element and the Document is in quirks mode return zero.
Else If the element is the root element return the value of scrollY
for scrollTop and scrollX for scrollLeft.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::scrollTop):
If the element is the HTML body element, the Document is in quirks mode,
return the value of scrollY for scrollTop and scrollX for scrollLeft.
2013-08-26 Antti Koivisto
REGRESSION (r154581): Some plugin tests failing in debug bots
https://bugs.webkit.org/show_bug.cgi?id=120315
Reviewed by Darin Adler.
We are hitting the new no-event-dispatch-while-iterating assertion.
Detaching deletes a plugin which modifies DOM while it dies.
* dom/Document.cpp:
(WebCore::Document::createRenderTree):
(WebCore::Document::detach):
Don't iterate at all. Document never has more than one Element child anyway.
2013-08-26 David Kilzer
BUILD FIX (r154580): RenderObject::document() returns a reference
See:
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]):
(AXAttributeStringSetHeadingLevel):
2013-08-26 Brent Fulgham
[Windows] Build fix after r154578. Return Vector() instead
of ListHashSet().
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::types):
2013-08-26 Brent Fulgham
[Windows] Build fix after r154580.
* rendering/RenderThemeWin.cpp: Mirror changes made for other ports now that
Frame is known to always be valid when in a render tree. This allows us to
get rid of some unneeded null checks.
(WebCore::RenderThemeWin::getThemeData):
(WebCore::RenderThemeWin::paintMenuList):
2013-08-26 Brent Fulgham
[Windows] Build fix after r154554.
* page/AutoscrollController.cpp: Correct various places where pointers are now
references.
(WebCore::AutoscrollController::stopAutoscrollTimer):
(WebCore::AutoscrollController::startPanScrolling):
(WebCore::AutoscrollController::autoscrollTimerFired):
2013-08-26 Andreas Kling
Move DocumentTiming inside ENABLE(WEB_TIMING) guards.
Reviewed by Anders Carlsson.
Looks like this struct is only used by other ENABLE(WEB_TIMING) code, so don't bother
filling it in if we're not building like that.
* dom/Document.cpp:
(WebCore::Document::setReadyState):
(WebCore::Document::finishedParsing):
* dom/Document.h:
* dom/DocumentTiming.h:
2013-08-26 Carlos Garcia Campos
[GTK] Fix compile warning in WebKitDOMCustom
https://bugs.webkit.org/show_bug.cgi?id=120286
Reviewed by Philippe Normand.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_element_get_item_type): Add return 0.
2013-08-25 Ryosuke Niwa
JSHTMLFormElement::canGetItemsForName needlessly allocates a Vector
https://bugs.webkit.org/show_bug.cgi?id=120277
Reviewed by Sam Weinig.
Added HTMLFormElement::hasNamedElement and used it in JSHTMLFormElement::canGetItemsForName.
This required fixing a bug in HTMLFormElement::getNamedElements that the first call to getNamedElements
after replacing an element A with another element B of the same name caused it to erroneously append A
to namedItems via the aliases mapping. Because getNamedElements used to be always called in pairs, this
wrong behavior was never visible to the Web. Fixed the bug by not adding the old element to namedItem
when namedItem's size is 1.
Also renamed m_elementAliases to m_pastNamesMap along with related member functions.
No new tests are added since there should be no Web exposed behavioral change.
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::canGetItemsForName):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::elementFromPastNamesMap):
(WebCore::HTMLFormElement::addElementToPastNamesMap):
(WebCore::HTMLFormElement::hasNamedElement):
(WebCore::HTMLFormElement::getNamedElements):
* html/HTMLFormElement.h:
2013-08-25 Andreas Kling
RenderLayerBacking::renderer() should return a reference.
Reviewed by Anders Carlsson.
It's just a forwarding call to RenderLayer::renderer() which already returns a reference.
2013-08-25 Gyuyoung Kim
Add toSVGMissingGlyphElement(), and use it.
https://bugs.webkit.org/show_bug.cgi?id=120197
Reviewed by Andreas Kling.
As a step to clean-up static_cast, toSVGMissingGlyphElement() is added to clean-up
static_cast.
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::firstMissingGlyphElement):
(WebCore::SVGFontElement::ensureGlyphCache):
* svg/SVGMissingGlyphElement.h:
(WebCore::toSVGMissingGlyphElement):
2013-08-25 Andreas Kling
RenderLayer::renderer() should return a reference.
Reviewed by Anders Carlsson.
RenderLayer is always created with a renderer, so make renderer() (and m_renderer) references.
Nuked an assortment of useless null checks.
2013-08-25 Antti Koivisto
Element child and descendant iterators
https://bugs.webkit.org/show_bug.cgi?id=120248
Reviewed by Sam Weinig and Andreas Kling.
Add iterators for Element children and descendants.
To iterate over element children:
#include "ChildIterator.h"
for (auto it = elementChildren(this).begin(), end = elementChildren(this).end(); it != end; ++it) {
Element& element = *it;
...
for (auto it = childrenOfType(this).begin(), end = childrenOfType(this).end(); it != end; ++it) {
HTMLAreaElement& area = *it;
...
To iteratate over element descendants in pre-order:
#include "DescendantIterator.h"
for (auto it = elementDescendants(this).begin(), end = elementDescendants(this).end(); it != end; ++it) {
Element& element = *it;
...
for (auto it = descendantsOfType(this).begin(), end = descendantsOfType(this).end(); it != end; ++it) {
HTMLAreaElement& area = *it;
...
The iterators assert against DOM mutations and event dispatch while iterating in debug builds.
They are compatible with C++11 range-based for loops. In the future we can use
for (auto& element : elementChildren(this))
...
etc.
The patch all uses the new iterators in a few places.
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
(WebCore::siblingWithAriaRole):
* accessibility/AccessibilityRenderObject.cpp:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* dom/ChildIterator.h: Added.
(WebCore::ChildIterator::operator*):
(WebCore::ChildIterator::operator->):
(WebCore::::ChildIterator):
(WebCore::::operator):
(WebCore::=):
(WebCore::::ChildIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementChildren):
(WebCore::childrenOfType):
* dom/DescendantIterator.h: Added.
(WebCore::DescendantIterator::operator*):
(WebCore::DescendantIterator::operator->):
(WebCore::::DescendantIterator):
(WebCore::::operator):
(WebCore::=):
(WebCore::::DescendantIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementDescendants):
(WebCore::descendantsOfType):
* dom/Document.cpp:
(WebCore::Document::buildAccessKeyMap):
(WebCore::Document::childrenChanged):
(WebCore::Document::attach):
(WebCore::Document::detach):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
* editing/markup.cpp:
(WebCore::completeURLs):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::mapMouseEvent):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::selectMediaResource):
(WebCore::HTMLMediaElement::textTrackModeChanged):
2013-08-25 Andreas Kling
RenderObject::document() should return a reference.
Reviewed by Antti Koivisto.
There's always a Document. We were allocated in someone's arena, after all.
Various null checks and assertions neutralized.
2013-08-25 David Kilzer
BUILD FIX (r154578): Return Vector() from Pasteboard::types() for iOS
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::types): Return Vector() instead of
ListHashSet() after r154578.
2013-08-25 Darin Adler
Make JavaScript binding for Clipboard::types more normal
https://bugs.webkit.org/show_bug.cgi?id=120271
Reviewed by Anders Carlsson.
* bindings/js/JSClipboardCustom.cpp:
(WebCore::JSClipboard::types): Make a simple custom binding. Only needed because
there is a special value, null, this can return.
* dom/Clipboard.cpp:
(WebCore::Clipboard::types): Return Vector instead of ListHashSet.
* dom/Clipboard.h: Ditto.
* platform/Pasteboard.h: Ditto.
* platform/blackberry/PasteboardBlackBerry.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/efl/PasteboardEfl.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::types): Ditto.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::types): Ditto.
* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::types): Ditto.
2013-08-25 David Kilzer
Unreviewed rollout of r154571. Broke internal iOS build.
Reopened: No need for clearTimers function in Frame
https://bugs.webkit.org/show_bug.cgi?id=120265
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
(WebCore::CachedFrame::destroy):
* page/Frame.cpp:
(WebCore::Frame::clearTimers):
* page/Frame.h:
2013-08-25 Darin Adler
No need for hasData in Clipboard
https://bugs.webkit.org/show_bug.cgi?id=120269
Reviewed by Andreas Kling.
This simple forwarder does not belong in the Clipboard class.
The drag code that uses it already works directly with Pasteboard.
* dom/Clipboard.cpp: Removed hasData.
* dom/Clipboard.h: Ditto.
* page/DragController.cpp:
(WebCore::DragController::startDrag): Call through the pasteboard.
2013-08-25 Darin Adler
No need for documentTypeString function in Frame
https://bugs.webkit.org/show_bug.cgi?id=120262
Reviewed by Andreas Kling.
* WebCore.exp.in: Removed export of Frame::documentTypeString.
* editing/markup.cpp:
(WebCore::documentTypeString): Added. Replaces the old Frame member function.
Makes more sense to have this here since it is both called by and calls code
in this file; somehow this function was left behind.
(WebCore::createFullMarkup): Changed to call the new function.
* editing/markup.h: Added documentTypeString function. Has to be exported
because LegacyWebArchive uses it; might be worth fixing that later.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Changed to call the new function.
(WebCore::LegacyWebArchive::createFromSelection): Ditto.
* page/Frame.cpp: Removed Frame::documentTypeString.
* page/Frame.h: Ditto.
2013-08-25 Darin Adler
Clipboard is in DOM directory, but ClipboardMac is in platform directory
https://bugs.webkit.org/show_bug.cgi?id=120267
Reviewed by Andreas Kling.
This file is almost gone; has just one function in it. Move it for now, and later
we can delete it entirely.
* WebCore.xcodeproj/project.pbxproj: Updated for new file location.
* dom/ClipboardMac.mm: Moved from Source/WebCore/platform/mac/ClipboardMac.mm.
2013-08-25 Darin Adler
No need for notifyChromeClientWheelEventHandlerCountChanged in Frame
https://bugs.webkit.org/show_bug.cgi?id=120264
Reviewed by Andreas Kling.
* dom/Document.cpp:
(WebCore::Document::createRenderTree): Renamed attach to this.
This made it practical to remove a comment that says the same thing and
also helps make the purpose of the function considerably more clear,
although the relationship to the attached and detach functions is now
less clear; should fix that soon.
(WebCore::pageWheelEventHandlerCountChanged): Added. Contains the code
from Frame::notifyChromeClientWheelEventHandlerCountChanged, minus some
assertions that were only needed because the function was passed a frame
rather than a page.
(WebCore::Document::didBecomeCurrentDocumentInFrame): Added. Contains
most of the code from Frame::setDocument. Looking at before and after,
we can see that most of the work is within the document class and matches
up with other code already in this class. Added FIXMEs about many problems
spotted in the code.
(WebCore::Document::topDocument): Added FIXME and tweaked formatting.
(WebCore::wheelEventHandlerCountChanged): Moved the call to the
pageWheelEventHandlerCountChanged in here from the two call sites.
Also added a FIXME.
(WebCore::Document::didAddWheelEventHandler): Removed the call to
notifyChromeClientWheelEventHandlerCountChanged, since that's now handled
inside wheelEventHandlerCountChanged.
(WebCore::Document::didRemoveWheelEventHandler): Ditto.
* dom/Document.h: Renamed attach to createRenderTree, made it private,
and added a new didBecomeCurrentDocumentInFrame function.
* loader/PlaceholderDocument.cpp:
(WebCore::PlaceholderDocument::createRenderTree): Renamed from attach.
* loader/PlaceholderDocument.h: Did the rename and made the function a
private override.
* page/Frame.cpp:
(WebCore::Frame::setDocument): Moved most of this function out of here
into the new Document::didBecomeCurrentDocumentInFrame function.
Also deleted notifyChromeClientWheelEventHandlerCountChanged.
* page/Frame.h: Deleted notifyChromeClientWheelEventHandlerCountChanged.
2013-08-25 Darin Adler
No need for dispatchVisibilityStateChangeEvent function
https://bugs.webkit.org/show_bug.cgi?id=120261
Reviewed by Andreas Kling.
* dom/Document.cpp: Removed dispatchVisibilityStateChangeEvent.
* dom/Document.h: Ditto.
* page/Frame.cpp: Ditto.
* page/Frame.h: Ditto.
* page/Page.cpp:
(WebCore::Page::setVisibilityState): Put all the logic for dispatching the
visibility state change event. Nothing here requires any special information
about the internals of Frame or Document.
2013-08-25 Darin Adler
No need for clearTimers function in Frame
https://bugs.webkit.org/show_bug.cgi?id=120265
Reviewed by Andreas Kling.
* history/CachedFrame.cpp:
(WebCore::clearTimers): Added. Moved here from Frame.
(WebCore::CachedFrame::CachedFrame): Call above function.
(WebCore::CachedFrame::destroy): Ditto.
* page/Frame.cpp: Removed the two clearTimers functions.
* page/Frame.h: Ditto.
2013-08-24 Ryuan Choi
Unreviewed build fix after r154560
* page/FrameTree.cpp:
(WebCore::FrameTree::scopedChild):
Use tree(). instead of tree()->.
2013-08-24 Benjamin Poulain
Inline SelectorQuery's execution traits
Reviewed by Sam Weinig.
For some reason, clang does not always inline the trait. The operations are so simple
that it shows up in profile.
Force the inlining to match the original speed.
* dom/SelectorQuery.cpp:
(WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
(WebCore::SingleElementExtractorSelectorQueryTrait::appendOutputForElement):
2013-08-24 Benjamin Poulain
Remove a useless #include from StyledElement
https://bugs.webkit.org/show_bug.cgi?id=120245
Reviewed by Andreas Kling.
* dom/StyledElement.cpp:
2013-08-24 Darin Adler
Move Frame::inScope into FrameTree
https://bugs.webkit.org/show_bug.cgi?id=120257
Reviewed by Sam Weinig.
* page/Frame.cpp: Removed inScope.
* page/Frame.h: Ditto.
* page/FrameTree.cpp:
(WebCore::inScope): Moved it here.
(WebCore::FrameTree::scopedChild): Changed to call new function.
(WebCore::FrameTree::scopedChildCount): Ditto.
2013-08-24 David Kilzer
BUILD FIX: Include HTMLPlugInImageElement.h for ENABLE(PLUGIN_PROXY_FOR_VIDEO)
Fixes the following build failure for iOS:
In file included from Source/WebCore/accessibility/AccessibilityAllInOne.cpp:28:
In file included from Source/WebCore/accessibility/AXObjectCache.cpp:42:
In file included from Source/WebCore/accessibility/AccessibilityMediaControls.h:36:
In file included from Source/WebCore/html/shadow/MediaControlElements.h:34:
In file included from Source/WebCore/html/shadow/MediaControlElementTypes.h:37:
Source/WebCore/html/HTMLMediaElement.h:324:23: error: unknown type name 'PluginCreationOption'
void updateWidget(PluginCreationOption);
^
* html/HTMLMediaElement.h:
2013-08-24 Darin Adler
Frame::tree should return a reference instead of a pointer
https://bugs.webkit.org/show_bug.cgi?id=120259
Reviewed by Andreas Kling.
* page/Frame.h:
(WebCore::Frame::tree): Return a reference instead of a pointer.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::childFrameGetter):
(WebCore::indexGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
(WebCore::JSDOMWindow::setLocation):
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused):
* dom/Document.cpp:
(WebCore::canAccessAncestor):
(WebCore::Document::adoptNode):
(WebCore::Document::canNavigate):
(WebCore::Document::findUnsafeParentScrollPropagationBoundary):
(WebCore::Document::notifySeamlessChildDocumentsOfStylesheetUpdate):
(WebCore::Document::openSearchDescriptionURL):
(WebCore::Document::setDesignMode):
(WebCore::Document::parentDocument):
(WebCore::Document::initSecurityContext):
(WebCore::Document::initContentSecurityPolicy):
(WebCore::Document::requestFullScreenForElement):
(WebCore::Document::webkitExitFullscreen):
(WebCore::Document::didRemoveTouchEventHandler):
* dom/TreeScope.cpp:
(WebCore::focusedFrameOwnerElement):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::CachedFrameBase):
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::hasFocus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
(WebCore::InspectorCanvasAgent::frameNavigated):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::documents):
* inspector/InspectorFileSystemAgent.cpp:
(WebCore::InspectorFileSystemAgent::assertScriptExecutionContextForOrigin):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::deleteCookie):
(WebCore::InspectorPageAgent::searchInResources):
(WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
(WebCore::InspectorPageAgent::buildObjectForFrame):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::mainResource):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::createDecoderIfNeeded):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::allChildrenAreComplete):
(WebCore::FrameLoader::allAncestorsAreComplete):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::outgoingReferrer):
(WebCore::FrameLoader::updateFirstPartyForCookies):
(WebCore::FrameLoader::setFirstPartyForCookies):
(WebCore::FrameLoader::completed):
(WebCore::FrameLoader::started):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::closeOldDataSources):
(WebCore::FrameLoader::prepareForCachedPageRestore):
(WebCore::FrameLoader::subframeIsLoading):
(WebCore::FrameLoader::subresourceCachePolicy):
(WebCore::FrameLoader::detachChildren):
(WebCore::FrameLoader::closeAndRemoveChild):
(WebCore::FrameLoader::checkLoadComplete):
(WebCore::FrameLoader::numPendingOrLoadingRequests):
(WebCore::FrameLoader::detachFromParent):
(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::handleBeforeUnloadEvent):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
(WebCore::FrameLoader::findFrameForNavigation):
(WebCore::FrameLoader::effectiveSandboxFlags):
(WebCore::createWindow):
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveDocumentState):
(WebCore::HistoryController::saveDocumentAndScrollState):
(WebCore::HistoryController::restoreDocumentState):
(WebCore::HistoryController::goToItem):
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
(WebCore::HistoryController::recursiveUpdateForCommit):
(WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
(WebCore::HistoryController::initializeItem):
(WebCore::HistoryController::createItemTree):
(WebCore::HistoryController::recursiveSetProvisionalItem):
(WebCore::HistoryController::recursiveGoToItem):
(WebCore::HistoryController::currentFramesMatchItem):
* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::mustLockBackForwardList):
(WebCore::NavigationScheduler::scheduleFormSubmission):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::progressCompleted):
(WebCore::ProgressTracker::isMainLoadProgressing):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::checkInsecureContent):
* loader/icon/IconController.cpp:
(WebCore::IconController::urlsForTypes):
(WebCore::IconController::startLoader):
* page/Chrome.cpp:
(WebCore::canRunModalIfDuringPageDismissal):
(WebCore::Chrome::windowScreenDidChange):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::length):
(WebCore::DOMWindow::name):
(WebCore::DOMWindow::setName):
(WebCore::DOMWindow::parent):
(WebCore::DOMWindow::top):
(WebCore::DOMWindow::open):
* page/EventHandler.cpp:
(WebCore::EventHandler::scrollRecursively):
(WebCore::EventHandler::logicalScrollRecursively):
(WebCore::EventHandler::handleMouseMoveEvent):
* page/FocusController.cpp:
(WebCore::FocusController::setContainingWindowIsVisible):
* page/Frame.cpp:
(WebCore::parentPageZoomFactor):
(WebCore::parentTextZoomFactor):
(WebCore::Frame::setPrinting):
(WebCore::Frame::shouldUsePrintingLayout):
(WebCore::Frame::dispatchVisibilityStateChangeEvent):
(WebCore::Frame::willDetachPage):
(WebCore::Frame::setPageAndTextZoomFactors):
(WebCore::Frame::deviceOrPageScaleFactorChanged):
(WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged):
(WebCore::Frame::isURLAllowed):
* page/FrameTree.cpp:
(WebCore::FrameTree::~FrameTree):
(WebCore::FrameTree::setName):
(WebCore::FrameTree::transferChild):
(WebCore::FrameTree::appendChild):
(WebCore::FrameTree::actuallyAppendChild):
(WebCore::FrameTree::removeChild):
(WebCore::FrameTree::uniqueChildName):
(WebCore::FrameTree::scopedChild):
(WebCore::FrameTree::scopedChildCount):
(WebCore::FrameTree::childCount):
(WebCore::FrameTree::child):
(WebCore::FrameTree::find):
(WebCore::FrameTree::isDescendantOf):
(WebCore::FrameTree::traverseNext):
(WebCore::FrameTree::traversePreviousWithWrap):
(WebCore::FrameTree::deepLastChild):
(WebCore::FrameTree::top):
(printFrames):
(showFrameTree):
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::hasCompositedContentIncludingDescendants):
(WebCore::FrameView::hasCompositingAncestor):
(WebCore::FrameView::flushCompositingStateIncludingSubframes):
(WebCore::FrameView::updateCanBlitOnScrollRecursively):
(WebCore::FrameView::setIsOverlapped):
(WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
(WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
(WebCore::FrameView::serviceScriptedAnimations):
(WebCore::FrameView::updateBackgroundRecursively):
(WebCore::FrameView::parentFrameView):
(WebCore::FrameView::paintContentsForSnapshot):
(WebCore::FrameView::setTracksRepaints):
(WebCore::FrameView::notifyWidgetsInAllFrames):
* page/Location.cpp:
(WebCore::Location::ancestorOrigins):
* page/Page.cpp:
(WebCore::networkStateChanged):
(WebCore::Page::~Page):
(WebCore::Page::renderTreeSize):
(WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
(WebCore::Page::refreshPlugins):
(WebCore::Page::takeAnyMediaCanStartListener):
(WebCore::incrementFrame):
(WebCore::Page::setDefersLoading):
(WebCore::Page::setMediaVolume):
(WebCore::Page::setDeviceScaleFactor):
(WebCore::Page::setShouldSuppressScrollbarAnimations):
(WebCore::Page::didMoveOnscreen):
(WebCore::Page::willMoveOffscreen):
(WebCore::Page::setIsInWindow):
(WebCore::Page::suspendScriptedAnimations):
(WebCore::Page::resumeScriptedAnimations):
(WebCore::Page::userStyleSheetLocationChanged):
(WebCore::Page::allVisitedStateChanged):
(WebCore::Page::visitedStateChanged):
(WebCore::Page::setDebugger):
(WebCore::Page::setMemoryCacheClientCallsEnabled):
(WebCore::Page::setMinimumTimerInterval):
(WebCore::Page::setTimerAlignmentInterval):
(WebCore::Page::dnsPrefetchingStateChanged):
(WebCore::Page::collectPluginViews):
(WebCore::Page::storageBlockingStateChanged):
(WebCore::Page::privateBrowsingStateChanged):
(WebCore::Page::checkSubframeCountConsistency):
(WebCore::Page::suspendActiveDOMObjectsAndAnimations):
(WebCore::Page::resumeActiveDOMObjectsAndAnimations):
(WebCore::Page::captionPreferencesChanged):
* page/PageGroup.cpp:
(WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
* page/PageGroupLoadDeferrer.cpp:
(WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
(WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* page/PageThrottler.cpp:
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
* page/Settings.cpp:
(WebCore::setImageLoadingSettings):
(WebCore::Settings::setTextAutosizingFontScaleFactor):
* page/SpatialNavigation.cpp:
(WebCore::rectToAbsoluteCoordinates):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::suspendAnimations):
(WebCore::AnimationControllerPrivate::resumeAnimations):
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount):
* plugins/PluginView.cpp:
(WebCore::PluginView::performRequest):
(WebCore::PluginView::load):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::targetFrame):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processSubtree):
* storage/StorageEventDispatcher.cpp:
(WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::currentScale):
(WebCore::SVGSVGElement::setCurrentScale):
* testing/Internals.cpp:
(WebCore::Internals::formControlStateOfPreviousHistoryItem):
(WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
(WebCore::Internals::numberOfScrollableAreas):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::hasNoStyleInformation):
Use tree(). instead of tree()->.
2013-08-24 Andreas Kling
Merge Document::viewportSize() logic into RenderView::viewportSize().
Reviewed by Darin Adler.
RenderView can just ask FrameView (the viewport) about its size directly, no need for
a weirdly-placed method on Document.
* dom/Document.cpp:
* rendering/RenderView.cpp:
(WebCore::RenderView::viewportSize):
* rendering/RenderView.h:
2013-08-24 Andreas Kling
RenderObject::frame() should return a reference.
Reviewed by Darin Adler.
There is now always a Frame, and we can get to it by walking this path:
RenderObject -> Document -> RenderView -> FrameView -> Frame
Removed the customary horde of null checks.
2013-08-24 Andreas Kling
RenderLayer::compositor() should return a reference.
Reviewed by Anders Carlsson.
It was already converting from a reference to a pointer.
2013-08-24 Yoav Weiss
Eliminate a useless comparison in srcset's candidate selection algorithm
https://bugs.webkit.org/show_bug.cgi?id=120235
There is no point in comparing the last item in the candidates vector to the DPR, since it will be returned anyway. Therefore, the
iteration on the candidates vector now skips the last candidate.
Reviewed by Andreas Kling.
* html/parser/HTMLParserIdioms.cpp:
(WebCore::bestFitSourceForImageAttributes):
2013-08-24 Andreas Kling
RenderObject::view() should return a reference.
Reviewed by Antti Koivisto.
Now that the lifetime and accessibility characteristics of RenderView are well-defined,
we can make RenderObject::view() return a reference, exposing a plethora of unnecessary
null checks.
2013-08-24 Joseph Pecoraro
Web Inspector: Cleanup Inspector Agents a bit
https://bugs.webkit.org/show_bug.cgi?id=120218
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/8693dcb8ba42a5c225f516c664fb0f453c8ba6f0.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::elementForId):
* inspector/InspectorStyleSheet.cpp:
(ParsedStyleSheet::ParsedStyleSheet):
(WebCore::InspectorStyle::setPropertyText):
(WebCore::InspectorStyle::populateAllProperties):
(WebCore::InspectorStyleSheet::inlineStyleSheetText):
2013-08-24 Andreas Kling
Let Document keep its RenderView during render tree detach.
Reviewed by Antti Koivisto.
Instead of having "Document::renderer() == NULL" signify that the render tree is being
torn down, give Document an explicit flag for this instead.
This way, we can keep Document's RenderView in place during tree detach.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::detach):
* dom/Document.h:
(WebCore::Document::renderTreeBeingDestroyed):
* rendering/RenderObject.h:
(WebCore::RenderObject::documentBeingDestroyed):
2013-08-24 Antti Koivisto
Tighten before/after pseudo element accessors
https://bugs.webkit.org/show_bug.cgi?id=120204
Reviewed by Andreas Kling.
We have generic looking Element::pseudoElement(PseudoID) which only returns before/after pseudo elements.
Switch to Element::before/afterPseudoElement(), similarly for setters.
* WebCore.exp.in:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::styledNode):
* dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::beforeOrAfterPseudeoElement):
(WebCore::Element::computedStyle):
(WebCore::Element::updatePseudoElement):
(WebCore::Element::createPseudoElementIfNeeded):
(WebCore::Element::updateBeforePseudoElement):
(WebCore::Element::updateAfterPseudoElement):
(WebCore::Element::beforePseudoElement):
(WebCore::Element::afterPseudoElement):
(WebCore::Element::setBeforePseudoElement):
(WebCore::Element::setAfterPseudoElement):
(WebCore::disconnectPseudoElement):
(WebCore::Element::clearBeforePseudoElement):
(WebCore::Element::clearAfterPseudoElement):
(WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::beforePseudoElement):
(WebCore::ElementRareData::afterPseudoElement):
(WebCore::ElementRareData::hasPseudoElements):
(WebCore::ElementRareData::~ElementRareData):
(WebCore::ElementRareData::clearBeforePseudoElement):
(WebCore::ElementRareData::clearAfterPseudoElement):
(WebCore::ElementRareData::setBeforePseudoElement):
(WebCore::ElementRareData::setAfterPseudoElement):
Move detach logic to Element. ElementRareData should not implement semantics.
* dom/Node.cpp:
(WebCore::Node::pseudoAwarePreviousSibling):
(WebCore::Node::pseudoAwareNextSibling):
(WebCore::Node::pseudoAwareFirstChild):
(WebCore::Node::pseudoAwareLastChild):
* dom/NodeRenderingTraversal.cpp:
(WebCore::NodeRenderingTraversal::nextSiblingSlow):
(WebCore::NodeRenderingTraversal::previousSiblingSlow):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeCounterValuesFromChildren):
(WebCore::counterValueForElement):
* style/StyleResolveTree.cpp:
(WebCore::Style::attachRenderTree):
(WebCore::Style::resolveTree):
* testing/Internals.cpp:
(WebCore::Internals::pauseAnimationAtTimeOnPseudoElement):
(WebCore::Internals::pauseTransitionAtTimeOnPseudoElement):
2013-08-23 Simon Fraser
Improve scrolling behavior in iTunes
https://bugs.webkit.org/show_bug.cgi?id=120241
Reviewed by Sam Weinig.
When vertically scrolling a page with horizontally scrollable overflow areas,
vertical scroll gestures would be interrupted when wheel events with non-zero
X deltas were intercepted by the overflow areas.
Fix by storing a small history of wheel events deltas and using
it to determine of the scroll gesture is primarily vertical or horizontal.
When this is detected, avoid dispatching scroll events on the on the
non-dominant axis.
Currently this behavior is conditionalized to only apply in iTunes.
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::recordWheelEventDelta):
(WebCore::deltaIsPredominantlyVertical):
(WebCore::EventHandler::dominantScrollGestureDirection):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::defaultWheelEventHandler):
* page/EventHandler.h:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsITunes):
* platform/RuntimeApplicationChecks.h:
2013-08-23 Pratik Solanki
MediaQuery::expressions() should return a reference
Reviewed by Anders Carlsson.
m_expressions is never NULL so we can just return a reference.
* css/MediaList.cpp:
(WebCore::reportMediaQueryWarningIfNeeded):
* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery):
* css/MediaQuery.h:
(WebCore::MediaQuery::expressions):
* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::eval):
2013-08-23 Ryosuke Niwa
Build fix after r154515.
* dom/ElementTraversal.h:
(WebCore::Traversal::firstChild):
(WebCore::Traversal::lastChild):
2013-08-23 Andreas Kling
Simplify some Settings access where we have a Frame in reach.
Reviewed by Anders Carlsson.
In three cases where we can grab at a Frame, we can reach all the way to some Settings
without having to use pointers.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::addToOverlapMap):
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2013-08-23 Jer Noble
REGRESSION (r150516): Media controls are messed up on right-to-left webpages
https://bugs.webkit.org/show_bug.cgi?id=120234
Reviewed by Dan Bernstein.
Test: media/video-rtl.html
Make the media control panel explicitly direction:ltr. The captions menu and captions
display are unaffected, so rtl content will continue to appear rtl there.
* css/mediaControls.css:
(audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2013-08-23 Beth Dakin
REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in
Adobe Reader
https://bugs.webkit.org/show_bug.cgi?id=120240
-and corresponding-
Reviewed by Anders Carlsson.
This patch makes it so that we don’t use the infinite rect for the PDF context,
and it adds WebCoreSystemInterface API to find out if the current content is the
PDF context.
* WebCore.exp.in:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::clipOut):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2013-08-23 Eric Carlson
[Mac] some track language tags are not recognized
https://bugs.webkit.org/show_bug.cgi?id=119643
Reviewed by Jere Noble.
No new tests, existing tests updated.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_captionDisplayMode from settings
if possible.
(WebCore::HTMLMediaElement::configureTextTrackGroup): Don't enable a default track when preferences
say captions should be disabled. Don't disable an already visible track if we don't find
a match unless preferences say captions should be disabled. m_forcedOrAutomaticSubtitleTrackLanguage ->
m_subtitleTrackLanguage.
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): If the language of the primary
audio track changes, only kick off a text track recalc if caption preference are set to "automatic".
* html/HTMLMediaElement.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): Initialize m_characteristicsChanged
and m_delayCharacteristicsChangedNotification.
(WebCore::MediaPlayerPrivateAVFoundation::setHasVideo): Call characteristicsChanged.
(WebCore::MediaPlayerPrivateAVFoundation::setHasAudio): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::setHasClosedCaptions): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::characteristicsChanged): New, allows us to coalesce
calls to the media player when we know several characteristics may change.
(WebCore::MediaPlayerPrivateAVFoundation::setDelayCharacteristicsChangedNotification): Enable or
disable notification delay.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Always call languageOfPrimaryAudioTrack(),
a track may have changed so we may have a new language.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Call [AVAssetTrack languageCode]
if [AVAssetTrack extendedLanguageTag] returns NULL in case the media file has an old
QuickTime language code.
2013-08-23 Andreas Kling
RenderView::compositor() should return a reference.
Reviewed by Beth Dakin.
The RenderLayerCompositor is lazily constructed by compositor() and never returns null.
2013-08-23 Yoav Weiss
Fix srcset's image candidate algorithm when DPR exceeds all candidates
https://bugs.webkit.org/show_bug.cgi?id=120168
When the DPR exceeded the 'x' qualifier of all image candidates, none was chosen.
From the srcset spec: "If there are any entries in candidates that have an associated pixel density that is less than a
user-agent-defined value giving the nominal pixel density of the display, then remove them, unless that would remove all the
entries, in which case remove only the entries whose associated pixel density is less than the greatest such pixel density."
Fixed by returning the last one in the list of candidates sorted by their qualifier, in case none of them is equal or greater than
DPR.
Reviewed by Andreas Kling.
Test: fast/hidpi/image-srcset-fraction.html
* html/parser/HTMLParserIdioms.cpp:
(WebCore::bestFitSourceForImageAttributes):
2013-08-23 Chris Fleizach
Webkit exposes aria-expanded="undefined" as aria-expanded="false" (AXExpanded = NO)
Reviewed by Darin Adler.
Don't support the ARIA expanded attribute unless the value is one of the defined ARIA values (true/false).
Test: platform/mac/accessibility/aria-expanded-not-exposed-when-undefined.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsARIAExpanded):
2013-08-17 Darin Adler
Some cleanup for PasteboardIOS
Reviewed by Andreas Kling.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::setFrame): Moved this function up near the
create functions and constructors.
(WebCore::documentFragmentWithRTF): Tweaked formatting.
(WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
Ditto.
(WebCore::utiTypeFromCocoaType): Changed to use early return and removed
an unneeded local variable.
(WebCore::cocoaTypeFromHTMLClipboardType): Renamed the quaint qType and
pbType local variables, and tweaked formatting.
(WebCore::Pasteboard::clear): Tweaked comment.
(WebCore::Pasteboard::readString): Tweaked formatting.
(WebCore::addHTMLClipboardTypesForCocoaType): Tweaked formatting.
(WebCore::Pasteboard::writeString): Streamlined logic and tweaked formatting
(WebCore::Pasteboard::types): Renamed pbType to just type.
2013-08-23 Bem Jones-Bey
Attempt to make it more clear what FloatIntervalSearchAdaptor::collectIfNeeded is doing
https://bugs.webkit.org/show_bug.cgi?id=119816
Reviewed by David Hyatt.
This is a port from Blink of
https://src.chromium.org/viewvc/blink?revision=155885&view=revision
Original Patch by Eric Seidel
Original comments:
"It seemed to me that template specifications would be clearer than an
if. They also allow for compile-time error checking were a 3rd type
of float to come into existance in CSS4. :p
For any unfamiliar with this method, this the object used for
performing a search on a RedBlackTree in WTF.
We create one of these adaptors, specifying that we want to search for
values in a specific (logical) Y interval, and this adaptor is called
back for any values in the RBTree cooresponding to that interval
range.
The job of this adaptor is to collect the various values we care
about, including the left or right-most offset of the floats in that
Y-range as well as what the last (document order) float seen in that
range.
It also collects the remaining available height for the block but I'm
less clear on how that parameter is used."
Note that in addition to the original change, I have made the
updateOffsetIfNeeded and rangesIntersect methods inline, as this was
shown to be a performance win in
https://src.chromium.org/viewvc/blink?revision=156064&view=revision
and it seemed a rather trivial change to be subject to a separate
patch when porting.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::::updateOffsetIfNeeded):
(WebCore::::collectIfNeeded):
* rendering/RenderBlock.h:
2013-08-23 David Kilzer
WebCore fails to link due to changes in Objective-C++ ABI in trunk clang
Reviewed by Eric Carlson.
The trunk version of clang made an ABI change for Objective-C++
parameters that caused WebCore to fail to link. The short-term
fix is to change the parameter type from id to just id
and add an ASSERT that the parameter still conforms to the
protocol.
* platform/DragData.h:
(DragDataRef): Change typedef from id to id.
* platform/mac/DragDataMac.mm:
(WebCore::DragData::DragData): Add ASSERT that checks that the
DragDataRef object implements the NSDragInfo protocol.
2013-08-23 Andreas Kling
RenderLayerCompositor::m_renderView should be a reference.
Reviewed by Antti Koivisto.
The RenderLayerCompositor is always created by a RenderView passing itself to the constructor.
By making m_renderView a reference, we flush out some unnecessary null checks.
We also gain a pointer-free path to Settings through m_renderView.frameView().frame().settings()
so we don't have to make those blocks conditional anymore, reducing ambiguity.
* rendering/RenderLayerCompositor.cpp:
* rendering/RenderLayerCompositor.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::compositor):
2013-08-23 Andreas Kling
RenderView::frameView() should return a reference.
Reviewed by Antti Koivisto.
A RenderView should always have a corresponding FrameView, so make frameView()
return a reference. Also remove a myriad of now-impossible null checks.
2013-08-23 Allan Sandfeld Jensen
REGRESSION(r153939) Fix typo in Qt build-files
Reviewed by Antti Koivisto.
Fix simple typo in Target.pri introduced in r153939.
* Target.pri:
2013-08-23 Antti Koivisto
Add Traversal template
Reviewed by Andreas Kling.
It is common to traverse through a subtree looking for elements of specific type and then casting to the type. This pattern can be generalized.
This patch adds a new Traversal template. It works like ElementTraversal except that the traversal is limited to the specified type.
The patch also uses the template in a bunch of applicable places.
* WebCore.exp.in:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addImageMapChildren):
* dom/Document.cpp:
(WebCore::Document::removeTitle):
(WebCore::Document::updateBaseURL):
(WebCore::Document::processBaseElement):
* dom/Element.h:
* dom/ElementTraversal.h:
(WebCore::::firstChildTemplate):
(WebCore::::firstWithinTemplate):
(WebCore::::lastChildTemplate):
(WebCore::::lastWithinTemplate):
(WebCore::::nextTemplate):
(WebCore::::previousTemplate):
(WebCore::::nextSiblingTemplate):
(WebCore::::previousSiblingTemplate):
(WebCore::::nextSkippingChildrenTemplate):
(WebCore::::firstChild):
(WebCore::::lastChild):
(WebCore::::firstWithin):
(WebCore::::lastWithin):
(WebCore::::next):
(WebCore::::previous):
(WebCore::::nextSibling):
(WebCore::::previousSibling):
(WebCore::::nextSkippingChildren):
(WebCore::ElementTraversal::previousIncludingPseudo):
(WebCore::ElementTraversal::nextIncludingPseudo):
(WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
(WebCore::ElementTraversal::pseudoAwarePreviousSibling):
* dom/Node.cpp:
(WebCore::Node::numberOfScopedHTMLStyleChildren):
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::NodeIterator):
* dom/NodeIterator.h:
* dom/Traversal.cpp:
(WebCore::NodeIteratorBase::NodeIteratorBase):
(WebCore::NodeIteratorBase::acceptNode):
* dom/Traversal.h:
Renamed existing class called Traversal to less generic NodeIteratorBase.
* dom/TreeScope.cpp:
(WebCore::TreeScope::labelElementForId):
(WebCore::TreeScope::findAnchor):
* dom/TreeWalker.cpp:
(WebCore::TreeWalker::TreeWalker):
* dom/TreeWalker.h:
* editing/FrameSelection.cpp:
(WebCore::scanForForm):
* editing/markup.cpp:
(WebCore::createContextualFragment):
* html/HTMLAnchorElement.h:
(WebCore::isHTMLAnchorElement):
(WebCore::HTMLAnchorElement):
* html/HTMLAreaElement.h:
(WebCore::isHTMLAreaElement):
(WebCore::HTMLAreaElement):
* html/HTMLBaseElement.h:
(WebCore::isHTMLBaseElement):
(WebCore::HTMLBaseElement):
* html/HTMLElement.h:
(WebCore::HTMLElement):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
(WebCore::HTMLFieldSetElement::childrenChanged):
(WebCore::HTMLFieldSetElement::legend):
* html/HTMLFormControlElement.h:
(WebCore::toHTMLFormControlElement):
(WebCore::HTMLFormControlElement):
* html/HTMLLabelElement.cpp:
(WebCore::nodeAsSupportedLabelableElement):
(WebCore::HTMLLabelElement::control):
* html/HTMLLabelElement.h:
(WebCore::isHTMLLabelElement):
(WebCore::HTMLLabelElement):
* html/HTMLLegendElement.h:
(WebCore::isHTMLLegendElement):
(WebCore::HTMLLegendElement):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::mapMouseEvent):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::finishParsingChildren):
* html/HTMLStyleElement.h:
(WebCore::isHTMLStyleElement):
(WebCore::HTMLStyleElement):
* html/HTMLTitleElement.h:
(WebCore::HTMLTitleElement):
* html/HTMLTrackElement.h:
(WebCore::isHTMLTrackElement):
(WebCore::HTMLTrackElement):
* html/LabelableElement.h:
(WebCore::isLabelableElement):
(WebCore::LabelableElement):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::buildReferenceFilter):
* svg/SVGElement.h:
(WebCore::SVGElement):
* svg/SVGForeignObjectElement.h:
(WebCore::isSVGForeignObjectElement):
(WebCore::SVGForeignObjectElement):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
(WebCore::SVGSVGElement::getElementById):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::title):
* svg/SVGTitleElement.h:
(WebCore::SVGTitleElement):
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::isSMILElement):
* svg/animation/SVGSMILElement.h:
(WebCore::SVGSMILElement):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::hasSingleSecurityOrigin):
2013-08-23 Arpita Bahuguna
does not get deleted when inlined after some non-textual content.
https://bugs.webkit.org/show_bug.cgi?id=120006
Reviewed by Ryosuke Niwa.
deleteSelectionCommand does not handle the case when a element is
inlined after some non-textual content (input controls, image etc.).
When doing a back-delete at the start of a line following such a
the two contiguous lines should merge and the should get deleted.
Currently, even though the is deleted, another placeholder
is incorrectly inserted at the same point, thus effectively there is no
change.
We are incorrectly computing the inline to be at the start of an
empty line even though the line is not empty.
Test: editing/deleting/delete-inline-br.html
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
Adding a check to verify that the inline is not on an empty line
if the end node is not a element itself and it's previous sibling
is the start element.
Basically we check whether there is another node (end node) following
the , that the node is not a itself, and that the end node's
previous node is the start .
2013-08-23 Renata Hodovan
Missing null-check in HTMLFormElement::rendererIsNeeded()
https://bugs.webkit.org/show_bug.cgi?id=120159
Reviewed by Ryosuke Niwa.
Null-check parentRenderer in HTMLFormElement::rendererIsNeeded()
and early return.
Test: fast/forms/missing-parentrenderer-crash.html
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::rendererIsNeeded):
2013-08-23 Zalan Bujtas
MathML: ASSERTION FAILED: !isPreferredLogicalHeightDirty() in RenderMathMLBlock::preferredLogicalHeight() const
https://bugs.webkit.org/show_bug.cgi?id=120157
Reviewed by Antti Koivisto.
RenderListMarker needs to be inserted to the render tree before
we start computing the preferred logical widths for the associated
RenderListItem.
Test: mathml/mn-as-list-item-assert.html
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
(WebCore::RenderListItem::layout):
(WebCore::RenderListItem::computePreferredLogicalWidths):
* rendering/RenderListItem.h:
2013-08-22 Gyuyoung Kim
Introduce toSVGLinearGradientElement(), and use it
https://bugs.webkit.org/show_bug.cgi?id=120154
Reviewed by Andreas Kling.
As a step to clean-up static_cast, toSVGLinearGradientElement() is added to clean-up
static_cast.
* rendering/svg/RenderSVGResourceLinearGradient.cpp:
(WebCore::RenderSVGResourceLinearGradient::collectGradientAttributes):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::collectGradientAttributes):
* svg/SVGLinearGradientElement.h:
(WebCore::toSVGLinearGradientElement):
2013-08-22 Simon Fraser
compositing/geometry/bounds-ignores-hidden-dynamic.html has incorrect initial rendering
https://bugs.webkit.org/show_bug.cgi?id=119825
Reviewed by Tim Horton.
r137526 and some earlier commits attempted to avoid unconditionally
repainting layers when their size changes, because this was causing
TiledBacking layers to repaint when the document size changed.
However, the approach required that we have good information about
whether size changes require a repaint, which in some cases is hard
to determine, especially when RenderLayer changes affect our
decisions about which layers are composited.
Fix by pushing the decision about whether to repaint on size change
into GraphicsLayer. The default is to repaint on size change,
but GraphicsLayer provides a function that can be overridden to
modify this behavior; GraphicsLayerCA does so to avoid repaints
when layers with TiledBackings get resized.
Test: compositing/repaint/repaint-on-layer-grouping-change.html
* WebCore.exp.in: WebKit2 needs GraphicsLayer::setSize, which is no longer inline.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::setOffsetFromRenderer):
(WebCore::GraphicsLayer::setSize):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::shouldRepaintOnSizeChange):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::shouldRepaintOnSizeChange):
* platform/graphics/ca/GraphicsLayerCA.h:
* rendering/RenderLayerBacking.h: No longer need m_boundsConstrainedByClipping
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::updateCompositedBounds):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): setSize takes
care of repainting for us now, so we can remove all the conditional code.
2013-08-22 Simon Fraser
Repaint counters are sometimes not in the corner of the compositing layer
https://bugs.webkit.org/show_bug.cgi?id=120176
Reviewed by Beth Dakin.
Sometimes the repaint counters are not in the corner of the compositing layer;
they are either inset, or partially or entirely outside the layer.
Fix by making sure that we restore the CGContext before drawing
the counter, since the WebCore code may have translated the CTM.
The counter-painting code saves and restores the context itself,
so this is safe.
* platform/graphics/mac/WebLayer.mm:
(drawLayerContents):
2013-08-22 Tim Horton
Unavailable plug-in indicator text is one pixel too low
https://bugs.webkit.org/show_bug.cgi?id=120177
Reviewed by Kevin Decker.
Move the unavailable plug-in indicator text up one pixel.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintReplaced):
2013-08-22 Christophe Dumez
[SVG2] Merge SVGStyledElement and SVGElement
https://bugs.webkit.org/show_bug.cgi?id=107386
Reviewed by Andreas Kling.
Merge SVGStyledElement into SVGElement to simplify the SVG inheritance
model and match the SVG2 specification:
https://svgwg.org/svg2-draft/single-page.html#types-InterfaceSVGElement
Test: svg/dom/svg2-inheritance.html
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeText):
(WebCore::AccessibilityNodeObject::accessibilityDescription):
* css/SVGCSSStyleSelector.cpp:
* rendering/style/SVGRenderStyle.cpp:
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::RenderSVGContainer):
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGHiddenContainer.cpp:
(WebCore::RenderSVGHiddenContainer::RenderSVGHiddenContainer):
* rendering/svg/RenderSVGHiddenContainer.h:
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::RenderSVGModelObject):
(WebCore::getElementCTM):
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceMarker.cpp:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::RenderSVGRoot):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGViewportContainer.cpp:
(WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer):
* rendering/svg/RenderSVGViewportContainer.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):
* rendering/svg/SVGRenderTreeAsText.cpp:
* rendering/svg/SVGResources.cpp:
(WebCore::registerPendingResource):
* rendering/svg/SVGResourcesCache.cpp:
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::title):
* svg/SVGAllInOne.cpp:
* svg/SVGAltGlyphDefElement.h:
* svg/SVGAltGlyphItemElement.h:
* svg/SVGAnimateElement.cpp:
* svg/SVGAnimatedType.cpp:
(WebCore::SVGAnimatedType::valueAsString):
(WebCore::SVGAnimatedType::setValueAsString):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
(WebCore::SVGAnimationElement::computeCSSPropertyValue):
(WebCore::SVGAnimationElement::adjustForInheritance):
(WebCore::inheritsFromProperty):
* svg/SVGComponentTransferFunctionElement.h:
* svg/SVGCursorElement.h:
* svg/SVGDescElement.cpp:
(WebCore::SVGDescElement::SVGDescElement):
* svg/SVGDescElement.h:
* svg/SVGDescElement.idl:
* svg/SVGElement.cpp:
(WebCore::mapAttributeToCSSProperty):
(WebCore::cssPropertyToTypeMap):
(WebCore::SVGElement::SVGElement):
(WebCore::SVGElement::~SVGElement):
(WebCore::SVGElement::removedFrom):
(WebCore::SVGElement::parseAttribute):
(WebCore::SVGElement::animatedPropertyTypeForAttribute):
(WebCore::collectInstancesForSVGElement):
(WebCore::SVGElement::isAnimatableAttribute):
(WebCore::SVGElement::title):
(WebCore::SVGElement::rendererIsNeeded):
(WebCore::SVGElement::cssPropertyIdForSVGAttributeName):
(WebCore::SVGElement::isAnimatableCSSProperty):
(WebCore::SVGElement::isPresentationAttribute):
(WebCore::SVGElement::collectStyleForPresentationAttribute):
(WebCore::SVGElement::isKnownAttribute):
(WebCore::SVGElement::svgAttributeChanged):
(WebCore::SVGElement::insertedInto):
(WebCore::SVGElement::buildPendingResourcesIfNeeded):
(WebCore::SVGElement::childrenChanged):
(WebCore::SVGElement::getPresentationAttribute):
(WebCore::SVGElement::instanceUpdatesBlocked):
(WebCore::SVGElement::setInstanceUpdatesBlocked):
(WebCore::SVGElement::localCoordinateSpaceTransform):
(WebCore::SVGElement::updateRelativeLengthsInformation):
(WebCore::SVGElement::isMouseFocusable):
(WebCore::SVGElement::isKeyboardFocusable):
* svg/SVGElement.h:
(WebCore::SVGElement::supportsMarkers):
(WebCore::SVGElement::hasRelativeLengths):
(WebCore::SVGElement::needsPendingResourceHandling):
(WebCore::SVGElement::selfHasRelativeLengths):
(WebCore::SVGElement::updateRelativeLengthsInformation):
* svg/SVGElement.idl:
* svg/SVGElementInstance.cpp:
(WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
(WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
* svg/SVGElementInstance.h:
* svg/SVGFEBlendElement.idl:
* svg/SVGFEColorMatrixElement.idl:
* svg/SVGFEComponentTransferElement.idl:
* svg/SVGFECompositeElement.idl:
* svg/SVGFEConvolveMatrixElement.idl:
* svg/SVGFEDiffuseLightingElement.idl:
* svg/SVGFEDisplacementMapElement.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEFloodElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEImageElement.idl:
* svg/SVGFELightElement.h:
* svg/SVGFEMergeElement.idl:
* svg/SVGFEMergeNodeElement.h:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFEOffsetElement.idl:
* svg/SVGFESpecularLightingElement.idl:
* svg/SVGFETileElement.idl:
* svg/SVGFETurbulenceElement.idl:
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::SVGFilterElement):
(WebCore::SVGFilterElement::parseAttribute):
(WebCore::SVGFilterElement::svgAttributeChanged):
(WebCore::SVGFilterElement::childrenChanged):
* svg/SVGFilterElement.h:
* svg/SVGFilterElement.idl:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
(WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
(WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
(WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
(WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::SVGFontElement):
* svg/SVGFontElement.h:
* svg/SVGFontFaceElement.cpp:
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceFormatElement.h:
* svg/SVGFontFaceNameElement.h:
* svg/SVGFontFaceSrcElement.h:
* svg/SVGFontFaceUriElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::rendererIsNeeded):
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::SVGGlyphElement):
(WebCore::SVGGlyphElement::parseAttribute):
(WebCore::SVGGlyphElement::insertedInto):
(WebCore::SVGGlyphElement::removedFrom):
* svg/SVGGlyphElement.h:
* svg/SVGGlyphRefElement.cpp:
(WebCore::SVGGlyphRefElement::SVGGlyphRefElement):
(WebCore::SVGGlyphRefElement::parseAttribute):
* svg/SVGGlyphRefElement.h:
* svg/SVGGlyphRefElement.idl:
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::SVGGradientElement):
(WebCore::SVGGradientElement::parseAttribute):
(WebCore::SVGGradientElement::svgAttributeChanged):
(WebCore::SVGGradientElement::childrenChanged):
* svg/SVGGradientElement.h:
* svg/SVGGradientElement.idl:
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::SVGGraphicsElement):
(WebCore::SVGGraphicsElement::parseAttribute):
(WebCore::SVGGraphicsElement::svgAttributeChanged):
* svg/SVGGraphicsElement.h:
* svg/SVGGraphicsElement.idl:
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::computeCTM):
* svg/SVGMPathElement.h:
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::SVGMarkerElement):
(WebCore::SVGMarkerElement::parseAttribute):
(WebCore::SVGMarkerElement::svgAttributeChanged):
(WebCore::SVGMarkerElement::childrenChanged):
* svg/SVGMarkerElement.h:
* svg/SVGMarkerElement.idl:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::SVGMaskElement):
(WebCore::SVGMaskElement::parseAttribute):
(WebCore::SVGMaskElement::svgAttributeChanged):
(WebCore::SVGMaskElement::childrenChanged):
* svg/SVGMaskElement.h:
* svg/SVGMaskElement.idl:
* svg/SVGMetadataElement.h:
* svg/SVGMissingGlyphElement.cpp:
(WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
* svg/SVGMissingGlyphElement.h:
* svg/SVGMissingGlyphElement.idl:
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::SVGPatternElement):
(WebCore::SVGPatternElement::parseAttribute):
(WebCore::SVGPatternElement::svgAttributeChanged):
(WebCore::SVGPatternElement::childrenChanged):
* svg/SVGPatternElement.h:
* svg/SVGPatternElement.idl:
* svg/SVGScriptElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::SVGStopElement):
(WebCore::SVGStopElement::parseAttribute):
(WebCore::SVGStopElement::svgAttributeChanged):
* svg/SVGStopElement.h:
* svg/SVGStopElement.idl:
* svg/SVGStyleElement.h:
* svg/SVGStyledElement.cpp: Removed.
* svg/SVGStyledElement.h: Removed.
* svg/SVGStyledElement.idl: Removed.
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::SVGSymbolElement):
(WebCore::SVGSymbolElement::parseAttribute):
(WebCore::SVGSymbolElement::svgAttributeChanged):
* svg/SVGSymbolElement.h:
* svg/SVGSymbolElement.idl:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::insertedInto):
(WebCore::SVGTRefElement::removedFrom):
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::SVGTitleElement):
(WebCore::SVGTitleElement::insertedInto):
* svg/SVGTitleElement.h:
* svg/SVGTitleElement.idl:
* svg/SVGTransformable.cpp:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::selfHasRelativeLengths):
* svg/SVGViewElement.cpp:
(WebCore::SVGViewElement::SVGViewElement):
(WebCore::SVGViewElement::parseAttribute):
* svg/SVGViewElement.h:
* svg/animation/SVGSMILElement.h:
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):
2013-08-22 Andreas Kling
FrameLoader::history() should return a reference.
Reviewed by Anders Carlsson.
Rehued by Anders Carlsson.
FrameLoader::m_history is never null, so make history() return a reference.
Also made HistoryController::m_frame a reference, since HistoryController's
lifetime is tied to FrameLoader, which is tied to the Frame.
2013-08-21 Simon Fraser
Reloading this video test shows garbage briefly
https://bugs.webkit.org/show_bug.cgi?id=119377
Reviewed by Anders Carlson.
RenderVideo should not claim that it's foreground is opaque
unless it has a video frame to display.
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::foregroundIsKnownToBeOpaqueInRect):
2013-08-22 Andreas Kling
Remove accidental cruft from r154449.
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::destroy):
2013-08-22 Andreas Kling
FrameLoader: frame() and client() should return references.
Reviewed by Anders Carlsson.
These two are never null so change them to return references.
2013-08-22 Andrei Bucur
RenderNamedFlowThread should not create NodeRenderingContext objects
https://bugs.webkit.org/show_bug.cgi?id=119923
Reviewed by Antti Koivisto.
Port of https://chromium.googlesource.com/chromium/blink/+/949d7d7e7b8685454742a55cf0ca912bb9a7b177.
Original patch by Elliott Sprehn.
RenderNamedFlowThread should not create NodeRenderingContext objects
RenderNamedFlowThread is using NodeRenderingContext to get the original
parent renderer, but should just be using NodeRenderingTraversal::parent
instead (which is what NodeRenderingContext does internally anyway).
Tests: No change in functionality. No new tests.
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::isChildAllowed):
2013-08-22 Christophe Dumez
Introduce a SVGUnknownElement class for unknown SVG elements
https://bugs.webkit.org/show_bug.cgi?id=120155
Reviewed by Andreas Kling.
Introduce a SVGUnknownElement class and have it override rendererIsNeeded() to return false.
We now use SVGUnknownElement type (instead of SVGElement) for unknown SVG elements:
- Unknown Elements in SVG namespace
- Registered custom tag elements in SVG namespace:
http://www.w3.org/TR/2013/WD-custom-elements-20130514/#registering-custom-elements
As a consequence, SVGElement::rendererIsNeeded() is not longer required to return false and
it will be able to behave as SVGStyledElement::rendererIsNeeded() once we merge
SVGStyledElement into SVGElement.
This is a pre-requirement to merging SVGStyledElement into SVGElement.
No new tests, no behavior change.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* dom/CustomElementConstructor.cpp:
(WebCore::CustomElementConstructor::createElementInternal):
* dom/make_names.pl:
(defaultParametersHash):
(printJSElementIncludes):
(printWrapperFunctions):
(printWrapperFactoryCppFile):
* svg/SVGElement.cpp:
* svg/SVGElement.h:
* svg/SVGUnknownElement.h: Added.
(WebCore::SVGUnknownElement::create):
(WebCore::SVGUnknownElement::SVGUnknownElement):
* svg/svgtags.in:
2013-08-22 Rob Buis
REGRESSION: Assertion failure !collection->hasExactlyOneItem() in WebCore::namedItemGetter
https://bugs.webkit.org/show_bug.cgi?id=118056
Reviewed by Ryosuke Niwa.
The assert is hit in Debug mode because the DocumentOrderedMap in HTMLDocument::m_windowNamedItem
includes matched SVG elements, but the WindowNameCollection used to collect the elements does not.
This means the HTMLCollection stripped of SVG elements could end up hitting the empty or single item
assertion, which the testcase verifies.
To fix this change WindowNameCollection to include both SVG and HTML elements so it matches DocumentOrderedMap.
Tests: svg/custom/document-all-includes-svg.html
svg/custom/window-named-item-lookup.html
* html/HTMLCollection.cpp:
(WebCore::isMatchingElement):
(WebCore::HTMLCollection::updateNameCache):
2013-08-22 Gyuyoung Kim
Introduce toSVGRadialGradientElement(), and use it
https://bugs.webkit.org/show_bug.cgi?id=120153
Reviewed by Andreas Kling.
As a step to clean-up static_cast, toSVGRadialGradientElement() is added to clean-up
static_cast.
* rendering/svg/RenderSVGResourceRadialGradient.cpp:
(WebCore::RenderSVGResourceRadialGradient::collectGradientAttributes):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::collectGradientAttributes):
* svg/SVGRadialGradientElement.h:
(WebCore::toSVGRadialGradientElement):
2013-08-22 Renata Hodovan
ASSERTION FAILED: extractedStyle in WebCore::ApplyStyleCommand::removeInlineStyleFromElement
https://bugs.webkit.org/show_bug.cgi?id=119672
Reviewed by Darin Adler.
The last extractedStyle parameter of removeInlineStyleFromElement() is not mandatory and it's set
to default 0. This way we have to check its existence before the usage.
Test: editing/execCommand/extracted_style_assert.html
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
2013-08-21 Commit Queue
Unreviewed, rolling out r154416.
http://trac.webkit.org/changeset/154416
https://bugs.webkit.org/show_bug.cgi?id=120147
Broke Windows builds (Requested by rniwa on #webkit).
* WebCore.vcxproj/WebCoreGenerated.make:
* WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
* WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
* WebCore.vcxproj/build-generated-files.sh:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
2013-08-21 Ryuan Choi
[EFL] Unreviewed build fix after r154430.
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::hasFilters): Added CSS_FILTERS guard.
2013-08-21 Simon Fraser
Setting -webkit-filter: in :active selector causes failure to redraw
https://bugs.webkit.org/show_bug.cgi?id=120135
Reviewed by Jer Noble.
When removing a filter on an inline child of a compositing layer,
the inline loses its RenderLayer and compositing layer, but we fail to
repaint the compositing layer that the inline is now painting into.
This worked correctly for opacity, because opacity toggles cause
layouts (which then paint the correct layer), so do the same for filters.
Test: css3/filters/remove-filter-repaint.html
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout): Return true if we toggled
between having filters and not. Drive-by cleanup, making use of new convenience
function for hasOpacity().
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::hasFilters): Returns true if we have any
filters.
* rendering/style/StyleRareNonInheritedData.h:
(WebCore::StyleRareNonInheritedData::hasOpacity): Convenience function that
returns true if opacity is < 1.
2013-08-21 Gavin Barraclough
https://bugs.webkit.org/show_bug.cgi?id=120139
PropertyDescriptor argument to define methods should be const
Rubber stamped by Sam Weinig.
This should never be modified, and this way we can use rvalues.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::defineOwnProperty):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::defineOwnProperty):
(WebCore::JSLocationPrototype::defineOwnProperty):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
- make PropertyDescriptor const
2013-08-21 Jacky Jiang
[BlackBerry] Incorrect origin of indexOfTile in LayerTiler can cause unnecessary texture jobs and waste memory
Reviewed by Yong Li.
Internally reviewed by Arvid Nilsson.
JIRA 481356
The origin of indexOfTile(origin) is incorrect in these two places. For
example, if the maxXMaxYCorner of the rect is (768, 768), there can be
three other redundant indexOfTile (0, 1), (1, 0), (1, 1) which can cause
unnecessary texture jobs and waste memory.
The origin should be the top left of the bottom right pixel of a rect.
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::updateTextureContentsIfNeeded):
(WebCore::LayerTiler::processTextureJob):
2013-08-21 Simon Fraser
ASSERTION FAILED: !m_visibleDescendantStatusDirty on twitter
Reviewed by Beth Dakin.
In order to make decisions about compositing, the m_hasVisibleDescendant bit on RenderLayers
needs to be up-to-date when RenderLayerCompositor::computeCompositingRequirements is recursing
over the RenderLayer tree.
However, was possible for computeCompositingRequirements() to hit a layer whose m_visibleDescendantStatusDirty
bit was set; we only clear this bit from collectLayers() (when updating z-order lists), and from styleChanged()
which requires that style changed on the layer itself.
Fix by always calling updateDescendantDependentFlags() from computeCompositingRequirements().
Wasn't able to easily get a reduced testcase.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
2013-08-21 Alex Christensen
Separating Win32 and Win64 builds.
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCoreGenerated.make:
* WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
Pass PlatformArchitecture as a command line parameter to bash scripts
and use PlatformArchitecture to determine which directory to delete
while cleaning (obj32 or obj64).
* WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
Export PlatformArchitecture to be used by make and cmd scripts.
* WebCore.vcxproj/build-generated-files.sh:
Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
Use PlatformArchitecture to determine which directory to copy to (obj32 or obj64).
2013-08-21 Tim Horton
revalidateTiles and ensureTilesForRect can share a lot of code
https://bugs.webkit.org/show_bug.cgi?id=119282
Missed the review comments, whoops.
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::prepopulateRect):
(WebCore::TileController::revalidateTiles):
(WebCore::TileController::ensureTilesForRect):
2013-08-21 Andreas Kling
SVG elements always have custom style resolve callbacks.
Reviewed by Antti Koivisto.
Simplify SVGElement construction by making them opt in to custom style resolve callbacks
by default, and removing the ability to pass a custom ConstructionType to some subclass
constructors.
* dom/Node.h:
Add HasCustomStyleResolveCallbacksFlag to the CreateSVGElement mask.
* svg/SVGElement.cpp:
(WebCore::SVGElement::SVGElement):
* svg/SVGElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::SVGGElement):
* svg/SVGGElement.h:
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::SVGGraphicsElement):
* svg/SVGGraphicsElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::SVGStyledElement):
* svg/SVGStyledElement.h:
Remove calls to setHasCustomStyleResolveCallbacks() in SVGElement and subclasses.
Also remove unnecessary ConstructionType argument from subclasses since nobody
overrides it and everyone just uses CreateSVGElement.
2013-08-21 Tim Horton
revalidateTiles and ensureTilesForRect can share a lot of code
https://bugs.webkit.org/show_bug.cgi?id=119282
Reviewed by Simon Fraser.
No new tests, just a refactoring.
The bodies of ensureTilesForRect and revalidateTiles are nearly equivalent.
* platform/graphics/ca/mac/TileController.h:
Add an enum, NewTileType, to note whether the tiles created by ensureTilesForRect will
be primary coverage tiles or secondary out-of-view tiles.
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::prepopulateRect):
Move the code to see if we already have the requisite tiles in the
primary coverage rect, as well as our call to updateTileCoverageMap,
out into prepopulateRect, to generalize ensureTilesForRect.
(WebCore::TileController::revalidateTiles):
Make use of ensureTilesForRect. The platformCALayerDidCreateTiles call will happen there, now.
(WebCore::TileController::ensureTilesForRect):
Make ensureTilesForRect return the rect that it created tiles for, and only put
tiles in a cohort if we're creating secondary tiles.
2013-08-21 Tim Horton
isReplacementObscured is wrong when the indicator is clipped by an iframe
https://bugs.webkit.org/show_bug.cgi?id=120031
Reviewed by Simon Fraser.
Hit-test for plugin obscurity in the root document. To do this, we also need
to convert the indicator rectangle into root view coordinates before
hit testing its edges.
This resolves the case where an iframe which clips its content was reporting
the indicator as not obscured, despite the fact that it was obscured from the
point of view of the user.
Updated test plugins/unavailable-plugin-indicator-obscurity.html
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::isReplacementObscured):
2013-08-21 Andreas Kling
Frame::navigationScheduler() should return a reference.
Reviewed by Anders Carlzon.
Frame::m_navigationScheduler is an inline member, not a pointer.
2013-08-21 Tim Horton
REGRESSION(r154399): broke Mac ML debug WK1 tests > 50 crashes (Requested by thorton on #webkit).
https://bugs.webkit.org/show_bug.cgi?id=120129
Rolling out http://trac.webkit.org/changeset/154399.
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
* rendering/RenderBox.h:
2013-08-21 Andreas Kling
Frame::animation() should return a reference.
Reviewed by Anders Carlsson.
Frame::m_animationController is never null.
Also changed RenderObject::animation() to return a reference since it's just a wrapper
around RenderObject::frame()->animation() with no null checking of frame().
2013-08-21 Simon Fraser
Allow opacity to apply to custom scrollbars
https://bugs.webkit.org/show_bug.cgi?id=120104
Reviewed by David Hyatt.
Opacity was ignored custom scrollbar pseudoelements because custom scrollbar
renderers never create layers, and opacity is normally handled by the RenderLayer code.
Fix by having RenderScrollbarTheme and RenderScrollbarPart do the transparency
layers necessary for opacity. RenderScrollbarPart handles opacity for individual
parts.
Because ScrollbarThemeComposite::paint() renders the parts on after another (with
no nesting), opacity handling for the entire scrollbar needs special-casing.
This is done by willPaintScrollbar()/didPaintScrollbar() on the theme.
RenderScrollbarTheme consults the opacity the scrollbar (which we get from
the ScrollbarBGPart renderer) to decide whether to set up a transparency layer.
Test: scrollbars/scrollbar-parts-opacity.html
* platform/ScrollbarThemeComposite.cpp:
(WebCore::ScrollbarThemeComposite::paint):
* platform/ScrollbarThemeComposite.h:
(WebCore::ScrollbarThemeComposite::willPaintScrollbar):
(WebCore::ScrollbarThemeComposite::didPaintScrollbar):
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::opacity):
* rendering/RenderScrollbar.h:
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::paintIntoRect):
* rendering/RenderScrollbarTheme.cpp:
(WebCore::RenderScrollbarTheme::willPaintScrollbar):
(WebCore::RenderScrollbarTheme::didPaintScrollbar):
* rendering/RenderScrollbarTheme.h:
2013-08-21 Robert Hogan
REGRESSION(r127163): Respect clearance set on ancestors when placing floats
https://bugs.webkit.org/show_bug.cgi?id=119979
Reviewed by David Hyatt.
If a float has a self-collapsing ancestor with clearance then it needs to respect
that clearance when placing itself on the line.
Test: fast/block/margin-collapse/self-collapsing-block-with-float-descendant.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::marginOffsetForSelfCollapsingBlock):
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
* rendering/RenderBox.h:
(WebCore::RenderBox::previousInFlowSiblingBox):
2013-08-21 Brent Fulgham
[Windows] Enable CSS_IMAGE_SET
Reviewed by Anders Carlsson.
We can now activate:
fast/css/image-set-parsing.html
fast/css/image-set-parsing-invalid.html
* WebCore.vcxproj/WebCore.vcxproj: Add missing image set implementation files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* css/CSSAllInOne.cpp: Add missing CSSImageSetValue.cpp
* rendering/style/StyleAllInOne.cpp: Add missing StyeCachedImageSet.cpp
2013-08-21 Robert Hogan
In RenderTableCell::paintCollapsedBorders() check surrounding cells using physical rather than logical direction
https://bugs.webkit.org/show_bug.cgi?id=120074
Reviewed by David Hyatt.
No new tests, covered by existing tests.
The functions cellAbove(), cellBelow() etc. check the logical rather than the physical direction but they're being
used to decide the painting of the physical borders of the cell. As we paint all four sides of every cell, and
the borders of adjoining cells twice over, this has no impact on painting currently but making the check consistent
in its treatment of physical and logical direction will help with webkit.org/b/119759 and make the code less confusing
to the next guy.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::cellAtLeft):
(WebCore::RenderTableCell::cellAtRight):
(WebCore::RenderTableCell::cellAtTop):
(WebCore::RenderTableCell::cellAtBottom):
(WebCore::RenderTableCell::paintCollapsedBorders):
* rendering/RenderTableCell.h:
2013-08-21 Róbert Sipka
[curl] only include WebCoreBundleWin on Windows
Reviewed by Brent Fulgham.
The WebCoreBundleWin is a windows specific file, it is only needed on Windows.
* platform/network/curl/ResourceHandleManager.cpp:
2013-08-21 Jae Hyun Park
[Qt] Remove unused code path in PluginView
https://bugs.webkit.org/show_bug.cgi?id=113173
Reviewed by Anders Carlsson.
m_platformLayer in PluginView has been removed in r121710, but there are
still some leftover code path related to m_platformLayer. This patch
removes unused code path.
No new tests, removing unused code paths.
* plugins/PluginView.h:
(PluginView):
* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::updatePluginWidget):
(WebCore::PluginView::paint):
2013-08-21 Allan Sandfeld Jensen
Font’s fast code path doesn’t handle partial runs correctly when kerning or ligatures are enabled
https://bugs.webkit.org/show_bug.cgi?id=100050
Reviewed by Antti Koivisto.
Always let WidthIterator iterate over an entire TextRun to avoid problems
with pixel rounding or shaping on partial runs.
This fix is necessary for Qt because the complex font-path can not disable
shaping, leading to the complex path painting slighly different from the
fast path, which messes up selection painting.
No change in functionality, no new tests.
* platform/graphics/Font.cpp:
(WebCore::Font::drawText):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::selectionRectForText):
(WebCore::Font::offsetForPosition):
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::getGlyphsAndAdvancesForSimpleText):
(WebCore::Font::selectionRectForSimpleText):
(WebCore::Font::offsetForPositionForSimpleText):
* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::add):
(GlyphBuffer):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):
* platform/graphics/WidthIterator.h:
(WidthIterator): Removed now unused advanceOneCharacter method.
2013-08-20 Antonio Gomes
Harden RenderBox::canBeScrolledAndHasScrollableArea logic
https://bugs.webkit.org/show_bug.cgi?id=104373
Reviewed by Simon Fraser.
Previously if a say div has a overflown content on 'y' but is
styled as "overflow-x: auto; overflow-y: hidden", RenderBox::canBeProgramaticallyScrolled
would still return true. It interfers, among other things, with the way
autoscroll works.
Patch fixes it by adding two helper methods to RenderBox class in order to verify a box'
scrollability in a given axis (x or y); They are used when checking if a given box is in
fact programatically scrollable.
Test: fast/events/autoscroll-overflow-hidden-longhands.html
WebKit autoscroll behavior now matches Firefox and Opera12 (pre-blink)
in that sense.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::canBeProgramaticallyScrolled):
* rendering/RenderBox.h:
(WebCore::RenderBox::hasScrollableOverflowX):
(WebCore::RenderBox::hasScrollableOverflowY):
2013-08-19 Antonio Gomes
Text dragging can scroll overflow:hidden boxes
https://bugs.webkit.org/show_bug.cgi?id=119760
Reviewed by Darin Adler.
Consider the case of the following HTML:
If ones starts a text selection by dragging the mouse from within the input
field, and continues to drag beyong the outer div boundary, the latter will
be scrolled no matter its overflow:hidden style.
That happens because when the autoscroll has started, it gets propagated up
to the current layer's parent layer, instead of the to current layer's enclosing
scrollable layer.
Patch fixes the issue by hardening the way scrolling is
propagated upwards when autoscroll is being performed.
RenderLayer::enclosingScrollableLayer method also got rewritten
in terms of RenderLayer tree traversing, instead of RenderObject tree.
The rewrite adds support for cross frame upwards traversal.
Test: fast/events/autoscroll-upwards-propagation.html
* rendering/RenderLayer.cpp:
(WebCore::parentLayerCrossFrame):
(WebCore::RenderLayer::enclosingScrollableLayer):
(WebCore::RenderLayer::scrollRectToVisible):
2013-08-20 Jer Noble
[Mac] Suspended HTMLMediaElements can still hold power assertion after playback stops.
Reviewed by Eric Carlson.
Call updateDisplaySleep() when we clear our MediaPlayer, as doing so may kill any in-flight
rateChanged() notifications.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::stop):
2013-08-20 David Barr , Gyuyoung Kim
[CSS] Pass an image orientation data to drawImage()
Reviewed by Beth Dakin.
In support of ongoing css3-images image-orientation implementation. This patch passes
an imageOrientationDescription object to drawImage() function as a argument. The drawImage()
can know information of image orientation by the argument.
Spec: http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage):
(WebCore::drawImageToContext):
* platform/graphics/ImageOrientation.h: Add setter functions.
(WebCore::ImageOrientationDescription::setRespectImageOrientation):
(WebCore::ImageOrientationDescription::setImageOrientationEnum):
* platform/graphics/texmap/TextureMapperImageBuffer.cpp:
(WebCore::BitmapTextureImageBuffer::updateContents):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintNinePieceImage):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintIntoRect):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2013-08-20 Gavin Barraclough
https://bugs.webkit.org/show_bug.cgi?id=120093
Remove getOwnPropertyDescriptor trap
Reviewed by Geoff Garen.
All implementations of this method are now called via the method table, and equivalent in behaviour.
Remove all duplicate implementations (and the method table trap), and add a single member function implementation on JSObject.
* WebCore.exp.in:
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorDeclaration):
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bridge/jsc/BridgeJSC.h:
(JSC::Bindings::Instance::getOwnPropertySlot):
* bridge/objc/objc_runtime.h:
* bridge/objc/objc_runtime.mm:
* bridge/runtime_array.cpp:
* bridge/runtime_array.h:
* bridge/runtime_method.cpp:
* bridge/runtime_method.h:
* bridge/runtime_object.cpp:
* bridge/runtime_object.h:
- remove getOwnPropertyDescriptor
2013-08-20 Antti Koivisto
Replace NodeRenderingContext with Node* as childShouldCreateRenderer() argument
Reviewed by Darin Adler.
This simplifies the code. NodeRenderingContext was basically only used for getting the Node.
* dom/ContainerNode.h:
(WebCore::ContainerNode::childShouldCreateRenderer):
* dom/Element.cpp:
(WebCore::Element::childShouldCreateRenderer):
* dom/Element.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::shouldCreateRenderer):
* dom/NodeRenderingContext.h:
Move isOnEncapsulationBoundary() to InsertionPoint.h and call it hasShadowRootOrActiveInsertionPointParent().
Move isOnUpperEncapsulationBoundary() to ShadowRoot.h and call it hasShadowRootParent().
* dom/ShadowRoot.h:
(WebCore::hasShadowRootParent):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::childShouldCreateRenderer):
* html/HTMLDetailsElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::validationMessageShadowTreeContains):
* html/HTMLFormControlElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::childShouldCreateRenderer):
* html/HTMLMediaElement.h:
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::childShouldCreateRenderer):
* html/HTMLMeterElement.h:
* html/HTMLOptGroupElement.h:
(WebCore::isHTMLOptGroupElement):
* html/HTMLOptionElement.h:
(WebCore::isHTMLOptionElement):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::childShouldCreateRenderer):
* html/HTMLProgressElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::childShouldCreateRenderer):
* html/HTMLSelectElement.h:
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::childShouldCreateRenderer):
* html/HTMLSummaryElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::childShouldCreateRenderer):
(WebCore::enclosingTextFormControl):
* html/HTMLTextFormControlElement.h:
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::shadowTreeContains):
* html/ValidationMessage.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::rendererIsNeeded):
* html/shadow/InsertionPoint.h:
(WebCore::isActiveInsertionPoint):
Remove isShadowBoundary() as it was equivalent to isActive().
Remove isLowerEncapsulationBoundary() as it was equivalent to isActiveInsertionPoint().
(WebCore::hasShadowRootOrActiveInsertionPointParent):
Moved and renamed from NodeRenderingContext::isOnEncapsulationBoundary().
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::childShouldCreateRenderer):
* svg/SVGAElement.h:
* svg/SVGAltGlyphElement.cpp:
(WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
* svg/SVGAltGlyphElement.h:
* svg/SVGDocument.cpp:
(WebCore::SVGDocument::childShouldCreateRenderer):
* svg/SVGDocument.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::childShouldCreateRenderer):
* svg/SVGElement.h:
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::childShouldCreateRenderer):
* svg/SVGFilterElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::childShouldCreateRenderer):
* svg/SVGForeignObjectElement.h:
* svg/SVGSVGElement.h:
(WebCore::toSVGSVGElement):
* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::childShouldCreateRenderer):
* svg/SVGSwitchElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::childShouldCreateRenderer):
* svg/SVGTRefElement.h:
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::childShouldCreateRenderer):
* svg/SVGTSpanElement.h:
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::childShouldCreateRenderer):
* svg/SVGTextElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::childShouldCreateRenderer):
* svg/SVGTextPathElement.h:
2013-08-20 Benjamin Poulain
Don't bother using a Vector for the ouput of querySelector, just return the first element found
Reviewed by Ryosuke Niwa.
Simplify the case of querySelector. Instead of using the same output type as querySelectorAll,
simply use a trait to define what to do in the loop.
* dom/SelectorQuery.cpp:
(WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
(WebCore::SelectorDataList::queryAll):
(WebCore::SingleElementExtractorSelectorQueryTrait::appendOutputForElement):
(WebCore::SelectorDataList::queryFirst):
(WebCore::SelectorDataList::executeFastPathForIdSelector):
(WebCore::elementsForLocalName):
(WebCore::anyElement):
(WebCore::SelectorDataList::executeSingleTagNameSelectorData):
(WebCore::SelectorDataList::executeSingleClassNameSelectorData):
(WebCore::SelectorDataList::executeSingleSelectorData):
(WebCore::SelectorDataList::executeSingleMultiSelectorData):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:
2013-08-20 Antti Koivisto
Rollout the previous patch for landing with the correct ChangeLog.
013-08-20 Jacky Jiang
[BlackBerry] Remove unused previousTextureRect in LayerTiler
Reviewed by Rob Buis.
Internally reviewed by Mike Lattanzio and Jakob Petsovits.
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::updateTextureContentsIfNeeded):
2013-08-20 Antti Koivisto
Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
Reviewed by Darin Adler.
This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
* dom/Element.cpp:
(WebCore::Element::rendererIsNeeded):
* dom/Element.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
(WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::rendererIsNeeded):
* dom/PseudoElement.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::rendererIsNeeded):
* html/HTMLAppletElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::rendererIsNeeded):
* html/HTMLElement.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLEmbedElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::rendererIsNeeded):
* html/HTMLFormElement.h:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::rendererIsNeeded):
* html/HTMLFrameElement.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::rendererIsNeeded):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::rendererIsNeeded):
* html/HTMLIFrameElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::rendererIsNeeded):
* html/HTMLInputElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rendererIsNeeded):
* html/HTMLMediaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::rendererIsNeeded):
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::rendererIsNeeded):
* html/HTMLVideoElement.h:
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::rendererIsNeeded):
* html/shadow/DetailsMarkerControl.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::rendererIsNeeded):
* html/shadow/InsertionPoint.h:
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterShadowElement::rendererIsNeeded):
(WebCore::MeterInnerElement::rendererIsNeeded):
* html/shadow/MeterShadowElement.h:
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressShadowElement::rendererIsNeeded):
(WebCore::ProgressInnerElement::rendererIsNeeded):
* html/shadow/ProgressShadowElement.h:
* svg/SVGDescElement.h:
* svg/SVGElement.h:
(WebCore::SVGElement::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontElement.h:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::rendererIsNeeded):
* svg/SVGForeignObjectElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::rendererIsNeeded):
* svg/SVGGElement.h:
* svg/SVGGlyphElement.h:
* svg/SVGGlyphRefElement.h:
* svg/SVGHKernElement.h:
* svg/SVGMarkerElement.h:
* svg/SVGMissingGlyphElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::rendererIsNeeded):
* svg/SVGSVGElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::rendererIsNeeded):
* svg/SVGStopElement.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::rendererIsNeeded):
* svg/SVGStyledElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::rendererIsNeeded):
* svg/SVGTRefElement.h:
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::rendererIsNeeded):
* svg/SVGTSpanElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::rendererIsNeeded):
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.h:
* svg/SVGVKernElement.h:
* svg/SVGViewElement.h:
2013-08-20 Daniel Bates
Define Clipboard::hasData() only when building with drag support
Reviewed by Darin Adler.
Clipboard::hasData() is specific to drag-and-drop support. We should only define it when
such support is enabled.
* dom/Clipboard.cpp: Move hasData() to DRAG_SUPPORT section of the file.
* dom/Clipboard.h: Ditto.
2013-08-20 Antti Koivisto
Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
Reviewed by Darin Adler.
This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
* dom/Element.cpp:
(WebCore::Element::rendererIsNeeded):
* dom/Element.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
(WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::rendererIsNeeded):
* dom/PseudoElement.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::rendererIsNeeded):
* html/HTMLAppletElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::rendererIsNeeded):
* html/HTMLElement.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLEmbedElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::rendererIsNeeded):
* html/HTMLFormElement.h:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::rendererIsNeeded):
* html/HTMLFrameElement.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::rendererIsNeeded):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::rendererIsNeeded):
* html/HTMLIFrameElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::rendererIsNeeded):
* html/HTMLInputElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rendererIsNeeded):
* html/HTMLMediaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::rendererIsNeeded):
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::rendererIsNeeded):
* html/HTMLVideoElement.h:
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::rendererIsNeeded):
* html/shadow/DetailsMarkerControl.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::rendererIsNeeded):
* html/shadow/InsertionPoint.h:
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterShadowElement::rendererIsNeeded):
(WebCore::MeterInnerElement::rendererIsNeeded):
* html/shadow/MeterShadowElement.h:
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressShadowElement::rendererIsNeeded):
(WebCore::ProgressInnerElement::rendererIsNeeded):
* html/shadow/ProgressShadowElement.h:
* svg/SVGDescElement.h:
* svg/SVGElement.h:
(WebCore::SVGElement::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontElement.h:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::rendererIsNeeded):
* svg/SVGForeignObjectElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::rendererIsNeeded):
* svg/SVGGElement.h:
* svg/SVGGlyphElement.h:
* svg/SVGGlyphRefElement.h:
* svg/SVGHKernElement.h:
* svg/SVGMarkerElement.h:
* svg/SVGMissingGlyphElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::rendererIsNeeded):
* svg/SVGSVGElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::rendererIsNeeded):
* svg/SVGStopElement.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::rendererIsNeeded):
* svg/SVGStyledElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::rendererIsNeeded):
* svg/SVGTRefElement.h:
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::rendererIsNeeded):
* svg/SVGTSpanElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::rendererIsNeeded):
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.h:
* svg/SVGVKernElement.h:
* svg/SVGViewElement.h:
2013-08-20 Tim Horton
[Mac] Some inspector tests intermittently assert in InspectorOverlay::paint
Reviewed by Joseph Pecoraro.
Update the inspector overlay's layout before painting, if it is stale.
No new tests; fixes an intermittent assertion failure in some existing tests.
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::paint):
2013-08-20 Daniel Bates
Build fix after (https://webkit.org/b/119949);
declare Clipboard::hasData() when building with and without drag support
* dom/Clipboard.h:
2013-08-20 Hans Muller
[CSS Shapes] Complete RasterShape::firstIncludedIntervalLogicalTop()
Reviewed by Alexandru Chiculita.
Completed the implementation of RasterShape::firstIncludedIntervalLogicalTop(). The
method now computes first logical top location where a line segment can be laid
out within a RasterShape, i.e. a shape derived from an image valued URL resource.
A detailed description of the algorithm can be found in
http://hansmuller-webkit.blogspot.com/2013/08/first-fit-location-for-image-shapes.html.
The new tests exposed a bug in the existing getIncludedIntervals() method. A shape
with a vertical gap that spans the entire line now causes the method to short circuit
and return an empty interval list.
Tests: fast/shapes/shape-inside/shape-inside-image-003.html
fast/shapes/shape-inside/shape-inside-image-004.html
fast/shapes/shape-inside/shape-inside-image-005.html
* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::firstIncludedIntervalY):
(WebCore::RasterShapeIntervals::getIncludedIntervals):
(WebCore::RasterShape::firstIncludedIntervalLogicalTop):
* rendering/shapes/RasterShape.h:
2013-08-20 Pratik Solanki
Document::markers() should return a reference
Reviewed by Andreas Kling.
Document::m_markers is never NULL so return a reference from Document::markers(). Also mark
m_markers as const and initialize it in member initialization.
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore::Document::markers):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::isSpellingMarkerAllowed):
(WebCore::AlternativeTextController::applyAlternativeTextToRange):
(WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
(WebCore::AlternativeTextController::handleAlternativeTextUIResult):
(WebCore::AlternativeTextController::respondToChangedSelection):
(WebCore::AlternativeTextController::respondToAppliedEditing):
(WebCore::AlternativeTextController::respondToUnappliedEditing):
(WebCore::AlternativeTextController::markReversed):
(WebCore::AlternativeTextController::markCorrection):
(WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
(WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
(WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
(WebCore::AlternativeTextController::applyDictationAlternative):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
* editing/DictationCommand.cpp:
(WebCore::DictationMarkerSupplier::addMarkersToTextNode):
* editing/Editor.cpp:
(WebCore::Editor::ignoreSpelling):
(WebCore::Editor::learnSpelling):
(WebCore::Editor::advanceToNextMisspelling):
(WebCore::Editor::clearMisspellingsAndBadGrammar):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::changeBackToReplacedString):
(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
(WebCore::Editor::countMatchesForText):
(WebCore::Editor::setMarkedTextMatchesAreHighlighted):
(WebCore::Editor::respondToChangedSelection):
(WebCore::Editor::selectionStartHasMarkerFor):
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::didCheckSucceed):
* editing/SplitTextNodeCommand.cpp:
(WebCore::SplitTextNodeCommand::doApply):
(WebCore::SplitTextNodeCommand::doUnapply):
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::findFirstMisspelling):
(WebCore::TextCheckingHelper::findFirstGrammarDetail):
* page/FrameView.cpp:
(WebCore::FrameView::getTickmarks):
(WebCore::FrameView::paintContents):
* page/Page.cpp:
(WebCore::Page::unmarkAllTextMatches):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::spellingToolTip):
(WebCore::HitTestResult::replacedString):
(WebCore::HitTestResult::dictationAlternatives):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDocumentMarkers):
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* testing/Internals.cpp:
(WebCore::Internals::markerCountForNode):
(WebCore::Internals::markerAt):
(WebCore::Internals::addTextMatchMarker):
2013-08-20 Pratik Solanki
localeToScriptCodeForFontSelection should use hash tables with larger default capacity
Reviewed by Darin Adler.
The two static hash tables used in this file have 106 and 198 entries. Set a minimumTableSize for
these hash tables so we don't have to expand them during initialization.
No new tests because no functional changes.
* platform/text/LocaleToScriptMappingDefault.cpp:
(WebCore::scriptNameToCode):
(WebCore::localeToScriptCodeForFontSelection):
2013-08-20 Eric Carlson
Media controls can be attached lazily
Reviewed by Jer Noble.
Merge https://chromium.googlesource.com/chromium/blink/+/28a995486a675992f2e72f81bfabdfff05688a31.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createMediaControls): Add AttachLazily to appendChild().
2013-08-20 Daniel Bates
Use nullAtom instead of defining static local in
Accessibility{Object, RenderObject}::actionVerb()
Reviewed by Chris Fleizach.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::actionVerb):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::actionVerb):
2013-08-20 Daniel Bates