1 2013-09-04 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
3 [GStreamer] cannot play live streams
4 https://bugs.webkit.org/show_bug.cgi?id=116831
6 Reviewed by Philippe Normand.
8 Fix issues with rtsp streams embedded on <video> not loading.
10 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
11 Do not reset pipeline to READY state on STATE_CHANGE_ASYNC when entering PAUSED state for
12 live streams, otherwise we enter an endless loop of READY->PAUSED->READY->PAUSED when
15 2013-09-03 Chris Fleizach <cfleizach@apple.com>
17 AX: REGRESSION: @title is exposed as AXDescription when label label from contents already exists.
18 https://bugs.webkit.org/show_bug.cgi?id=120550
20 Reviewed by Mario Sanchez Prada.
22 Resolve a FIXME from the accessible name computation refactoring so that alternative text for links do not
23 show up in the title field and do not duplicate naming when a title tag is used.
25 Effectively, this means that links no longer use AXTitle for alternative text. They use AXDescription
26 like all other elements.
28 Test: platform/mac/accessibility/link-with-title.html
30 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
31 (-[WebAccessibilityObjectWrapper accessibilityTitle]):
32 (-[WebAccessibilityObjectWrapper accessibilityDescription]):
34 2013-09-03 Darin Adler <darin@apple.com>
36 Change type of Document::doctype back to a raw pointer
37 https://bugs.webkit.org/show_bug.cgi?id=120617
39 Reviewed by Andreas Kling.
42 (WebCore::Document::doctype): Return a raw pointer.
43 (WebCore::Document::childrenChanged): Use the raw pointer.
44 Also added a FIXME about this code that is probably in the wrong place.
45 * dom/Document.h: More of the same.
48 (WebCore::documentTypeString): Get rid of local variable entirely,
49 since null is already handled right by createMarkup, and also remove
50 the call to get since doctype is just a raw pointer.
52 2013-09-03 Andreas Kling <akling@apple.com>
54 ASSERTION FAILED: frame().view() == this closing a page with SVG or video
55 <https://webkit.org/b/120645>
57 Reviewed by Antti Koivisto.
59 Have RenderSVGResourceContainer check if the document is being destroyed before
60 triggering any repaints. This replaces the previous check for a null RenderView
61 which meant basically the same thing.
63 We could add more and better assertions to catch unnecessary work during tree
64 teardown, but let's do that separately.
66 * rendering/svg/RenderSVGResourceContainer.cpp:
67 (WebCore::RenderSVGResourceContainer::markClientForInvalidation):
69 2013-09-03 Gyuyoung Kim <gyuyoung.kim@samsung.com>
71 Fix uninitialized build warning in make_names.pl
72 https://bugs.webkit.org/show_bug.cgi?id=120658
74 Reviewed by Andreas Kling.
76 No new tests, no behavior change.
79 (printTypeChecks): Fixed a build warning since r154965.
81 2013-09-03 Darin Adler <darin@apple.com>
83 Fix backwards branch in ~Node from r154967
84 https://bugs.webkit.org/show_bug.cgi?id=120659
86 Reviewed by Andreas Kling.
89 (WebCore::Node::~Node): Fix backwards branch. The old code ran the code only
90 when we did not remove the item from the table. I removed a ! from this expression
91 after review; bad idea.
93 2013-09-03 Enrica Casucci <enrica@apple.com>
95 Can't select Katakana word by double-clicking.
96 <rdar://problem/14654926>
98 Reviewed by Alexey Proskuryakov and Ryosuke Niwa.
100 For some languages, like Japanese we need
101 to use more context for word breaking.
103 New test: editing/selection/doubleclick-japanese-text.html
105 * platform/text/TextBoundaries.h:
106 (WebCore::requiresContextForWordBoundary):
108 2013-09-03 Mark Lam <mark.lam@apple.com>
110 Converting StackIterator to a callback interface.
111 https://bugs.webkit.org/show_bug.cgi?id=120564.
113 Reviewed by Filip Pizlo.
117 * bindings/js/JSXMLHttpRequestCustom.cpp:
118 (WebCore::SendFunctor::SendFunctor):
119 (WebCore::SendFunctor::hasViableFrame):
120 (WebCore::SendFunctor::operator()):
121 (WebCore::JSXMLHttpRequest::send):
122 * bindings/js/ScriptCallStackFactory.cpp:
123 (WebCore::CreateScriptCallStackFunctor::CreateScriptCallStackFunctor):
124 (WebCore::CreateScriptCallStackFunctor::operator()):
125 (WebCore::createScriptCallStack):
126 (WebCore::CreateScriptCallStackForConsoleFunctor::CreateScriptCallStackForConsoleFunctor):
127 (WebCore::CreateScriptCallStackForConsoleFunctor::operator()):
129 2013-09-03 Oliver Hunt <oliver@apple.com>
131 Support structured clone of Map and Set
132 https://bugs.webkit.org/show_bug.cgi?id=120654
134 Reviewed by Simon Fraser.
136 Add support for cloning Map and Set. Fairly self explanatory change.
137 Needed to add Forwarding headers for the JSMap, JSSet and MapData classes.
139 * ForwardingHeaders/runtime/JSMap.h: Added.
140 * ForwardingHeaders/runtime/JSSet.h: Added.
141 * ForwardingHeaders/runtime/MapData.h: Added.
142 * bindings/js/SerializedScriptValue.cpp:
143 (WebCore::CloneSerializer::isMap):
144 (WebCore::CloneSerializer::isSet):
145 (WebCore::CloneSerializer::startSet):
146 (WebCore::CloneSerializer::startMap):
147 (WebCore::CloneSerializer::serialize):
148 (WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible):
149 (WebCore::CloneDeserializer::deserialize):
151 2013-09-03 Bear Travis <betravis@adobe.com>
153 [CSS Shapes] Shape's content gets extra left offset when left-border is positive on the content box
154 https://bugs.webkit.org/show_bug.cgi?id=117573
156 Reviewed by David Hyatt.
158 Nested blocks need to take into account their offset from the shape-inside container.
159 The new code calculates the offset from the shape-inside container, then applies the
160 offset to the computed segments. The line must be moved down by the offset's height,
161 and each segment must be moved left by the offset's width.
163 Test: fast/shapes/shape-inside/shape-inside-offset-block-children.html
165 * rendering/RenderBlock.cpp:
166 (WebCore::RenderBlock::relayoutShapeDescendantIfMoved): Relayout a block child if its
167 new logical left would cause it to rest at a new position within a shape container.
168 (WebCore::RenderBlock::logicalOffsetFromShapeAncestorContainer): Calculate the logical
169 offset form a shape inside ancestor container.
170 (WebCore::RenderBlock::layoutBlockChild): Call relayoutShapeDescendantIfMoved with the
172 * rendering/RenderBlock.h:
173 * rendering/RenderBlockLineLayout.cpp:
174 (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Use layout offset, rather
175 than just vertical offset.
176 (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Ditto.
177 (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Ditto.
178 * rendering/shapes/ShapeInsideInfo.h:
179 (WebCore::ShapeInsideInfo::computeSegmentsForLine): Shift segments logically left when
180 there is an inline offset.
182 2013-09-03 Antoine Quint <graouts@apple.com>
184 Web Inspector: exceptions triggered from console evaluation do not pause the debugger
185 https://bugs.webkit.org/show_bug.cgi?id=120460
187 Reviewed by Timothy Hatcher.
189 * inspector/InjectedScriptSource.js:
190 Explicitly set a sourceURL such that the frontend may identify injected script when
191 processing call frames in order to hide such code from the debugger.
193 2013-09-03 Andreas Kling <akling@apple.com>
195 Support Vector<Ref<T>>.
196 <https://webkit.org/b/120637>
198 Reviewed by Antti Koivisto.
200 Use Vector<Ref<T>> internally in Page.
203 (WebCore::networkStateChanged):
204 (WebCore::Page::refreshPlugins):
206 Clean up these functions and use Vector<Ref<Frame>> to store pointers to frames
207 since we know they are not going to be null.
209 (WebCore::Page::pluginViews):
211 Changed this to return a Vector<Ref<PluginView>> by value instead of passing a
212 writable vector as an argument. Clean up loops with 'auto'.
214 (WebCore::Page::storageBlockingStateChanged):
215 (WebCore::Page::privateBrowsingStateChanged):
217 Tweaked for pluginViews() returning a Vector now.
219 (WebCore::Page::setVisibilityState):
221 Store Documents that need a visibilitychange event in a Vector<Ref<Document>>.
223 2013-08-28 Sergio Villar Senin <svillar@igalia.com>
225 [CSS Grid Layout] Add parsing for named grid lines
226 https://bugs.webkit.org/show_bug.cgi?id=119540
228 Reviewed by Andreas Kling.
230 From Blink r150381,r150587 by <jchaffraix@chromium.org>
232 Adds parsing support for named grid lines at <grid-line> level,
233 i.e., inside grid-{row|column}-{start|end}. This change covers
234 only the parsing, layout changes coming in a follow up patch.
236 * css/CSSComputedStyleDeclaration.cpp:
237 (WebCore::valueForGridPosition):
239 (WebCore::CSSParser::parseIntegerOrStringFromGridPosition):
240 (WebCore::CSSParser::parseGridPosition):
242 * css/StyleResolver.cpp:
243 (WebCore::createGridPosition):
244 * rendering/RenderGrid.cpp:
245 (WebCore::RenderGrid::resolveGridPositionFromStyle):
246 * rendering/style/GridPosition.h:
247 (WebCore::GridPosition::setExplicitPosition):
248 (WebCore::GridPosition::setSpanPosition):
249 (WebCore::GridPosition::integerPosition):
250 (WebCore::GridPosition::namedGridLine):
252 2013-09-03 Alexey Proskuryakov <ap@apple.com>
254 [Mac] Hyphenation respects regional format settings language instead of primary language
255 https://bugs.webkit.org/show_bug.cgi?id=120641
257 Reviewed by Dan Bernstein.
259 Fixes hyphenation tests on my machine with non-English regional format settings.
261 * platform/text/cf/HyphenationCF.cpp: (createValueForNullKey):
262 Use primary UI language for hyphenation, not regional settings language.
264 2013-09-03 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
266 [GTK][EFL] include missing localized strings for subtitle auto track
267 https://bugs.webkit.org/show_bug.cgi?id=120629
269 those methods are necessary to show the "Auto" track on webkitgtk
271 Reviewed by Gustavo Noronha Silva.
273 * platform/efl/LocalizedStringsEfl.cpp:
274 (WebCore::textTrackAutomaticMenuItemText):
275 * platform/gtk/LocalizedStringsGtk.cpp:
276 (WebCore::textTrackAutomaticMenuItemText):
278 2013-09-03 Daniel Bates <dabates@apple.com>
280 Require layout when -webkit-overflow-scrolling changes
281 https://bugs.webkit.org/show_bug.cgi?id=120535
283 Reviewed by Darin Adler.
285 Test: fast/repaint/overflow-scroll-touch-repaint.html
287 We want to require a layout when the value of -webkit-overflow-scrolling changes
288 since -webkit-overflow-scrolling creates a stacking context.
290 * rendering/style/RenderStyle.cpp:
291 (WebCore::RenderStyle::changeRequiresLayout):
293 2013-09-02 Ryosuke Niwa <rniwa@webkit.org>
295 Support the "json" responseType and JSON response entity in XHR
296 https://bugs.webkit.org/show_bug.cgi?id=73648
298 Reviewed by Oliver Hunt.
300 Based on the patch written by Jarred Nicholls.
302 Implement 'json' type for XMLHttpRequest.response. We cache the result on JSC side as a cached attribute
303 unlike other response types like 'document' and 'blob' for which the parsed response object is cached
304 in XMLHttpRequest itself. In the long run, we should do the same for other types of response types.
306 Also refactored the various code to share the code.
308 Tests: fast/xmlhttprequest/xmlhttprequest-responsetype-json-invalid.html
309 fast/xmlhttprequest/xmlhttprequest-responsetype-json-utf16.html
310 fast/xmlhttprequest/xmlhttprequest-responsetype-json-valid.html
312 * ForwardingHeaders/runtime/JSONObject.h: Added.
314 * bindings/js/JSXMLHttpRequestCustom.cpp:
315 (WebCore::JSXMLHttpRequest::visitChildren):
316 (WebCore::JSXMLHttpRequest::response): Use JSONParse to parse the response text and cache the result.
317 Call didCacheResponseJSON to set the cache status and clear the original response buffer.
319 * xml/XMLHttpRequest.cpp:
320 (WebCore::XMLHttpRequest::XMLHttpRequest): Added m_responseCacheIsValid to invalidate the cache of
322 (WebCore::XMLHttpRequest::responseText):
323 (WebCore::XMLHttpRequest::didCacheResponseJSON): Added; Updates m_responseCacheIsValid and clears the
324 response buffer to save memory.
325 (WebCore::XMLHttpRequest::responseXML):
326 (WebCore::XMLHttpRequest::setResponseType):
327 (WebCore::XMLHttpRequest::responseType):
328 (WebCore::XMLHttpRequest::clearResponseBuffers):
329 (WebCore::XMLHttpRequest::didReceiveData):
331 * xml/XMLHttpRequest.h:
332 (WebCore::XMLHttpRequest::doneWithoutErrors): Extracted from responseXML.
333 (WebCore::XMLHttpRequest::responseTextIgnoringResponseType): Extracted from responseText.
334 (WebCore::XMLHttpRequest::responseCacheIsValid): Added.
335 (WebCore::XMLHttpRequest::shouldDecodeResponse): Extracted from didReceiveData.
336 Also modified to decode when the response type is ResponseTypeJSON.
338 * xml/XMLHttpRequest.idl: Added CachedAttribute IDL extention on response property. This cache is
339 used when the response type is 'json'.
341 2013-09-03 Commit Queue <commit-queue@webkit.org>
343 Unreviewed, rolling out r154881.
344 http://trac.webkit.org/changeset/154881
345 https://bugs.webkit.org/show_bug.cgi?id=120643
347 Crashes on macworld.com (Requested by kling on #webkit).
350 (WebCore::Element::setAttributeInternal):
352 2013-09-03 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
354 [GStreamer] Don't set state to NULL until element is destroyed
355 https://bugs.webkit.org/show_bug.cgi?id=117354
357 Reviewed by Philippe Normand.
359 Don't set playbin to NULL until it is going to be destroyed or if we stay
360 for too long on the READY state. Instead only set the state to READY as this
361 allows much faster state changes to PAUSED/PLAYING again. playbin internally
362 caches some state that is destroyed when setting it to NULL.
363 This state is independent of the URI and it is even possible to change the
366 To avoid having resources (e.g. audio devices) open indefinitely,
367 when setting the state to READY we create a timeout and if the timeout
368 is reached we reset the pipeline state to NULL to free resources.
370 Also now all state changes use the changePipelineState method instead of setting
371 the playbin state directly with gst_element_set_state, so we have a better control
372 of when we are requesting state changes.
374 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
375 (WebCore::mediaPlayerPrivateReadyStateTimeoutCallback):
376 (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
377 (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
378 (WebCore::MediaPlayerPrivateGStreamer::commitLoad):
379 (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
380 (WebCore::MediaPlayerPrivateGStreamer::setRate):
381 (WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult):
382 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
384 2013-09-03 peavo@outlook.com <peavo@outlook.com>
386 [WinCairo] Unneeded code in method GlyphPage::fill().
387 https://bugs.webkit.org/show_bug.cgi?id=120634
389 Reviewed by Andreas Kling.
391 * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
392 (WebCore::GlyphPage::fill): Remove unneeded call to GetTextMetrics() function.
394 2013-09-03 Mihnea Ovidenie <mihnea@adobe.com>
396 [CSSRegions] Pseudo-elements as regions should not be exposed to JS
397 https://bugs.webkit.org/show_bug.cgi?id=120633
399 Reviewed by Andreas Kling.
401 Until we properly implement the Region interface (http://dev.w3.org/csswg/css-regions/#the-region-interface)
402 for pseudo-elements, we should not return these as regions in JS.
404 Tests: fast/regions/get-regions-by-content-pseudo.html
405 fast/regions/webkit-named-flow-get-regions-pseudo.html
407 * dom/WebKitNamedFlow.cpp:
408 (WebCore::WebKitNamedFlow::firstEmptyRegionIndex): Skip pseudo-elements as regions here too,
409 otherwise we may get an index that cannot be used with getRegions().
410 (WebCore::WebKitNamedFlow::getRegionsByContent):
411 (WebCore::WebKitNamedFlow::getRegions):
413 2013-09-03 Zan Dobersek <zdobersek@igalia.com>
415 REGRESSION(r154967): http appcache tests crashing on WK1
416 https://bugs.webkit.org/show_bug.cgi?id=120620
418 Reviewed by Andreas Kling.
420 * loader/appcache/ApplicationCacheGroup.cpp:
421 (WebCore::ApplicationCacheGroup::cacheDestroyed): Reintroduce pre-r154967 behavior that returned early in
422 this method if the passed-in ApplicationCache object was not found in the ApplicationCacheGroup's HashSet
423 of all the caches. This is now done by checking that the HashSet<T>::remove(T) returns true (meaning the
424 object was found in the HashSet and removed from it) in addition to that HashSet being subsequently empty
425 before the method moves on to destroying its ApplicationCacheGroup instance.
427 2013-09-03 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
429 [gstreamer] Disable HTTP request "Accept-Encoding:" header field on gstreamer source element to avoid receiving the wrong size when retrieving data
430 https://bugs.webkit.org/show_bug.cgi?id=115354
432 Reviewed by Philippe Normand.
434 Also disable Accept-Encoding on ResourceRequest::toSoupMessage accordingly.
436 * platform/network/soup/ResourceRequestSoup.cpp:
437 (WebCore::ResourceRequest::toSoupMessage):
438 Call ResourceRequest::updateSoupMessage from ResourceRequest::toSoupMessage so that the
439 Accept-Encoding header is also respected.
441 2013-09-03 Krzysztof Czech <k.czech@samsung.com>
443 [AX][ATK] Added support for sort and help attributes.
444 https://bugs.webkit.org/show_bug.cgi?id=120456
446 Reviewed by Chris Fleizach.
448 Added support for aria-sort and aria-help attributes.
450 Test: accessibility/aria-sort.html
452 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
453 (webkitAccessibleGetAttributes):
455 2013-09-03 Allan Sandfeld Jensen <allan.jensen@digia.com>
457 [Qt] Remove dead code for QtXmlPatterns
458 https://bugs.webkit.org/show_bug.cgi?id=120624
460 Reviewed by Simon Hausmann.
462 Remove code supporting XSLT using QtXmlPatterns which has been
467 * dom/TransformSourceQt.cpp: Removed.
468 * xml/XSLStyleSheetQt.cpp: Removed.
469 * xml/XSLTProcessorQt.cpp: Removed.
470 * xml/parser/XMLDocumentParserQt.cpp:
471 (WebCore::XMLDocumentParser::doEnd):
472 (WebCore::XMLDocumentParser::parseProcessingInstruction):
474 2013-09-03 Mihnea Ovidenie <mihnea@adobe.com>
476 [CSS Regions] position: fixed is computed relative to the first region, not the viewport
477 https://bugs.webkit.org/show_bug.cgi?id=111176
479 Reviewed by David Hyatt.
481 Fixed positioned elements inside a named flow should be positioned and sized relative to the viewport,
482 not on the first region, as described in the spec: http://dev.w3.org/csswg/css-regions/#the-flow-into-property.
483 While the flow thread will still act as containing block for the fixed positioned elements, the painting and hit
484 testing for the fixed positioned elements is done by RenderView. The layers for the fixed positioned elements
485 are collected by the flow thread.
487 Tests: fast/regions/element-in-named-flow-absolute-from-fixed.html
488 fast/regions/element-in-named-flow-fixed-from-absolute.html
489 fast/regions/element-inflow-fixed-from-outflow-static.html
490 fast/regions/element-outflow-static-from-inflow-fixed.html
491 fast/regions/fixed-element-transformed-parent.html
492 fast/regions/fixed-in-named-flow-scroll.html
493 fast/regions/fixed-inside-fixed-in-named-flow.html
494 fast/regions/fixed-inside-named-flow-zIndex.html
495 fast/regions/fixed-pos-elem-in-namedflow-noregions.html
496 fast/regions/fixed-pos-region-in-nested-flow.html
498 * rendering/FlowThreadController.cpp:
499 (WebCore::FlowThreadController::collectFixedPositionedLayers):
500 Return the list of layers for the fixed positioned elements with named flows as containing blocks.
501 Used in RenderLayer:: paintFixedLayersInNamedFlows and RenderLayer:: hitTestFixedLayersInNamedFlows.
502 * rendering/FlowThreadController.h:
503 * rendering/RenderBox.cpp:
504 (WebCore::RenderBox::mapLocalToContainer):
505 (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
506 (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
507 For fixed positioned elements, width and height are given by the view instead of the first region.
508 * rendering/RenderLayer.cpp:
509 (WebCore::accumulateOffsetTowardsAncestor):
510 Modified for the fixed positioned elements inside named flows with the named flows as containing block
511 to take into account the view scroll.
512 (WebCore::compareZIndex):
513 Moved upwards because it is used in RenderLayer::paintFixedLayersInNamedFlows.
514 (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
515 Paint the list of fixed layers directly from the RenderView instead of painting them through regions -> named flows.
516 (WebCore::RenderLayer::paintLayerContents):
517 (WebCore::RenderLayer::paintList):
518 (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
519 Hit test the layers for the fix positioned elements inside named flows from the RenderView layer
520 instead of the region -> named flow layer.
521 (WebCore::RenderLayer::hitTestLayer):
522 (WebCore::RenderLayer::calculateRects):
523 * rendering/RenderLayer.h:
524 * rendering/RenderLayerCompositor.cpp:
525 (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
526 We do not support yet the accelerated compositing for elements in named flows,
527 so bail out early here. We need to revisit fixed elements once we finish accelerated compositing for elements in named flows.
528 * rendering/RenderObject.cpp:
529 (WebCore::RenderObject::fixedPositionedWithNamedFlowContainingBlock):
530 (WebCore::hasFixedPosInNamedFlowContainingBlock):
531 (WebCore::RenderObject::containerForRepaint):
532 Changed to take into account that RenderView should be the repaintContainer for the
533 fixed positioned elements with named flow as the containing block.
534 * rendering/RenderObject.h:
536 2013-09-03 Arvid Nilsson <anilsson@rim.com>
538 [BlackBerry] Remove LayerData::LayerProgram
539 https://bugs.webkit.org/show_bug.cgi?id=120601
541 Reviewed by Anders Carlsson.
544 All layer contents are RGBA now, so there's no need to support BGRA any
545 more and the LayerData::LayerProgram enum can be removed. Related dead
548 No new tests, no change in behavior.
550 * platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp:
551 (WebCore::EGLImageLayerWebKitThread::EGLImageLayerWebKitThread):
552 * platform/graphics/blackberry/LayerData.h:
553 (WebCore::LayerData::LayerData):
554 * platform/graphics/blackberry/LayerRenderer.cpp:
555 (WebCore::LayerRenderer::compositeLayersRecursive):
556 (WebCore::LayerRenderer::createProgram):
557 * platform/graphics/blackberry/LayerRenderer.h:
558 * platform/graphics/blackberry/LayerWebKitThread.h:
559 * platform/graphics/blackberry/PluginLayerWebKitThread.cpp:
560 (WebCore::PluginLayerWebKitThread::setPluginView):
562 2013-09-03 Xabier Rodriguez Calvar <calvaris@igalia.com>
564 [GStreamer] Video player sets system volume to 100%
565 https://bugs.webkit.org/show_bug.cgi?id=118974
567 Reviewed by Philippe Normand.
569 In order to preserve the system volume we need to keep track of
570 the volume being initialized in the HTMLMediaElement and then just
571 setting the volume to the sink when initializing the pipeline if
572 that volume was changed before.
574 * html/HTMLMediaElement.cpp:
575 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialized
577 (WebCore::HTMLMediaElement::setVolume): Set the attribute to true
578 when volume is changed.
579 (WebCore::HTMLMediaElement::updateVolume): Set the volume only if
580 volume was initialized.
581 (WebCore::HTMLMediaElement::mediaPlayerPlatformVolumeConfigurationRequired):
582 Platform volume configuration is required only if volume was not
584 * html/HTMLMediaElement.h: Added attribute and interface method.
585 * platform/graphics/MediaPlayer.h:
586 (WebCore::MediaPlayerClient::mediaPlayerPlatformVolumeConfigurationRequired):
587 Declared and added default implementation for the interface method.
588 (WebCore::MediaPlayer::platformVolumeConfigurationRequired):
589 Asked the client, meaning the HTMLMediaElement if the platform
590 volume configuration is required.
591 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
592 (WebCore::mediaPlayerPrivateVolumeChangedCallback): Added log.
593 (WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Added log.
594 (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
595 Set the volume only if not platform volume is required and added log.
597 2013-09-02 Darin Adler <darin@apple.com>
599 * inspector/InspectorProfilerAgent.cpp:
600 (WebCore::InspectorProfilerAgent::removeProfile): Fix braces here; a review
601 comment I forgot to address in my last check-in.
603 2013-09-02 Darin Adler <darin@apple.com>
605 Cut down on double hashing and code needlessly using hash table iterators
606 https://bugs.webkit.org/show_bug.cgi?id=120611
608 Reviewed by Andreas Kling.
610 Some of these changes are primarily code cleanup, but others could provide
611 a small code size and speed improvement by avoiding extra hashing.
613 * Modules/geolocation/Geolocation.cpp:
614 (WebCore::Geolocation::Watchers::find): Use get instead of find.
615 (WebCore::Geolocation::Watchers::remove): Use take instead of find.
616 (WebCore::Geolocation::makeCachedPositionCallbacks): Use the return
617 value from remove to avoid hashing twice.
619 * Modules/webaudio/AudioContext.cpp:
620 (WebCore::AudioContext::addAutomaticPullNode): Use the return value from
621 add to avoid hashing twice.
622 (WebCore::AudioContext::removeAutomaticPullNode): Use the return value
623 from remove to avoid hashing twice.
625 * Modules/webaudio/AudioNodeInput.cpp:
626 (WebCore::AudioNodeInput::connect): Use the return value from add to avoid
628 (WebCore::AudioNodeInput::disconnect): Use the return value from remove
629 to avoid hashing twice.
631 * Modules/webaudio/AudioParam.cpp:
632 (WebCore::AudioParam::connect): Use the return value from add to avoid
634 (WebCore::AudioParam::disconnect): Use the return value from remove to
637 * bridge/NP_jsobject.cpp:
638 (ObjectMap::remove): Use remove instead of find/remove.
641 (WebCore::Node::~Node): Use the return value from remove instead of
644 * inspector/InspectorProfilerAgent.cpp:
645 (WebCore::InspectorProfilerAgent::removeProfile): Remove needless
648 * loader/DocumentLoader.cpp:
649 (WebCore::DocumentLoader::removeSubresourceLoader): Use the return
650 value from remove instead of find/remove.
652 * loader/ResourceLoadScheduler.cpp:
653 (WebCore::ResourceLoadScheduler::HostInformation::remove): Use the
654 return value from remove to avoid hashing twice.
656 * loader/appcache/ApplicationCacheGroup.cpp:
657 (WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Use
658 remove instead of find/remove.
659 (WebCore::ApplicationCacheGroup::cacheDestroyed): Removed a needless
660 call to contains to avoid hashing twice. It's fine to do the check
661 for an empty hash table unconditionally.
663 * page/DOMWindow.cpp:
664 (WebCore::addUnloadEventListener): Eliminated a local variable for clarity.
665 (WebCore::removeUnloadEventListener): Ditto. Also use remove instead
667 (WebCore::removeAllUnloadEventListeners): Ditto. Also use removeAll instead
669 (WebCore::addBeforeUnloadEventListener): Ditto.
670 (WebCore::removeBeforeUnloadEventListener): Ditto.
671 (WebCore::removeAllBeforeUnloadEventListeners): Ditto.
673 * page/FrameView.cpp:
674 (WebCore::FrameView::removeViewportConstrainedObject): Use the return
675 value from remove to avoid hashing twice.
676 (WebCore::FrameView::removeScrollableArea): Use the return value from
677 remove instead of find/remove.
678 (WebCore::FrameView::containsScrollableArea): Use && instead of an if
679 statement in a way that is idiomatic for this kind of function.
682 (WebCore::Page::addRelevantRepaintedObject): Use the return value from
683 remove instead of find/remove.
685 * page/PageGroup.cpp:
686 (WebCore::PageGroup::removeUserScriptsFromWorld): Use remove instead
688 (WebCore::PageGroup::removeUserStyleSheetsFromWorld): Use the return
689 value from remove instead of find/remove.
691 * page/PerformanceUserTiming.cpp:
692 (WebCore::clearPeformanceEntries): Removed a needless call to contains.
694 * platform/graphics/DisplayRefreshMonitor.cpp:
695 (WebCore::DisplayRefreshMonitor::removeClient): Use the return value
696 from remove instead of find/remove.
697 (WebCore::DisplayRefreshMonitorManager::displayDidRefresh): Use remove
698 instead of find/remove.
700 * platform/graphics/blackberry/LayerRenderer.cpp:
701 (WebCore::LayerRenderer::removeLayer): Use the return value from remove
702 instead of find/remove.
704 * platform/win/WindowMessageBroadcaster.cpp:
705 (WebCore::WindowMessageBroadcaster::removeListener): Use remove instead
706 of find/remove. It's fine to do the check for an empty hash table unconditionally.
708 * plugins/PluginDatabase.cpp:
709 (WebCore::PluginDatabase::removeDisabledPluginFile): Use the return value
710 from remove instead of find/remove.
712 * rendering/style/StyleCustomFilterProgramCache.cpp:
713 (WebCore::StyleCustomFilterProgramCache::lookup): Use get instead of find.
714 (WebCore::StyleCustomFilterProgramCache::add): Use contains instead of find
716 (WebCore::StyleCustomFilterProgramCache::remove): Use remove instead of
719 * svg/SVGCursorElement.cpp:
720 (WebCore::SVGCursorElement::removeClient): Use the return value from remove
721 instead of find/remove.
723 * svg/SVGDocumentExtensions.cpp:
724 (WebCore::SVGDocumentExtensions::removeResource): Removed an unneeded call
726 (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): Use
727 remove instead of find/remove. It's fine to do the check for an empty hash
728 table unconditionally.
729 (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Use
730 remove instead of find/remove. Also removed unhelpful assertions. One is
731 already done by HashMap, and the other is just checking a basic invariant
732 of every HashMap that doesn't need to be checked.
734 * svg/graphics/SVGImageCache.cpp:
735 (WebCore::SVGImageCache::removeClientFromCache): Removed an unneeded call
738 * svg/properties/SVGAnimatedProperty.cpp:
739 (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty): Use the version of
740 remove that takes an iterator rather than the one that takes a key, so
741 we don't need to redo the hashing.
743 2013-09-02 Andreas Kling <akling@apple.com>
745 Generate isFooElement() functions from tagname data.
746 <https://webkit.org/b/120584>
748 Reviewed by Antti Koivisto.
750 Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
751 If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
752 This also outputs an isElementOfType<T> check for the Element iterators.
754 Removed all the hand-written isFooElement() functions that only checked tag name.
756 * html/HTMLTagNames.in:
759 Added "generateTypeChecks" attribute as appropriate.
762 * GNUmakefile.list.am:
763 * WebCore.vcxproj/WebCore.vcxproj:
764 * WebCore.xcodeproj/project.pbxproj:
766 Added to build systems based on how HTMLNames.h was done.
767 We're just outputting an additional header file in the generated code directory
768 so I suspect most ports will just pick this up automagically.
771 (defaultTagPropertyHash):
772 (printLicenseHeader):
774 (printTypeChecksHeaderFile):
776 Generate a separate file for each namespace with isFooElement() helpers for
777 elements with "generateTypeChecks" attribute set.
779 2013-09-02 Darin Adler <darin@apple.com>
781 [Mac] No need for HardAutorelease, which is same as CFBridgingRelease
782 https://bugs.webkit.org/show_bug.cgi?id=120569
784 Reviewed by Andy Estes.
786 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
788 (AXTextMarkerRangeStart):
789 (AXTextMarkerRangeEnd):
790 (textMarkerForVisiblePosition):
791 Use CFBridgingRelease.
793 * platform/mac/KURLMac.mm:
794 (WebCore::KURL::operator NSURL *): Use CFBridgingRelease.
795 (WebCore::KURL::createCFURL): Get rid of needless local variable.
797 * platform/mac/WebCoreNSURLExtras.mm:
798 (WebCore::mapHostNameWithRange):
799 (WebCore::URLWithData):
800 (WebCore::userVisibleString):
801 * platform/text/mac/StringImplMac.mm:
802 (WTF::StringImpl::operator NSString *):
803 Use CFBridgingRelease.
805 2013-09-01 Andreas Kling <akling@apple.com>
807 Ref: A smart pointer for the reference age.
808 <https://webkit.org/b/120570>
810 Reviewed by Antti Koivisto.
812 Use Ref<T> for various stack guards where null checking isn't needed.
814 2013-09-02 Andreas Kling <akling@apple.com>
816 Simplify DocumentType handling.
817 <https://webkit.org/b/120529>
819 Reviewed by Antti Koivisto.
821 Removed the insertedInto()/removedFrom() handlers from DocumentType.
823 Document no longer keeps a pointer to its doctype node, it was only used for the
824 document.doctype DOM API, which now just looks through the list of (<=2) children.
826 The ENABLE(LEGACY_VIEWPORT_ADAPTION) hunk from Document::setDocType() was moved
827 into Document::childrenChanged().
829 We no longer clear the style resolver on doctype insertion/removal since it
830 doesn't actually affect style anyway.
832 Also made doctype() return a PassRefPtr<DocumentType> instead of a raw pointer.
835 (WebCore::Document::dispose):
836 (WebCore::Document::doctype):
837 (WebCore::Document::childrenChanged):
839 * dom/DocumentType.cpp:
840 * dom/DocumentType.h:
841 * editing/markup.cpp:
842 (WebCore::documentTypeString):
844 2013-09-02 Anton Obzhirov <a.obzhirov@samsung.com>
846 <https://webkit.org/b/98350> [GTK] accessibility/aria-invalid.html times out
848 Reviewed by Mario Sanchez Prada.
850 The patch exposes aria-invalid attribute to ATK.
852 * accessibility/atk/AXObjectCacheAtk.cpp:
853 (WebCore::AXObjectCache::postPlatformNotification):
854 Added emitting state-change signal for aria-invalid event.
855 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
856 (webkitAccessibleGetAttributes):
857 Added aria-invalid attribute.
859 2013-09-02 Commit Queue <commit-queue@webkit.org>
861 Unreviewed, rolling out r154955.
862 http://trac.webkit.org/changeset/154955
863 https://bugs.webkit.org/show_bug.cgi?id=120605
865 broke xcode4 build :| (Requested by kling on #webkit).
868 * GNUmakefile.list.am:
869 * WebCore.vcxproj/WebCore.vcxproj:
870 * WebCore.xcodeproj/project.pbxproj:
872 (defaultTagPropertyHash):
873 (printLicenseHeader):
874 * html/HTMLAnchorElement.h:
875 (WebCore::isHTMLAnchorElement):
876 (WebCore::HTMLAnchorElement):
877 * html/HTMLAreaElement.h:
878 (WebCore::isHTMLAreaElement):
879 (WebCore::HTMLAreaElement):
880 * html/HTMLAudioElement.h:
881 (WebCore::isHTMLAudioElement):
882 * html/HTMLBaseElement.h:
883 (WebCore::isHTMLBaseElement):
884 (WebCore::HTMLBaseElement):
885 * html/HTMLCanvasElement.h:
886 (WebCore::isHTMLCanvasElement):
887 * html/HTMLElement.h:
888 * html/HTMLFieldSetElement.h:
889 (WebCore::isHTMLFieldSetElement):
890 (WebCore::HTMLFieldSetElement):
891 * html/HTMLFormElement.h:
892 (WebCore::isHTMLFormElement):
893 * html/HTMLFrameSetElement.h:
894 (WebCore::isHTMLFrameSetElement):
895 (WebCore::HTMLFrameSetElement):
896 * html/HTMLImageElement.h:
897 (WebCore::isHTMLImageElement):
898 * html/HTMLInputElement.h:
899 (WebCore::isHTMLInputElement):
900 * html/HTMLLabelElement.h:
901 (WebCore::isHTMLLabelElement):
902 (WebCore::HTMLLabelElement):
903 * html/HTMLLegendElement.h:
904 (WebCore::isHTMLLegendElement):
905 (WebCore::HTMLLegendElement):
906 * html/HTMLMapElement.h:
907 (WebCore::isHTMLMapElement):
908 * html/HTMLMeterElement.h:
909 (WebCore::isHTMLMeterElement):
910 * html/HTMLOptGroupElement.h:
911 (WebCore::isHTMLOptGroupElement):
912 * html/HTMLOptionElement.h:
913 (WebCore::isHTMLOptionElement):
914 * html/HTMLParamElement.h:
915 (WebCore::isHTMLParamElement):
916 (WebCore::HTMLParamElement):
917 * html/HTMLProgressElement.h:
918 (WebCore::isHTMLProgressElement):
919 * html/HTMLScriptElement.h:
920 (WebCore::isHTMLScriptElement):
921 * html/HTMLSourceElement.h:
922 (WebCore::isHTMLSourceElement):
923 (WebCore::HTMLSourceElement):
924 * html/HTMLStyleElement.h:
925 (WebCore::isHTMLStyleElement):
926 (WebCore::HTMLStyleElement):
927 * html/HTMLTableElement.h:
928 (WebCore::isHTMLTableElement):
929 * html/HTMLTableRowElement.h:
930 (WebCore::isHTMLTableRowElement):
931 (WebCore::HTMLTableRowElement):
932 * html/HTMLTagNames.in:
933 * html/HTMLTextAreaElement.h:
934 (WebCore::isHTMLTextAreaElement):
935 * html/HTMLTitleElement.h:
936 (WebCore::isHTMLTitleElement):
937 (WebCore::HTMLTitleElement):
938 * html/HTMLTrackElement.h:
939 (WebCore::isHTMLTrackElement):
940 (WebCore::HTMLTrackElement):
942 * svg/SVGFontElement.h:
943 (WebCore::isSVGFontElement):
944 * svg/SVGFontFaceElement.h:
945 (WebCore::isSVGFontFaceElement):
946 (WebCore::SVGFontFaceElement):
947 * svg/SVGForeignObjectElement.h:
948 (WebCore::isSVGForeignObjectElement):
949 (WebCore::SVGForeignObjectElement):
950 * svg/SVGImageElement.h:
951 (WebCore::isSVGImageElement):
952 * svg/SVGScriptElement.h:
953 (WebCore::isSVGScriptElement):
956 2013-09-02 Antti Koivisto <antti@apple.com>
958 Clean up ContainerNode::childrenChanged
959 https://bugs.webkit.org/show_bug.cgi?id=120599
961 Reviewed by Andreas Kling.
963 - Make childrenChanged take a single struct argument instead of a long list of arguments.
964 - Use enum instead of childCountDelta. It was always -1, 0, 1 or the total number of children (in case of removing them all).
965 - Remove use of Node*, give the change range as Elements.
969 (WebCore::Attr::childrenChanged):
971 * dom/CharacterData.cpp:
972 (WebCore::CharacterData::parserAppendData):
973 (WebCore::CharacterData::dispatchModifiedEvent):
974 * dom/ContainerNode.cpp:
975 (WebCore::ContainerNode::insertBefore):
976 (WebCore::ContainerNode::notifyChildInserted):
977 (WebCore::ContainerNode::notifyChildRemoved):
979 Add private helpers for setting up the struct.
981 (WebCore::ContainerNode::parserInsertBefore):
982 (WebCore::ContainerNode::replaceChild):
983 (WebCore::ContainerNode::removeChild):
984 (WebCore::ContainerNode::parserRemoveChild):
985 (WebCore::ContainerNode::removeChildren):
986 (WebCore::ContainerNode::appendChild):
987 (WebCore::ContainerNode::parserAppendChild):
988 (WebCore::ContainerNode::childrenChanged):
989 (WebCore::ContainerNode::updateTreeAfterInsertion):
990 * dom/ContainerNode.h:
992 (WebCore::Document::childrenChanged):
995 (WebCore::checkForSiblingStyleChanges):
997 Clean up and simplify. Since we now get element range automatically we don't need to compute it.
999 (WebCore::Element::childrenChanged):
1000 (WebCore::Element::finishParsingChildren):
1002 * dom/ShadowRoot.cpp:
1003 (WebCore::ShadowRoot::childrenChanged):
1005 * html/HTMLElement.cpp:
1006 (WebCore::HTMLElement::childrenChanged):
1007 (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
1009 Try to keep the existing behavior. This code needs more cleanup to be sane. It shouldn't operate on Nodes
1010 as it only really cares about Elements.
1012 * html/HTMLElement.h:
1013 * html/HTMLFieldSetElement.cpp:
1014 (WebCore::HTMLFieldSetElement::childrenChanged):
1015 * html/HTMLFieldSetElement.h:
1016 * html/HTMLObjectElement.cpp:
1017 (WebCore::HTMLObjectElement::childrenChanged):
1018 * html/HTMLObjectElement.h:
1019 * html/HTMLOptGroupElement.cpp:
1020 (WebCore::HTMLOptGroupElement::childrenChanged):
1021 * html/HTMLOptGroupElement.h:
1022 * html/HTMLOptionElement.cpp:
1023 (WebCore::HTMLOptionElement::childrenChanged):
1024 * html/HTMLOptionElement.h:
1025 * html/HTMLOutputElement.cpp:
1026 (WebCore::HTMLOutputElement::childrenChanged):
1027 * html/HTMLOutputElement.h:
1028 * html/HTMLScriptElement.cpp:
1029 (WebCore::HTMLScriptElement::childrenChanged):
1030 * html/HTMLScriptElement.h:
1031 * html/HTMLSelectElement.cpp:
1032 (WebCore::HTMLSelectElement::childrenChanged):
1033 * html/HTMLSelectElement.h:
1034 * html/HTMLStyleElement.cpp:
1035 (WebCore::HTMLStyleElement::childrenChanged):
1036 * html/HTMLStyleElement.h:
1037 * html/HTMLTextAreaElement.cpp:
1038 (WebCore::HTMLTextAreaElement::childrenChanged):
1039 * html/HTMLTextAreaElement.h:
1040 * html/HTMLTitleElement.cpp:
1041 (WebCore::HTMLTitleElement::childrenChanged):
1042 * html/HTMLTitleElement.h:
1043 * html/shadow/InsertionPoint.cpp:
1044 (WebCore::InsertionPoint::childrenChanged):
1045 * html/shadow/InsertionPoint.h:
1046 * svg/SVGClipPathElement.cpp:
1047 (WebCore::SVGClipPathElement::childrenChanged):
1048 * svg/SVGClipPathElement.h:
1049 * svg/SVGElement.cpp:
1050 (WebCore::SVGElement::childrenChanged):
1052 * svg/SVGFELightElement.cpp:
1053 (WebCore::SVGFELightElement::childrenChanged):
1054 * svg/SVGFELightElement.h:
1055 * svg/SVGFilterElement.cpp:
1056 (WebCore::SVGFilterElement::childrenChanged):
1057 * svg/SVGFilterElement.h:
1058 * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1059 (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
1060 * svg/SVGFilterPrimitiveStandardAttributes.h:
1061 * svg/SVGFontFaceElement.cpp:
1062 (WebCore::SVGFontFaceElement::childrenChanged):
1063 * svg/SVGFontFaceElement.h:
1064 * svg/SVGFontFaceFormatElement.cpp:
1065 (WebCore::SVGFontFaceFormatElement::childrenChanged):
1066 * svg/SVGFontFaceFormatElement.h:
1067 * svg/SVGFontFaceSrcElement.cpp:
1068 (WebCore::SVGFontFaceSrcElement::childrenChanged):
1069 * svg/SVGFontFaceSrcElement.h:
1070 * svg/SVGFontFaceUriElement.cpp:
1071 (WebCore::SVGFontFaceUriElement::childrenChanged):
1072 * svg/SVGFontFaceUriElement.h:
1073 * svg/SVGGradientElement.cpp:
1074 (WebCore::SVGGradientElement::childrenChanged):
1075 * svg/SVGGradientElement.h:
1076 * svg/SVGMarkerElement.cpp:
1077 (WebCore::SVGMarkerElement::childrenChanged):
1078 * svg/SVGMarkerElement.h:
1079 * svg/SVGMaskElement.cpp:
1080 (WebCore::SVGMaskElement::childrenChanged):
1081 * svg/SVGMaskElement.h:
1082 * svg/SVGPatternElement.cpp:
1083 (WebCore::SVGPatternElement::childrenChanged):
1084 * svg/SVGPatternElement.h:
1085 * svg/SVGScriptElement.cpp:
1086 (WebCore::SVGScriptElement::childrenChanged):
1087 * svg/SVGScriptElement.h:
1088 * svg/SVGStyleElement.cpp:
1089 (WebCore::SVGStyleElement::childrenChanged):
1090 * svg/SVGStyleElement.h:
1091 * svg/SVGTitleElement.cpp:
1092 (WebCore::SVGTitleElement::childrenChanged):
1093 * svg/SVGTitleElement.h:
1095 2013-09-02 Andreas Kling <akling@apple.com>
1097 Generate isFooElement() functions from tagname data.
1098 <https://webkit.org/b/120584>
1100 Reviewed by Antti Koivisto.
1102 Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
1103 If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
1104 This also outputs an isElementOfType<T> check for the Element iterators.
1106 Removed all the hand-written isFooElement() functions that only checked tag name.
1108 * html/HTMLTagNames.in:
1111 Added "generateTypeChecks" attribute as appropriate.
1114 * GNUmakefile.list.am:
1115 * WebCore.vcxproj/WebCore.vcxproj:
1116 * WebCore.xcodeproj/project.pbxproj:
1118 Added to build systems based on how HTMLNames.h was done.
1119 We're just outputting an additional header file in the generated code directory
1120 so I suspect most ports will just pick this up automagically.
1122 * dom/make_names.pl:
1123 (defaultTagPropertyHash):
1124 (printLicenseHeader):
1126 (printTypeChecksHeaderFile):
1128 Generate a separate file for each namespace with isFooElement() helpers for
1129 elements with "generateTypeChecks" attribute set.
1131 2013-09-02 Dirk Schulze <krit@webkit.org>
1133 Use edgeMode=duplicate for blurring on filter() function
1134 https://bugs.webkit.org/show_bug.cgi?id=120590
1136 Reviewed by Antti Koivisto.
1138 Filters on the CSS Image function filter() are not allowed to extend the
1139 dimension of the input image. This causes weird results on blurring an image,
1140 where the fading on the edges is clipped at the half of the fading.
1141 We shouldn't fade edges at all and use the edgeMode=duplicate instead.
1142 This will duplicate the pixel value on the nearest edge of the input image
1143 instead of taking transparent black and results in nice blurred images with
1146 Spec: http://dev.w3.org/fxtf/filters/#blurEquivalent
1148 Test: fast/filter-image/filter-image-blur.html
1150 * css/CSSFilterImageValue.cpp: Pass consumer information to the renderer.
1151 (WebCore::CSSFilterImageValue::image):
1152 * rendering/FilterEffectRenderer.cpp: Set edgeMode for feGaussianBlur to
1153 'duplicate' or 'none' depending on the consumer.
1154 (WebCore::FilterEffectRenderer::build):
1155 * rendering/FilterEffectRenderer.h: Add enumeration to differ between the
1156 different consumers of the renderer.
1157 * rendering/RenderLayer.cpp:
1158 (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Pass consumer
1159 information to the renderer.
1161 2013-09-01 Dirk Schulze <krit@webkit.org>
1163 Add 'edgeMode' attribute to SVGFEGaussianBlur
1164 https://bugs.webkit.org/show_bug.cgi?id=120582
1166 Add 'edgeMode' attribute to the SVGFEGaussianBlur element. This attribute
1167 allows users to define the behavior on edges with the values 'none' where
1168 pixel values outside the input image are treated as transparent black. (The
1169 current blurring behavior.) 'duplicate' which repeats the values on the
1170 nearest edge and 'warp', which takes the pixel of the opposite site of
1172 Beside the attribute, this patch implements the behavior of 'duplicate'.
1174 http://dev.w3.org/fxtf/filters/#feGaussianBlurEdgeModeAttribute
1176 Reviewed by Rob Buis.
1178 Tests: svg/dynamic-updates/SVGFEGaussianBlurElement-dom-edgeMode-attr.html
1179 svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop.html
1180 svg/filters/svg-gaussianblur-edgeMode-duplicate-expected.svg
1181 svg/filters/svg-gaussianblur-edgeMode-duplicate.svg
1183 * platform/graphics/filters/FEGaussianBlur.cpp:
1184 (WebCore::FEGaussianBlur::FEGaussianBlur):
1185 (WebCore::FEGaussianBlur::create):
1186 (WebCore::FEGaussianBlur::edgeMode):
1187 (WebCore::FEGaussianBlur::setEdgeMode):
1189 (WebCore::FEGaussianBlur::platformApplyGeneric):
1190 (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
1191 * platform/graphics/filters/FEGaussianBlur.h:
1192 * rendering/FilterEffectRenderer.cpp:
1193 (WebCore::FilterEffectRenderer::build):
1194 * svg/SVGFEGaussianBlurElement.cpp:
1195 (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
1196 (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
1197 (WebCore::SVGFEGaussianBlurElement::parseAttribute):
1198 (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
1199 (WebCore::SVGFEGaussianBlurElement::build):
1200 * svg/SVGFEGaussianBlurElement.h:
1201 * svg/SVGFEGaussianBlurElement.idl:
1203 2013-09-01 Andreas Kling <akling@apple.com>
1205 EventHandler::m_frame should be a Frame&.
1206 <https://webkit.org/b/120580>
1208 Reviewed by Darin Adler.
1210 EventHandler is tied to the lifetime of its frame, so let m_frame be a Frame&.
1211 A handful of null checks and assertions removed.
1213 2013-09-01 Darin Adler <darin@apple.com>
1215 Fix a mistake in my recent pasteboard/editor refactoring that was causing tests to fail.
1217 * editing/mac/EditorMac.mm:
1218 (WebCore::getImage): One place this said cachedImage but it should have said tentativeCachedImage.
1220 2013-09-01 Darin Adler <darin@apple.com>
1222 HitTestResult should have innerNonSharedElement
1223 https://bugs.webkit.org/show_bug.cgi?id=120579
1225 Reviewed by Andreas Kling.
1227 * editing/Editor.cpp:
1228 (WebCore::Editor::copyImage): Call HitTestResult member function version of
1229 innerNonSharedElement instead of a local function that does it.
1232 (WebCore::Chrome::setToolTip): Use innerNonSharedElement instead of getting
1233 the node and checking if it's an input element. Also added some missing braces.
1235 * page/EventHandler.cpp:
1236 (WebCore::EventHandler::selectClosestWordFromHitTestResult): Use targetNode for
1237 local variables instead of innerNode to match the HitTestResult function name.
1238 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Ditto.
1239 (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
1240 (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
1241 (WebCore::EventHandler::handleMousePressEvent): Ditto.
1243 * rendering/HitTestResult.cpp:
1244 (WebCore::HitTestResult::innerElement): Rewrote so there there is no loop.
1245 (WebCore::HitTestResult::innerNonSharedElement): Ditto.
1247 * rendering/HitTestResult.h: Added innerNonSharedElement. Generally speaking,
1248 we'd like to avoid using Node unless there is some real need.
1250 2013-09-01 Xabier Rodriguez Calvar <calvaris@igalia.com>
1252 Volume slider value should be 0 when audio is muted
1253 https://bugs.webkit.org/show_bug.cgi?id=120553
1255 Reviewed by Eric Carlson.
1257 Fixed the problem of showing a non empty slider when audio is
1260 Test: media/volume-bar-empty-when-muted.html.
1262 * html/shadow/MediaControls.cpp:
1263 (WebCore::MediaControls::reset): Use setSliderVolume.
1264 (WebCore::MediaControls::changedVolume): Use setSliderVolume.
1265 (WebCore::MediaControls::setSliderVolume): Added to set the volume
1266 to 0 when muted and to its value otherwise.
1267 * html/shadow/MediaControls.h: Added setSliderVolume.
1268 * html/shadow/MediaControlsApple.cpp:
1269 (WebCore::MediaControlsApple::reset): Used setSliderVolume and
1270 setFullscreenSliderVolume.
1271 (WebCore::MediaControlsApple::changedVolume): Used
1272 setFullscreenSliderVolume.
1273 (WebCore::MediaControlsApple::setFullscreenSliderVolume): Added to
1274 set the volume to 0 when muted and to its value otherwise.
1275 * html/shadow/MediaControlsApple.h: Added setFullscreenSliderVolume
1276 * html/shadow/MediaControlsBlackBerry.cpp:
1277 (WebCore::MediaControlsBlackBerry::reset): Used setSliderVolume.
1279 2013-09-01 Andreas Kling <akling@apple.com>
1281 Give EditCommand a protected Frame& getter.
1282 <https://webkit.org/b/120574>
1284 Reviewed by Darin Adler.
1286 EditCommand is only created for documents that are attached to a Frame,
1287 we already ASSERTed as much in the EditCommand constructor.
1289 This patch adds a "Frame& EditCommand::frame()" helper, so EditCommand
1290 and its subclasses don't have to fumble around with pointers.
1292 2013-08-31 Antti Koivisto <antti@apple.com>
1294 Add element ancestor iterator
1295 https://bugs.webkit.org/show_bug.cgi?id=120563
1297 Reviewed by Andreas Kling.
1299 This patch adds ancestor iterators. They iterate over elements parent chain up to the root.
1301 To iterate over Element ancestors:
1303 auto ancestors = elementAncestors(this);
1304 for (auto it = ancestors.begin(), end = ancestors.end(); it != end; ++it) {
1305 Element& element = *it;
1308 To iterate over Element ancestors including the current element:
1310 auto lineage = elementLineage(this);
1311 for (auto it = lineage.begin(), end = lineage.end(); it != end; ++it) {
1312 Element& element = *it;
1315 To iterate over ancestors of a specific Element subclass:
1317 auto htmlAncestors = ancestorsOfType<HTMLElement>(this);
1318 for (auto it = htmlAncestors.begin(), end = htmlAncestors.end(); it != end; ++it) {
1319 HTMLElement& htmlElement = *it;
1322 To iterate over ancestors of a specific Element subclass including the current element:
1324 auto htmlLineage = lineageOfType<HTMLElement>(this);
1325 for (auto it = htmlLineage.begin(), end = htmlLineage.end(); it != end; ++it) {
1326 HTMLElement& htmlElement = *it;
1329 The patch also uses the new types in a few places.
1331 * WebCore.xcodeproj/project.pbxproj:
1332 * accessibility/AccessibilityNodeObject.cpp:
1333 (WebCore::AccessibilityNodeObject::mouseButtonListener):
1334 (WebCore::AccessibilityNodeObject::labelForElement):
1335 * dom/ElementAncestorIterator.h: Added.
1336 (WebCore::::ElementAncestorIterator):
1337 (WebCore::::operator):
1338 (WebCore::::ElementAncestorConstIterator):
1339 (WebCore::::ElementAncestorIteratorAdapter):
1342 (WebCore::::ElementAncestorConstIteratorAdapter):
1343 (WebCore::elementLineage):
1344 (WebCore::elementAncestors):
1345 (WebCore::ancestorsOfType):
1346 * dom/ElementIterator.h:
1347 (WebCore::findElementAncestorOfType):
1348 (WebCore::::traverseAncestor):
1350 * html/HTMLElement.cpp:
1351 (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
1352 * html/HTMLFieldSetElement.h:
1353 (WebCore::isHTMLFieldSetElement):
1354 (WebCore::HTMLFieldSetElement):
1355 * html/HTMLFrameSetElement.cpp:
1356 (WebCore::HTMLFrameSetElement::findContaining):
1357 * html/HTMLFrameSetElement.h:
1358 (WebCore::HTMLFrameSetElement):
1359 * html/HTMLInputElement.h:
1360 (WebCore::isHTMLInputElement):
1361 (WebCore::toHTMLInputElement):
1362 * html/HTMLLegendElement.cpp:
1363 (WebCore::HTMLLegendElement::associatedControl):
1365 2013-08-31 Darin Adler <darin@apple.com>
1367 Refactor URL and image writing so layer-violating parts are in Editor, not Pasteboard (Mac-only at first)
1368 https://bugs.webkit.org/show_bug.cgi?id=120573
1370 Reviewed by Andreas Kling.
1372 * editing/Editor.cpp:
1373 (WebCore::Editor::copy): Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
1374 (WebCore::Editor::copyURL): Use writeURLToPasteboard instead of Pasteboard::writeURL on Mac.
1375 (WebCore::innerNonSharedElement): Added. Used in copyImage.
1376 (WebCore::Editor::copyImage): Use innerNonSharedElement instead of innerNonSharedNode.
1377 Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
1379 * editing/Editor.h: Add new functions, writeURLToPasteboard and writeImageToPasteboard,
1380 both Mac-only for now.
1382 * editing/mac/EditorMac.mm:
1383 (WebCore::Editor::pasteWithPasteboard): Removed unneeded "m_frame.editor()" round trip that
1384 was left behind in this function.
1385 (WebCore::getImage): Added. Helper used by writeImageToPasteboard.
1386 (WebCore::Editor::writeURLToPasteboard): Added. Sets up PasteboardURL and then calls
1387 Pasteboard::write with it.
1388 (WebCore::Editor::writeImageToPasteboard): Added. Sets up PasteboardImage and then calls
1389 Pasteboard::write with it.
1390 * page/DragController.cpp:
1391 (WebCore::DragController::startDrag): Use Editor::writeURLToPasteboard instead of
1392 Pasteboard::writeURL on Mac.
1394 * platform/Pasteboard.h: Added PasteboardURL and PasteboardImage structures.
1395 Declare write functions for PasteboardWebContent, PasteboardURL, and PasteboardImage.
1396 Guard writeURL and writeImage with !PLATFORM(MAC).
1398 * platform/mac/PasteboardMac.mm:
1399 (WebCore::writeURLForTypes): Changed this to take a PasteboardURL.
1400 (WebCore::Pasteboard::write): Renamed writeURL and writeImage to this. Refactor both
1401 to take PasteboardURL and PasteboardImage arguments.
1402 (WebCore::fileWrapper): Renamed from fileWrapperForImage since the fact that this is
1403 for an image is now clear from its argument, a PasteboardImage.
1404 (WebCore::writeFileWrapperAsRTFDAttachment): Changed this function to use early return.
1406 2013-08-31 Andreas Kling <akling@apple.com>
1408 EditCommand constructors should take Document&.
1409 <https://webkit.org/b/120566>
1411 Reviewed by Darin Adler.
1413 Let EditCommand's and all subclass constructors take Document& instead of Document*.
1414 EditCommand::document() now returns a Document&.
1416 Added Editor::document() which returns Editor::frame().document() after asserting
1417 that it's non-null, to make passing a Document& from Editor functions easier.
1419 2013-08-31 Andreas Kling <akling@apple.com>
1421 Make more use of toRenderFoo(RenderObject&) cast helpers.
1422 <https://webkit.org/b/120565>
1424 Reviewed by Darin Adler.
1426 To make amends for putting ugly toRenderFoo(&renderer) casts everywhere,
1427 here's a patch that switches a bunch of code over to using reference-based casts.
1429 I removed pointer-based casts altogether for these renderers:
1437 2013-08-31 Santosh Mahto <santosh.ma@samsung.com>
1439 warning: unused parameter ‘renderingMode' in ImageBufferCairo.cpp:94
1440 https://bugs.webkit.org/show_bug.cgi?id=120543
1442 Reviewed by Darin Adler.
1444 Fixing warning by adding ASSERT_UNUSED.
1446 * platform/graphics/cairo/ImageBufferCairo.cpp:
1447 (WebCore::ImageBuffer::ImageBuffer):
1449 2013-08-31 Andreas Kling <akling@apple.com>
1451 Fix typo in r154931 that caused assertions in continuation tests.
1453 * rendering/InlineFlowBox.cpp:
1454 (WebCore::InlineFlowBox::paint):
1456 2013-08-31 Rob Buis <rwlbuis@webkit.org>
1458 XMLSerializer-attribute-namespace-prefix-conflicts can't produce reliable results
1459 https://bugs.webkit.org/show_bug.cgi?id=120490
1461 Reviewed by Ryosuke Niwa.
1463 Retain the key of the namespaces map by using AtomicString as key instead of AtomicStringImpl*.
1465 * editing/MarkupAccumulator.h:
1467 2013-08-31 Andreas Kling <akling@apple.com>
1469 InlineBox::renderer() and pals should return references.
1470 <https://webkit.org/b/120562>
1472 Reviewed by Antti Koivisto.
1474 Make InlineBox::renderer() and its friends return references instead of pointers.
1475 Every box always has a renderer, so this clears up any ambiguity, and a number of
1476 weird assertions in SVG code.
1478 Made InlineBox::m_renderer private so subclasses have to go through renderer().
1479 The next step will be to replace renderer() with tightly-typed accessors where
1480 applicable (e.g InlineTextBox's renderer is always a RenderText.)
1482 Also added reference versions of these RenderObject casts:
1487 - toRenderSVGInlineText()
1489 2013-08-31 Andreas Kling <akling@apple.com>
1491 PostAttachCallbackDisabler should take a ContainerNode&.
1492 <https://webkit.org/b/120560>
1494 Reviewed by Antti Koivisto.
1496 Let PostAttachCallbackDisabler take a reference and remove an ugly assertion.
1498 * dom/ContainerNode.h:
1499 (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
1500 (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
1502 (WebCore::Document::recalcStyle):
1503 * style/StyleResolveTree.cpp:
1504 (WebCore::Style::attachRenderTree):
1506 2013-08-31 Antti Koivisto <antti@apple.com>
1508 Rename ChildIterator -> ElementChildIterator, DescendantIterator -> ElementDescendantIterator
1509 https://bugs.webkit.org/show_bug.cgi?id=120561
1511 Reviewed by Andreas Kling.
1513 New names are more descriptive and consistent. They also put related iterator files close by in file lists.
1514 The types are always used with auto so longer names don't make them any clumsier to use.
1516 For simplicity included all Element iterator types from ElementIterator.h so it is the only file that has
1517 to be included by the clients.
1519 * GNUmakefile.list.am:
1521 * WebCore.vcxproj/WebCore.vcxproj:
1522 * WebCore.xcodeproj/project.pbxproj:
1523 * accessibility/AccessibilityNodeObject.cpp:
1524 * accessibility/AccessibilityRenderObject.cpp:
1525 * accessibility/AccessibilityTable.cpp:
1526 * css/CSSFontFaceSource.cpp:
1527 * dom/ChildIterator.h: Removed.
1528 * dom/DescendantIterator.h: Removed.
1530 * dom/ElementChildIterator.h: Copied from Source/WebCore/dom/ChildIterator.h.
1531 (WebCore::::ElementChildIterator):
1532 (WebCore::::operator):
1533 (WebCore::::ElementChildConstIterator):
1534 (WebCore::::ElementChildIteratorAdapter):
1537 (WebCore::::ElementChildConstIteratorAdapter):
1538 (WebCore::elementChildren):
1539 (WebCore::childrenOfType):
1540 * dom/ElementDescendantIterator.h: Copied from Source/WebCore/dom/DescendantIterator.h.
1541 (WebCore::::ElementDescendantIterator):
1542 (WebCore::::operator):
1543 (WebCore::::ElementDescendantConstIterator):
1544 (WebCore::::ElementDescendantIteratorAdapter):
1547 (WebCore::::ElementDescendantConstIteratorAdapter):
1548 (WebCore::elementDescendants):
1549 (WebCore::descendantsOfType):
1550 * dom/ElementIterator.h:
1552 * dom/TreeScope.cpp:
1553 * editing/ApplyStyleCommand.cpp:
1554 * editing/markup.cpp:
1555 * html/HTMLAppletElement.cpp:
1556 * html/HTMLFieldSetElement.cpp:
1557 * html/HTMLLabelElement.cpp:
1558 * html/HTMLMapElement.cpp:
1559 * html/HTMLMediaElement.cpp:
1560 * html/HTMLObjectElement.cpp:
1561 * loader/PlaceholderDocument.cpp:
1562 * rendering/FilterEffectRenderer.cpp:
1563 * style/StyleResolveTree.cpp:
1564 * svg/SVGElement.cpp:
1565 * svg/SVGSVGElement.cpp:
1566 * svg/animation/SMILTimeContainer.cpp:
1567 * svg/graphics/SVGImage.cpp:
1569 2013-08-31 Andreas Kling <akling@apple.com>
1571 Don't do document style recalc unless there's a RenderView.
1572 <https://webkit.org/b/120558>
1574 Reviewed by Antti Koivisto.
1576 There's no sense in computing style for a Document that has no RenderView.
1577 Checking this before continuing also lets us know that there's a Frame & FrameView
1578 present, simplifying some things later on.
1581 (WebCore::Document::recalcStyle):
1582 * style/StyleResolveForDocument.cpp:
1583 (WebCore::Style::resolveForDocument):
1585 2013-08-31 Antti Koivisto <antti@apple.com>
1587 Add common base for element iterators
1588 https://bugs.webkit.org/show_bug.cgi?id=120557
1590 Reviewed by Andreas Kling.
1592 Add ElementIterator and use it as the base for child and descendant iterators. The only difference is the definition of operator++.
1594 Also renamed DescendantIteratorAssertions to ElementIteratorAssertions.
1596 * GNUmakefile.list.am:
1598 * WebCore.vcxproj/WebCore.vcxproj:
1599 * WebCore.xcodeproj/project.pbxproj:
1600 * dom/ChildIterator.h:
1601 (WebCore::::ChildIterator):
1602 (WebCore::::operator):
1603 (WebCore::::ChildConstIterator):
1606 * dom/DescendantIterator.h:
1607 (WebCore::::DescendantIterator):
1608 (WebCore::::operator):
1609 (WebCore::::DescendantConstIterator):
1610 * dom/DescendantIteratorAssertions.h: Removed.
1611 * dom/ElementIterator.h: Added.
1612 (WebCore::::ElementIterator):
1613 (WebCore::::traverseNext):
1614 (WebCore::::traversePrevious):
1615 (WebCore::::traverseNextSibling):
1616 (WebCore::::traversePreviousSibling):
1617 (WebCore::::operator):
1619 (WebCore::::ElementConstIterator):
1620 * dom/ElementIteratorAssertions.h: Copied from Source/WebCore/dom/DescendantIteratorAssertions.h.
1621 (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
1622 (WebCore::ElementIteratorAssertions::domTreeHasMutated):
1623 (WebCore::ElementIteratorAssertions::dropEventDispatchAssertion):
1625 2013-08-30 Brent Fulgham <bfulgham@apple.com>
1627 [Windows] Build fix after r154921.
1629 AVFoundationCF uses an internal wrapper object around the C-API. The call point
1630 in the original patch was inside the wrapper, which did not (yet) provide
1631 a method implementation.
1633 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1634 (WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
1635 (WebCore::AVFWrapper::updateVideoLayerGravity):
1637 2013-08-30 Simon Fraser <simon.fraser@apple.com>
1639 Video with object-fit: cover can spill outside the box
1640 https://bugs.webkit.org/show_bug.cgi?id=52103
1642 Reviewed by Dean Jackson.
1644 object-fit on renderers which use accelerated compositing needs special
1647 For directly composited images, and video, GraphicsLayer needs to know
1648 both the size of the content layer, and also a rectangle at which this
1649 should be clipped (because, for the first time, that content layer can be
1650 larger than the renderer's content box).
1652 AVFoundation would always aspect-ratio fit video by default, so plumb
1653 through MediaPlayer a way to override that when object-fit requires it.
1655 Added a LAYER_TREE_INCLUDES_CONTENT_LAYERS enum to the layerTreeAsText()
1656 flags so we can dump content layers for testing.
1658 Tests: compositing/images/direct-image-object-fit.html
1659 compositing/reflections/direct-image-object-fit-reflected.html
1660 compositing/video/video-object-fit.html
1662 * page/Frame.h: New LayerTreeFlagsIncludeContentLayers flag.
1663 * platform/graphics/GraphicsLayer.h: New flag.
1664 * platform/graphics/MediaPlayer.cpp:
1665 (WebCore::MediaPlayer::shouldMaintainAspectRatio):
1666 (WebCore::MediaPlayer::setShouldMaintainAspectRatio):
1667 * platform/graphics/MediaPlayer.h:
1668 * platform/graphics/MediaPlayerPrivate.h:
1669 (WebCore::MediaPlayerPrivateInterface::shouldMaintainAspectRatio):
1670 (WebCore::MediaPlayerPrivateInterface::setShouldMaintainAspectRatio):
1671 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1672 (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
1673 (WebCore::MediaPlayerPrivateAVFoundation::setShouldMaintainAspectRatio):
1674 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1675 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1676 (WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
1677 (WebCore::AVFWrapper::platformLayer):
1678 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1679 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1680 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1681 (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
1682 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
1683 * platform/graphics/ca/GraphicsLayerCA.cpp: We need a new m_contentsClippingLayer to
1684 clip the contents layer, which only gets created when necessary. It has to be cloned
1686 (WebCore::GraphicsLayerCA::willBeDestroyed):
1687 (WebCore::GraphicsLayerCA::setContentsRect):
1688 (WebCore::GraphicsLayerCA::setContentsClippingRect):
1689 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1690 (WebCore::GraphicsLayerCA::updateSublayerList):
1691 (WebCore::GraphicsLayerCA::updateContentsImage):
1692 (WebCore::GraphicsLayerCA::updateContentsMediaLayer):
1693 (WebCore::GraphicsLayerCA::updateContentsCanvasLayer):
1694 (WebCore::GraphicsLayerCA::updateContentsColorLayer):
1695 (WebCore::GraphicsLayerCA::updateContentsRects):
1696 (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
1697 (WebCore::GraphicsLayerCA::ensureCloneLayers):
1698 (WebCore::GraphicsLayerCA::removeCloneLayers):
1699 (WebCore::GraphicsLayerCA::fetchCloneLayers):
1700 * platform/graphics/ca/GraphicsLayerCA.h:
1701 * rendering/RenderLayerBacking.cpp: Need to push both the contentsRect and
1702 the contentsClippingRect down to the GraphicsLayers. Most of the time they
1703 are the same, unless object-fit makes them different.
1704 (WebCore::RenderLayerBacking::resetContentsRect):
1705 (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
1706 (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor):
1707 (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
1708 (WebCore::RenderLayerBacking::updateImageContents):
1709 (WebCore::RenderLayerBacking::contentsBox):
1710 * rendering/RenderLayerCompositor.cpp:
1711 (WebCore::RenderLayerCompositor::layerTreeAsText):
1712 * rendering/RenderVideo.cpp:
1713 (WebCore::RenderVideo::updatePlayer):
1714 * testing/Internals.cpp:
1715 (WebCore::Internals::layerTreeAsText):
1716 * testing/Internals.h:
1717 * testing/Internals.idl:
1719 2013-08-30 Brent Fulgham <bfulgham@apple.com>
1721 [Windows] Update to incorporate additional suggestions
1722 https://bugs.webkit.org/show_bug.cgi?id=120448
1724 Reviewed by Darin Adler
1726 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Add
1727 notes as to why AVFoundationCF needs this extra method call.
1728 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Use OVERRIDE
1729 * rendering/RenderVideo.cpp: Replace ternary operator with logical &&.
1731 2013-08-30 Brent Fulgham <bfulgham@apple.com>
1733 [Windows] Vide element in page always uses non-hw accelerated mode.
1734 https://bugs.webkit.org/show_bug.cgi?id=120448
1736 Reviewed by Darin Adler
1738 This patch is unfortunately larger than my original idea, but seems to make the
1739 layout system happier. Instead of switching into composited mode when building
1740 the media player, we now build the original layout tree with compositing active
1741 if the underlying media element requires it. The AVFoundationCF player needs to
1742 have the compositor available at construction time so it can attach to the
1743 rendering device. Otherwise it falls back to CPU-only mode.
1745 * platform/graphics/MediaPlayer.cpp:
1746 (WebCore::MediaPlayer::requiresImmediateCompositing): Added
1747 * platform/graphics/MediaPlayer.h:
1748 * platform/graphics/MediaPlayerPrivate.h:
1749 (WebCore::MediaPlayerPrivateInterface::requiresImmediateCompositing): Added
1750 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1751 (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Added
1752 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1753 (WebCore::MediaPlayerPrivateAVFoundationCF::requiresImmediateCompositing):
1754 * rendering/RenderLayerCompositor.cpp:
1755 (WebCore::RenderLayerCompositor::requiresCompositingForVideo): Uses new
1756 'requiresImmediateCompositing' to short-circuit check for whether a
1757 compositor is required.
1758 * rendering/RenderVideo.cpp:
1759 (WebCore::RenderVideo::requiresImmediateCompositing):
1760 * rendering/RenderVideo.h:
1762 2013-08-30 Joseph Pecoraro <pecoraro@apple.com>
1764 Web Inspector: Breakpoints should have Automatically Continue Option
1765 https://bugs.webkit.org/show_bug.cgi?id=120187
1767 Reviewed by Timothy Hatcher.
1769 Tests: inspector-protocol/debugger/removeBreakpoint.html
1770 inspector-protocol/debugger/setBreakpoint-autoContinue.html
1771 inspector-protocol/debugger/setBreakpoint-column.html
1772 inspector-protocol/debugger/setBreakpoint-condition.html
1773 inspector-protocol/debugger/setBreakpoint.html
1775 * inspector/Inspector.json:
1776 Convert the "condition" argument of setBreakpoint and setBreakpointByUrl
1777 to a BreakpointOptions object with optional properties. One of which
1778 is "condition" and a new option "autoContinue".
1780 * bindings/js/ScriptDebugServer.h:
1781 * bindings/js/ScriptDebugServer.cpp:
1782 (WebCore::ScriptDebugServer::hasBreakpoint):
1783 (WebCore::ScriptDebugServer::pauseIfNeeded):
1784 Automatically continue if the breakpoint was hit and has autoContinue.
1786 * inspector/InspectorDebuggerAgent.h:
1787 * inspector/InspectorDebuggerAgent.cpp:
1788 (WebCore::buildObjectForBreakpointCookie):
1789 (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1790 (WebCore::InspectorDebuggerAgent::setBreakpoint):
1791 (WebCore::InspectorDebuggerAgent::continueToLocation):
1792 (WebCore::InspectorDebuggerAgent::didParseSource):
1793 * inspector/ScriptBreakpoint.h:
1794 (WebCore::ScriptBreakpoint::ScriptBreakpoint):
1795 Handle the new incoming BreakpointOptions type, and set the
1796 autoContinue state on ScriptBreakpoints.
1798 * inspector/front-end/DebuggerModel.js:
1799 (WebInspector.DebuggerModel.prototype.setBreakpointByURL):
1800 (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
1801 Update old front-end to be compatible with the new API.
1803 2013-08-30 Dean Jackson <dino@apple.com>
1805 Animations should use double for key values, not floats
1806 https://bugs.webkit.org/show_bug.cgi?id=120547
1808 Reviewed by Simon Fraser.
1810 Merge https://chromium.googlesource.com/chromium/blink/+/71de046541c77120874b9bff82958ee9e0e20c7c
1812 Some files have been renamed in the Blink port, and they have made some
1813 improvements, but I took what applied to us.
1815 All our existing tests passed.
1817 * css/StyleResolver.cpp:
1818 (WebCore::StyleResolver::keyframeStylesForAnimation):
1819 * css/WebKitCSSKeyframeRule.cpp:
1820 (WebCore::StyleKeyframe::parseKeyString):
1821 * css/WebKitCSSKeyframeRule.h:
1822 (WebCore::StyleKeyframe::getKeys):
1823 * platform/graphics/GraphicsLayer.h:
1824 (WebCore::AnimationValue::keyTime):
1825 (WebCore::AnimationValue::AnimationValue):
1826 (WebCore::FloatAnimationValue::create):
1827 (WebCore::FloatAnimationValue::FloatAnimationValue):
1828 (WebCore::TransformAnimationValue::create):
1829 (WebCore::TransformAnimationValue::TransformAnimationValue):
1830 (WebCore::FilterAnimationValue::create):
1831 (WebCore::FilterAnimationValue::FilterAnimationValue):
1832 * rendering/RenderLayerBacking.cpp:
1833 (WebCore::RenderLayerBacking::startAnimation):
1834 * rendering/style/KeyframeList.h:
1835 (WebCore::KeyframeValue::KeyframeValue):
1836 (WebCore::KeyframeValue::key):
1837 (WebCore::KeyframeValue::setKey):
1839 2013-08-30 Brendan Long <b.long@cablelabs.com>
1841 [GStreamer] support in-band text tracks
1842 https://bugs.webkit.org/show_bug.cgi?id=103771
1844 Reviewed by Eric Carlson.
1846 Tests: New tests added because existing tests were too specific.
1847 media/track/in-band/track-in-band-kate-ogg-cues-added-once.html
1848 media/track/in-band/track-in-band-kate-ogg-kind.html
1849 media/track/in-band/track-in-band-kate-ogg-language.html
1850 media/track/in-band/track-in-band-kate-ogg-mode.html
1851 media/track/in-band/track-in-band-kate-ogg-style.html
1852 media/track/in-band/track-in-band-kate-ogg-track-order.html
1853 media/track/in-band/track-in-band-srt-mkv-cues-added-once.html
1854 media/track/in-band/track-in-band-srt-mkv-kind.html
1855 media/track/in-band/track-in-band-srt-mkv-language.html
1856 media/track/in-band/track-in-band-srt-mkv-mode.html
1857 media/track/in-band/track-in-band-srt-mkv-style.html
1858 media/track/in-band/track-in-band-srt-mkv-track-order.html
1860 * CMakeLists.txt: Add InbandTextTrackPrivateGStreamer, InbandGenericTextTrack, InbandWebVTTTextTrack, and TextCombinerGStreamer files.
1861 * GNUmakefile.list.am: Same.
1862 * PlatformEfl.cmake: Same.
1864 * WebCore.vcxproj/WebCore.vcxproj: Same.
1865 * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
1866 * WebCore.xcodeproj/project.pbxproj: Same.
1867 * html/track/InbandGenericTextTrack.cpp: Split out code for handling generic cues.
1868 (WebCore::GenericTextTrackCueMap::GenericTextTrackCueMap): Move from InbandTextTrack.
1869 (WebCore::GenericTextTrackCueMap::~GenericTextTrackCueMap): Same.
1870 (WebCore::GenericTextTrackCueMap::add): Same.
1871 (WebCore::GenericTextTrackCueMap::find): Same.
1872 (WebCore::GenericTextTrackCueMap::remove): Same.
1873 (WebCore::InbandGenericTextTrack::create): Same.
1874 (WebCore::InbandGenericTextTrack::updateCueFromCueData): Same.
1875 (WebCore::InbandGenericTextTrack::addGenericCue): Same.
1876 (WebCore::InbandGenericTextTrack::updateGenericCue): Same.
1877 (WebCore::InbandGenericTextTrack::removeGenericCue): Same.
1878 (WebCore::InbandGenericTextTrack::removeCue): Same.
1879 (WebCore::InbandGenericTextTrack::InbandGenericTextTrack): Empty.
1880 (WebCore::InbandGenericTextTrack::~InbandGenericTextTrack): Empty.
1881 * html/track/InbandGenericTextTrack.h: Copied from Source/WebCore/html/track/InbandTextTrack.h.
1882 The only addition is the ASSERT_NOT_REACHED() for WebVTT cues.
1883 * html/track/InbandTextTrack.cpp: Add label and language changed callbacks.
1884 (WebCore::InbandTextTrack::create): Return a generic or WebVTT text track based on the private CueFormat.
1885 (WebCore::InbandTextTrack::labelChanged): Added.
1886 (WebCore::InbandTextTrack::languageChanged): Added.
1887 * html/track/InbandTextTrack.h: Add label and language changed callbacks.
1888 * html/track/InbandWebVTTTextTrack.cpp: Added, based on InbandTextTrack.
1889 (WebCore::InbandWebVTTTextTrack::create): Same.
1890 (WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): Empty.
1891 (WebCore::InbandWebVTTTextTrack::~InbandWebVTTTextTrack): Empty.
1892 (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): Sends data to a WebVTTParser.
1893 (WebCore::InbandWebVTTTextTrack::newCuesParsed): Adds cues when WebVTTParser parses them.
1894 (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Prints a warning when WebVTTParser has a problem.
1895 * html/track/InbandWebVTTTextTrack.h: Added.
1896 * platform/graphics/InbandTextTrackPrivate.h:
1897 (WebCore::InbandTextTrackPrivate::cueFormat): For determining if the track will have generic or WebVTT cues.
1898 (WebCore::InbandTextTrackPrivate::InbandTextTrackPrivate): Pass CueFormat in the constructor.
1899 * platform/graphics/InbandTextTrackPrivateClient.h: Same.
1900 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1901 (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Pass CueFormat (Generic) to InbandTextTrackPrivate.
1902 * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Add GRefPtr specializations for GstSample and GstEvent.
1903 * platform/graphics/gstreamer/GRefPtrGStreamer.h: Same.
1904 * platform/graphics/gstreamer/GStreamerUtilities.h: Add WARN_MEDIA_MESSAGE.
1905 * platform/graphics/gstreamer/GStreamerVersioning.h: Add a function to check GStreamer version at runtime.
1906 * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Added.
1907 (WebCore::textTrackPrivateEventCallback): Watches for tag and stream start events.
1908 (WebCore::textTrackPrivateSampleTimeoutCallback): See notifyTrackOfSample();
1909 (WebCore::textTrackPrivateStreamTimeoutCallback): See notifyTrackOfStreamChanged();
1910 (WebCore::textTrackPrivateTagsChangeTimeoutCallback): See notifyTrackOfTagsChanged();
1911 (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): Initializes tags and stream and sets up event callback.
1912 (WebCore::InbandTextTrackPrivateGStreamer::~InbandTextTrackPrivateGStreamer): Calls disconnect:
1913 (WebCore::InbandTextTrackPrivateGStreamer::disconnect): Removes signal handlers and frees some memory.
1914 (WebCore::InbandTextTrackPrivateGStreamer::handleSample): Adds samples to a list and sets up callback.
1915 (WebCore::InbandTextTrackPrivateGStreamer::streamChanged): Sets up callback.
1916 (WebCore::InbandTextTrackPrivateGStreamer::tagsChanged): Same.
1917 (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample): Parses all queued samples with WebVTTParser.
1918 (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged): Keeps track of current stream.
1919 (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfTagsChanged): Sets label and language from tags.
1920 * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: Added.
1921 (WebCore::InbandTextTrackPrivateGStreamer::create): Basic RefPtr create function.
1922 (WebCore::InbandTextTrackPrivateGStreamer::pad): Returns the pad this track is associated with (used
1923 to determine if a playbin text stream has already been associated with a text track).
1924 (WebCore::InbandTextTrackPrivateGStreamer::setIndex): Sets the track index (used for sorting).
1925 (WebCore::InbandTextTrackPrivateGStreamer::streamId): Returns the stream ID (used to handle new samples).
1926 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1927 (WebCore::mediaPlayerPrivateTextChangedCallback): Called for playbin "text-changed" event. See textChanged().
1928 (WebCore::mediaPlayerPrivateTextChangeTimeoutCallback): See notifyPlayerOfText().
1929 (WebCore::mediaPlayerPrivateNewTextSampleCallback): See newTextSample().
1930 (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initialize m_textTimerHandler.
1931 (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnect text tracks (they don't necessarily
1932 get freed here, since a script could hold a reference).
1933 (WebCore::MediaPlayerPrivateGStreamer::textChanged): Setup callback for notifyPlayerOfText.
1934 (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Create text tracks.
1935 (WebCore::MediaPlayerPrivateGStreamer::newTextSample): Handle new samples by giving them to a text track
1936 with a matching stream. This method is syncryonous because we need to get the stream start sticky event
1938 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1939 * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Added. This element forwards buffers from all
1940 of its input pads, but also converts plain text to WebVTT as needed.
1941 (webkit_text_combiner_init): Setup internal funnel.
1942 (webkitTextCombinerPadEvent): If the caps are plain text make sure we have a webvttenv, otherwise connect
1943 directly to the funnel.
1944 (webkitTextCombinerRequestNewPad): Setup ghostpad and event callback.
1945 (webkitTextCombinerReleasePad): Release pad and optional associated webvttenc.
1946 (webkit_text_combiner_class_init): Setup pad templates and request/release pad functions.
1947 (webkitTextCombinerNew): Returns a new WebKitTextCombiner.
1948 * platform/graphics/gstreamer/TextCombinerGStreamer.h: Added.
1949 * platform/graphics/gstreamer/TextSinkGStreamer.cpp: Added.
1950 (webkit_text_sink_init): Set sync=false.
1951 (webkitTextSinkGetProperty): Ignore sync property.
1952 (webkitTextSinkSetProperty): Same.
1953 (webkitTextSinkQuery): Ignore position and duration queries, forward everything else to appsink.
1954 (webkit_text_sink_class_init): Setup property and query functions.
1955 (webkitTextSinkNew): Return a new WebKitTextSink.
1956 * platform/graphics/gstreamer/TextSinkGStreamer.h: Added.
1958 2013-08-30 Dirk Schulze <krit@webkit.org>
1960 Animate CSS Image filter() function
1961 https://bugs.webkit.org/show_bug.cgi?id=119938
1963 Reviewed by Simon Fraser.
1965 With this patch, the new introduced CSS Image function filter() can be
1966 animated. According to the spec, just filter functions can be
1969 The patch also prepares StyleImage blending for interpolation of other
1970 generated images like gradients or cross-fade().
1972 http://dev.w3.org/fxtf/filters/#interpolating-filter-image
1974 Test: fast/filter-image/filter-image-animation.html
1976 * css/CSSComputedStyleDeclaration.cpp: Reuse the code that creates a
1977 CSSValueList from ComputeStyle logic.
1978 (WebCore::valueForPixel):
1979 For StyleRules we want to have not-adjusted length values.
1980 (WebCore::ComputedStyleExtractor::valueForShadow):
1981 Add argument to switch between adjusted and not-adjusted length.
1982 (WebCore::ComputedStyleExtractor::valueForFilter):
1984 (WebCore::ComputedStyleExtractor::propertyValue):
1985 * css/CSSComputedStyleDeclaration.h:
1986 * css/CSSFilterImageValue.h: Add helper functions
1987 for animating filters. We need to pass the FilterOperations for
1988 the image generation and the CSSValueList for StyleRule.
1989 (WebCore::CSSFilterImageValue::filterOperations):
1990 (WebCore::CSSFilterImageValue::setFilterOperations):
1991 (WebCore::CSSFilterImageValue::cachedImage):
1992 * page/animation/CSSPropertyAnimation.cpp:
1993 Add animation code to support animations between two filter()
1995 (WebCore::blendFilterOperations):
1996 (WebCore::blendFunc):
1997 (WebCore::filterBlend):
1998 * rendering/style/StyleGeneratedImage.h: Add helper functions.
1999 (WebCore::CSSFilterImageValue::imageValue):
2002 2013-08-30 Leo Yang <leoyang@blackberry.com>
2004 Make sure remove CachedResourceClient when destructing IconLoader
2005 https://bugs.webkit.org/show_bug.cgi?id=120541
2007 Reviewed by Darin Adler.
2009 It's a good practice to call CachedResource::removeClient(client)
2010 when the client is being destructed. We need to do this for InconLoader
2011 to prevent m_resource from keeping dangling client in case m_resource
2012 is referenced by someone else in the future.
2014 Found by code inspection. Just a defensive enhancement no new tests.
2016 * loader/icon/IconLoader.cpp:
2017 (WebCore::IconLoader::~IconLoader):
2019 2013-08-30 Hans Muller <hmuller@adobe.com>
2021 [CSS Shapes] Redefine the ShapeIntervals class as a template
2022 https://bugs.webkit.org/show_bug.cgi?id=120381
2024 Reviewed by Alexandru Chiculita.
2026 No new tests, this was just an internal refactoring.
2028 The existing ShapeIntervals class has been converted into a template whose
2029 type specifies the type of the interval's x1 and x2 horizontal endpoints
2030 (formerly float). There were several other minor changes, all in the realm
2033 - The original type was a struct with public x1 and x2 fields. It's now a class
2034 with x1 and x2 accessors. ASSERTS are now used to maintain the x2 >= x1 invariant.
2035 In the original code the invariant was not checked.
2037 - The logical comparison operators have been overloaded for ShapeInterval.
2038 This obviates the IntervalX1Comparator class which has been removed.
2040 - The names of the global ShapeInterval Vector set operation methods have been
2041 changed to reflect the fact that they're now members of the template class,
2042 rather than globals.
2044 PolygonShape.cpp depended on the ShapeInterval class. In the one or two places
2045 where an interval's x1 or x1 fields had been set explicitly, ShapeInterval::set()
2046 is now used to set both fields. This also enables the invariant check mentioned
2047 earlier. The other changes to this class are syntatic, to account for the ShapeInterval
2051 * GNUmakefile.list.am:
2052 * WebCore.vcxproj/WebCore.vcxproj:
2053 * WebCore.xcodeproj/project.pbxproj:
2054 * rendering/shapes/PolygonShape.cpp:
2055 (WebCore::appendIntervalX):
2056 (WebCore::computeXIntersections):
2057 (WebCore::computeOverlappingEdgeXProjections):
2058 (WebCore::PolygonShape::getExcludedIntervals):
2059 (WebCore::PolygonShape::getIncludedIntervals):
2060 * rendering/shapes/PolygonShape.h:
2061 * rendering/shapes/ShapeInterval.cpp: Removed.
2062 * rendering/shapes/ShapeInterval.h: The entire implementation is now here.
2063 (WebCore::ShapeInterval::ShapeInterval):
2064 (WebCore::ShapeInterval::x1):
2065 (WebCore::ShapeInterval::x2):
2066 (WebCore::ShapeInterval::set):
2067 (WebCore::ShapeInterval::overlaps):
2068 (WebCore::ShapeInterval::intersect):
2069 (WebCore::ShapeInterval::sortVector):
2070 (WebCore::ShapeInterval::uniteVectors):
2071 (WebCore::ShapeInterval::intersectVectors):
2072 (WebCore::ShapeInterval::subtractVectors):
2073 (WebCore::operator==):
2074 (WebCore::operator!=):
2075 (WebCore::operator< ):
2076 (WebCore::operator> ):
2077 (WebCore::operator<=):
2078 (WebCore::operator>=):
2080 2013-08-30 Antti Koivisto <antti@apple.com>
2082 Use Element& in StyleResolveTree
2083 https://bugs.webkit.org/show_bug.cgi?id=120540
2085 Reviewed by Andreas Kling.
2087 * dom/ContainerNode.cpp:
2088 (WebCore::attachChild):
2089 (WebCore::detachChild):
2091 (WebCore::Document::recalcStyle):
2092 (WebCore::Document::createRenderTree):
2093 (WebCore::Document::detach):
2095 (WebCore::Element::lazyReattach):
2096 (WebCore::Element::updateExistingPseudoElement):
2097 (WebCore::Element::createPseudoElementIfNeeded):
2098 (WebCore::disconnectPseudoElement):
2099 * dom/ShadowRoot.cpp:
2100 (WebCore::ShadowRoot::setResetStyleInheritance):
2101 * html/HTMLDetailsElement.cpp:
2102 (WebCore::HTMLDetailsElement::parseAttribute):
2103 * html/HTMLInputElement.cpp:
2104 (WebCore::HTMLInputElement::updateType):
2105 (WebCore::HTMLInputElement::parseAttribute):
2106 * html/HTMLObjectElement.cpp:
2107 (WebCore::HTMLObjectElement::renderFallbackContent):
2108 * html/HTMLPlugInImageElement.cpp:
2109 (WebCore::HTMLPlugInImageElement::willRecalcStyle):
2110 (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
2111 (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
2112 (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
2113 * html/HTMLSelectElement.cpp:
2114 (WebCore::HTMLSelectElement::parseAttribute):
2115 (WebCore::HTMLSelectElement::parseMultipleAttribute):
2116 * html/HTMLViewSourceDocument.cpp:
2117 (WebCore::HTMLViewSourceDocument::createContainingTable):
2118 (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
2119 (WebCore::HTMLViewSourceDocument::addLine):
2120 (WebCore::HTMLViewSourceDocument::finishLine):
2121 (WebCore::HTMLViewSourceDocument::addBase):
2122 (WebCore::HTMLViewSourceDocument::addLink):
2123 * html/parser/HTMLConstructionSite.cpp:
2124 (WebCore::executeTask):
2125 * html/parser/HTMLTreeBuilder.cpp:
2126 (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
2127 * html/shadow/InsertionPoint.cpp:
2128 (WebCore::InsertionPoint::willAttachRenderers):
2129 (WebCore::InsertionPoint::willDetachRenderers):
2130 * loader/PlaceholderDocument.cpp:
2131 (WebCore::PlaceholderDocument::createRenderTree):
2132 * style/StyleResolveTree.cpp:
2133 (WebCore::Style::attachChildren):
2134 (WebCore::Style::attachRenderTree):
2135 (WebCore::Style::detachChildren):
2136 (WebCore::Style::detachRenderTree):
2137 (WebCore::Style::resolveLocal):
2138 (WebCore::Style::updateTextStyle):
2139 (WebCore::Style::resolveShadowTree):
2140 (WebCore::Style::resolveTree):
2142 Documents only ever have one child element. Remove the loop.
2144 (WebCore::Style::detachRenderTreeInReattachMode):
2145 (WebCore::Style::reattachRenderTree):
2146 * style/StyleResolveTree.h:
2148 (WebCore::SVGTests::handleAttributeChange):
2149 * xml/XMLErrors.cpp:
2150 (WebCore::XMLErrors::insertErrorMessageBlock):
2151 * xml/parser/XMLDocumentParserLibxml2.cpp:
2152 (WebCore::XMLDocumentParser::startElementNs):
2154 2013-08-30 Andreas Kling <akling@apple.com>
2156 Document style resolve should take Document&.
2157 <https://webkit.org/b/120534>
2159 Reviewed by Darin Adler.
2161 Tweak Style::resolveTree(Document*) and Style::resolveForDocument(Document*) to take Document& instead.
2164 (WebCore::Document::recalcStyle):
2165 * html/HTMLLinkElement.cpp:
2166 (WebCore::HTMLLinkElement::process):
2167 * style/StyleResolveForDocument.cpp:
2168 (WebCore::Style::resolveForDocument):
2169 * style/StyleResolveForDocument.h:
2170 * style/StyleResolveTree.cpp:
2171 (WebCore::Style::resolveTree):
2172 * style/StyleResolveTree.h:
2174 2013-08-30 Darin Adler <darin@apple.com>
2176 [Mac] No need for Pasteboard::getDataSelection
2177 https://bugs.webkit.org/show_bug.cgi?id=120536
2179 Reviewed by Anders Carlsson.
2181 * editing/Editor.h: Added some Mac-only private member functions.
2183 * editing/mac/EditorMac.mm:
2184 (WebCore::Editor::selectionInWebArchiveFormat): Added.
2185 (WebCore::Editor::adjustedSelectionRange): Added.
2186 (WebCore::attributedStringForRange): Added.
2187 (WebCore::dataInRTFDFormat): Added.
2188 (WebCore::dataInRTFFormat): Added.
2189 (WebCore::Editor::dataSelectionForPasteboard): Moved the implementation
2190 of Pasteboard::getDataSelection here, refactoring to share code with the
2191 writeSelectionToPasteboard function.
2192 (WebCore::Editor::writeSelectionToPasteboard): Refactored to share code
2193 with the new function above.
2195 * platform/Pasteboard.h: Removed getDataSelection. One less layering violation.
2196 * platform/mac/PasteboardMac.mm: Ditto.
2198 2013-08-30 Rob Buis <rwlbuis@webkit.org>
2200 SVG error parsing empty path
2201 https://bugs.webkit.org/show_bug.cgi?id=78980
2203 Reviewed by Darin Adler.
2205 According to the spec (http://www.w3.org/TR/SVG/paths.html#PathData), path 'd' attribute can be empty.
2206 No error should be reported in this case.
2208 * svg/SVGPathParser.cpp:
2209 (WebCore::SVGPathParser::parsePathDataFromSource):
2210 * svg/SVGPathUtilities.cpp:
2211 (WebCore::buildPathFromString):
2212 (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
2213 (WebCore::buildPathFromByteStream):
2214 (WebCore::buildSVGPathSegListFromByteStream):
2215 (WebCore::buildStringFromByteStream):
2216 (WebCore::buildStringFromSVGPathSegList):
2217 (WebCore::buildSVGPathByteStreamFromString):
2218 (WebCore::buildAnimatedSVGPathByteStream):
2219 (WebCore::addToSVGPathByteStream):
2221 2013-08-30 Andreas Kling <akling@apple.com>
2223 Try to fix CSS_VARIABLES and CSS_DEVICE_ADAPTATION builds.
2225 * css/StyleResolver.cpp:
2226 (WebCore::StyleResolver::StyleResolver):
2227 (WebCore::StyleResolver::resolveVariables):
2229 2013-08-30 Commit Queue <commit-queue@webkit.org>
2231 Unreviewed, rolling out r154891.
2232 http://trac.webkit.org/changeset/154891
2233 https://bugs.webkit.org/show_bug.cgi?id=120539
2235 broke the mac build (Requested by Ossy on #webkit).
2237 * platform/network/SynchronousLoaderClient.h:
2239 2013-08-30 Csaba Osztrogonác <ossy@webkit.org>
2241 Add USE(CFNETWORK) guard to SynchronousLoaderClient::didReceiveAuthenticationChallengedidReceiveAuthenticationChallenge()
2242 https://bugs.webkit.org/show_bug.cgi?id=120532
2244 Reviewed by Darin Adler.
2246 * platform/network/SynchronousLoaderClient.h:
2248 2013-08-30 Brent Fulgham <bfulgham@apple.com>
2250 [Windows] Video inside page always uses non-hardware accelerated playback
2251 https://bugs.webkit.org/show_bug.cgi?id=120448
2253 Reviewed by Eric Carlson.
2255 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2256 (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Check for
2257 D3D device. If it doesn't exist, switch to compositing mode and try again.
2259 2013-08-30 Leo Yang <leoyang@blackberry.com>
2261 Possible dangling CachedResourceClient of StyleRuleImport and XSLImportRule
2262 https://bugs.webkit.org/show_bug.cgi?id=120479
2264 Reviewed by Darin Adler.
2266 In StyleRuleImport::requestStyleSheet() and XSLImportRule::loadSheet() we
2267 didn't call removeClient() for m_cachedSheet before assigning m_cachedSheet
2268 a new value. This could leave the client as a client of the old cached
2269 sheet and dangling after the client is deleted. Fix them by calling removeClient()
2270 before assigning m_cacheSheet a new value.
2272 Found by code inspection. Seems no way to test it automatically.
2274 * css/StyleRuleImport.cpp:
2275 (WebCore::StyleRuleImport::requestStyleSheet):
2276 * xml/XSLImportRule.cpp:
2277 (WebCore::XSLImportRule::loadSheet):
2279 2013-08-30 Gabor Abraham <abrhm@inf.u-szeged.hu>
2281 Fix unused parameter warning in graphics/cairo/GraphicsContextCairo.cpp file.
2282 https://bugs.webkit.org/show_bug.cgi?id=120524
2284 Reviewed by Darin Adler.
2286 * platform/graphics/cairo/GraphicsContextCairo.cpp:
2287 (WebCore::GraphicsContext::fillRectWithRoundedHole):
2289 2013-08-30 Andreas Kling <akling@apple.com>
2291 StyleResolver & friends should use Document&.
2292 <https://webkit.org/b/120527>
2294 Reviewed by Antti Koivisto.
2296 Document&-ify StyleResolver, ElementRuleCollector and SelectorChecker.
2298 2013-08-30 Brent Fulgham <bfulgham@apple.com>
2300 [Windows] Unreviewed build correction after r154835. Only seen when doing a
2301 full (clean) rebuild.
2303 * DerivedSources.cpp: Remove reference to deleted JSHTMLDialogElement.cpp
2305 2013-08-30 Tamas Czene <tczene@inf.u-szeged.hu>
2307 Resolve unused parameter warning in FindController.cpp
2308 https://bugs.webkit.org/show_bug.cgi?id=120407
2310 Reviewed by Darin Adler.
2312 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2313 (wordAtPositionForAtkBoundary):
2315 2013-08-30 Arpita Bahuguna <a.bah@samsung.com>
2317 setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
2318 https://bugs.webkit.org/show_bug.cgi?id=120293
2320 Reviewed by Darin Adler.
2322 setAttributeNode() performs a case-insensitive search for an existing
2323 attribute. If an existing attribute is found, it retrieves the index of
2324 such an attribute. For setting the attribute's new value, we call upon
2325 setAttributeInternal() to which both the index as well as the name of
2326 the attribute is passed.
2327 The name passed to this method is the same as the one passed to the
2328 setAttributeNode() API from the webpage and thus can be in any case.
2330 However, setAttributeInternal() uses this name to get the corresponding
2331 existing attribute node. Since this retrieval is not case-insensitive,
2332 the existing node is not returned and thus the new value is not set on
2334 We should instead use the passed index and use that to retrieve the
2337 Note that obtaining the attribute's value using getAttributeNode() would
2338 still return the correct value, i.e. the new one.
2340 Also, this change shall make our behavior similar to that of FF and IE.
2342 Test: fast/dom/Element/setAttributeNode-for-existing-attribute.html
2345 (WebCore::Element::setAttributeInternal):
2346 If the passed index is not equal to attributeNotFound, we use that index
2347 to retrieve the existing attribute.
2349 2013-08-30 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
2351 SimpleClassVectorTraits shall be used for RuleData
2352 https://bugs.webkit.org/show_bug.cgi?id=120526
2354 Reviewed by Andreas Kling.
2356 Whereas RuleData is POD type and whereas there are quite a lot of Vector<RuleData> occurrences in the code,
2357 it makes sense to use SimpleClassVectorTraits for RuleData and hence to allow using more efficient mem functions
2362 2013-08-30 Andreas Kling <akling@apple.com>
2364 Node::document() should return a reference.
2365 <https://webkit.org/b/120496>
2367 Reviewed by Antti Koivisto.
2369 Now that orphan DocumentType nodes also have document pointers, it's no longer
2370 possible to have a null Node::document().
2372 Cement this by making document() return a reference, and remove the various
2373 null checks exposed by this.
2375 2013-08-30 Andrei Parvu <parvu@adobe.com>
2377 [CSS Masking] -webkit-mask-repeat: space does not work
2378 Added the space option to background-repeat and -webkit-mask-repeat.
2379 With the property value 'space', the background or mask image gets repeated as often as it fits within the background positioning
2380 area. The repeated images are spaced equally to fill the unused area.
2381 https://bugs.webkit.org/show_bug.cgi?id=119324
2383 Reviewed by Dirk Schulze.
2385 Tests: css3/background/background-repeat-space-border.html
2386 css3/background/background-repeat-space-content.html
2387 css3/background/background-repeat-space-padding.html
2388 css3/masking/mask-repeat-space-border.html
2389 css3/masking/mask-repeat-space-content.html
2390 css3/masking/mask-repeat-space-padding.html
2392 * platform/graphics/GeneratorGeneratedImage.cpp:
2393 (WebCore::GeneratorGeneratedImage::drawPattern): Passed the space values to the image buffer.
2394 * platform/graphics/Image.cpp:
2395 (WebCore::Image::drawTiled): Added the space values when computing the location of the tile.
2396 * platform/graphics/Image.h: Added the space property.
2397 (WebCore::Image::spaceSize):
2398 (WebCore::Image::setSpaceSize):
2399 * platform/graphics/ImageBuffer.h: Added the space property.
2400 (WebCore::ImageBuffer::spaceSize):
2401 (WebCore::ImageBuffer::setSpaceSize):
2402 * platform/graphics/cg/ImageBufferCG.cpp: Passed the space values when copying an image.
2403 (WebCore::ImageBuffer::copyImage):
2404 * platform/graphics/cg/ImageCG.cpp: Added the space values when creating a platform pattern.
2405 (WebCore::Image::drawPattern):
2406 * rendering/RenderBoxModelObject.cpp:
2407 (WebCore::RenderBoxModelObject::paintFillLayerExtended): Computed the space values on x and y axis.
2408 (WebCore::getSpace):
2409 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Pass the space values to the Image class.
2410 * rendering/RenderBoxModelObject.h: Added the space property.
2411 (WebCore::RenderBoxModelObject::BackgroundImageGeometry::spaceSize):
2412 (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setSpaceSize):
2413 * svg/graphics/SVGImage.cpp: Passed the space property to the created image.
2414 (WebCore::SVGImage::drawPatternForContainer):
2415 * svg/graphics/SVGImageForContainer.cpp: Passed the space property to the image property.
2416 (WebCore::SVGImageForContainer::drawPattern):
2418 2013-08-30 Antti Koivisto <antti@apple.com>
2420 Remove AttachContext
2421 https://bugs.webkit.org/show_bug.cgi?id=120518
2423 Reviewed by Andreas Kling.
2425 This type is not useful anymore. Just pass the precomputed style to attachRenderTree and reattach-or-not flag to detachRenderTree.
2427 * style/StyleResolveTree.cpp:
2428 (WebCore::Style::createRendererIfNeeded):
2429 (WebCore::Style::attachChildren):
2430 (WebCore::Style::attachShadowRoot):
2431 (WebCore::Style::attachRenderTree):
2432 (WebCore::Style::detachChildren):
2433 (WebCore::Style::detachShadowRoot):
2434 (WebCore::Style::detachRenderTree):
2435 (WebCore::Style::reattachRenderTree):
2436 (WebCore::Style::resolveLocal):
2437 * style/StyleResolveTree.h:
2439 2013-08-30 Commit Queue <commit-queue@webkit.org>
2441 Unreviewed, rolling out r154826.
2442 http://trac.webkit.org/changeset/154826
2443 https://bugs.webkit.org/show_bug.cgi?id=120517
2445 Still breaks icloud.com (Requested by mwenge_ on #webkit).
2447 * rendering/RenderBox.cpp:
2448 (WebCore::RenderBox::computePositionedLogicalWidth):
2449 (WebCore::RenderBox::computePositionedLogicalHeight):
2450 * rendering/RenderBox.h:
2451 (WebCore::RenderBox::intrinsicSize):
2452 * rendering/RenderButton.h:
2453 * rendering/RenderFileUploadControl.cpp:
2454 (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
2455 * rendering/RenderListBox.cpp:
2456 (WebCore::RenderListBox::RenderListBox):
2457 (WebCore::RenderListBox::computePreferredLogicalWidths):
2458 (WebCore::RenderListBox::computeLogicalHeight):
2459 * rendering/RenderListBox.h:
2460 * rendering/RenderMenuList.h:
2461 * rendering/RenderSlider.cpp:
2462 (WebCore::RenderSlider::computePreferredLogicalWidths):
2463 * rendering/RenderTextControl.cpp:
2464 (WebCore::RenderTextControl::RenderTextControl):
2465 (WebCore::RenderTextControl::computeLogicalHeight):
2466 * rendering/RenderTextControl.h:
2468 2013-08-29 Ryosuke Niwa <rniwa@webkit.org>
2470 Unduplicate the code to convert between VisiblePosition and index
2471 https://bugs.webkit.org/show_bug.cgi?id=120506
2473 Reviewed by Darin Adler.
2475 Encapsulate the conversion between VisiblePosition and index into indexForVisiblePosition
2476 and visiblePositionForIndexUsingCharacterIterator. It's unfortunate that these two functions
2477 are different from the two other existing functions of similar names but we've at least
2478 confined problems into a single cpp file now.
2480 * accessibility/AccessibilityRenderObject.cpp:
2481 (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
2482 (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
2483 * editing/Editor.cpp:
2484 (WebCore::findFirstMarkable):
2485 * editing/htmlediting.cpp:
2486 (WebCore::indexForVisiblePosition):
2487 (WebCore::visiblePositionForIndexUsingCharacterIterator):
2488 * editing/htmlediting.h:
2489 * html/HTMLTextFormControlElement.cpp:
2490 (WebCore::hasVisibleTextArea):
2491 (WebCore::HTMLTextFormControlElement::setSelectionRange):
2492 (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
2493 (WebCore::HTMLTextFormControlElement::visiblePositionForIndex):
2494 * html/HTMLTextFormControlElement.h:
2495 * rendering/RenderTextControl.cpp:
2496 * rendering/RenderTextControl.h:
2498 2013-08-29 Ryosuke Niwa <rniwa@webkit.org>
2500 Avoid Node references from AXObjectCache from leaking
2501 https://bugs.webkit.org/show_bug.cgi?id=120501
2503 Reviewed by Darin Adler.
2505 Merge https://chromium.googlesource.com/chromium/blink/+/454f31497613b6d0fbcfb0df757254b64a177c06
2506 without any tests since we don't have the same infrastructure to detect leaks in WebKit.
2508 A real world example of this would be selecting an <option> item inside frame by keyboard. The node will not be deref()-ed until the topDocument() is detached.
2510 The issue was that AccessibilityMenuListOption is created in childrenChanged()
2511 hook called when its RenderObject is being destroyed. This patch modifies AccessibilityMenuListPopup so it won't create AccessibilityMenuListOption if its
2512 element is already detached.
2514 * accessibility/AccessibilityMenuListPopup.cpp:
2515 (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
2516 * rendering/RenderMenuList.cpp:
2517 (WebCore::RenderMenuList::didUpdateActiveOption):
2519 2013-08-26 Simon Fraser <simon.fraser@apple.com>
2521 Implement object-fit CSS property
2522 https://bugs.webkit.org/show_bug.cgi?id=52040
2524 Reviewed by Antti Koivisto, Sam Weinig.
2526 Merge object-fit patch from Blink r156535, which started as a patch
2529 Since then, the spec has gone to CR. This patch is an
2530 implementation of object-fit as described in
2531 http://www.w3.org/TR/2012/CR-css3-images-20120417/#object-fit
2533 Object-fit is used to maintain the aspect ratio of replaced content
2534 within its content box. All object-fit values but the initial one
2535 ('fill') will always ensure that the aspect ratio is retained, in
2536 different ways (fit inside the content box, cover the content box, or
2537 use intrinsic size). Painting is always clipped against the content
2538 box, regardless of the 'overflow' property.
2540 Tests: fast/css/object-fit/object-fit-canvas.html
2541 fast/css/object-fit/object-fit-embed.html
2542 fast/css/object-fit/object-fit-grow-landscape.html
2543 fast/css/object-fit/object-fit-grow-portrait.html
2544 fast/css/object-fit/object-fit-img-svg.html
2545 fast/css/object-fit/object-fit-img-svg2.html
2546 fast/css/object-fit/object-fit-img.html
2547 fast/css/object-fit/object-fit-input-image.html
2548 fast/css/object-fit/object-fit-object.html
2549 fast/css/object-fit/object-fit-shrink.html
2550 fast/css/object-fit/object-fit-video-poster.html
2551 fast/css/parsing-object-fit.html
2552 http/tests/css/object-fit-delayed-img-svg.html
2553 media/video-object-fit-change.html
2554 media/video-object-fit.html
2556 * css/CSSComputedStyleDeclaration.cpp:
2557 (WebCore::ComputedStyleExtractor::propertyValue):
2558 * css/CSSParser.cpp:
2559 (WebCore::isValidKeywordPropertyAndValue):
2560 (WebCore::isKeywordPropertyID):
2561 (WebCore::CSSParser::parseValue):
2562 * css/CSSPrimitiveValueMappings.h:
2563 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2564 (WebCore::CSSPrimitiveValue::operator EObjectFit):
2565 * css/CSSProperty.cpp:
2566 (WebCore::CSSProperty::isInheritedProperty):
2567 * css/CSSPropertyNames.in:
2568 * css/CSSValueKeywords.in:
2569 * css/DeprecatedStyleBuilder.cpp:
2570 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2571 * css/StyleResolver.cpp:
2572 (WebCore::StyleResolver::applyProperty):
2574 (video): Set object-fit to 'contain'. This is how VIDEO elements
2576 * loader/cache/CachedImage.cpp:
2577 (WebCore::CachedImage::imageSizeForRenderer):
2578 * loader/cache/CachedImage.h:
2579 * platform/graphics/LayoutSize.h:
2580 (WebCore::fitLayoutSizeToAspectRatio): New function to grow or shrink
2581 in one dimension to fit to the aspect ratio.
2582 * rendering/RenderHTMLCanvas.cpp:
2583 (WebCore::RenderHTMLCanvas::paintReplaced): Apply object-fit and
2585 * rendering/RenderImage.cpp:
2586 (WebCore::RenderImage::updateInnerContentRect):
2587 (WebCore::RenderImage::imageDimensionsChanged): Update intrinsic
2588 size properly, and recalculate the inner content rectangle (the
2589 exact area occupied by the replaced content) again if appropriate.
2590 (WebCore::RenderImage::paintReplaced): Apply object-fit and clip
2592 (WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
2593 object-fit may leave parts of the content box empty, in which case
2594 it won't be fully obscured.
2595 (WebCore::RenderImage::layout):
2596 * rendering/RenderImage.h:
2597 * rendering/RenderImageResource.cpp:
2598 (WebCore::RenderImageResource::intrinsicSize): Need this to
2599 differentiate between intrinsic and extrinsic size for SVG images.
2600 * rendering/RenderImageResource.h:
2601 * rendering/RenderImageResourceStyleImage.h:
2602 * rendering/RenderReplaced.cpp:
2603 (WebCore::RenderReplaced::replacedContentRect): Return the
2604 rectangle occupied by the replaced content. This will be identical
2605 to the content box if object-fit is 'fill', but will typically be
2606 something else for other values.
2607 * rendering/RenderReplaced.h:
2608 * rendering/RenderVideo.cpp:
2609 (WebCore::RenderVideo::videoBox): Not much left to do here, with
2610 the new RenderReplaced::replacedContentRect() method in place.
2611 (WebCore::RenderVideo::paintReplaced): Apply object-fit and clip
2613 * rendering/style/RenderStyle.cpp:
2614 (WebCore::RenderStyle::changeRequiresRepaint):
2615 * rendering/style/RenderStyle.h:
2616 * rendering/style/RenderStyleConstants.h:
2617 * rendering/style/StyleRareNonInheritedData.cpp:
2618 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2619 (WebCore::StyleRareNonInheritedData::operator==):
2620 * rendering/style/StyleRareNonInheritedData.h:
2622 2013-08-29 Tim Horton <timothy_horton@apple.com>
2624 SVG clipping, masking, and gradients-on-text do not respect the device scale factor
2625 https://bugs.webkit.org/show_bug.cgi?id=120377
2626 <rdar://problem/14777944>
2628 Reviewed by Simon Fraser.
2630 Tests: svg/custom/masking-clipping-hidpi.svg
2632 calculateTransformationToOutermostCoordinateSystem should include the page's
2633 device scale factor in its transform.
2635 * rendering/svg/SVGRenderingContext.cpp:
2636 (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
2638 2013-08-29 Chris Fleizach <cfleizach@apple.com>
2640 AX: Crash when VoiceOver reference a TextMarker from an iframe that has been removed
2641 https://bugs.webkit.org/show_bug.cgi?id=120318
2643 Reviewed by Darin Adler.
2645 These crashes occur because an AXTextMarker is retrieved that reference a Node in an iframe.
2646 The iframe goes away, but when it tries to clean up and remove that Node from the InUse cache,
2647 the document() tree has already been detached, so it never clears the actual InUse cache.
2649 The fix here is to pre-emptively clean up any nodes in the document going away when the frame is about to disconnect.
2651 I'm removing the clearAXObjectCache() at the disconnectOwnerElement because it
2652 1) Cleared the AXObjectCache for the iframe document (which is always empty -- only the top level doc maintains the cache), because
2653 the document() tree had already been detached... so it essentially did nothing.
2654 2) And if it did work, we wouldn't want this behavior -- that is to say, when an iframe goes away, we don't want to clear the entire cache for all
2655 the other documents (there's even an existing layout test to verify this behavior).
2657 Test: platform/mac/accessibility/stale-textmarker-crash.html
2659 * accessibility/AXObjectCache.cpp:
2660 (WebCore::AXObjectCache::clearTextMarkerNodesInUse):
2661 * accessibility/AXObjectCache.h:
2663 (WebCore::Frame::disconnectOwnerElement):
2665 2013-08-29 Brent Fulgham <bfulgham@apple.com>
2667 [Windows] More unreviewed gardening of project file.
2668 Move css files inline with related source code.
2670 * WebCore.vcxproj/WebCore.vcxproj:
2671 * WebCore.vcxproj/WebCore.vcxproj.filters:
2673 2013-08-29 Sam Weinig <sam@webkit.org>
2675 Add ENABLE guards for Promises
2676 https://bugs.webkit.org/show_bug.cgi?id=120488
2678 Reviewed by Andreas Kling.
2680 * Configurations/FeatureDefines.xcconfig:
2682 2013-08-29 Andreas Kling <akling@apple.com>
2684 Inspector: Use a bit of RefPtr::release() in generated code.
2685 <https://webkit.org/b/120485>
2687 Reviewed by Darin Adler.
2689 Just something I spotted while reading InspectorBackendDispatcher.cpp.
2690 Avoid 3 cases of reference count churnery.
2692 * inspector/CodeGeneratorInspectorStrings.py:
2694 2013-08-29 Christophe Dumez <ch.dumez@sisa.samsung.com>
2696 According to DOM4, all DocType nodes should have a document
2697 https://bugs.webkit.org/show_bug.cgi?id=99244
2699 Reviewed by Darin Adler.
2701 Doctypes now always have a node document and can be moved across document boundaries as per
2702 the latest DOM4 specification:
2703 http://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype
2704 http://dom.spec.whatwg.org/#dom-node-ownerdocument
2706 This means that DOMImplementation.createDocumentType() now sets the ownerDocument of the
2707 new DocumentType Node to the associated document of the current "context" object. In
2708 DOM4, all nodes have a document at all times. DocumentType nodes can now be moved across
2709 document boundaries so that the node can be added to a Document after being created.
2711 This means we will no longer need to special case DocumentType nodes in the code and
2712 Node::document() can no longer return NULL, which means that we'll be able to remove
2713 NULL checks in call sites.
2715 Firefox stable and since recently Blink already follow DOM4 here while IE10 does not (yet).
2717 Test: fast/dom/createDocumentType-ownerDocument.html
2719 * dom/ContainerNode.cpp:
2720 (WebCore::checkAcceptChild):
2721 * dom/DOMImplementation.cpp:
2722 (WebCore::DOMImplementation::createDocumentType):
2723 (WebCore::DOMImplementation::createDocument):
2725 (WebCore::Node::document):
2727 2013-08-29 Darin Adler <darin@apple.com>
2729 Pasteboard::writeSelection violates layering (first step, fixes it for Mac platform only)
2730 https://bugs.webkit.org/show_bug.cgi?id=120483
2732 Reviewed by Anders Carlsson.
2734 * editing/Editor.cpp:
2735 (WebCore::Editor::cut): Added some comments. Use the new writeSelectionToPasteboard
2736 function on Mac instead of Pasteboard::writeSelection.
2737 (WebCore::Editor::copy): Ditto.
2739 * editing/Editor.h: Removed an old unused Mac-only writeSelectionToPasteboard function
2740 that was a cover that called through to Pasteboard::writeSelectionForTypes. Added a new
2741 Mac-only writeSelectionToPasteboard function that is destined to become cross-platform soon.
2743 * editing/mac/EditorMac.mm:
2744 (WebCore::Editor::writeSelectionToPasteboard): Added. Uses a new pattern where the Editor
2745 puts all the data into a structure called PasteboardWebContent then calls the Pasteboard to
2746 do the work. The platform-specific aspect of PasteboardWebContent is what formats are needed
2749 * page/DragController.cpp:
2750 (WebCore::DragController::startDrag): Added some comments. Use the new writeSelectionToPasteboard
2751 function on Mac instead of Pasteboard::writeSelection.
2753 * platform/Pasteboard.h: Remove some unneeded forward declarations. Added comments for all functions
2754 that don't belong in this class because they are layering violations; this becomes the to do list for
2755 the project we are beginning here. Added the new PasteboardWebContent structure, empty on all platforms
2756 except for Mac for now. Removed writeSelectionForTypes, a Mac-only function that is no longer used.
2757 Added setTypes and writeAfterSettingTypes, the two halves of the future function named writeWebContent.
2758 Put the writeSelection function inside a "not Mac" if statement. Later to be deleted entirely.
2760 * platform/mac/PasteboardMac.mm: Removed now-unneeded selectionPasteboardTypes,
2761 Pasteboard::writeSelectionForTypes, and writeSelection functions.
2762 (WebCore::Pasteboard::setTypes): Added. First half of writing web content to the pasteboard.
2763 (WebCore::Pasteboard::writeAfterSettingTypes): Added. Second half of writing web content to the pasteboard.
2765 2013-08-29 Antti Koivisto <antti@apple.com>
2767 Remove code behind ENABLE(DIALOG_ELEMENT)
2768 https://bugs.webkit.org/show_bug.cgi?id=120467
2770 Reviewed by Darin Adler.
2772 It is incomplete and no one is building it.
2775 * Configurations/FeatureDefines.xcconfig:
2776 * DerivedSources.make:
2777 * DerivedSources.pri:
2778 * GNUmakefile.list.am:
2781 * WebCore.xcodeproj/project.pbxproj:
2782 * bindings/generic/RuntimeEnabledFeatures.cpp:
2783 * bindings/generic/RuntimeEnabledFeatures.h:
2784 * css/StyleResolver.cpp:
2785 (WebCore::StyleResolver::adjustRenderStyle):
2787 * dom/ContextFeatures.cpp:
2788 * dom/ContextFeatures.h:
2792 (WebCore::Element::removedFrom):
2793 (WebCore::Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries):
2795 (WebCore::Element::isDisabledFormControl):
2796 * dom/ElementRareData.h:
2797 (WebCore::ElementRareData::ElementRareData):
2798 * html/HTMLDialogElement.cpp: Removed.
2799 * html/HTMLDialogElement.h: Removed.
2800 * html/HTMLDialogElement.idl: Removed.
2801 * html/HTMLElementsAllInOne.cpp:
2802 * html/HTMLTagNames.in:
2803 * rendering/RenderDialog.cpp: Removed.
2804 * rendering/RenderDialog.h: Removed.
2805 * rendering/RenderLayer.cpp:
2806 (WebCore::RenderLayer::rebuildZOrderLists):
2807 (WebCore::RenderLayer::collectLayers):
2808 * rendering/RenderLayer.h:
2809 * rendering/RenderObject.h:
2810 (WebCore::RenderObject::isCounter):
2811 * rendering/RenderingAllInOne.cpp:
2812 * testing/InternalSettings.cpp:
2813 (WebCore::InternalSettings::Backup::Backup):
2814 (WebCore::InternalSettings::Backup::restoreTo):
2815 * testing/InternalSettings.h:
2817 2013-08-29 Simon Fraser <simon.fraser@apple.com>
2819 Fix slider thumb event handling to use local, not absolute coordinates
2820 https://bugs.webkit.org/show_bug.cgi?id=120480
2822 Reviewed by Darin Adler.
2824 SliderThumbElement::setPositionFromPoint() did all of its coordinate
2825 math by mapping renderer rects into absolute coordinates, which was
2826 unnecessary and expensive.
2828 Fix by doing all the math in the coordinate space of the input's
2829 renderer. This simplified the code. Also, currentPosition
2830 was computed but unused, so was removed.
2832 No behavior change. Tested by fast/forms/range/slider-transformed.html
2834 * html/shadow/SliderThumbElement.cpp:
2835 (WebCore::SliderThumbElement::setPositionFromPoint):
2837 2013-08-29 Zan Dobersek <zdobersek@igalia.com>
2839 [Automake] libWebCoreDOM.la could use a better name
2840 https://bugs.webkit.org/show_bug.cgi?id=120232
2842 Reviewed by Martin Robinson.
2844 * bindings/gobject/GNUmakefile.am: Rename the libWebCoreDOM library to libGObjectDOMBindings.
2846 2013-08-29 Joseph Pecoraro <pecoraro@apple.com>
2848 Web Inspector: Download Web Archive of Inspected Page
2849 https://bugs.webkit.org/show_bug.cgi?id=119774
2851 Reviewed by Timothy Hatcher.
2853 Add PageAgent.archive which will return a Base-64 encoded web archive
2854 when successful. In order to then allow saving non-string files, extend
2855 InspectorFrontendHost.save to allow for Base-64 encoded data.
2857 * inspector/Inspector.json:
2858 * inspector/InspectorPageAgent.cpp:
2859 (WebCore::InspectorPageAgent::archive):
2860 * inspector/InspectorPageAgent.h:
2861 Introduce and implement PageAgent.archive. Create a Web Archive of the
2864 * inspector/InspectorFrontendClient.h:
2865 * inspector/InspectorFrontendClientLocal.h:
2866 (WebCore::InspectorFrontendClientLocal::save):
2867 * inspector/InspectorFrontendHost.cpp:
2868 (WebCore::InspectorFrontendHost::save):
2869 * inspector/InspectorFrontendHost.h:
2870 * inspector/InspectorFrontendHost.idl:
2871 Extend InspectorFrontendHost.save to include a base64Encoded param.
2873 * inspector/front-end/FileManager.js:
2874 * inspector/front-end/InspectorFrontendHostStub.js:
2875 (.WebInspector.InspectorFrontendHostStub.prototype.save):
2876 Misc. updates to the old inspector for function changes.
2878 2013-08-29 Robert Hogan <robert@webkit.org>
2880 Positioned Replaced Elements That Aren't RenderReplaced get Incorrect Width
2881 https://bugs.webkit.org/show_bug.cgi?id=93735
2883 Reviewed by David Hyatt.
2885 Replaced elements that aren't RenderReplaced aren't |isReplaced| and don't have an
2886 intrinsic height or width. This causes them to go down the wrong height and width computation
2887 path in RenderBox when they are absolute positioned.
2889 The notion of |isReplaced| is entwined with the notion of being |isInline| so it isn't really
2890 possible to make them isReplaced without re-wiring a lot of code. So instead use an ad-hoc definition
2891 of isReplacedElement in RenderBox to bring all replaced elements into the height and width calculation.
2892 To make sure we get the right height and width in there, give non-RenderReplaced replaced renderers
2893 the helpers for returning their approximation of intrinsic height and width.
2895 The initial attempt at landing this patch had to be rolled out because it used LayoutUnit() for default
2896 intrinsic height of some replaced elements and this made the layout of the elements unstable in some sites.
2897 The fix for this issue is captured in intrinsic-button-and-input-height.html.
2899 Tests: fast/replaced/intrinsic-button-and-input-height.html
2900 fast/replaced/width-and-height-of-positioned-replaced-elements.html
2902 * rendering/RenderBox.cpp:
2903 (WebCore::isReplacedElement):
2904 (WebCore::RenderBox::computePositionedLogicalWidth):
2905 (WebCore::RenderBox::computePositionedLogicalHeight):
2906 * rendering/RenderBox.h:
2907 (WebCore::RenderBox::intrinsicSize):
2908 * rendering/RenderButton.h:
2909 * rendering/RenderFileUploadControl.cpp:
2910 (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
2911 * rendering/RenderListBox.cpp:
2912 (WebCore::RenderListBox::RenderListBox):
2913 (WebCore::RenderListBox::computePreferredLogicalWidths):
2914 (WebCore::RenderListBox::computeLogicalHeight):
2915 * rendering/RenderListBox.h:
2916 * rendering/RenderMenuList.h:
2917 * rendering/RenderReplaced.h:
2918 * rendering/RenderSlider.cpp:
2919 (WebCore::RenderSlider::computePreferredLogicalWidths):
2920 * rendering/RenderTextControl.cpp:
2921 (WebCore::RenderTextControl::RenderTextControl):
2922 (WebCore::RenderTextControl::computeLogicalHeight):
2923 * rendering/RenderTextControl.h:
2925 2013-08-29 Brent Fulgham <bfulgham@apple.com>
2927 [Windows] Unreviewed gardening. Add missing *.css files from project.
2929 * WebCore.vcxproj/WebCore.vcxproj:
2930 * WebCore.vcxproj/WebCore.vcxproj.filters:
2932 2013-08-29 Pratik Solanki <pratik.solanki@gmail.com>
2934 SharedBuffer m_segments and m_dataArray must be exclusive
2935 https://bugs.webkit.org/show_bug.cgi?id=77715
2937 Reviewed by Benjamin Poulain.
2939 When USE(NETWORK_CFDATA_ARRAY_CALLBACK) is enabled, we use m_dataArray to hold the incoming
2940 data. We do not use m_segments. Since they are exclusive in practice, do not define or use
2941 m_segments when NETWORK_CFDATA_ARRAY_CALLBACK is enabled.
2943 No new tests because no functional changes.
2945 * platform/SharedBuffer.cpp:
2946 (WebCore::SharedBuffer::append):
2947 (WebCore::SharedBuffer::clear):
2948 (WebCore::SharedBuffer::copy):
2949 (WebCore::SharedBuffer::buffer):
2950 (WebCore::SharedBuffer::getSomeData):
2951 * platform/SharedBuffer.h:
2953 2013-08-29 Daniel Bates <dabates@apple.com>
2955 [iOS] Upstream changes to WebCore/style
2956 https://bugs.webkit.org/show_bug.cgi?id=120173
2958 Reviewed by Darin Adler.
2960 * style/StyleResolveTree.cpp:
2961 (WebCore::Style::elementImplicitVisibility): Added; specific to iOS.
2962 (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
2963 (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
2964 (WebCore::Style::resolveTree): Modified to instantiate CheckForVisibilityChangeOnRecalcStyle when building on iOS.
2966 2013-08-29 Arnaud Renevier <a.renevier@samsung.com>
2968 [cairo] canvas drawing on itself doesn't work with accelerated canvas
2969 https://bugs.webkit.org/show_bug.cgi?id=118808
2971 Reviewed by Martin Robinson.
2973 When copying an accelerated image, we try to get its dimensions with
2974 cairo_image_surface_get_width/cairo_image_surface_get_height. As
2975 surface is not an image, this returns width and height of 0.
2977 Many other places use cairo_image_surface_get although the surface may
2980 This patch fixes those issues by implementing a cairoSurfaceSize
2981 helper that returns the surface size whatever type it is.
2983 It use cairo_surface_create_similar instead of
2984 cairo_image_surface_create in copyCairoImageSurface. It also calls
2985 cairo_paint in encodeImage when a drawing over a black background is
2988 It copies the surface to an image surface if needed in extractImage.
2990 No new tests. Covered by existing tests.
2992 * platform/graphics/cairo/BitmapImageCairo.cpp:
2993 (WebCore::BitmapImage::BitmapImage):
2994 (WebCore::BitmapImage::draw):
2995 (WebCore::BitmapImage::checkForSolidColor):
2996 * platform/graphics/cairo/CairoUtilities.cpp:
2997 (WebCore::copyCairoImageSurface):
2998 (WebCore::cairoSurfaceSize):
2999 * platform/graphics/cairo/CairoUtilities.h:
3000 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3001 (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3002 * platform/graphics/gtk/GdkCairoUtilities.cpp:
3003 (cairoSurfaceToGdkPixbuf):
3004 * platform/graphics/gtk/GdkCairoUtilities.h:
3005 * platform/graphics/gtk/ImageBufferGtk.cpp:
3006 (WebCore::encodeImage):
3007 * platform/graphics/gtk/ImageGtk.cpp:
3008 (WebCore::BitmapImage::getGdkPixbuf):
3009 * platform/gtk/DragIcon.cpp:
3010 (WebCore::DragIcon::setImage):
3012 2013-08-29 Tamas Czene <tczene@inf.u-szeged.hu>
3014 Buildfix after r154806 for !ENABLE(CSS_REGIONS) platforms.
3015 https://bugs.webkit.org/show_bug.cgi?id=120461
3017 Reviewed by Csaba Osztrogonác.
3019 moveToFlowThreadIfNeeded() is used only inside of ENABLE(CSS_REGIONS)
3020 block (and only once), so it should be guarded too.
3022 * style/StyleResolveTree.cpp:
3024 2013-08-29 David Kilzer <ddkilzer@apple.com>
3026 BUILD FIX (r154778): AXSearchFieldCancelButtonText() is not defined on iOS
3028 See: AX: Cancel button in search field not accessible.
3029 <https://webkit.org/b/120322>
3031 Fixes the following build error:
3033 In file included from Source/WebCore/accessibility/AccessibilityAllInOne.cpp:44:
3034 Source/WebCore/accessibility/AccessibilitySearchFieldButtons.cpp:46:12: error: use of undeclared identifier 'AXSearchFieldCancelButtonText'
3035 return AXSearchFieldCancelButtonText();
3039 * accessibility/AccessibilitySearchFieldButtons.cpp:
3040 (WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
3041 Return String() instead of calling AXSearchFieldCancelButtonText() on iOS.
3043 2013-08-29 Antti Koivisto <antti@apple.com>
3045 Remove NodeRenderingContext
3046 https://bugs.webkit.org/show_bug.cgi?id=120466
3048 Reviewed by Andreas Kling.
3050 Switch the few remaining clients of this class to call the underlying code directly.
3053 * GNUmakefile.list.am:
3056 * WebCore.vcxproj/WebCore.vcxproj:
3057 * WebCore.xcodeproj/project.pbxproj:
3058 * css/StyleResolver.cpp:
3059 (WebCore::StyleResolver::State::initForStyleResolve):
3060 * dom/DOMAllInOne.cpp:
3064 Remove Node::parentNodeForRenderingAndStyle(). Make clients invoke NodeRenderingTraversal::parent() directly.
3066 * dom/NodeRenderingContext.cpp: Removed.
3067 * dom/NodeRenderingContext.h: Removed.
3071 * dom/TreeScope.cpp:
3074 Remove virtual TreeScope::resetStyleInheritance. Make clients cast to ShadowRoot when needed.
3076 * html/HTMLSummaryElement.cpp:
3077 (WebCore::HTMLSummaryElement::detailsElement):
3078 * style/StyleResolveTree.cpp:
3079 (WebCore::Style::createTextRendererIfNeeded):
3081 For consistency switch resetStyleInheritance check to use parentNode() instead of renderingParentNode. This matches the NodeRenderingTraversal implementation.
3082 This difference is probably not testable in current trunk.
3084 (WebCore::Style::resolveTree):
3086 2013-08-29 Antti Koivisto <antti@apple.com>
3088 Move element renderer creation out of NodeRenderingContext
3089 https://bugs.webkit.org/show_bug.cgi?id=120461
3091 Reviewed by Andreas Kling.
3093 Move NodeRenderingContext::createRendererIfNeeded() and the related utility functions to StyleResolveTree.
3095 Tighten typing and constness. Refactor sligthly to be more understandable.
3098 (WebCore::Element::shouldMoveToFlowThread):
3100 * dom/NodeRenderingContext.cpp:
3101 (WebCore::NodeRenderingContext::NodeRenderingContext):
3102 (WebCore::NodeRenderingContext::nextRenderer):
3103 (WebCore::NodeRenderingContext::previousRenderer):
3104 (WebCore::NodeRenderingContext::parentRenderer):
3105 * dom/NodeRenderingContext.h:
3106 * dom/PseudoElement.h:
3107 * style/StyleResolveTree.cpp:
3108 (WebCore::Style::nextSiblingRenderer):
3109 (WebCore::Style::shouldCreateRenderer):
3110 (WebCore::Style::elementInsideRegionNeedsRenderer):
3111 (WebCore::Style::moveToFlowThreadIfNeeded):
3112 (WebCore::Style::createRendererIfNeeded):
3113 (WebCore::Style::attachRenderTree):
3114 * svg/SVGElement.cpp:
3115 (WebCore::SVGElement::shouldMoveToFlowThread):
3118 2013-08-28 Chris Fleizach <cfleizach@apple.com>
3120 AX: WebProcess at com.apple.WebCore: WebCore::AXObjectCache::rootObject + 27
3121 https://bugs.webkit.org/show_bug.cgi?id=120434
3123 Reviewed by Darin Adler.
3125 Crash logs indicate that there's a null pointer access in rootObject. That seems like it could only
3126 happen in Document was null.
3128 Unfortunately, there are no reproducible steps and no other information to construct a test case.
3130 * accessibility/AXObjectCache.cpp:
3131 (WebCore::AXObjectCache::rootObject):
3133 2013-08-28 Ryosuke Niwa <rniwa@webkit.org>
3135 The code to look for an ancestor form element is duplicated in three different places
3136 https://bugs.webkit.org/show_bug.cgi?id=120391
3138 Reviewed by Darin Adler.
3140 Unduplicated the code by putting a single implementation in HTMLFormElement.cpp.
3143 * html/FormAssociatedElement.cpp:
3144 (WebCore::FormAssociatedElement::findAssociatedForm):
3145 (WebCore::FormAssociatedElement::formAttributeChanged):
3146 * html/HTMLElement.cpp:
3147 (WebCore::HTMLElement::virtualForm):
3148 * html/HTMLElement.h:
3149 * html/HTMLFormControlElement.cpp:
3150 (WebCore::HTMLFormControlElement::HTMLFormControlElement):
3151 * html/HTMLFormElement.cpp:
3152 (WebCore::HTMLFormElement::findClosestFormAncestor):
3153 * html/HTMLFormElement.h:
3154 * html/HTMLImageElement.cpp:
3155 (WebCore::HTMLImageElement::insertedInto):
3156 * html/HTMLObjectElement.cpp:
3157 (WebCore::HTMLObjectElement::HTMLObjectElement):
3158 * html/parser/HTMLTreeBuilder.cpp:
3159 (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
3161 2013-08-28 Ryosuke Niwa <rniwa@webkit.org>
3163 Stop throwing DOM exceptions in internal 'XMLHttpRequest' response getters
3164 https://bugs.webkit.org/show_bug.cgi?id=120446
3166 Reviewed by Alexey Proskuryakov.
3168 Merge https://chromium.googlesource.com/chromium/blink/+/c8188c21452501b68950a9fcc1f5cbc7b4de4df5
3170 Unlike 'responseText' and 'responseXML', 'responseBlob' and
3171 'responseArrayBuffer' are not exposed to JavaScript (they don't
3172 appear in the IDL or in the specification). As they are only called from
3173 custom bindings in response to a JavaScript call to the 'response' getter,
3174 we can safely replace the exception-throwing code in the implementation
3175 with an ASSERT that the request type is correct.
3177 * bindings/js/JSXMLHttpRequestCustom.cpp:
3178 (WebCore::JSXMLHttpRequest::response):
3179 * xml/XMLHttpRequest.cpp:
3180 (WebCore::XMLHttpRequest::responseBlob):
3181 (WebCore::XMLHttpRequest::responseArrayBuffer):
3182 * xml/XMLHttpRequest.h:
3184 2013-08-28 Chris Curtis <chris_curtis@apple.com>
3186 https://bugs.webkit.org/show_bug.cgi?id=119548
3187 Refactoring Exception throws.
3189 Reviewed by Geoffrey Garen.
3191 Gets column information from the error object for reporting exceptions.
3192 * bindings/js/JSDOMBinding.cpp:
3193 (WebCore::reportException):
3194 * bindings/js/ScriptCallStackFactory.cpp:
3195 (WebCore::createScriptCallStackFromException):
3197 Moved setting an exception into the vm, These functions changed to use the new functionality.
3199 * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
3200 (WebCore::JSAudioBufferSourceNode::setBuffer):
3201 * bindings/js/JSBiquadFilterNodeCustom.cpp:
3202 (WebCore::JSBiquadFilterNode::setType):
3203 * bindings/js/JSCryptoCustom.cpp:
3204 (WebCore::JSCrypto::getRandomValues):
3205 * bindings/js/JSDOMBinding.cpp:
3206 (WebCore::setDOMException):
3207 * bindings/js/JSInjectedScriptHostCustom.cpp:
3208 (WebCore::JSInjectedScriptHost::setFunctionVariableValue):
3209 * bindings/js/JSJavaScriptCallFrameCustom.cpp:
3210 (WebCore::JSJavaScriptCallFrame::evaluate):
3211 (WebCore::JSJavaScriptCallFrame::setVariableValue):
3212 * bindings/js/JSNodeFilterCondition.cpp:
3213 (WebCore::JSNodeFilterCondition::acceptNode):
3214 * bindings/js/JSOscillatorNodeCustom.cpp:
3215 (WebCore::JSOscillatorNode::setType):
3216 * bindings/js/JSPannerNodeCustom.cpp:
3217 (WebCore::JSPannerNode::setPanningModel):
3218 (WebCore::JSPannerNode::setDistanceModel):
3219 * bindings/js/JSSVGLengthCustom.cpp:
3220 (WebCore::JSSVGLength::convertToSpecifiedUnits):
3221 * bindings/js/JSWebGLRenderingContextCustom.cpp:
3222 (WebCore::getObjectParameter):
3223 (WebCore::JSWebGLRenderingContext::getAttachedShaders):
3224 (WebCore::JSWebGLRenderingContext::getExtension):
3225 (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
3226 (WebCore::JSWebGLRenderingContext::getParameter):
3227 (WebCore::JSWebGLRenderingContext::getProgramParameter):
3228 (WebCore::JSWebGLRenderingContext::getShaderParameter):
3229 (WebCore::JSWebGLRenderingContext::getUniform):
3230 (WebCore::dataFunctionf):
3231 (WebCore::dataFunctioni):
3232 (WebCore::dataFunctionMatrix):
3233 * bindings/js/JSXMLHttpRequestCustom.cpp:
3234 (WebCore::JSXMLHttpRequest::open):
3235 * bindings/js/SerializedScriptValue.cpp:
3236 (WebCore::CloneBase::throwStackOverflow):
3237 (WebCore::CloneDeserializer::throwValidationError):
3238 (WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed):
3239 * bindings/js/WorkerScriptController.cpp:
3240 (WebCore::WorkerScriptController::evaluate):
3241 (WebCore::WorkerScriptController::setException):
3242 * bridge/c/c_instance.cpp:
3243 (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
3244 (JSC::Bindings::CInstance::invokeMethod):
3245 (JSC::Bindings::CInstance::invokeDefaultMethod):
3246 (JSC::Bindings::CInstance::invokeConstruct):
3247 (JSC::Bindings::CInstance::toJSPrimitive):
3248 * bridge/objc/objc_instance.mm:
3249 (ObjcInstance::invokeMethod):
3250 * bridge/objc/objc_runtime.mm:
3251 (JSC::Bindings::ObjcArray::setValueAt):
3252 (JSC::Bindings::ObjcArray::valueAt):
3253 * bridge/objc/objc_utility.mm:
3254 (JSC::Bindings::throwError):
3255 * bridge/qt/qt_instance.cpp:
3256 (JSC::Bindings::QtField::valueFromInstance):
3257 (JSC::Bindings::QtField::setValueToInstance):
3258 * bridge/runtime_array.cpp:
3259 (JSC::RuntimeArray::put):
3260 (JSC::RuntimeArray::putByIndex):
3261 * bridge/runtime_object.cpp:
3262 (JSC::Bindings::RuntimeObject::throwInvalidAccessError):
3264 2013-08-28 Alexey Proskuryakov <ap@apple.com>
3266 Remove an unused data member from Page.
3268 Rubber-stamped by Brady Eidson.
3272 Removed m_cookieEnabled. This was completely dead code, long obsoleted by PageSettings.
3274 2013-08-28 Gustavo Noronha Silva <gns@gnome.org>
3276 Unreviewed build fix - copy/paste failure, copied too much.
3278 * bindings/gobject/WebKitDOMCustom.h:
3280 2013-08-28 Dean Jackson <dino@apple.com>
3282 [WebGL] CoreGraphics can provide greyscale image data
3283 https://webkit.org/b/120443
3285 Reviewed by Simon Fraser.
3287 CoreGraphics can decode greyscale or greyscale+alpha images
3288 while preserving the format. Our WebGL texture unpacker
3289 was seeing this and assuming it meant the data did not come
3290 from an <img> element. Since that method already special cased
3291 CoreGraphics, the fix was to simply return true for these
3294 I also renamed srcFormatComeFromDOMElementOrImageData
3295 to srcFormatComesFromDOMElementOrImageData.
3297 Test: fast/canvas/webgl/tex-image-with-greyscale-image.html
3299 * platform/graphics/GraphicsContext3D.cpp: Call new name.
3300 * platform/graphics/GraphicsContext3D.h:
3301 (WebCore::GraphicsContext3D::srcFormatComesFromDOMElementOrImageData):
3302 Add support for R8, AR8, A8, and RA8 data formats.
3304 2013-08-28 Gustavo Noronha Silva <gns@gnome.org>
3306 [GTK] HTMLElement lost setID and getID - need to add compatibility symbols
3307 https://bugs.webkit.org/show_bug.cgi?id=120440
3309 Reviewed by Martin Robinson.
3311 No tests, just adding compatibility symbols.
3313 setID and getID were removed, and the parent class (Element) ones should be used instead.
3314 We need to keep our ABI compatible, though, so add compatibility symbols.
3316 * bindings/gobject/WebKitDOMCustom.cpp:
3317 (webkit_dom_html_element_get_id):
3318 (webkit_dom_html_element_set_id):
3319 * bindings/gobject/WebKitDOMCustom.h:
3321 2013-08-28 Simon Fraser <simon.fraser@apple.com>
3323 Fix compositing layers in columns
3324 https://bugs.webkit.org/show_bug.cgi?id=120436
3326 Reviewed by Dave Hyatt.
3328 Remove the old hack in RenderLayer::updateLayerPosition() for placing
3329 layers in columns, which changed the layer position for composited
3330 layers; this broke hit-testing.
3332 Fix a better way by moving compositing layers to the correct
3333 positions that take column offsets into account, by fixing
3334 RenderLayer::convertToLayerCoords() to optionally apply column
3335 adjustment, and using this in the code which positions compositing layers.
3337 Tests: compositing/columns/ancestor-clipped-in-paginated.html
3338 compositing/columns/clipped-in-paginated.html
3339 compositing/columns/composited-columns-vertical-rl.html
3340 compositing/columns/composited-columns.html
3341 compositing/columns/composited-in-paginated-rl.html
3342 compositing/columns/composited-in-paginated-writing-mode-rl.html
3343 compositing/columns/composited-lr-paginated-repaint.html
3344 compositing/columns/composited-rl-paginated-repaint.html
3345 compositing/columns/hittest-composited-in-paginated.html
3346 compositing/columns/rotated-in-paginated.html
3347 compositing/columns/untransformed-composited-in-paginated.html
3349 * rendering/RenderLayer.cpp:
3350 (WebCore::RenderLayer::updateLayerPosition):
3351 (WebCore::RenderLayer::convertToPixelSnappedLayerCoords):
3352 (WebCore::accumulateOffsetTowardsAncestor):
3353 (WebCore::RenderLayer::convertToLayerCoords):
3354 * rendering/RenderLayer.h:
3355 * rendering/RenderLayerBacking.cpp:
3356 (WebCore::RenderLayerBacking::updateCompositedBounds):
3357 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3359 2013-08-28 Brent Fulgham <bfulgham@webkit.org>
3361 [WinCairo] Unreviewed build fix.
3363 * WebCore.vcxproj/WebCore.vcxproj: Don't exclude the full screen
3364 window from the build.
3365 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3367 2013-08-28 Benjamin Poulain <benjamin@webkit.org>
3369 Fix the build after r154780
3371 * dom/SpaceSplitString.cpp:
3372 (WebCore::SpaceSplitStringData::create):
3374 2013-08-27 Benjamin Poulain <bpoulain@apple.com>
3376 Simplify and clean SpaceSplitString
3377 https://bugs.webkit.org/show_bug.cgi?id=120385
3379 Reviewed by Ryosuke Niwa.
3381 Clean up of SpaceSplitString following the cleaning of the DOMTokenList hierarchy.
3382 This brings the following:
3383 - Fix the coding style of the header.
3384 - Remove the concepts of empty and null. The list can now be empty or have something.
3385 There is no null state.
3386 - Put the tokens directly following SpaceSplitStringData instead of using a Vector in between.
3389 * dom/ElementData.h:
3390 (WebCore::ElementData::hasClass):
3391 * dom/SpaceSplitString.cpp:
3392 (WebCore::tokenizeSpaceSplitString):
3393 (WebCore::SpaceSplitStringData::containsAll):
3394 (WebCore::SpaceSplitString::set):
3395 (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
3396 (WebCore::TokenCounterProcessor::TokenCounterProcessor):
3397 (WebCore::TokenCounterProcessor::processToken):
3398 (WebCore::TokenCounterProcessor::tokenCount):
3399 (WebCore::TokenInitializerProcessor::TokenInitializerProcessor):
3400 (WebCore::TokenInitializerProcessor::processToken):
3401 (WebCore::TokenInitializerProcessor::nextMemoryBucket):
3402 (WebCore::SpaceSplitStringData::create):
3403 (WebCore::SpaceSplitStringData::destroy):
3404 * dom/SpaceSplitString.h:
3405 (WebCore::SpaceSplitStringData::contains):
3406 (WebCore::SpaceSplitStringData::size):
3407 (WebCore::SpaceSplitStringData::operator[]):
3408 (WebCore::SpaceSplitStringData::ref):
3409 (WebCore::SpaceSplitStringData::deref):
3410 (WebCore::SpaceSplitStringData::SpaceSplitStringData):
3411 (WebCore::SpaceSplitStringData::~SpaceSplitStringData):
3412 (WebCore::SpaceSplitStringData::tokenArrayStart):
3413 (WebCore::SpaceSplitString::SpaceSplitString):
3414 (WebCore::SpaceSplitString::operator!=):
3415 (WebCore::SpaceSplitString::clear):
3416 (WebCore::SpaceSplitString::contains):
3417 (WebCore::SpaceSplitString::containsAll):
3418 (WebCore::SpaceSplitString::size):
3419 (WebCore::SpaceSplitString::isEmpty):
3420 (WebCore::SpaceSplitString::operator[]):
3421 (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
3422 * html/ClassList.cpp:
3423 (WebCore::ClassList::classNames):
3424 * page/EventHandler.cpp:
3425 (WebCore::findDropZone):
3427 2013-08-28 Benjamin Poulain <benjamin@webkit.org>
3429 Simplify and clean SpaceSplitString