1 2013-09-05 Mihnea Ovidenie <mihnea@adobe.com>
3 Replace node() calls with generatingNode() for RenderRegion code
4 https://bugs.webkit.org/show_bug.cgi?id=120397
6 Reviewed by Darin Adler.
8 As regions will become anonymous blocks nested inside elements with the flow-from property, a first step
9 would be to change the calls to node() with calls to generatingNode(). In the case of regions, generatingNode()
10 will always return an Element* and not a Node*. Therefore, to get rid of toElement() casts, i created
11 a specific method RenderRegion::generatingElement that will return the generating node as Element.
12 No new tests as no functional change was introduced.
14 Original patch by Catalin Badea.
16 * css/ElementRuleCollector.cpp:
17 (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
18 * dom/WebKitNamedFlow.cpp:
19 (WebCore::WebKitNamedFlow::getRegionsByContent):
20 (WebCore::WebKitNamedFlow::getRegions):
21 * rendering/RenderRegion.cpp:
22 (WebCore::RenderRegion::regionOversetState):
23 (WebCore::RenderRegion::setRegionOversetState):
24 (WebCore::RenderRegion::checkRegionStyle):
25 * rendering/RenderRegion.h:
26 (WebCore::RenderRegion::generatingElement):
27 * rendering/RenderTreeAsText.cpp:
28 (WebCore::writeRenderRegionList): For pseudo-elements as regions, i want to print
29 {pseudo} instead of {div} marker for the parent.
31 2013-09-05 Csaba Osztrogonác <ossy@webkit.org>
33 Fix SynchronousLoaderClient class for !USE(CFNETWORK) platforms
34 https://bugs.webkit.org/show_bug.cgi?id=120532
36 Reviewed by Darin Adler.
41 * WebCore.vcxproj/WebCore.vcxproj:
42 * WebCore.vcxproj/WebCore.vcxproj.filters:
43 * platform/network/SynchronousLoaderClient.cpp:
44 * platform/network/cf/SynchronousLoaderClientCFNet.cpp: Added.
45 (WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
46 (WebCore::SynchronousLoaderClient::platformBadResponseError):
47 * platform/network/soup/SynchronousLoaderClientSoup.cpp: Added.
48 (WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
49 (WebCore::SynchronousLoaderClient::platformBadResponseError):
51 2013-09-05 Jinwoo Song <jinwoo7.song@samsung.com>
53 Fix unused parameter warning in WebKitAccessibleInterfaceText.cpp
54 <https://webkit.org/b/120761>
56 Reviewed by Gyuyoung Kim.
58 Fix warning by removing unused parameter.
60 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
61 (sentenceAtPositionForAtkBoundary):
63 2013-09-05 Dirk Schulze <krit@webkit.org>
65 NULL ptr in WebCore::RefCountedPropertyWrapper<WebCore::ClipPathOperation>::blend
66 https://bugs.webkit.org/show_bug.cgi?id=105408
68 Reviewed by Dean Jackson.
70 Adding an early return if from or to clip-path values are 'none'. According to the
71 specification we shall just interpolate between two basic shapes.
73 http://dev.w3.org/csswg/css-shapes/#basic-shape-interpolation
75 * page/animation/CSSPropertyAnimation.cpp:
78 2013-09-05 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
80 [Qt][WK1] REGRESSION(r154988): compositing/video/video-with-invalid-source.html
81 https://bugs.webkit.org/show_bug.cgi?id=120683
83 Reviewed by Philippe Normand.
85 Do not set pipeline state to NULL on MediaPlayerPrivateGStreamer::loadingFailed()
86 otherwise the bus is flushed and we never get a GST_MESSAGE_ERROR when failing to
88 Also restore previous behaviour (before r154988) of not invoking loadingFailed() for
89 all failed manual state change attempts.
91 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
92 (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
93 Do not call loadingFailed() if state change fails as all manual state changes are
94 now done with changePipelineState().
95 (WebCore::MediaPlayerPrivateGStreamer::play):
96 (WebCore::MediaPlayerPrivateGStreamer::pause):
97 (WebCore::MediaPlayerPrivateGStreamer::seek):
98 (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
99 Restore previous behaviour (before changeset r154988) when calling changePipelineState().
100 (WebCore::MediaPlayerPrivateGStreamer::updateStates):
101 Do nothing if changing to READY on EOS (same behaviour as setting to NULL as it was before
103 (WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
104 Do not set pipeline state to NULL so we properly get GST_MESSAGE_ERROR on loading failures.
106 2013-09-05 Alberto Garcia <berto@igalia.com>
108 [GTK] MediaControlsGtk: fix warning in constructor due to incorrect order of attributes
109 https://bugs.webkit.org/show_bug.cgi?id=120703
111 Reviewed by Carlos Garcia Campos.
113 Fix member initialization so it matches their declaration [-Wreorder].
115 * html/shadow/MediaControlsGtk.cpp:
116 (WebCore::MediaControlsGtk::MediaControlsGtk):
118 2013-09-04 Dirk Schulze <krit@webkit.org>
120 Support interpolation between cross-fade() images
121 https://bugs.webkit.org/show_bug.cgi?id=119955
123 Reviewed by Darin Adler.
125 With this patch, CSS can animate from one -webkit-cross-fade
126 function to another, when the input images are the same in the
129 * css/CSSCrossfadeValue.cpp: Added blend function.
130 (WebCore::blendFunc):
131 (WebCore::CSSCrossfadeValue::blend):
132 (WebCore::CSSCrossfadeValue::equals):
133 (WebCore::CSSCrossfadeValue::equalInputImages):
134 * css/CSSCrossfadeValue.h: Added save casting functions.
135 (WebCore::toCSSCrossfadeValue):
137 (WebCore::CSSValue::isCrossfadeValue):
138 * page/animation/CSSPropertyAnimation.cpp: Add another condition to
139 interpolate between two -webkit-cross-fade functions.
140 (WebCore::blendFunc):
142 2013-09-04 Zoltan Herczeg <zherczeg@webkit.org>
144 <https://webkit.org/b/118553> Hash navigation doesn't affect history when the page is retrieved from appcache
146 Reviewed by Darin Adler.
148 A new flag called keepInHistory is added to allow keeping
149 certain pages in the history even if they have substitute data.
151 Test: http/tests/appcache/history-test.html
153 * loader/DocumentLoader.cpp:
154 (WebCore::DocumentLoader::urlForHistory):
155 * loader/SubstituteData.h:
156 (WebCore::SubstituteData::SubstituteData):
157 (WebCore::SubstituteData::shouldRevealToSessionHistory):
158 (WebCore::SubstituteData::setShouldRevealToSessionHistory):
159 * loader/appcache/ApplicationCacheHost.cpp:
160 (WebCore::ApplicationCacheHost::maybeLoadMainResource):
162 2013-09-04 Grzegorz Czajkowski <g.czajkowski@samsung.com>
164 Remove deprecated markersForNode(Node* node).
165 https://bugs.webkit.org/show_bug.cgi?id=120679
167 Reviewed by Ryosuke Niwa.
169 DocumentMarkerController::markersForNode(Node* node) has been marked as
170 deprecated in favor of markersFor(Node*, MarkerTypes = AllMarkers()).
172 No new tests, no behavior change.
174 * dom/DocumentMarkerController.cpp:
175 * dom/DocumentMarkerController.h:
176 Remove never used markersForNode(Node*).
178 2013-09-04 Andreas Kling <akling@apple.com>
180 CachedPage construction should begin with a Page&.
181 <https://webkit.org/b/120721>
183 Reviewed by Anders Carlsson.
185 We can't create a CachedPage from a null Page anyway.
187 * history/CachedPage.cpp:
188 (WebCore::CachedPage::create):
189 (WebCore::CachedPage::CachedPage):
190 (WebCore::CachedPage::restore):
191 * history/CachedPage.h:
192 * history/PageCache.cpp:
193 (WebCore::PageCache::add):
194 * history/PageCache.h:
195 * loader/FrameLoader.cpp:
196 (WebCore::FrameLoader::commitProvisionalLoad):
198 2013-09-04 Arpita Bahuguna <a.bah@samsung.com>
200 setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
201 https://bugs.webkit.org/show_bug.cgi?id=120293
203 Reviewed by Darin Adler.
205 setAttributeNode() performs a case-insensitive search for an existing
206 attribute. If an existing attribute is found, it retrieves the index of
207 such an attribute. For setting the attribute's new value, we call upon
208 setAttributeInternal() to which both the index as well as the name of
209 the attribute is passed.
210 The name passed to this method is the same as the one passed to the
211 setAttributeNode() API from the webpage and thus can be in any case.
213 However, setAttributeInternal() uses this name to get the corresponding
214 existing attribute node. Since this retrieval is not case-insensitive,
215 the existing node is not returned and thus the new value is not set on
217 We should instead use the passed index and use that to retrieve the
220 Note that obtaining the attribute's value using getAttributeNode() would
221 still return the correct value, i.e. the new one.
223 Also, this change shall make our behavior similar to that of FF and IE.
225 Test: fast/dom/Element/setAttributeNode-for-existing-attribute.html
228 (WebCore::Element::setAttributeInternal):
229 If the passed index is not equal to attributeNotFound, we use that index
230 to retrieve the existing attribute.
232 2013-09-04 Andreas Kling <akling@apple.com>
234 CachedFrame construction should begin with a Frame&.
235 <https://webkit.org/b/120719>
237 Reviewed by Anders Carlsson.
239 We can't create a CachedFrame from a null Frame anyway.
241 * bindings/js/ScriptCachedFrameData.cpp:
242 (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
243 (WebCore::ScriptCachedFrameData::restore):
244 * bindings/js/ScriptCachedFrameData.h:
245 * history/CachedFrame.cpp:
246 (WebCore::CachedFrameBase::CachedFrameBase):
247 (WebCore::CachedFrameBase::restore):
248 (WebCore::CachedFrame::CachedFrame):
249 * history/CachedFrame.h:
250 (WebCore::CachedFrame::create):
251 * history/CachedPage.cpp:
252 (WebCore::CachedPage::CachedPage):
254 2013-09-04 Andreas Kling <akling@apple.com>
256 Set "render tree being torn down" flag a bit earlier.
257 <https://webkit.org/b/120717>
259 Reviewed by Anders Carlsson.
261 Set the flag at the start of Document::detach() so everyone can get a chance
262 to avoid unnecessary work, not just renderers.
265 (WebCore::Document::detach):
267 2013-09-04 Andreas Kling <akling@apple.com>
269 Cached Page and Frame don't need to be ref-counted.
270 <https://webkit.org/b/120710>
272 Reviewed by Anders Carlsson.
274 - CachedPage is owned by HistoryItem.
275 - CachedFrame is owned by CachedPage.
277 Remove the ref counting from these objects to make the code less confusing.
279 The only place that used this was in FrameLoader::commitProvisionalLoad() which
280 took a temporary ref on the CachedPage. Switched this to using a raw pointer.
282 * history/CachedFrame.h:
283 (WebCore::CachedFrame::create):
284 * history/CachedPage.cpp:
285 (WebCore::CachedPage::create):
286 * history/CachedPage.h:
287 * history/HistoryItem.h:
288 * loader/FrameLoader.cpp:
289 (WebCore::FrameLoader::commitProvisionalLoad):
290 (WebCore::FrameLoader::transitionToCommitted):
291 * loader/FrameLoader.h:
293 2013-09-04 Roger Fong <roger_fong@apple.com>
295 Unreviewed. Windows build fix and WebCore project cleanup.
297 * WebCore.vcxproj/WebCore.vcxproj.filters:
298 * rendering/RenderingAllInOne.cpp:
300 2013-09-04 Mark Lam <mark.lam@apple.com>
302 Renamed StackIterator to StackVisitor.
303 https://bugs.webkit.org/show_bug.cgi?id=120706.
305 Reviewed by Geoffrey Garen.
309 * ForwardingHeaders/interpreter/StackIterator.h: Removed.
310 * ForwardingHeaders/interpreter/StackVisitor.h: Copied from Source/WebCore/ForwardingHeaders/interpreter/StackIterator.h.
311 * bindings/js/JSXMLHttpRequestCustom.cpp:
312 (WebCore::SendFunctor::operator()):
313 * bindings/js/ScriptCallStackFactory.cpp:
314 (WebCore::CreateScriptCallStackFunctor::operator()):
315 (WebCore::CreateScriptCallStackForConsoleFunctor::operator()):
317 2013-09-04 Samuel White <samuel_white@apple.com>
319 AX: when no other label on provided on form elements, WebKit should fall back to using @title
320 https://bugs.webkit.org/show_bug.cgi?id=112842
322 Reviewed by Chris Fleizach.
324 Don't let input elements include empty labels in their accessibility title.
326 Test: platform/mac/accessibility/input-title.html
328 * accessibility/AccessibilityNodeObject.cpp:
329 (WebCore::AccessibilityNodeObject::titleElementText):
331 2013-09-04 Andreas Kling <akling@apple.com>
333 Make ImageQualityController per-RenderView.
334 <https://webkit.org/b/120702>
336 Reviewed by Anders Carlsson.
338 Move ImageQualityController to its own files and add a RenderView::imageQualityController()
339 getter instead of using a global map for all render trees.
341 This avoids having to unregister every renderer (well, every RenderBoxModelObject) from the
342 global hash map during render tree teardown.
344 It also simplifies the live resize optimization a bit since it can now short-circuit if
345 the RenderView's FrameView is being resized. (Previously there could be any number of
346 RenderViews present in the map.)
349 * GNUmakefile.list.am:
351 * WebCore.vcxproj/WebCore.vcxproj:
352 * WebCore.xcodeproj/project.pbxproj:
353 * rendering/ImageQualityController.cpp: Added.
354 * rendering/ImageQualityController.h: Added.
356 2013-09-04 Roger Fong <roger_fong@apple.com>
358 Unreviewed Build fix for Windows DebugSuffix configuration.
360 * WebCore.vcxproj/WebCore.vcxproj:
361 * WebCore.vcxproj/WebCore.vcxproj.filters:
363 2013-09-04 Mark Lam <mark.lam@apple.com>
365 Refining the StackIterator callback interface.
366 https://bugs.webkit.org/show_bug.cgi?id=120695.
368 Reviewed by Geoffrey Garen.
372 * bindings/js/JSXMLHttpRequestCustom.cpp:
373 (WebCore::SendFunctor::SendFunctor):
374 (WebCore::SendFunctor::line):
375 (WebCore::SendFunctor::url):
376 (WebCore::SendFunctor::operator()):
377 (WebCore::JSXMLHttpRequest::send):
378 * bindings/js/ScriptCallStackFactory.cpp:
379 (WebCore::createScriptCallStack):
381 2013-09-04 Andreas Kling <akling@apple.com>
383 Remove unnecessary RenderView.h inclusion from headers.
384 <https://webkit.org/b/120365>
386 Reviewed by Anders Carlsson.
388 RenderView.h was overzealously included by RenderText and RenderTextTrackCue,
389 making it unpleasant to edit on my laptop.
391 * rendering/RenderText.h:
392 * rendering/RenderTextTrackCue.h:
394 Don't include RenderView.h here, do it in .cpp files.
396 2013-09-04 Alexey Proskuryakov <ap@apple.com>
398 Editor::m_removedAnchor is unused
399 https://bugs.webkit.org/show_bug.cgi?id=120701
401 Reviewed by Ryosuke Niwa.
403 * editing/Editor.h: Removed m_removedAnchor. It was not only unused, but also broken,
404 as we didn't reset it when navigating.
406 2013-09-04 Pratik Solanki <psolanki@apple.com>
408 Document::updateHoverActiveState() should allow for deferred style recalcs
409 https://bugs.webkit.org/show_bug.cgi?id=120700
411 Reviewed by Simon Fraser.
413 Add an extra argument to Document::updateHoverActiveState() to specify if a style recalc
414 should be done. The default value keeps the current behavior of doing a style recalc. iOS
415 touch handling code will pass in DeferRecalcStyleIfNeeded to avoid the work.
417 No new tests because no functional changes.
420 (WebCore::Document::updateHoverActiveState):
423 2013-09-04 Tim Horton <timothy_horton@apple.com>
425 [mac] PDFDocumentImage should use PDFKit to draw
426 https://bugs.webkit.org/show_bug.cgi?id=120651
427 <rdar://problem/12810731>
429 Reviewed by Alexey Proskuryakov.
431 Use PDFKit to draw PDF-in-<img> on Mac, so that annotations in PDF are painted.
433 Test: fast/images/pdf-as-image-with-annotations.html
435 * WebCore.xcodeproj/project.pbxproj:
436 Add PDFDocumentImageMac.mm.
438 * platform/graphics/cg/PDFDocumentImage.cpp:
439 (WebCore::PDFDocumentImage::PDFDocumentImage):
440 We don't need to initialize m_document anymore because it's now a RetainPtr.
441 Initialize m_hasPage to false.
443 (WebCore::PDFDocumentImage::~PDFDocumentImage):
444 We don't need to manually release our CGPDFDocumentRef anymore because it's now a RetainPtr.
446 (WebCore::PDFDocumentImage::size):
447 Use expandedIntSize for explicitness.
449 (WebCore::PDFDocumentImage::applyRotationForPainting):
450 Rename adjustCTM to applyRotationForPainting, and move the one non-rotation related transformation out.
451 We need to do this because PDFKit applies the rotation transformation itself, so we don't need to.
452 Also, explicitly use std::min instead of importing the whole std namespace.
454 (WebCore::PDFDocumentImage::dataChanged):
455 Assert that we don't re-enter dataChanged after we've created a document,
456 because it seems like that shouldn't happen - we only create a document when
457 we've supposedly received all data, and it would be nice if we didn't have
458 all this varying code to deal with SharedBuffers changing out from under each other.
459 Factor the code to create a CGPDFDocumentRef out into createPDFDocument, so we can
460 replace it with a different implementation that creates a PDFDocument.
462 (WebCore::PDFDocumentImage::setCurrentPage):
463 Make all page-number-related things unsigned, since they are in CG and PDFKit,
464 and add m_hasPage to denote whether we've acquired a valid page yet.
465 Factor code to retrieve the PDF box bounds into computeBoundsForCurrentPage.
466 Remove setCurrentPage itself, as we never use a page other than the first page;
467 we will call computeBoundsForCurrentPage and set hasPage in dataChanged, now.
469 (WebCore::PDFDocumentImage::draw):
471 Factor code that actually draws the PDF out into drawPDFPage.
473 The rest of the functions in this file are only built for USE(CG) && !PLATFORM(MAC):
475 (WebCore::PDFDocumentImage::createPDFDocument):
476 Factored out of dataChanged(); I only kept the !PLATFORM(MAC) branch.
478 (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
479 Factored out of setCurrentPage().
480 Use deg2rad since we have it.
482 (WebCore::PDFDocumentImage::pageCount):
483 (WebCore::PDFDocumentImage::drawPDFPage):
484 Factored out of draw().
485 Reduced an unnecessary transform (we were effectively doing mediaBox.origin - cropBox.origin - mediaBox.origin).
487 * platform/graphics/cg/PDFDocumentImage.h:
488 Unindent all the things, as we don't indent the first level inside a namespace scope.
489 Forward-declare PDFDocument.
490 Make m_currentPage unsigned as it should be.
492 Make m_document a PDFDocument on PLATFORM(MAC) and a CGPDFDocumentRef on other platforms.
494 * platform/graphics/mac/PDFDocumentImageMac.mm: Added.
495 Soft-link in PDFKit and specifically the PDFDocument class.
497 (WebCore::PDFDocumentImage::createPDFDocument):
498 Create our PDFDocument from the SharedBuffer's NSData directly. This shouldn't be a problem
499 (with respect to the SharedBuffer's data being appended to in secret), because we've waited
500 for the document to finish loading before getting here.
502 (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
503 Ask PDFKit for the page's media and crop boxes; it automatically performs the correct fallback.
504 Ask PDFKit for the page's rotation.
506 (WebCore::PDFDocumentImage::pageCount):
507 Ask PDFKit for the page count.
509 (WebCore::PDFDocumentImage::drawPDFPage):
510 Paint the current page of the PDF. Note that we do not apply the rotation here
511 via applyRotationForPainting because PDFKit will do it itself.
513 * platform/mac/SoftLinking.h:
514 I couldn't find any clients of SOFT_LINK_FRAMEWORK_IN_CORESERVICES_UMBRELLA,
515 so I made it the more generic SOFT_LINK_FRAMEWORK_IN_UMBRELLA, taking the name
516 of the umbrella framework and the subframework, so I could use it to soft link
517 Quartz.framework's PDFKit.framework.
519 2013-09-04 Roger Fong <roger_fong@apple.com>
521 Unreviewed Windows build fix.
523 * WebCore.vcxproj/WebCoreCommon.props:
525 2013-09-04 Bem Jones-Bey <bjonesbe@adobe.com>
527 FloatingObjects should manage cleaning it's line box tree pointers itself
528 https://bugs.webkit.org/show_bug.cgi?id=120692
530 Reviewed by David Hyatt.
532 This is another step in properly encapsulating FloatingObjects.
533 Instead of having RenderBlock walk and clear the line box tree
534 pointers, create a method for the behavior, and have RenderBlock call
537 In addtion, add a proper destructor to FloatingObjects, so that
538 RenderBlock does not have to explicitly delete the set in
541 And as a bonus, fix the ordering of an if to avoid the expensive
542 descendantChild check.
544 This is a port of a Blink patch by Eric Seidel.
546 No new tests, no behavior change.
548 * rendering/RenderBlock.cpp:
549 (WebCore::RenderBlock::~RenderBlock):
550 (WebCore::RenderBlock::deleteLineBoxTree):
551 (WebCore::RenderBlock::repaintOverhangingFloats):
552 (WebCore::RenderBlock::FloatingObjects::~FloatingObjects):
553 (WebCore::RenderBlock::FloatingObjects::clearLineBoxTreePointers):
554 (WebCore::RenderBlock::FloatingObjects::clear):
555 * rendering/RenderBlock.h:
557 2013-09-04 Tim Horton <timothy_horton@apple.com>
559 Rename customCssText -> customCSSText to match WebKit style
560 https://bugs.webkit.org/show_bug.cgi?id=120694
562 Reviewed by Simon Fraser.
564 No new tests, just a rename.
567 * css/CSSAspectRatioValue.cpp:
568 (WebCore::CSSAspectRatioValue::customCSSText):
569 * css/CSSAspectRatioValue.h:
570 * css/CSSBorderImageSliceValue.cpp:
571 (WebCore::CSSBorderImageSliceValue::customCSSText):
572 * css/CSSBorderImageSliceValue.h:
573 * css/CSSCalculationValue.cpp:
574 (WebCore::CSSCalcValue::customCSSText):
575 (WebCore::CSSCalcPrimitiveValue::customCSSText):
576 (WebCore::CSSCalcBinaryOperation::customCSSText):
577 * css/CSSCalculationValue.h:
578 * css/CSSCanvasValue.cpp:
579 (WebCore::CSSCanvasValue::customCSSText):
580 * css/CSSCanvasValue.h:
581 * css/CSSCrossfadeValue.cpp:
582 (WebCore::CSSCrossfadeValue::customCSSText):
583 * css/CSSCrossfadeValue.h:
584 * css/CSSCursorImageValue.cpp:
585 (WebCore::CSSCursorImageValue::customCSSText):
586 * css/CSSCursorImageValue.h:
587 * css/CSSFilterImageValue.cpp:
588 (WebCore::CSSFilterImageValue::customCSSText):
589 * css/CSSFilterImageValue.h:
590 * css/CSSFontFaceSrcValue.cpp:
591 (WebCore::CSSFontFaceSrcValue::customCSSText):
592 * css/CSSFontFaceSrcValue.h:
593 * css/CSSFunctionValue.cpp:
594 (WebCore::CSSFunctionValue::customCSSText):
595 * css/CSSFunctionValue.h:
596 * css/CSSGradientValue.cpp:
597 (WebCore::CSSLinearGradientValue::customCSSText):
598 (WebCore::CSSRadialGradientValue::customCSSText):
599 * css/CSSGradientValue.h:
600 * css/CSSImageSetValue.cpp:
601 (WebCore::CSSImageSetValue::customCSSText):
602 * css/CSSImageSetValue.h:
603 * css/CSSImageValue.cpp:
604 (WebCore::CSSImageValue::customCSSText):
605 * css/CSSImageValue.h:
606 * css/CSSInheritedValue.cpp:
607 (WebCore::CSSInheritedValue::customCSSText):
608 * css/CSSInheritedValue.h:
609 * css/CSSInitialValue.cpp:
610 (WebCore::CSSInitialValue::customCSSText):
611 * css/CSSInitialValue.h:
612 * css/CSSLineBoxContainValue.cpp:
613 (WebCore::CSSLineBoxContainValue::customCSSText):
614 * css/CSSLineBoxContainValue.h:
615 * css/CSSPrimitiveValue.cpp:
616 (WebCore::CSSPrimitiveValue::customCSSText):
617 (WebCore::CSSPrimitiveValue::customSerializeResolvingVariables):
618 * css/CSSPrimitiveValue.h:
619 * css/CSSReflectValue.cpp:
620 (WebCore::CSSReflectValue::customCSSText):
621 * css/CSSReflectValue.h:
622 * css/CSSTimingFunctionValue.cpp:
623 (WebCore::CSSLinearTimingFunctionValue::customCSSText):
624 (WebCore::CSSCubicBezierTimingFunctionValue::customCSSText):
625 (WebCore::CSSStepsTimingFunctionValue::customCSSText):
626 * css/CSSTimingFunctionValue.h:
627 * css/CSSUnicodeRangeValue.cpp:
628 (WebCore::CSSUnicodeRangeValue::customCSSText):
629 * css/CSSUnicodeRangeValue.h:
631 (WebCore::CSSValue::cssText):
632 * css/CSSValueList.cpp:
633 (WebCore::CSSValueList::customCSSText):
634 * css/CSSValueList.h:
635 * css/FontFeatureValue.cpp:
636 (WebCore::FontFeatureValue::customCSSText):
637 * css/FontFeatureValue.h:
639 (WebCore::FontValue::customCSSText):
641 * css/ShadowValue.cpp:
642 (WebCore::ShadowValue::customCSSText):
644 * css/WebKitCSSArrayFunctionValue.cpp:
645 (WebCore::WebKitCSSArrayFunctionValue::customCSSText):
646 * css/WebKitCSSArrayFunctionValue.h:
647 * css/WebKitCSSFilterValue.cpp:
648 (WebCore::WebKitCSSFilterValue::customCSSText):
649 * css/WebKitCSSFilterValue.h:
650 * css/WebKitCSSMatFunctionValue.cpp:
651 (WebCore::WebKitCSSMatFunctionValue::customCSSText):
652 * css/WebKitCSSMatFunctionValue.h:
653 * css/WebKitCSSMixFunctionValue.cpp:
654 (WebCore::WebKitCSSMixFunctionValue::customCSSText):
655 * css/WebKitCSSMixFunctionValue.h:
656 * css/WebKitCSSSVGDocumentValue.cpp:
657 (WebCore::WebKitCSSSVGDocumentValue::customCSSText):
658 * css/WebKitCSSSVGDocumentValue.h:
659 * css/WebKitCSSShaderValue.cpp:
660 (WebCore::WebKitCSSShaderValue::customCSSText):
661 * css/WebKitCSSShaderValue.h:
662 * css/WebKitCSSTransformValue.cpp:
663 (WebCore::WebKitCSSTransformValue::customCSSText):
664 * css/WebKitCSSTransformValue.h:
666 (WebCore::SVGColor::customCSSText):
669 (WebCore::SVGPaint::customCSSText):
672 2013-09-04 Chris Fleizach <cfleizach@apple.com>
674 AX: aria-valuetext property not exposing AXValueDescription
675 https://bugs.webkit.org/show_bug.cgi?id=120375
677 Reviewed by Darin Adler.
679 Expose value based attributes for incrementor roles (which are called spinbuttons by ARIA).
681 Test: platform/mac/accessibility/spinbutton-valuedescription.html
683 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
684 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
686 2013-09-04 Javier Fernandez <jfernandez@igalia.com>
688 <https://webkit.org/b/119622> [CSSRegions] Not possible to clear the selection when mixing content from different FlowThreads
690 Reviewed by David Hyatt.
692 When using CSS Regions is usual that the RenderTree doesn't match
693 the DOM Tree in terms of relative position of the nodes. Besides,
694 usually the content of a certain node is split and spread across
695 multiple blocks, rendered in different positions.
697 Regarding the Selection, this problem is even more important; the
698 selection direction changes when crossing the FlowThread
699 boundaries. This weird behavior is also present in other layouts
700 using non-regular positioning mechanisms, like absolute,
701 static. However, for those layouts the RenderTree preserves the
702 order of the nodes, unlike the CSS Regions layout model.
704 Because of how the RenderTree is generated with CSS Regions, the
705 RenderView::setSelection algorithm is not able to repaint some of
706 the rectangles defined during the selection process. In order to
707 face this issue, the proposed fix determines whether it should
708 backwards traversing the RenderTree, from the "stop" node to the
711 Test: fast/regions/selecting-text-through-different-region-flows-2.html
713 * rendering/RenderView.cpp:
714 (WebCore::getNextOrPrevRenderObjectBasedOnDirection): Added.
715 (WebCore::RenderView::setSelection):
717 2013-09-04 Eric Carlson <eric.carlson@apple.com>
719 Get MEDIA_STREAM compiling on OSX
720 https://bugs.webkit.org/show_bug.cgi?id=120650
722 Reviewed by Darin Adler.
724 No new tests, the code changed doesn't run on OSX yet.
726 * DerivedSources.make: Add MediaStream idl files.
728 * Modules/mediastream/LocalMediaStream.h: Mark class as FINAL.
730 * Modules/mediastream/MediaConstraintsImpl.cpp:
731 (WebCore::MediaConstraintsImpl::getOptionalConstraints): append -> appendRange so we don't
732 need a MediaConstraint copy constructor.
734 * Modules/mediastream/RTCDataChannel.cpp:
735 (WebCore::RTCDataChannel::send): Remove an unused parameter name.
736 * Modules/mediastream/RTCDataChannel.h: ArrayBuffer and ArrayBufferView are in the JSC namespace.
738 * Modules/mediastream/RTCPeerConnection.cpp:
739 (WebCore::RTCPeerConnection::RTCPeerConnection): loader() doesn't return a pointer.
740 (WebCore::RTCPeerConnection::localDescription): Set the ExceptionCode on error.
741 (WebCore::RTCPeerConnection::remoteDescription): Ditto.
743 * Modules/mediastream/RTCSessionDescription.cpp:
744 (WebCore::RTCSessionDescription::setSdp): Remove the unused ExceptionCode parameter.
745 * Modules/mediastream/RTCSessionDescription.h: Ditto.
746 * Modules/mediastream/RTCSessionDescription.idl: Ditto.
748 * Modules/mediastream/RTCStatsResponse.cpp:
749 (WebCore::RTCStatsResponse::canGetItemsForName): Add so JSRTCStatsResponse::canGetItemsForName
750 doesn't cause ref count churn.
751 * Modules/mediastream/RTCStatsResponse.h: Mark class as FINAL. Declare canGetItemsForName.
753 * WebCore.xcodeproj/project.pbxproj: Add new files.
755 * bindings/js/JSRTCStatsResponseCustom.cpp:
756 (WebCore::JSRTCStatsResponse::canGetItemsForName): Use canGetItemsForName instead of namedItem.
757 Use propertyNameToAtomicString instead of propertyNameToString
758 (WebCore::JSRTCStatsResponse::nameGetter): Use propertyNameToAtomicString instead of
759 propertyNameToString because namedItem takes an AtomicString.
761 * platform/mediastream/mac: Added.
762 * platform/mediastream/mac/MediaStreamCenterMac.cpp: Added.
763 * platform/mediastream/mac/MediaStreamCenterMac.h: Added.
765 2013-09-04 Daniel Bates <dabates@apple.com>
767 [iOS] Fix the build following <http://trac.webkit.org/changeset/154903>
768 (https://bugs.webkit.org/show_bug.cgi?id=120540)
770 * style/StyleResolveTree.cpp:
771 (WebCore::Style::resolveTree): Use address operator and dot-notation when
772 passing Element to CheckForVisibilityChangeOnRecalcStyle and calling
773 Element::renderStyle(), respectively.
775 2013-09-04 Bem Jones-Bey <bjonesbe@adobe.com>
777 Move logical dimension getters/setters to FloatingObject from RenderBlock
778 https://bugs.webkit.org/show_bug.cgi?id=120686
780 Reviewed by David Hyatt.
782 This is the first step in decoupling FloatingObject, FloatingObjects,
783 et al from RenderBlock. It is not ideal that the methods take a bool;
784 however, passing down the actual writing mode would require
785 refactoring the way that RenderBlock stores this information, which is
786 a task for the future.
788 No new tests, no behavior change.
790 * rendering/RenderBlock.cpp:
791 (WebCore::RenderBlock::repaintOverhangingFloats): Use new methods.
792 (WebCore::RenderBlock::insertFloatingObject): Ditto.
793 (WebCore::RenderBlock::removeFloatingObject): Ditto.
794 (WebCore::RenderBlock::removeFloatingObjectsBelow): Ditto.
795 (WebCore::RenderBlock::computeLogicalLocationForFloat): Ditto.
796 (WebCore::RenderBlock::positionNewFloats): Ditto.
797 (WebCore::::updateOffsetIfNeeded): Ditto.
798 (WebCore::::collectIfNeeded): Ditto.
799 (WebCore::::getHeightRemaining): Ditto.
800 (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
801 (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
802 (WebCore::RenderBlock::nextFloatLogicalBottomBelow): Ditto.
803 (WebCore::RenderBlock::lowestFloatLogicalBottom): Ditto.
804 (WebCore::RenderBlock::clearFloats): Ditto.
805 (WebCore::RenderBlock::addOverhangingFloats): Ditto.
806 (WebCore::RenderBlock::hasOverhangingFloat): Ditto.
807 (WebCore::RenderBlock::addIntrudingFloats): Ditto.
808 * rendering/RenderBlock.h:
809 (WebCore::RenderBlock::FloatingObject::logicalTop): Moved from RenderBlock::logicalTopForFloat
810 (WebCore::RenderBlock::FloatingObject::logicalBottom): Moved from RenderBlock::logicalBottomForFloat
811 (WebCore::RenderBlock::FloatingObject::logicalLeft): Moved from RenderBlock::logicalLeftForFloat
812 (WebCore::RenderBlock::FloatingObject::logicalRight): Moved from RenderBlock::logicalRightForFloat
813 (WebCore::RenderBlock::FloatingObject::logicalWidth): Moved from RenderBlock::logicalWidthForFloat
814 (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalTop): Moved from RenderBlock::pixelSnappedLogicalTopForFloat
815 (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalBottom): Moved from RenderBlock::pixelSnappedLogicalBottomForFloat
816 (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalLeft): Moved from RenderBlock::pixelSnappedLogicalLeftForFloat
817 (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalRight): Moved from RenderBlock::pixelSnappedLogicalRightForFloat
818 (WebCore::RenderBlock::FloatingObject::setLogicalTop): Moved from RenderBlock::setLogicalTopForFloat
819 (WebCore::RenderBlock::FloatingObject::setLogicalLeft): Moved from RenderBlock::setLogicalLeftForFloat
820 (WebCore::RenderBlock::FloatingObject::setLogicalHeight): Moved from RenderBlock::setLogicalHeightForFloat
821 (WebCore::RenderBlock::FloatingObject::setLogicalWidth): Moved from RenderBlock::setLogicalWidthForFloat
822 * rendering/RenderBlockLineLayout.cpp:
823 (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Use new methods.
824 (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Ditto.
825 (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Ditto.
826 (WebCore::RenderBlock::positionNewFloatOnLine): Ditto.
828 2013-09-04 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
830 REGRESSION(r154977): Do not urlencode soup message on ResourceRequest::toSoupMessage()
831 https://bugs.webkit.org/show_bug.cgi?id=120681
833 Reviewed by Martin Robinson.
835 Do not call soup_message_set_uri with soupURI() (url encoded uri) on
836 ResourceRequest::toSoupMessage().
838 * platform/network/soup/ResourceRequest.h:
839 * platform/network/soup/ResourceRequestSoup.cpp:
840 (WebCore::ResourceRequest::updateSoupMessageMembers):
841 (WebCore::ResourceRequest::updateSoupMessage):
842 (WebCore::ResourceRequest::toSoupMessage):
843 Split common code from updateSoupMessage/toSoupMessage into updateSoupMessageMembers.
845 2013-09-04 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
847 [GTK] add support for subtitles on webkit2GTK
848 https://bugs.webkit.org/show_bug.cgi?id=117008
850 By activating subtitles support on webkit2GTK, the video player
851 recognizes and use text <tracks> inside <video> elements.
853 Reviewed by Martin Robinson.
855 Layout tests (track-menu) should cover this change.
857 * css/mediaControlsGtk.css:
858 (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
859 (video::-webkit-media-controls-closed-captions-container):
860 (video::-webkit-media-controls-closed-captions-track-list):
861 (video::-webkit-media-controls-closed-captions-track-list h3):
862 (video::-webkit-media-controls-closed-captions-track-list ul):
863 (video::-webkit-media-controls-closed-captions-track-list li):
864 (video::-webkit-media-controls-closed-captions-track-list li.selected):
865 * html/shadow/MediaControlElements.cpp:
866 (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
867 (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
868 * html/shadow/MediaControlElements.h:
869 * html/shadow/MediaControlsGtk.cpp:
870 (WebCore::MediaControlsGtkEventListener::create):
871 (WebCore::MediaControlsGtkEventListener::cast):
872 (WebCore::MediaControlsGtkEventListener::MediaControlsGtkEventListener):
873 (WebCore::MediaControlsGtk::MediaControlsGtk):
874 (WebCore::MediaControlsGtk::initializeControls):
875 (WebCore::MediaControlsGtk::setMediaController):
876 (WebCore::MediaControlsGtk::reset):
877 (WebCore::MediaControlsGtk::makeTransparent):
878 (WebCore::MediaControlsGtk::toggleClosedCaptionTrackList):
879 (WebCore::MediaControlsGtk::showClosedCaptionTrackList):
880 (WebCore::MediaControlsGtk::hideClosedCaptionTrackList):
881 (WebCore::MediaControlsGtk::handleClickEvent):
882 (WebCore::MediaControlsGtk::eventListener):
883 (WebCore::MediaControlsGtkEventListener::handleEvent):
884 (WebCore::MediaControlsGtkEventListener::operator==):
885 * html/shadow/MediaControlsGtk.h:
886 * page/CaptionUserPreferences.cpp:
887 (WebCore::trackDisplayName):
888 * platform/gtk/LocalizedStringsGtk.cpp:
889 (WebCore::textTrackSubtitlesText):
890 (WebCore::textTrackOffMenuItemText):
891 (WebCore::textTrackNoLabelText):
892 * platform/gtk/RenderThemeGtk.h:
894 2013-09-03 Darin Adler <darin@apple.com>
896 Use OwnPtr in the RenderLayerFilterInfo map
897 https://bugs.webkit.org/show_bug.cgi?id=120619
899 Reviewed by Anders Carlsson.
901 * rendering/RenderLayer.cpp:
902 (WebCore::RenderLayer::~RenderLayer): Use FilterInfo::remove directly instead of
903 going through removeFilterInfoIfNeeded function.
904 (WebCore::RenderLayer::paintsWithFilters): Rearranged #if a little bit and tweaked
906 (WebCore::RenderLayer::requiresFullLayerImageForFilters): Use && instead of ternary.
907 (WebCore::RenderLayer::filterRenderer): Use FilterInfo::getIfExists directly instead
908 of going through filterInfo function.
909 (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect): Use FilterInfo::get
910 directly instead of going through filterInfo function. Also use references instead
912 (WebCore::shouldDoSoftwarePaint): Marked this simple function, used only once, as
914 (WebCore::paintForFixedRootBackground): Ditto.
915 (WebCore::RenderLayer::setupFilters): Use FilterInfo::getIfExists directly instead
916 of going through filterInfo function. Also get rendererer out of filterInfo instead
917 of calling filterRenderer.
918 (WebCore::RenderLayer::updateOrRemoveFilterClients): Use FilterInfo::get and
919 FilterInfo::getIfExists directly instead of using ensureFilterInfo and
920 filterInfo functions.
921 (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Use FilterInfo::getIfExists
922 and FilterInfo::get directly instead of using filterInfo function.
924 * rendering/RenderLayer.h: Removed the ifdefs around forward declarations; overkill,
925 since there is no harm in a few extras. Marked the RenderLayer class FINAL. Removed the
926 no-longer-needed filterInfo, ensureFilterInfo, removeFilterInfoIfNeeded, hasFilterInfo,
927 and setHasFilterInfo functions. Mark everything private instead of protected since
928 there are no classes derived from this one. Made FilterInfo an embedded class so it
929 can get at the m_hasFilterInfo data member directly and has a shorter name.
931 * rendering/RenderLayerFilterInfo.cpp: Removed the ifs around includes, which were
932 overkill, since there is little harm including a few extra files.
933 (WebCore::RenderLayer::FilterInfo::map): Added. Returns the single global map.
934 (WebCore::RenderLayer::FilterInfo::getIfExists): Renamed from filterInfoForRenderLayer.
935 Also changed to take a reference instead of a pointer, and to use the new filterMap.
936 (WebCore::RenderLayer::FilterInfo::get): Renamed from createFilterInfoForRenderLayerIfNeeded.
937 Also changed to take a reference instead of a pointer, to use the new filterMap, and
938 to use add to avoid hashing twice when adding a new layer to the map.
939 (WebCore::RenderLayer::FilterInfo::remove): Renamed from removeFilterInfoForRenderLayer.
940 Also changed to take a reference instead of a pointer and eliminated the explicit
941 delete since we use OwnPtr now.
942 (WebCore::RenderLayer::FilterInfo::FilterInfo): Take a reference instead of a pointer.
943 (WebCore::RenderLayer::FilterInfo::~FilterInfo): Updated class name.
944 (WebCore::RenderLayer::FilterInfo::setRenderer): Ditto.
945 (WebCore::RenderLayer::FilterInfo::notifyFinished): Update since m_layer is a reference.
946 (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients): Update to iterate in a
947 slightly more idiomatic and efficient way. Also update since m_layer is a reference.
948 (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients): Ditto.
949 (WebCore::RenderLayer::FilterInfo::notifyCustomFilterProgramLoaded): Ditto.
950 (WebCore::RenderLayer::FilterInfo::updateCustomFilterClients): Ditto. Also switched to
951 a raw pointer for CustomFilterProgram*.
952 (WebCore::RenderLayer::FilterInfo::removeCustomFilterClients): Ditto.
954 * rendering/RenderLayerFilterInfo.h: Removed the ifs around includes, which were
955 overkill, since there is little harm including a few extra files. Changed to be a
956 member class of RenderLayer, marked the class FINAL, and changed the style of the
957 conditionals around the base classes. Renamed functions. Made overrides private and
958 used OVERRIDE. Changed functions to take references instead of pointers. Did some
959 small style cleanup. Made deleteOwnedPtr a friend so we can keep the destructor private.
960 Moved the typedef of RenderLayerFilterInfoMap into the class and named it just Map.
961 Got rid of s_filterMap and instead added a function named just map().
963 2013-09-04 Andreas Kling <akling@apple.com>
965 Simplify subtree relayout scheduling a bit.
966 <https://webkit.org/b/120684>
968 Reviewed by Antti Koivisto.
970 Subtree relayout scheduling should only happen while there's a render tree up,
971 the code can freely assume that there's a RenderView present.
973 Added an assertion that the render tree isn't being torn down. This should catch
974 renderers doing unnecessary work during document detach and could be a source
975 of "performance freebies."
977 I also un-nested scheduleRelayoutOfSubtree() with early-return style to make
978 the code more human-readable.
981 * page/FrameView.cpp:
982 (WebCore::FrameView::scheduleRelayoutOfSubtree):
983 * rendering/RenderObject.cpp:
984 (WebCore::RenderObject::scheduleRelayout):
986 2013-09-04 Jae Hyun Park <jae.park@company100.net>
988 [Coordinated Graphics] Remove unused method in CoordinatedGraphicsLayer
989 https://bugs.webkit.org/show_bug.cgi?id=120664
991 Reviewed by Darin Adler.
993 CoordinatedGraphicsLayer::hasPendingVisibleChanges is not used as of
996 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
997 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
999 2013-09-04 Hans Muller <hmuller@adobe.com>
1001 [CSS Shapes] Revise the ShapeInterval set operations' implementation
1002 https://bugs.webkit.org/show_bug.cgi?id=120349
1004 Reviewed by Alexandru Chiculita.
1006 Revised the ShapeIntervals unite, intersect, and subtract operations to
1007 improve efficiency and clarity.
1009 No new tests are required, this is just an internal refactoring.
1011 * rendering/shapes/PolygonShape.cpp:
1012 (WebCore::computeOverlappingEdgeXProjections): Removed call to ShapeInterval<T>sortVector(), since calling std::sort directly is simpler.
1013 * rendering/shapes/ShapeInterval.h:
1014 (WebCore::ShapeInterval::contains): True if the interval parameter is within this interval.
1015 (WebCore::ShapeInterval::intersect): Substantially revised version of the original method.
1016 (WebCore::ShapeInterval::uniteVectors): Ditto.
1017 (WebCore::ShapeInterval::intersectVectors): Ditto.
1018 (WebCore::ShapeInterval::subtractVectors): Ditto.
1020 2013-09-04 Krzysztof Czech <k.czech@samsung.com>
1022 [ATK] Adds an accessibility support to access a value of the color control element
1023 https://bugs.webkit.org/show_bug.cgi?id=114354
1025 Reviewed by Mario Sanchez Prada.
1027 Implements a possibility of retrieving a value of the color control element.
1029 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1030 (webkitAccessibleTextGetText):
1031 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1032 (getInterfaceMaskFromObject):
1034 2013-09-04 Andreas Kling <akling@apple.com>
1036 Use Vector<Ref<T>> in three random WebCore loops.
1037 <https://webkit.org/b/120661>
1039 Reviewed by Darin Adler.
1041 Clean up three little loops to use Refs to avoid null checking known-valid objects.
1042 Also apply auto, reserveInitialCapacity and uncheckedAppend as appropriate.
1044 * page/DOMWindow.cpp:
1045 (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
1046 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
1047 * platform/graphics/FontCache.cpp:
1048 (WebCore::FontCache::invalidate):
1050 2013-09-04 Claudio Saavedra <csaavedra@igalia.com>
1052 [GTK] Color of input button's text broken with recent gnome-themes-standard
1053 https://bugs.webkit.org/show_bug.cgi?id=120581
1055 Reviewed by Carlos Garcia Campos.
1057 * platform/gtk/RenderThemeGtk3.cpp:
1058 (WebCore::getStyleContext): add the "text-button" class.
1059 (WebCore::RenderThemeGtk::systemColor): Use the ACTIVE state flag,
1060 as this is the one actually used for button labels.
1062 2013-09-04 Zan Dobersek <zdobersek@igalia.com>
1064 [GTK] Add support for the Wayland build target
1065 https://bugs.webkit.org/show_bug.cgi?id=120627
1067 Reviewed by Gustavo Noronha Silva.
1069 * GNUmakefile.list.am: Reorder the Source/WebCore/plugins/np* source files.
1070 The X11-specific source files should only be included if the X11 target is being built. PluginPackageNone and
1071 PluginViewNone source files must be included in non-X11-target builds. Other source files that were previously
1072 guarded with the TARGET_X11 conditional should also be built for the Wayland target, so the new TARGET_X11_OR_WAYLAND
1073 conditional is used. If neither of those two targets is being built we fall back to adding source files to the build
1074 as necessary by the actual build target.
1075 * platform/gtk/GtkVersioning.c:
1076 (gdk_screen_get_monitor_workarea): Additionally guard bits of code that depend on the GDK_WINDOWING_X11 macro being
1077 defined - these should only be built when building the X11 target, checked for with PLATFORM(X11).
1079 2013-09-04 Mario Sanchez Prada <mario.prada@samsung.com>
1081 [GTK] Reimplement atk_text_get_text_*_offset for SENTENCE boundaries
1082 https://bugs.webkit.org/show_bug.cgi?id=114873
1084 Reviewed by Chris Fleizach.
1086 Re-implement these functions without using GailTextUtil nor Pango.
1088 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1089 (webkitAccessibleTextWordForBoundary): Renamed from webkitAccessibleTextGetWordForBoundary,
1090 to keep it consistent with names for new functions.
1091 (isSentenceBoundary): Helper function to know when we are either
1092 at the beginning or the end of a sentence.
1093 (isWhiteSpaceBetweenSentences): It returns true if we are in the
1094 middle of a white space between sentences. Useful for implementing
1095 the SENTENCE_END boundary type.
1096 (sentenceAtPositionForAtkBoundary): New helper function to find the
1097 sentence at a given position considering values of AtkTextBoundary.
1098 (webkitAccessibleTextSentenceForBoundary): New function,
1099 implementing atk_text_get_text_*_offset for SENTENCE.
1100 (webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
1101 SENTENCE boundaries with webkitAccessibleTextSentenceForBoundary().
1103 2013-09-04 Andrei Bucur <abucur@adobe.com>
1105 [CSS Regions] Extend the RenderRegionRange class to include overflow information + apply the layout overflow
1106 https://bugs.webkit.org/show_bug.cgi?id=116299
1108 Reviewed by David Hyatt.
1110 Patch for computing overflow for boxes per region and applying it for layout overflow.
1111 The approach is based on adding a RenderOverflow object inside the RenderBoxRegionInfo
1112 structure. The RenderOverflow object is manipulated by the RenderRegion using some utility
1113 functions that receive the target box as a parameter.
1114 When computing the portion of a box inside a region it is necessary to split the border
1115 rect of the box between regions. This means mapping the rectangle in the flow thread
1116 coordinates, making the split and then remapping the fragment in the box coordinates.
1117 For now, this is not optimized and walks the render tree to compute the block offsets.
1118 The function getRegionRangeForBox is used to determine in what regions a box should
1119 be rendered into. The range is computed at layout time and it depends on the height of
1120 the box, if its unsplittable for fragmentation etc.
1121 The patch also propagates the layout overflow to the regions. This enables to correctly
1122 display scrollbars when chaining varying size regions (currently the horizontal overflow
1123 is as wide as the widest region for all the regions). Unsplittable boxes will also generate
1124 layout overflow in the start region so they can be scrolled and fully reachable. This
1125 functionality depends on fixing the visual overflow and adapting the layout to take into
1126 account the unsplittable box. Besides this, the relative positioning and transforms are applied
1127 at a fragment level. This is in line with the CSS3 Break specification:
1128 http://dev.w3.org/csswg/css-break/#transforms
1130 Tests: fast/regions/overflow-scrollable-rel-pos-fragment.html
1131 fast/regions/overflow-scrollable-rotated-fragment.html
1132 fast/regions/overflow-scrollable-unsplittable-fragment.html
1133 fast/regions/overflow-scrollable-varying-width-1.html
1134 fast/regions/overflow-scrollable-varying-width-2.html
1136 * rendering/RenderBlock.cpp:
1137 (WebCore::RenderBlock::computeOverflow):
1138 (WebCore::RenderBlock::clearLayoutOverflow):
1139 (WebCore::RenderBlock::addVisualOverflowFromTheme):
1140 (WebCore::RenderBlock::relayoutForPagination):
1141 * rendering/RenderBlockLineLayout.cpp:
1142 (WebCore::RenderBlock::addOverflowFromInlineChildren):
1143 * rendering/RenderBox.cpp:
1144 (WebCore::RenderBox::clientBoxRectInRegion):
1145 (WebCore::RenderBox::addVisualEffectOverflow):
1146 (WebCore::RenderBox::applyVisualEffectOverflow):
1147 (WebCore::RenderBox::addOverflowFromChild):
1148 (WebCore::RenderBox::clearOverflow):
1149 * rendering/RenderBox.h:
1150 * rendering/RenderBoxRegionInfo.h:
1151 (WebCore::RenderBoxRegionInfo::createOverflow):
1152 (WebCore::RenderBoxRegionInfo::overflow):
1153 (WebCore::RenderBoxRegionInfo::clearOverflow):
1154 * rendering/RenderEmbeddedObject.cpp:
1155 (WebCore::RenderEmbeddedObject::layout):
1156 * rendering/RenderFlowThread.cpp:
1157 (WebCore::RenderFlowThread::updateLogicalWidth):
1158 (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
1159 (WebCore::RenderFlowThread::mapFromLocalToFlowThread):
1160 (WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
1161 (WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
1162 (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
1163 (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
1164 (WebCore::RenderFlowThread::addRegionsLayoutOverflow):
1165 (WebCore::RenderFlowThread::clearRegionsOverflow):
1166 * rendering/RenderFlowThread.h:
1167 * rendering/RenderIFrame.cpp:
1168 (WebCore::RenderIFrame::layout):
1169 * rendering/RenderRegion.cpp:
1170 (WebCore::RenderRegion::computeOverflowFromFlowThread):
1171 (WebCore::RenderRegion::setRenderBoxRegionInfo):
1172 (WebCore::RenderRegion::ensureOverflowForBox):
1173 (WebCore::RenderRegion::rectFlowPortionForBox):
1174 (WebCore::RenderRegion::addLayoutOverflowForBox):
1175 (WebCore::RenderRegion::addVisualOverflowForBox):
1176 (WebCore::RenderRegion::layoutOverflowRectForBox):
1177 (WebCore::RenderRegion::visualOverflowRectForBox):
1178 (WebCore::RenderRegion::layoutOverflowRectForBoxForPropagation):
1179 (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
1180 * rendering/RenderRegion.h:
1181 * rendering/RenderReplaced.cpp:
1182 (WebCore::RenderReplaced::layout):
1183 * rendering/RenderTableSection.cpp:
1184 (WebCore::RenderTableSection::computeOverflowFromCells):
1186 2013-09-04 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
1188 [GStreamer] cannot play live streams
1189 https://bugs.webkit.org/show_bug.cgi?id=116831
1191 Reviewed by Philippe Normand.
1193 Fix issues with rtsp streams embedded on <video> not loading.
1195 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1196 Do not reset pipeline to READY state on STATE_CHANGE_ASYNC when entering PAUSED state for
1197 live streams, otherwise we enter an endless loop of READY->PAUSED->READY->PAUSED when
1200 2013-09-03 Chris Fleizach <cfleizach@apple.com>
1202 AX: REGRESSION: @title is exposed as AXDescription when label label from contents already exists.
1203 https://bugs.webkit.org/show_bug.cgi?id=120550
1205 Reviewed by Mario Sanchez Prada.
1207 Resolve a FIXME from the accessible name computation refactoring so that alternative text for links do not
1208 show up in the title field and do not duplicate naming when a title tag is used.
1210 Effectively, this means that links no longer use AXTitle for alternative text. They use AXDescription
1211 like all other elements.
1213 Test: platform/mac/accessibility/link-with-title.html
1215 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1216 (-[WebAccessibilityObjectWrapper accessibilityTitle]):
1217 (-[WebAccessibilityObjectWrapper accessibilityDescription]):
1219 2013-09-03 Darin Adler <darin@apple.com>
1221 Change type of Document::doctype back to a raw pointer
1222 https://bugs.webkit.org/show_bug.cgi?id=120617
1224 Reviewed by Andreas Kling.
1227 (WebCore::Document::doctype): Return a raw pointer.
1228 (WebCore::Document::childrenChanged): Use the raw pointer.
1229 Also added a FIXME about this code that is probably in the wrong place.
1230 * dom/Document.h: More of the same.
1232 * editing/markup.cpp:
1233 (WebCore::documentTypeString): Get rid of local variable entirely,
1234 since null is already handled right by createMarkup, and also remove
1235 the call to get since doctype is just a raw pointer.
1237 2013-09-03 Andreas Kling <akling@apple.com>
1239 ASSERTION FAILED: frame().view() == this closing a page with SVG or video
1240 <https://webkit.org/b/120645>
1242 Reviewed by Antti Koivisto.
1244 Have RenderSVGResourceContainer check if the document is being destroyed before
1245 triggering any repaints. This replaces the previous check for a null RenderView
1246 which meant basically the same thing.
1248 We could add more and better assertions to catch unnecessary work during tree
1249 teardown, but let's do that separately.
1251 * rendering/svg/RenderSVGResourceContainer.cpp:
1252 (WebCore::RenderSVGResourceContainer::markClientForInvalidation):
1254 2013-09-03 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1256 Fix uninitialized build warning in make_names.pl
1257 https://bugs.webkit.org/show_bug.cgi?id=120658
1259 Reviewed by Andreas Kling.
1261 No new tests, no behavior change.
1263 * dom/make_names.pl:
1264 (printTypeChecks): Fixed a build warning since r154965.
1266 2013-09-03 Darin Adler <darin@apple.com>
1268 Fix backwards branch in ~Node from r154967
1269 https://bugs.webkit.org/show_bug.cgi?id=120659
1271 Reviewed by Andreas Kling.
1274 (WebCore::Node::~Node): Fix backwards branch. The old code ran the code only
1275 when we did not remove the item from the table. I removed a ! from this expression
1276 after review; bad idea.
1278 2013-09-03 Enrica Casucci <enrica@apple.com>
1280 Can't select Katakana word by double-clicking.
1281 <rdar://problem/14654926>
1283 Reviewed by Alexey Proskuryakov and Ryosuke Niwa.
1285 For some languages, like Japanese we need
1286 to use more context for word breaking.
1288 New test: editing/selection/doubleclick-japanese-text.html
1290 * platform/text/TextBoundaries.h:
1291 (WebCore::requiresContextForWordBoundary):
1293 2013-09-03 Mark Lam <mark.lam@apple.com>
1295 Converting StackIterator to a callback interface.
1296 https://bugs.webkit.org/show_bug.cgi?id=120564.
1298 Reviewed by Filip Pizlo.
1302 * bindings/js/JSXMLHttpRequestCustom.cpp:
1303 (WebCore::SendFunctor::SendFunctor):
1304 (WebCore::SendFunctor::hasViableFrame):
1305 (WebCore::SendFunctor::operator()):
1306 (WebCore::JSXMLHttpRequest::send):
1307 * bindings/js/ScriptCallStackFactory.cpp:
1308 (WebCore::CreateScriptCallStackFunctor::CreateScriptCallStackFunctor):
1309 (WebCore::CreateScriptCallStackFunctor::operator()):
1310 (WebCore::createScriptCallStack):
1311 (WebCore::CreateScriptCallStackForConsoleFunctor::CreateScriptCallStackForConsoleFunctor):
1312 (WebCore::CreateScriptCallStackForConsoleFunctor::operator()):
1314 2013-09-03 Oliver Hunt <oliver@apple.com>
1316 Support structured clone of Map and Set
1317 https://bugs.webkit.org/show_bug.cgi?id=120654
1319 Reviewed by Simon Fraser.
1321 Add support for cloning Map and Set. Fairly self explanatory change.
1322 Needed to add Forwarding headers for the JSMap, JSSet and MapData classes.
1324 * ForwardingHeaders/runtime/JSMap.h: Added.
1325 * ForwardingHeaders/runtime/JSSet.h: Added.
1326 * ForwardingHeaders/runtime/MapData.h: Added.
1327 * bindings/js/SerializedScriptValue.cpp:
1328 (WebCore::CloneSerializer::isMap):
1329 (WebCore::CloneSerializer::isSet):
1330 (WebCore::CloneSerializer::startSet):
1331 (WebCore::CloneSerializer::startMap):
1332 (WebCore::CloneSerializer::serialize):
1333 (WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible):
1334 (WebCore::CloneDeserializer::deserialize):
1336 2013-09-03 Bear Travis <betravis@adobe.com>
1338 [CSS Shapes] Shape's content gets extra left offset when left-border is positive on the content box
1339 https://bugs.webkit.org/show_bug.cgi?id=117573
1341 Reviewed by David Hyatt.
1343 Nested blocks need to take into account their offset from the shape-inside container.
1344 The new code calculates the offset from the shape-inside container, then applies the
1345 offset to the computed segments. The line must be moved down by the offset's height,
1346 and each segment must be moved left by the offset's width.
1348 Test: fast/shapes/shape-inside/shape-inside-offset-block-children.html
1350 * rendering/RenderBlock.cpp:
1351 (WebCore::RenderBlock::relayoutShapeDescendantIfMoved): Relayout a block child if its
1352 new logical left would cause it to rest at a new position within a shape container.
1353 (WebCore::RenderBlock::logicalOffsetFromShapeAncestorContainer): Calculate the logical
1354 offset form a shape inside ancestor container.
1355 (WebCore::RenderBlock::layoutBlockChild): Call relayoutShapeDescendantIfMoved with the
1356 new position offset.
1357 * rendering/RenderBlock.h:
1358 * rendering/RenderBlockLineLayout.cpp:
1359 (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Use layout offset, rather
1360 than just vertical offset.
1361 (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Ditto.
1362 (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Ditto.
1363 * rendering/shapes/ShapeInsideInfo.h:
1364 (WebCore::ShapeInsideInfo::computeSegmentsForLine): Shift segments logically left when
1365 there is an inline offset.
1367 2013-09-03 Antoine Quint <graouts@apple.com>
1369 Web Inspector: exceptions triggered from console evaluation do not pause the debugger
1370 https://bugs.webkit.org/show_bug.cgi?id=120460
1372 Reviewed by Timothy Hatcher.
1374 * inspector/InjectedScriptSource.js:
1375 Explicitly set a sourceURL such that the frontend may identify injected script when
1376 processing call frames in order to hide such code from the debugger.
1378 2013-09-03 Andreas Kling <akling@apple.com>
1380 Support Vector<Ref<T>>.
1381 <https://webkit.org/b/120637>
1383 Reviewed by Antti Koivisto.
1385 Use Vector<Ref<T>> internally in Page.
1388 (WebCore::networkStateChanged):
1389 (WebCore::Page::refreshPlugins):
1391 Clean up these functions and use Vector<Ref<Frame>> to store pointers to frames
1392 since we know they are not going to be null.
1394 (WebCore::Page::pluginViews):
1396 Changed this to return a Vector<Ref<PluginView>> by value instead of passing a
1397 writable vector as an argument. Clean up loops with 'auto'.
1399 (WebCore::Page::storageBlockingStateChanged):
1400 (WebCore::Page::privateBrowsingStateChanged):
1402 Tweaked for pluginViews() returning a Vector now.
1404 (WebCore::Page::setVisibilityState):
1406 Store Documents that need a visibilitychange event in a Vector<Ref<Document>>.
1408 2013-08-28 Sergio Villar Senin <svillar@igalia.com>
1410 [CSS Grid Layout] Add parsing for named grid lines
1411 https://bugs.webkit.org/show_bug.cgi?id=119540
1413 Reviewed by Andreas Kling.
1415 From Blink r150381,r150587 by <jchaffraix@chromium.org>
1417 Adds parsing support for named grid lines at <grid-line> level,
1418 i.e., inside grid-{row|column}-{start|end}. This change covers
1419 only the parsing, layout changes coming in a follow up patch.
1421 * css/CSSComputedStyleDeclaration.cpp:
1422 (WebCore::valueForGridPosition):
1423 * css/CSSParser.cpp:
1424 (WebCore::CSSParser::parseIntegerOrStringFromGridPosition):
1425 (WebCore::CSSParser::parseGridPosition):
1427 * css/StyleResolver.cpp:
1428 (WebCore::createGridPosition):
1429 * rendering/RenderGrid.cpp:
1430 (WebCore::RenderGrid::resolveGridPositionFromStyle):
1431 * rendering/style/GridPosition.h:
1432 (WebCore::GridPosition::setExplicitPosition):
1433 (WebCore::GridPosition::setSpanPosition):
1434 (WebCore::GridPosition::integerPosition):
1435 (WebCore::GridPosition::namedGridLine):
1437 2013-09-03 Alexey Proskuryakov <ap@apple.com>
1439 [Mac] Hyphenation respects regional format settings language instead of primary language
1440 https://bugs.webkit.org/show_bug.cgi?id=120641
1442 Reviewed by Dan Bernstein.
1444 Fixes hyphenation tests on my machine with non-English regional format settings.
1446 * platform/text/cf/HyphenationCF.cpp: (createValueForNullKey):
1447 Use primary UI language for hyphenation, not regional settings language.
1449 2013-09-03 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
1451 [GTK][EFL] include missing localized strings for subtitle auto track
1452 https://bugs.webkit.org/show_bug.cgi?id=120629
1454 those methods are necessary to show the "Auto" track on webkitgtk
1456 Reviewed by Gustavo Noronha Silva.
1458 * platform/efl/LocalizedStringsEfl.cpp:
1459 (WebCore::textTrackAutomaticMenuItemText):
1460 * platform/gtk/LocalizedStringsGtk.cpp:
1461 (WebCore::textTrackAutomaticMenuItemText):
1463 2013-09-03 Daniel Bates <dabates@apple.com>
1465 Require layout when -webkit-overflow-scrolling changes
1466 https://bugs.webkit.org/show_bug.cgi?id=120535
1468 Reviewed by Darin Adler.
1470 Test: fast/repaint/overflow-scroll-touch-repaint.html
1472 We want to require a layout when the value of -webkit-overflow-scrolling changes
1473 since -webkit-overflow-scrolling creates a stacking context.
1475 * rendering/style/RenderStyle.cpp:
1476 (WebCore::RenderStyle::changeRequiresLayout):
1478 2013-09-02 Ryosuke Niwa <rniwa@webkit.org>
1480 Support the "json" responseType and JSON response entity in XHR
1481 https://bugs.webkit.org/show_bug.cgi?id=73648
1483 Reviewed by Oliver Hunt.
1485 Based on the patch written by Jarred Nicholls.
1487 Implement 'json' type for XMLHttpRequest.response. We cache the result on JSC side as a cached attribute
1488 unlike other response types like 'document' and 'blob' for which the parsed response object is cached
1489 in XMLHttpRequest itself. In the long run, we should do the same for other types of response types.
1491 Also refactored the various code to share the code.
1493 Tests: fast/xmlhttprequest/xmlhttprequest-responsetype-json-invalid.html
1494 fast/xmlhttprequest/xmlhttprequest-responsetype-json-utf16.html
1495 fast/xmlhttprequest/xmlhttprequest-responsetype-json-valid.html
1497 * ForwardingHeaders/runtime/JSONObject.h: Added.
1499 * bindings/js/JSXMLHttpRequestCustom.cpp:
1500 (WebCore::JSXMLHttpRequest::visitChildren):
1501 (WebCore::JSXMLHttpRequest::response): Use JSONParse to parse the response text and cache the result.
1502 Call didCacheResponseJSON to set the cache status and clear the original response buffer.
1504 * xml/XMLHttpRequest.cpp:
1505 (WebCore::XMLHttpRequest::XMLHttpRequest): Added m_responseCacheIsValid to invalidate the cache of
1507 (WebCore::XMLHttpRequest::responseText):
1508 (WebCore::XMLHttpRequest::didCacheResponseJSON): Added; Updates m_responseCacheIsValid and clears the
1509 response buffer to save memory.
1510 (WebCore::XMLHttpRequest::responseXML):
1511 (WebCore::XMLHttpRequest::setResponseType):
1512 (WebCore::XMLHttpRequest::responseType):
1513 (WebCore::XMLHttpRequest::clearResponseBuffers):
1514 (WebCore::XMLHttpRequest::didReceiveData):
1516 * xml/XMLHttpRequest.h:
1517 (WebCore::XMLHttpRequest::doneWithoutErrors): Extracted from responseXML.
1518 (WebCore::XMLHttpRequest::responseTextIgnoringResponseType): Extracted from responseText.
1519 (WebCore::XMLHttpRequest::responseCacheIsValid): Added.
1520 (WebCore::XMLHttpRequest::shouldDecodeResponse): Extracted from didReceiveData.
1521 Also modified to decode when the response type is ResponseTypeJSON.
1523 * xml/XMLHttpRequest.idl: Added CachedAttribute IDL extention on response property. This cache is
1524 used when the response type is 'json'.
1526 2013-09-03 Commit Queue <commit-queue@webkit.org>
1528 Unreviewed, rolling out r154881.
1529 http://trac.webkit.org/changeset/154881
1530 https://bugs.webkit.org/show_bug.cgi?id=120643
1532 Crashes on macworld.com (Requested by kling on #webkit).
1535 (WebCore::Element::setAttributeInternal):
1537 2013-09-03 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
1539 [GStreamer] Don't set state to NULL until element is destroyed
1540 https://bugs.webkit.org/show_bug.cgi?id=117354
1542 Reviewed by Philippe Normand.
1544 Don't set playbin to NULL until it is going to be destroyed or if we stay
1545 for too long on the READY state. Instead only set the state to READY as this
1546 allows much faster state changes to PAUSED/PLAYING again. playbin internally
1547 caches some state that is destroyed when setting it to NULL.
1548 This state is independent of the URI and it is even possible to change the
1551 To avoid having resources (e.g. audio devices) open indefinitely,
1552 when setting the state to READY we create a timeout and if the timeout
1553 is reached we reset the pipeline state to NULL to free resources.
1555 Also now all state changes use the changePipelineState method instead of setting
1556 the playbin state directly with gst_element_set_state, so we have a better control
1557 of when we are requesting state changes.
1559 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1560 (WebCore::mediaPlayerPrivateReadyStateTimeoutCallback):
1561 (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1562 (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1563 (WebCore::MediaPlayerPrivateGStreamer::commitLoad):
1564 (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
1565 (WebCore::MediaPlayerPrivateGStreamer::setRate):
1566 (WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult):
1567 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1569 2013-09-03 peavo@outlook.com <peavo@outlook.com>
1571 [WinCairo] Unneeded code in method GlyphPage::fill().
1572 https://bugs.webkit.org/show_bug.cgi?id=120634
1574 Reviewed by Andreas Kling.
1576 * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
1577 (WebCore::GlyphPage::fill): Remove unneeded call to GetTextMetrics() function.
1579 2013-09-03 Mihnea Ovidenie <mihnea@adobe.com>
1581 [CSSRegions] Pseudo-elements as regions should not be exposed to JS
1582 https://bugs.webkit.org/show_bug.cgi?id=120633
1584 Reviewed by Andreas Kling.
1586 Until we properly implement the Region interface (http://dev.w3.org/csswg/css-regions/#the-region-interface)
1587 for pseudo-elements, we should not return these as regions in JS.
1589 Tests: fast/regions/get-regions-by-content-pseudo.html
1590 fast/regions/webkit-named-flow-get-regions-pseudo.html
1592 * dom/WebKitNamedFlow.cpp:
1593 (WebCore::WebKitNamedFlow::firstEmptyRegionIndex): Skip pseudo-elements as regions here too,
1594 otherwise we may get an index that cannot be used with getRegions().
1595 (WebCore::WebKitNamedFlow::getRegionsByContent):
1596 (WebCore::WebKitNamedFlow::getRegions):
1598 2013-09-03 Zan Dobersek <zdobersek@igalia.com>
1600 REGRESSION(r154967): http appcache tests crashing on WK1
1601 https://bugs.webkit.org/show_bug.cgi?id=120620
1603 Reviewed by Andreas Kling.
1605 * loader/appcache/ApplicationCacheGroup.cpp:
1606 (WebCore::ApplicationCacheGroup::cacheDestroyed): Reintroduce pre-r154967 behavior that returned early in
1607 this method if the passed-in ApplicationCache object was not found in the ApplicationCacheGroup's HashSet
1608 of all the caches. This is now done by checking that the HashSet<T>::remove(T) returns true (meaning the
1609 object was found in the HashSet and removed from it) in addition to that HashSet being subsequently empty
1610 before the method moves on to destroying its ApplicationCacheGroup instance.
1612 2013-09-03 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
1614 [gstreamer] Disable HTTP request "Accept-Encoding:" header field on gstreamer source element to avoid receiving the wrong size when retrieving data
1615 https://bugs.webkit.org/show_bug.cgi?id=115354
1617 Reviewed by Philippe Normand.
1619 Also disable Accept-Encoding on ResourceRequest::toSoupMessage accordingly.
1621 * platform/network/soup/ResourceRequestSoup.cpp:
1622 (WebCore::ResourceRequest::toSoupMessage):
1623 Call ResourceRequest::updateSoupMessage from ResourceRequest::toSoupMessage so that the
1624 Accept-Encoding header is also respected.
1626 2013-09-03 Krzysztof Czech <k.czech@samsung.com>
1628 [AX][ATK] Added support for sort and help attributes.
1629 https://bugs.webkit.org/show_bug.cgi?id=120456
1631 Reviewed by Chris Fleizach.
1633 Added support for aria-sort and aria-help attributes.
1635 Test: accessibility/aria-sort.html
1637 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1638 (webkitAccessibleGetAttributes):
1640 2013-09-03 Allan Sandfeld Jensen <allan.jensen@digia.com>
1642 [Qt] Remove dead code for QtXmlPatterns
1643 https://bugs.webkit.org/show_bug.cgi?id=120624
1645 Reviewed by Simon Hausmann.
1647 Remove code supporting XSLT using QtXmlPatterns which has been
1652 * dom/TransformSourceQt.cpp: Removed.
1653 * xml/XSLStyleSheetQt.cpp: Removed.
1654 * xml/XSLTProcessorQt.cpp: Removed.
1655 * xml/parser/XMLDocumentParserQt.cpp:
1656 (WebCore::XMLDocumentParser::doEnd):
1657 (WebCore::XMLDocumentParser::parseProcessingInstruction):
1659 2013-09-03 Mihnea Ovidenie <mihnea@adobe.com>
1661 [CSS Regions] position: fixed is computed relative to the first region, not the viewport
1662 https://bugs.webkit.org/show_bug.cgi?id=111176
1664 Reviewed by David Hyatt.
1666 Fixed positioned elements inside a named flow should be positioned and sized relative to the viewport,
1667 not on the first region, as described in the spec: http://dev.w3.org/csswg/css-regions/#the-flow-into-property.
1668 While the flow thread will still act as containing block for the fixed positioned elements, the painting and hit
1669 testing for the fixed positioned elements is done by RenderView. The layers for the fixed positioned elements
1670 are collected by the flow thread.
1672 Tests: fast/regions/element-in-named-flow-absolute-from-fixed.html
1673 fast/regions/element-in-named-flow-fixed-from-absolute.html
1674 fast/regions/element-inflow-fixed-from-outflow-static.html
1675 fast/regions/element-outflow-static-from-inflow-fixed.html
1676 fast/regions/fixed-element-transformed-parent.html
1677 fast/regions/fixed-in-named-flow-scroll.html
1678 fast/regions/fixed-inside-fixed-in-named-flow.html
1679 fast/regions/fixed-inside-named-flow-zIndex.html
1680 fast/regions/fixed-pos-elem-in-namedflow-noregions.html
1681 fast/regions/fixed-pos-region-in-nested-flow.html
1683 * rendering/FlowThreadController.cpp:
1684 (WebCore::FlowThreadController::collectFixedPositionedLayers):
1685 Return the list of layers for the fixed positioned elements with named flows as containing blocks.
1686 Used in RenderLayer:: paintFixedLayersInNamedFlows and RenderLayer:: hitTestFixedLayersInNamedFlows.
1687 * rendering/FlowThreadController.h:
1688 * rendering/RenderBox.cpp:
1689 (WebCore::RenderBox::mapLocalToContainer):
1690 (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
1691 (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
1692 For fixed positioned elements, width and height are given by the view instead of the first region.
1693 * rendering/RenderLayer.cpp:
1694 (WebCore::accumulateOffsetTowardsAncestor):
1695 Modified for the fixed positioned elements inside named flows with the named flows as containing block
1696 to take into account the view scroll.
1697 (WebCore::compareZIndex):
1698 Moved upwards because it is used in RenderLayer::paintFixedLayersInNamedFlows.
1699 (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
1700 Paint the list of fixed layers directly from the RenderView instead of painting them through regions -> named flows.
1701 (WebCore::RenderLayer::paintLayerContents):
1702 (WebCore::RenderLayer::paintList):
1703 (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
1704 Hit test the layers for the fix positioned elements inside named flows from the RenderView layer
1705 instead of the region -> named flow layer.
1706 (WebCore::RenderLayer::hitTestLayer):
1707 (WebCore::RenderLayer::calculateRects):
1708 * rendering/RenderLayer.h:
1709 * rendering/RenderLayerCompositor.cpp:
1710 (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
1711 We do not support yet the accelerated compositing for elements in named flows,
1712 so bail out early here. We need to revisit fixed elements once we finish accelerated compositing for elements in named flows.
1713 * rendering/RenderObject.cpp:
1714 (WebCore::RenderObject::fixedPositionedWithNamedFlowContainingBlock):
1715 (WebCore::hasFixedPosInNamedFlowContainingBlock):
1716 (WebCore::RenderObject::containerForRepaint):
1717 Changed to take into account that RenderView should be the repaintContainer for the
1718 fixed positioned elements with named flow as the containing block.
1719 * rendering/RenderObject.h:
1721 2013-09-03 Arvid Nilsson <anilsson@rim.com>
1723 [BlackBerry] Remove LayerData::LayerProgram
1724 https://bugs.webkit.org/show_bug.cgi?id=120601
1726 Reviewed by Anders Carlsson.
1729 All layer contents are RGBA now, so there's no need to support BGRA any
1730 more and the LayerData::LayerProgram enum can be removed. Related dead
1733 No new tests, no change in behavior.
1735 * platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp:
1736 (WebCore::EGLImageLayerWebKitThread::EGLImageLayerWebKitThread):
1737 * platform/graphics/blackberry/LayerData.h:
1738 (WebCore::LayerData::LayerData):
1739 * platform/graphics/blackberry/LayerRenderer.cpp:
1740 (WebCore::LayerRenderer::compositeLayersRecursive):
1741 (WebCore::LayerRenderer::createProgram):
1742 * platform/graphics/blackberry/LayerRenderer.h:
1743 * platform/graphics/blackberry/LayerWebKitThread.h:
1744 * platform/graphics/blackberry/PluginLayerWebKitThread.cpp:
1745 (WebCore::PluginLayerWebKitThread::setPluginView):
1747 2013-09-03 Xabier Rodriguez Calvar <calvaris@igalia.com>
1749 [GStreamer] Video player sets system volume to 100%
1750 https://bugs.webkit.org/show_bug.cgi?id=118974
1752 Reviewed by Philippe Normand.
1754 In order to preserve the system volume we need to keep track of
1755 the volume being initialized in the HTMLMediaElement and then just
1756 setting the volume to the sink when initializing the pipeline if
1757 that volume was changed before.
1759 * html/HTMLMediaElement.cpp:
1760 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialized
1762 (WebCore::HTMLMediaElement::setVolume): Set the attribute to true
1763 when volume is changed.
1764 (WebCore::HTMLMediaElement::updateVolume): Set the volume only if
1765 volume was initialized.
1766 (WebCore::HTMLMediaElement::mediaPlayerPlatformVolumeConfigurationRequired):
1767 Platform volume configuration is required only if volume was not
1769 * html/HTMLMediaElement.h: Added attribute and interface method.
1770 * platform/graphics/MediaPlayer.h:
1771 (WebCore::MediaPlayerClient::mediaPlayerPlatformVolumeConfigurationRequired):
1772 Declared and added default implementation for the interface method.
1773 (WebCore::MediaPlayer::platformVolumeConfigurationRequired):
1774 Asked the client, meaning the HTMLMediaElement if the platform
1775 volume configuration is required.
1776 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1777 (WebCore::mediaPlayerPrivateVolumeChangedCallback): Added log.
1778 (WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Added log.
1779 (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
1780 Set the volume only if not platform volume is required and added log.
1782 2013-09-02 Darin Adler <darin@apple.com>
1784 * inspector/InspectorProfilerAgent.cpp:
1785 (WebCore::InspectorProfilerAgent::removeProfile): Fix braces here; a review
1786 comment I forgot to address in my last check-in.
1788 2013-09-02 Darin Adler <darin@apple.com>
1790 Cut down on double hashing and code needlessly using hash table iterators
1791 https://bugs.webkit.org/show_bug.cgi?id=120611
1793 Reviewed by Andreas Kling.
1795 Some of these changes are primarily code cleanup, but others could provide
1796 a small code size and speed improvement by avoiding extra hashing.
1798 * Modules/geolocation/Geolocation.cpp:
1799 (WebCore::Geolocation::Watchers::find): Use get instead of find.
1800 (WebCore::Geolocation::Watchers::remove): Use take instead of find.
1801 (WebCore::Geolocation::makeCachedPositionCallbacks): Use the return
1802 value from remove to avoid hashing twice.
1804 * Modules/webaudio/AudioContext.cpp:
1805 (WebCore::AudioContext::addAutomaticPullNode): Use the return value from
1806 add to avoid hashing twice.
1807 (WebCore::AudioContext::removeAutomaticPullNode): Use the return value
1808 from remove to avoid hashing twice.
1810 * Modules/webaudio/AudioNodeInput.cpp:
1811 (WebCore::AudioNodeInput::connect): Use the return value from add to avoid
1813 (WebCore::AudioNodeInput::disconnect): Use the return value from remove
1814 to avoid hashing twice.
1816 * Modules/webaudio/AudioParam.cpp:
1817 (WebCore::AudioParam::connect): Use the return value from add to avoid
1819 (WebCore::AudioParam::disconnect): Use the return value from remove to
1820 avoid hashing twice.
1822 * bridge/NP_jsobject.cpp:
1823 (ObjectMap::remove): Use remove instead of find/remove.
1826 (WebCore::Node::~Node): Use the return value from remove instead of
1829 * inspector/InspectorProfilerAgent.cpp:
1830 (WebCore::InspectorProfilerAgent::removeProfile): Remove needless
1833 * loader/DocumentLoader.cpp:
1834 (WebCore::DocumentLoader::removeSubresourceLoader): Use the return
1835 value from remove instead of find/remove.
1837 * loader/ResourceLoadScheduler.cpp:
1838 (WebCore::ResourceLoadScheduler::HostInformation::remove): Use the
1839 return value from remove to avoid hashing twice.
1841 * loader/appcache/ApplicationCacheGroup.cpp:
1842 (WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Use
1843 remove instead of find/remove.
1844 (WebCore::ApplicationCacheGroup::cacheDestroyed): Removed a needless
1845 call to contains to avoid hashing twice. It's fine to do the check
1846 for an empty hash table unconditionally.
1848 * page/DOMWindow.cpp:
1849 (WebCore::addUnloadEventListener): Eliminated a local variable for clarity.
1850 (WebCore::removeUnloadEventListener): Ditto. Also use remove instead
1852 (WebCore::removeAllUnloadEventListeners): Ditto. Also use removeAll instead
1854 (WebCore::addBeforeUnloadEventListener): Ditto.
1855 (WebCore::removeBeforeUnloadEventListener): Ditto.
1856 (WebCore::removeAllBeforeUnloadEventListeners): Ditto.
1858 * page/FrameView.cpp:
1859 (WebCore::FrameView::removeViewportConstrainedObject): Use the return
1860 value from remove to avoid hashing twice.
1861 (WebCore::FrameView::removeScrollableArea): Use the return value from
1862 remove instead of find/remove.
1863 (WebCore::FrameView::containsScrollableArea): Use && instead of an if
1864 statement in a way that is idiomatic for this kind of function.
1867 (WebCore::Page::addRelevantRepaintedObject): Use the return value from
1868 remove instead of find/remove.
1870 * page/PageGroup.cpp:
1871 (WebCore::PageGroup::removeUserScriptsFromWorld): Use remove instead
1873 (WebCore::PageGroup::removeUserStyleSheetsFromWorld): Use the return
1874 value from remove instead of find/remove.
1876 * page/PerformanceUserTiming.cpp:
1877 (WebCore::clearPeformanceEntries): Removed a needless call to contains.
1879 * platform/graphics/DisplayRefreshMonitor.cpp:
1880 (WebCore::DisplayRefreshMonitor::removeClient): Use the return value
1881 from remove instead of find/remove.
1882 (WebCore::DisplayRefreshMonitorManager::displayDidRefresh): Use remove
1883 instead of find/remove.
1885 * platform/graphics/blackberry/LayerRenderer.cpp:
1886 (WebCore::LayerRenderer::removeLayer): Use the return value from remove
1887 instead of find/remove.
1889 * platform/win/WindowMessageBroadcaster.cpp:
1890 (WebCore::WindowMessageBroadcaster::removeListener): Use remove instead
1891 of find/remove. It's fine to do the check for an empty hash table unconditionally.
1893 * plugins/PluginDatabase.cpp:
1894 (WebCore::PluginDatabase::removeDisabledPluginFile): Use the return value
1895 from remove instead of find/remove.
1897 * rendering/style/StyleCustomFilterProgramCache.cpp:
1898 (WebCore::StyleCustomFilterProgramCache::lookup): Use get instead of find.
1899 (WebCore::StyleCustomFilterProgramCache::add): Use contains instead of find
1901 (WebCore::StyleCustomFilterProgramCache::remove): Use remove instead of
1904 * svg/SVGCursorElement.cpp:
1905 (WebCore::SVGCursorElement::removeClient): Use the return value from remove
1906 instead of find/remove.
1908 * svg/SVGDocumentExtensions.cpp:
1909 (WebCore::SVGDocumentExtensions::removeResource): Removed an unneeded call
1911 (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): Use
1912 remove instead of find/remove. It's fine to do the check for an empty hash
1913 table unconditionally.
1914 (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Use
1915 remove instead of find/remove. Also removed unhelpful assertions. One is
1916 already done by HashMap, and the other is just checking a basic invariant
1917 of every HashMap that doesn't need to be checked.
1919 * svg/graphics/SVGImageCache.cpp:
1920 (WebCore::SVGImageCache::removeClientFromCache): Removed an unneeded call
1923 * svg/properties/SVGAnimatedProperty.cpp:
1924 (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty): Use the version of
1925 remove that takes an iterator rather than the one that takes a key, so
1926 we don't need to redo the hashing.
1928 2013-09-02 Andreas Kling <akling@apple.com>
1930 Generate isFooElement() functions from tagname data.
1931 <https://webkit.org/b/120584>
1933 Reviewed by Antti Koivisto.
1935 Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
1936 If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
1937 This also outputs an isElementOfType<T> check for the Element iterators.
1939 Removed all the hand-written isFooElement() functions that only checked tag name.
1941 * html/HTMLTagNames.in:
1944 Added "generateTypeChecks" attribute as appropriate.
1947 * GNUmakefile.list.am:
1948 * WebCore.vcxproj/WebCore.vcxproj:
1949 * WebCore.xcodeproj/project.pbxproj:
1951 Added to build systems based on how HTMLNames.h was done.
1952 We're just outputting an additional header file in the generated code directory
1953 so I suspect most ports will just pick this up automagically.
1955 * dom/make_names.pl:
1956 (defaultTagPropertyHash):
1957 (printLicenseHeader):
1959 (printTypeChecksHeaderFile):
1961 Generate a separate file for each namespace with isFooElement() helpers for
1962 elements with "generateTypeChecks" attribute set.
1964 2013-09-02 Darin Adler <darin@apple.com>
1966 [Mac] No need for HardAutorelease, which is same as CFBridgingRelease
1967 https://bugs.webkit.org/show_bug.cgi?id=120569
1969 Reviewed by Andy Estes.
1971 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1972 (AXTextMarkerRange):
1973 (AXTextMarkerRangeStart):
1974 (AXTextMarkerRangeEnd):
1975 (textMarkerForVisiblePosition):
1976 Use CFBridgingRelease.
1978 * platform/mac/KURLMac.mm:
1979 (WebCore::KURL::operator NSURL *): Use CFBridgingRelease.
1980 (WebCore::KURL::createCFURL): Get rid of needless local variable.
1982 * platform/mac/WebCoreNSURLExtras.mm:
1983 (WebCore::mapHostNameWithRange):
1984 (WebCore::URLWithData):
1985 (WebCore::userVisibleString):
1986 * platform/text/mac/StringImplMac.mm:
1987 (WTF::StringImpl::operator NSString *):
1988 Use CFBridgingRelease.
1990 2013-09-01 Andreas Kling <akling@apple.com>
1992 Ref: A smart pointer for the reference age.
1993 <https://webkit.org/b/120570>
1995 Reviewed by Antti Koivisto.
1997 Use Ref<T> for various stack guards where null checking isn't needed.
1999 2013-09-02 Andreas Kling <akling@apple.com>
2001 Simplify DocumentType handling.
2002 <https://webkit.org/b/120529>
2004 Reviewed by Antti Koivisto.
2006 Removed the insertedInto()/removedFrom() handlers from DocumentType.
2008 Document no longer keeps a pointer to its doctype node, it was only used for the
2009 document.doctype DOM API, which now just looks through the list of (<=2) children.
2011 The ENABLE(LEGACY_VIEWPORT_ADAPTION) hunk from Document::setDocType() was moved
2012 into Document::childrenChanged().
2014 We no longer clear the style resolver on doctype insertion/removal since it
2015 doesn't actually affect style anyway.
2017 Also made doctype() return a PassRefPtr<DocumentType> instead of a raw pointer.
2020 (WebCore::Document::dispose):
2021 (WebCore::Document::doctype):
2022 (WebCore::Document::childrenChanged):
2024 * dom/DocumentType.cpp:
2025 * dom/DocumentType.h:
2026 * editing/markup.cpp:
2027 (WebCore::documentTypeString):
2029 2013-09-02 Anton Obzhirov <a.obzhirov@samsung.com>
2031 <https://webkit.org/b/98350> [GTK] accessibility/aria-invalid.html times out
2033 Reviewed by Mario Sanchez Prada.
2035 The patch exposes aria-invalid attribute to ATK.
2037 * accessibility/atk/AXObjectCacheAtk.cpp:
2038 (WebCore::AXObjectCache::postPlatformNotification):
2039 Added emitting state-change signal for aria-invalid event.
2040 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2041 (webkitAccessibleGetAttributes):
2042 Added aria-invalid attribute.
2044 2013-09-02 Commit Queue <commit-queue@webkit.org>
2046 Unreviewed, rolling out r154955.
2047 http://trac.webkit.org/changeset/154955
2048 https://bugs.webkit.org/show_bug.cgi?id=120605
2050 broke xcode4 build :| (Requested by kling on #webkit).
2053 * GNUmakefile.list.am:
2054 * WebCore.vcxproj/WebCore.vcxproj:
2055 * WebCore.xcodeproj/project.pbxproj:
2056 * dom/make_names.pl:
2057 (defaultTagPropertyHash):
2058 (printLicenseHeader):
2059 * html/HTMLAnchorElement.h:
2060 (WebCore::isHTMLAnchorElement):
2061 (WebCore::HTMLAnchorElement):
2062 * html/HTMLAreaElement.h:
2063 (WebCore::isHTMLAreaElement):
2064 (WebCore::HTMLAreaElement):
2065 * html/HTMLAudioElement.h:
2066 (WebCore::isHTMLAudioElement):
2067 * html/HTMLBaseElement.h:
2068 (WebCore::isHTMLBaseElement):
2069 (WebCore::HTMLBaseElement):
2070 * html/HTMLCanvasElement.h:
2071 (WebCore::isHTMLCanvasElement):
2072 * html/HTMLElement.h:
2073 * html/HTMLFieldSetElement.h:
2074 (WebCore::isHTMLFieldSetElement):
2075 (WebCore::HTMLFieldSetElement):
2076 * html/HTMLFormElement.h:
2077 (WebCore::isHTMLFormElement):
2078 * html/HTMLFrameSetElement.h:
2079 (WebCore::isHTMLFrameSetElement):
2080 (WebCore::HTMLFrameSetElement):
2081 * html/HTMLImageElement.h:
2082 (WebCore::isHTMLImageElement):
2083 * html/HTMLInputElement.h:
2084 (WebCore::isHTMLInputElement):
2085 * html/HTMLLabelElement.h:
2086 (WebCore::isHTMLLabelElement):
2087 (WebCore::HTMLLabelElement):
2088 * html/HTMLLegendElement.h:
2089 (WebCore::isHTMLLegendElement):
2090 (WebCore::HTMLLegendElement):
2091 * html/HTMLMapElement.h:
2092 (WebCore::isHTMLMapElement):
2093 * html/HTMLMeterElement.h:
2094 (WebCore::isHTMLMeterElement):
2095 * html/HTMLOptGroupElement.h:
2096 (WebCore::isHTMLOptGroupElement):
2097 * html/HTMLOptionElement.h:
2098 (WebCore::isHTMLOptionElement):
2099 * html/HTMLParamElement.h:
2100 (WebCore::isHTMLParamElement):
2101 (WebCore::HTMLParamElement):
2102 * html/HTMLProgressElement.h:
2103 (WebCore::isHTMLProgressElement):
2104 * html/HTMLScriptElement.h:
2105 (WebCore::isHTMLScriptElement):
2106 * html/HTMLSourceElement.h:
2107 (WebCore::isHTMLSourceElement):
2108 (WebCore::HTMLSourceElement):
2109 * html/HTMLStyleElement.h:
2110 (WebCore::isHTMLStyleElement):
2111 (WebCore::HTMLStyleElement):
2112 * html/HTMLTableElement.h:
2113 (WebCore::isHTMLTableElement):
2114 * html/HTMLTableRowElement.h:
2115 (WebCore::isHTMLTableRowElement):
2116 (WebCore::HTMLTableRowElement):
2117 * html/HTMLTagNames.in:
2118 * html/HTMLTextAreaElement.h:
2119 (WebCore::isHTMLTextAreaElement):
2120 * html/HTMLTitleElement.h:
2121 (WebCore::isHTMLTitleElement):
2122 (WebCore::HTMLTitleElement):
2123 * html/HTMLTrackElement.h:
2124 (WebCore::isHTMLTrackElement):
2125 (WebCore::HTMLTrackElement):
2127 * svg/SVGFontElement.h:
2128 (WebCore::isSVGFontElement):
2129 * svg/SVGFontFaceElement.h:
2130 (WebCore::isSVGFontFaceElement):
2131 (WebCore::SVGFontFaceElement):
2132 * svg/SVGForeignObjectElement.h:
2133 (WebCore::isSVGForeignObjectElement):
2134 (WebCore::SVGForeignObjectElement):
2135 * svg/SVGImageElement.h:
2136 (WebCore::isSVGImageElement):
2137 * svg/SVGScriptElement.h:
2138 (WebCore::isSVGScriptElement):
2141 2013-09-02 Antti Koivisto <antti@apple.com>
2143 Clean up ContainerNode::childrenChanged
2144 https://bugs.webkit.org/show_bug.cgi?id=120599
2146 Reviewed by Andreas Kling.
2148 - Make childrenChanged take a single struct argument instead of a long list of arguments.
2149 - Use enum instead of childCountDelta. It was always -1, 0, 1 or the total number of children (in case of removing them all).
2150 - Remove use of Node*, give the change range as Elements.
2154 (WebCore::Attr::childrenChanged):
2156 * dom/CharacterData.cpp:
2157 (WebCore::CharacterData::parserAppendData):
2158 (WebCore::CharacterData::dispatchModifiedEvent):
2159 * dom/ContainerNode.cpp:
2160 (WebCore::ContainerNode::insertBefore):
2161 (WebCore::ContainerNode::notifyChildInserted):
2162 (WebCore::ContainerNode::notifyChildRemoved):
2164 Add private helpers for setting up the struct.
2166 (WebCore::ContainerNode::parserInsertBefore):
2167 (WebCore::ContainerNode::replaceChild):
2168 (WebCore::ContainerNode::removeChild):
2169 (WebCore::ContainerNode::parserRemoveChild):
2170 (WebCore::ContainerNode::removeChildren):
2171 (WebCore::ContainerNode::appendChild):
2172 (WebCore::ContainerNode::parserAppendChild):
2173 (WebCore::ContainerNode::childrenChanged):
2174 (WebCore::ContainerNode::updateTreeAfterInsertion):
2175 * dom/ContainerNode.h:
2177 (WebCore::Document::childrenChanged):
2180 (WebCore::checkForSiblingStyleChanges):
2182 Clean up and simplify. Since we now get element range automatically we don't need to compute it.
2184 (WebCore::Element::childrenChanged):
2185 (WebCore::Element::finishParsingChildren):
2187 * dom/ShadowRoot.cpp:
2188 (WebCore::ShadowRoot::childrenChanged):
2190 * html/HTMLElement.cpp:
2191 (WebCore::HTMLElement::childrenChanged):
2192 (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
2194 Try to keep the existing behavior. This code needs more cleanup to be sane. It shouldn't operate on Nodes
2195 as it only really cares about Elements.
2197 * html/HTMLElement.h:
2198 * html/HTMLFieldSetElement.cpp:
2199 (WebCore::HTMLFieldSetElement::childrenChanged):
2200 * html/HTMLFieldSetElement.h:
2201 * html/HTMLObjectElement.cpp:
2202 (WebCore::HTMLObjectElement::childrenChanged):
2203 * html/HTMLObjectElement.h:
2204 * html/HTMLOptGroupElement.cpp:
2205 (WebCore::HTMLOptGroupElement::childrenChanged):
2206 * html/HTMLOptGroupElement.h:
2207 * html/HTMLOptionElement.cpp:
2208 (WebCore::HTMLOptionElement::childrenChanged):
2209 * html/HTMLOptionElement.h:
2210 * html/HTMLOutputElement.cpp:
2211 (WebCore::HTMLOutputElement::childrenChanged):
2212 * html/HTMLOutputElement.h:
2213 * html/HTMLScriptElement.cpp:
2214 (WebCore::HTMLScriptElement::childrenChanged):
2215 * html/HTMLScriptElement.h:
2216 * html/HTMLSelectElement.cpp:
2217 (WebCore::HTMLSelectElement::childrenChanged):
2218 * html/HTMLSelectElement.h:
2219 * html/HTMLStyleElement.cpp:
2220 (WebCore::HTMLStyleElement::childrenChanged):
2221 * html/HTMLStyleElement.h:
2222 * html/HTMLTextAreaElement.cpp:
2223 (WebCore::HTMLTextAreaElement::childrenChanged):
2224 * html/HTMLTextAreaElement.h:
2225 * html/HTMLTitleElement.cpp:
2226 (WebCore::HTMLTitleElement::childrenChanged):
2227 * html/HTMLTitleElement.h:
2228 * html/shadow/InsertionPoint.cpp:
2229 (WebCore::InsertionPoint::childrenChanged):
2230 * html/shadow/InsertionPoint.h:
2231 * svg/SVGClipPathElement.cpp:
2232 (WebCore::SVGClipPathElement::childrenChanged):
2233 * svg/SVGClipPathElement.h:
2234 * svg/SVGElement.cpp:
2235 (WebCore::SVGElement::childrenChanged):
2237 * svg/SVGFELightElement.cpp:
2238 (WebCore::SVGFELightElement::childrenChanged):
2239 * svg/SVGFELightElement.h:
2240 * svg/SVGFilterElement.cpp:
2241 (WebCore::SVGFilterElement::childrenChanged):
2242 * svg/SVGFilterElement.h:
2243 * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2244 (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
2245 * svg/SVGFilterPrimitiveStandardAttributes.h:
2246 * svg/SVGFontFaceElement.cpp:
2247 (WebCore::SVGFontFaceElement::childrenChanged):
2248 * svg/SVGFontFaceElement.h:
2249 * svg/SVGFontFaceFormatElement.cpp:
2250 (WebCore::SVGFontFaceFormatElement::childrenChanged):
2251 * svg/SVGFontFaceFormatElement.h:
2252 * svg/SVGFontFaceSrcElement.cpp:
2253 (WebCore::SVGFontFaceSrcElement::childrenChanged):
2254 * svg/SVGFontFaceSrcElement.h:
2255 * svg/SVGFontFaceUriElement.cpp:
2256 (WebCore::SVGFontFaceUriElement::childrenChanged):
2257 * svg/SVGFontFaceUriElement.h:
2258 * svg/SVGGradientElement.cpp:
2259 (WebCore::SVGGradientElement::childrenChanged):
2260 * svg/SVGGradientElement.h:
2261 * svg/SVGMarkerElement.cpp:
2262 (WebCore::SVGMarkerElement::childrenChanged):
2263 * svg/SVGMarkerElement.h:
2264 * svg/SVGMaskElement.cpp:
2265 (WebCore::SVGMaskElement::childrenChanged):
2266 * svg/SVGMaskElement.h:
2267 * svg/SVGPatternElement.cpp:
2268 (WebCore::SVGPatternElement::childrenChanged):
2269 * svg/SVGPatternElement.h:
2270 * svg/SVGScriptElement.cpp:
2271 (WebCore::SVGScriptElement::childrenChanged):
2272 * svg/SVGScriptElement.h:
2273 * svg/SVGStyleElement.cpp:
2274 (WebCore::SVGStyleElement::childrenChanged):
2275 * svg/SVGStyleElement.h:
2276 * svg/SVGTitleElement.cpp:
2277 (WebCore::SVGTitleElement::childrenChanged):
2278 * svg/SVGTitleElement.h:
2280 2013-09-02 Andreas Kling <akling@apple.com>
2282 Generate isFooElement() functions from tagname data.
2283 <https://webkit.org/b/120584>
2285 Reviewed by Antti Koivisto.
2287 Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
2288 If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
2289 This also outputs an isElementOfType<T> check for the Element iterators.
2291 Removed all the hand-written isFooElement() functions that only checked tag name.
2293 * html/HTMLTagNames.in:
2296 Added "generateTypeChecks" attribute as appropriate.
2299 * GNUmakefile.list.am:
2300 * WebCore.vcxproj/WebCore.vcxproj:
2301 * WebCore.xcodeproj/project.pbxproj:
2303 Added to build systems based on how HTMLNames.h was done.
2304 We're just outputting an additional header file in the generated code directory
2305 so I suspect most ports will just pick this up automagically.
2307 * dom/make_names.pl:
2308 (defaultTagPropertyHash):
2309 (printLicenseHeader):
2311 (printTypeChecksHeaderFile):
2313 Generate a separate file for each namespace with isFooElement() helpers for
2314 elements with "generateTypeChecks" attribute set.
2316 2013-09-02 Dirk Schulze <krit@webkit.org>
2318 Use edgeMode=duplicate for blurring on filter() function
2319 https://bugs.webkit.org/show_bug.cgi?id=120590
2321 Reviewed by Antti Koivisto.
2323 Filters on the CSS Image function filter() are not allowed to extend the
2324 dimension of the input image. This causes weird results on blurring an image,
2325 where the fading on the edges is clipped at the half of the fading.
2326 We shouldn't fade edges at all and use the edgeMode=duplicate instead.
2327 This will duplicate the pixel value on the nearest edge of the input image
2328 instead of taking transparent black and results in nice blurred images with
2331 Spec: http://dev.w3.org/fxtf/filters/#blurEquivalent
2333 Test: fast/filter-image/filter-image-blur.html
2335 * css/CSSFilterImageValue.cpp: Pass consumer information to the renderer.
2336 (WebCore::CSSFilterImageValue::image):
2337 * rendering/FilterEffectRenderer.cpp: Set edgeMode for feGaussianBlur to
2338 'duplicate' or 'none' depending on the consumer.
2339 (WebCore::FilterEffectRenderer::build):
2340 * rendering/FilterEffectRenderer.h: Add enumeration to differ between the
2341 different consumers of the renderer.
2342 * rendering/RenderLayer.cpp:
2343 (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Pass consumer
2344 information to the renderer.
2346 2013-09-01 Dirk Schulze <krit@webkit.org>
2348 Add 'edgeMode' attribute to SVGFEGaussianBlur
2349 https://bugs.webkit.org/show_bug.cgi?id=120582
2351 Add 'edgeMode' attribute to the SVGFEGaussianBlur element. This attribute
2352 allows users to define the behavior on edges with the values 'none' where
2353 pixel values outside the input image are treated as transparent black. (The
2354 current blurring behavior.) 'duplicate' which repeats the values on the
2355 nearest edge and 'warp', which takes the pixel of the opposite site of
2357 Beside the attribute, this patch implements the behavior of 'duplicate'.
2359 http://dev.w3.org/fxtf/filters/#feGaussianBlurEdgeModeAttribute
2361 Reviewed by Rob Buis.
2363 Tests: svg/dynamic-updates/SVGFEGaussianBlurElement-dom-edgeMode-attr.html
2364 svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop.html
2365 svg/filters/svg-gaussianblur-edgeMode-duplicate-expected.svg
2366 svg/filters/svg-gaussianblur-edgeMode-duplicate.svg
2368 * platform/graphics/filters/FEGaussianBlur.cpp:
2369 (WebCore::FEGaussianBlur::FEGaussianBlur):
2370 (WebCore::FEGaussianBlur::create):
2371 (WebCore::FEGaussianBlur::edgeMode):
2372 (WebCore::FEGaussianBlur::setEdgeMode):
2374 (WebCore::FEGaussianBlur::platformApplyGeneric):
2375 (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
2376 * platform/graphics/filters/FEGaussianBlur.h:
2377 * rendering/FilterEffectRenderer.cpp:
2378 (WebCore::FilterEffectRenderer::build):
2379 * svg/SVGFEGaussianBlurElement.cpp:
2380 (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
2381 (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
2382 (WebCore::SVGFEGaussianBlurElement::parseAttribute):
2383 (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
2384 (WebCore::SVGFEGaussianBlurElement::build):
2385 * svg/SVGFEGaussianBlurElement.h:
2386 * svg/SVGFEGaussianBlurElement.idl:
2388 2013-09-01 Andreas Kling <akling@apple.com>
2390 EventHandler::m_frame should be a Frame&.
2391 <https://webkit.org/b/120580>
2393 Reviewed by Darin Adler.
2395 EventHandler is tied to the lifetime of its frame, so let m_frame be a Frame&.
2396 A handful of null checks and assertions removed.
2398 2013-09-01 Darin Adler <darin@apple.com>
2400 Fix a mistake in my recent pasteboard/editor refactoring that was causing tests to fail.
2402 * editing/mac/EditorMac.mm:
2403 (WebCore::getImage): One place this said cachedImage but it should have said tentativeCachedImage.
2405 2013-09-01 Darin Adler <darin@apple.com>
2407 HitTestResult should have innerNonSharedElement
2408 https://bugs.webkit.org/show_bug.cgi?id=120579
2410 Reviewed by Andreas Kling.
2412 * editing/Editor.cpp:
2413 (WebCore::Editor::copyImage): Call HitTestResult member function version of
2414 innerNonSharedElement instead of a local function that does it.
2417 (WebCore::Chrome::setToolTip): Use innerNonSharedElement instead of getting
2418 the node and checking if it's an input element. Also added some missing braces.
2420 * page/EventHandler.cpp:
2421 (WebCore::EventHandler::selectClosestWordFromHitTestResult): Use targetNode for
2422 local variables instead of innerNode to match the HitTestResult function name.
2423 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Ditto.
2424 (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
2425 (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
2426 (WebCore::EventHandler::handleMousePressEvent): Ditto.
2428 * rendering/HitTestResult.cpp:
2429 (WebCore::HitTestResult::innerElement): Rewrote so there there is no loop.
2430 (WebCore::HitTestResult::innerNonSharedElement): Ditto.
2432 * rendering/HitTestResult.h: Added innerNonSharedElement. Generally speaking,
2433 we'd like to avoid using Node unless there is some real need.
2435 2013-09-01 Xabier Rodriguez Calvar <calvaris@igalia.com>
2437 Volume slider value should be 0 when audio is muted
2438 https://bugs.webkit.org/show_bug.cgi?id=120553
2440 Reviewed by Eric Carlson.
2442 Fixed the problem of showing a non empty slider when audio is
2445 Test: media/volume-bar-empty-when-muted.html.
2447 * html/shadow/MediaControls.cpp:
2448 (WebCore::MediaControls::reset): Use setSliderVolume.
2449 (WebCore::MediaControls::changedVolume): Use setSliderVolume.
2450 (WebCore::MediaControls::setSliderVolume): Added to set the volume
2451 to 0 when muted and to its value otherwise.
2452 * html/shadow/MediaControls.h: Added setSliderVolume.
2453 * html/shadow/MediaControlsApple.cpp:
2454 (WebCore::MediaControlsApple::reset): Used setSliderVolume and
2455 setFullscreenSliderVolume.
2456 (WebCore::MediaControlsApple::changedVolume): Used
2457 setFullscreenSliderVolume.
2458 (WebCore::MediaControlsApple::setFullscreenSliderVolume): Added to
2459 set the volume to 0 when muted and to its value otherwise.
2460 * html/shadow/MediaControlsApple.h: Added setFullscreenSliderVolume
2461 * html/shadow/MediaControlsBlackBerry.cpp:
2462 (WebCore::MediaControlsBlackBerry::reset): Used setSliderVolume.
2464 2013-09-01 Andreas Kling <akling@apple.com>
2466 Give EditCommand a protected Frame& getter.
2467 <https://webkit.org/b/120574>
2469 Reviewed by Darin Adler.
2471 EditCommand is only created for documents that are attached to a Frame,
2472 we already ASSERTed as much in the EditCommand constructor.
2474 This patch adds a "Frame& EditCommand::frame()" helper, so EditCommand
2475 and its subclasses don't have to fumble around with pointers.
2477 2013-08-31 Antti Koivisto <antti@apple.com>
2479 Add element ancestor iterator
2480 https://bugs.webkit.org/show_bug.cgi?id=120563
2482 Reviewed by Andreas Kling.
2484 This patch adds ancestor iterators. They iterate over elements parent chain up to the root.
2486 To iterate over Element ancestors:
2488 auto ancestors = elementAncestors(this);
2489 for (auto it = ancestors.begin(), end = ancestors.end(); it != end; ++it) {
2490 Element& element = *it;
2493 To iterate over Element ancestors including the current element:
2495 auto lineage = elementLineage(this);
2496 for (auto it = lineage.begin(), end = lineage.end(); it != end; ++it) {
2497 Element& element = *it;
2500 To iterate over ancestors of a specific Element subclass:
2502 auto htmlAncestors = ancestorsOfType<HTMLElement>(this);
2503 for (auto it = htmlAncestors.begin(), end = htmlAncestors.end(); it != end; ++it) {
2504 HTMLElement& htmlElement = *it;
2507 To iterate over ancestors of a specific Element subclass including the current element:
2509 auto htmlLineage = lineageOfType<HTMLElement>(this);
2510 for (auto it = htmlLineage.begin(), end = htmlLineage.end(); it != end; ++it) {
2511 HTMLElement& htmlElement = *it;
2514 The patch also uses the new types in a few places.
2516 * WebCore.xcodeproj/project.pbxproj:
2517 * accessibility/AccessibilityNodeObject.cpp:
2518 (WebCore::AccessibilityNodeObject::mouseButtonListener):
2519 (WebCore::AccessibilityNodeObject::labelForElement):
2520 * dom/ElementAncestorIterator.h: Added.
2521 (WebCore::::ElementAncestorIterator):
2522 (WebCore::::operator):
2523 (WebCore::::ElementAncestorConstIterator):
2524 (WebCore::::ElementAncestorIteratorAdapter):
2527 (WebCore::::ElementAncestorConstIteratorAdapter):
2528 (WebCore::elementLineage):
2529 (WebCore::elementAncestors):
2530 (WebCore::ancestorsOfType):
2531 * dom/ElementIterator.h:
2532 (WebCore::findElementAncestorOfType):
2533 (WebCore::::traverseAncestor):
2535 * html/HTMLElement.cpp:
2536 (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
2537 * html/HTMLFieldSetElement.h:
2538 (WebCore::isHTMLFieldSetElement):
2539 (WebCore::HTMLFieldSetElement):
2540 * html/HTMLFrameSetElement.cpp:
2541 (WebCore::HTMLFrameSetElement::findContaining):
2542 * html/HTMLFrameSetElement.h:
2543 (WebCore::HTMLFrameSetElement):
2544 * html/HTMLInputElement.h:
2545 (WebCore::isHTMLInputElement):
2546 (WebCore::toHTMLInputElement):
2547 * html/HTMLLegendElement.cpp:
2548 (WebCore::HTMLLegendElement::associatedControl):
2550 2013-08-31 Darin Adler <darin@apple.com>
2552 Refactor URL and image writing so layer-violating parts are in Editor, not Pasteboard (Mac-only at first)
2553 https://bugs.webkit.org/show_bug.cgi?id=120573
2555 Reviewed by Andreas Kling.
2557 * editing/Editor.cpp:
2558 (WebCore::Editor::copy): Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
2559 (WebCore::Editor::copyURL): Use writeURLToPasteboard instead of Pasteboard::writeURL on Mac.
2560 (WebCore::innerNonSharedElement): Added. Used in copyImage.
2561 (WebCore::Editor::copyImage): Use innerNonSharedElement instead of innerNonSharedNode.
2562 Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
2564 * editing/Editor.h: Add new functions, writeURLToPasteboard and writeImageToPasteboard,
2565 both Mac-only for now.
2567 * editing/mac/EditorMac.mm:
2568 (WebCore::Editor::pasteWithPasteboard): Removed unneeded "m_frame.editor()" round trip that
2569 was left behind in this function.
2570 (WebCore::getImage): Added. Helper used by writeImageToPasteboard.
2571 (WebCore::Editor::writeURLToPasteboard): Added. Sets up PasteboardURL and then calls
2572 Pasteboard::write with it.
2573 (WebCore::Editor::writeImageToPasteboard): Added. Sets up PasteboardImage and then calls
2574 Pasteboard::write with it.
2575 * page/DragController.cpp:
2576 (WebCore::DragController::startDrag): Use Editor::writeURLToPasteboard instead of
2577 Pasteboard::writeURL on Mac.
2579 * platform/Pasteboard.h: Added PasteboardURL and PasteboardImage structures.
2580 Declare write functions for PasteboardWebContent, PasteboardURL, and PasteboardImage.
2581 Guard writeURL and writeImage with !PLATFORM(MAC).
2583 * platform/mac/PasteboardMac.mm:
2584 (WebCore::writeURLForTypes): Changed this to take a PasteboardURL.
2585 (WebCore::Pasteboard::write): Renamed writeURL and writeImage to this. Refactor both
2586 to take PasteboardURL and PasteboardImage arguments.
2587 (WebCore::fileWrapper): Renamed from fileWrapperForImage since the fact that this is
2588 for an image is now clear from its argument, a PasteboardImage.
2589 (WebCore::writeFileWrapperAsRTFDAttachment): Changed this function to use early return.
2591 2013-08-31 Andreas Kling <akling@apple.com>
2593 EditCommand constructors should take Document&.
2594 <https://webkit.org/b/120566>
2596 Reviewed by Darin Adler.
2598 Let EditCommand's and all subclass constructors take Document& instead of Document*.
2599 EditCommand::document() now returns a Document&.
2601 Added Editor::document() which returns Editor::frame().document() after asserting
2602 that it's non-null, to make passing a Document& from Editor functions easier.
2604 2013-08-31 Andreas Kling <akling@apple.com>
2606 Make more use of toRenderFoo(RenderObject&) cast helpers.
2607 <https://webkit.org/b/120565>
2609 Reviewed by Darin Adler.
2611 To make amends for putting ugly toRenderFoo(&renderer) casts everywhere,
2612 here's a patch that switches a bunch of code over to using reference-based casts.
2614 I removed pointer-based casts altogether for these renderers:
2622 2013-08-31 Santosh Mahto <santosh.ma@samsung.com>
2624 warning: unused parameter ‘renderingMode' in ImageBufferCairo.cpp:94
2625 https://bugs.webkit.org/show_bug.cgi?id=120543
2627 Reviewed by Darin Adler.
2629 Fixing warning by adding ASSERT_UNUSED.
2631 * platform/graphics/cairo/ImageBufferCairo.cpp:
2632 (WebCore::ImageBuffer::ImageBuffer):
2634 2013-08-31 Andreas Kling <akling@apple.com>
2636 Fix typo in r154931 that caused assertions in continuation tests.
2638 * rendering/InlineFlowBox.cpp:
2639 (WebCore::InlineFlowBox::paint):
2641 2013-08-31 Rob Buis <rwlbuis@webkit.org>
2643 XMLSerializer-attribute-namespace-prefix-conflicts can't produce reliable results
2644 https://bugs.webkit.org/show_bug.cgi?id=120490
2646 Reviewed by Ryosuke Niwa.
2648 Retain the key of the namespaces map by using AtomicString as key instead of AtomicStringImpl*.
2650 * editing/MarkupAccumulator.h:
2652 2013-08-31 Andreas Kling <akling@apple.com>
2654 InlineBox::renderer() and pals should return references.
2655 <https://webkit.org/b/120562>
2657 Reviewed by Antti Koivisto.
2659 Make InlineBox::renderer() and its friends return references instead of pointers.
2660 Every box always has a renderer, so this clears up any ambiguity, and a number of
2661 weird assertions in SVG code.
2663 Made InlineBox::m_renderer private so subclasses have to go through renderer().
2664 The next step will be to replace renderer() with tightly-typed accessors where
2665 applicable (e.g InlineTextBox's renderer is always a RenderText.)
2667 Also added reference versions of these RenderObject casts:
2672 - toRenderSVGInlineText()
2674 2013-08-31 Andreas Kling <akling@apple.com>
2676 PostAttachCallbackDisabler should take a ContainerNode&.
2677 <https://webkit.org/b/120560>
2679 Reviewed by Antti Koivisto.
2681 Let PostAttachCallbackDisabler take a reference and remove an ugly assertion.
2683 * dom/ContainerNode.h:
2684 (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
2685 (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
2687 (WebCore::Document::recalcStyle):
2688 * style/StyleResolveTree.cpp:
2689 (WebCore::Style::attachRenderTree):
2691 2013-08-31 Antti Koivisto <antti@apple.com>
2693 Rename ChildIterator -> ElementChildIterator, DescendantIterator -> ElementDescendantIterator
2694 https://bugs.webkit.org/show_bug.cgi?id=120561
2696 Reviewed by Andreas Kling.
2698 New names are more descriptive and consistent. They also put related iterator files close by in file lists.
2699 The types are always used with auto so longer names don't make them any clumsier to use.
2701 For simplicity included all Element iterator types from ElementIterator.h so it is the only file that has
2702 to be included by the clients.
2704 * GNUmakefile.list.am:
2706 * WebCore.vcxproj/WebCore.vcxproj:
2707 * WebCore.xcodeproj/project.pbxproj:
2708 * accessibility/AccessibilityNodeObject.cpp:
2709 * accessibility/AccessibilityRenderObject.cpp:
2710 * accessibility/AccessibilityTable.cpp:
2711 * css/CSSFontFaceSource.cpp:
2712 * dom/ChildIterator.h: Removed.
2713 * dom/DescendantIterator.h: Removed.
2715 * dom/ElementChildIterator.h: Copied from Source/WebCore/dom/ChildIterator.h.
2716 (WebCore::::ElementChildIterator):
2717 (WebCore::::operator):
2718 (WebCore::::ElementChildConstIterator):
2719 (WebCore::::ElementChildIteratorAdapter):
2722 (WebCore::::ElementChildConstIteratorAdapter):
2723 (WebCore::elementChildren):
2724 (WebCore::childrenOfType):
2725 * dom/ElementDescendantIterator.h: Copied from Source/WebCore/dom/DescendantIterator.h.
2726 (WebCore::::ElementDescendantIterator):
2727 (WebCore::::operator):
2728 (WebCore::::ElementDescendantConstIterator):
2729 (WebCore::::ElementDescendantIteratorAdapter):
2732 (WebCore::::ElementDescendantConstIteratorAdapter):
2733 (WebCore::elementDescendants):
2734 (WebCore::descendantsOfType):
2735 * dom/ElementIterator.h:
2737 * dom/TreeScope.cpp:
2738 * editing/ApplyStyleCommand.cpp:
2739 * editing/markup.cpp:
2740 * html/HTMLAppletElement.cpp:
2741 * html/HTMLFieldSetElement.cpp:
2742 * html/HTMLLabelElement.cpp:
2743 * html/HTMLMapElement.cpp:
2744 * html/HTMLMediaElement.cpp:
2745 * html/HTMLObjectElement.cpp:
2746 * loader/PlaceholderDocument.cpp:
2747 * rendering/FilterEffectRenderer.cpp:
2748 * style/StyleResolveTree.cpp:
2749 * svg/SVGElement.cpp:
2750 * svg/SVGSVGElement.cpp:
2751 * svg/animation/SMILTimeContainer.cpp:
2752 * svg/graphics/SVGImage.cpp:
2754 2013-08-31 Andreas Kling <akling@apple.com>
2756 Don't do document style recalc unless there's a RenderView.
2757 <https://webkit.org/b/120558>
2759 Reviewed by Antti Koivisto.
2761 There's no sense in computing style for a Document that has no RenderView.
2762 Checking this before continuing also lets us know that there's a Frame & FrameView
2763 present, simplifying some things later on.
2766 (WebCore::Document::recalcStyle):
2767 * style/StyleResolveForDocument.cpp:
2768 (WebCore::Style::resolveForDocument):
2770 2013-08-31 Antti Koivisto <antti@apple.com>
2772 Add common base for element iterators
2773 https://bugs.webkit.org/show_bug.cgi?id=120557
2775 Reviewed by Andreas Kling.
2777 Add ElementIterator and use it as the base for child and descendant iterators. The only difference is the definition of operator++.
2779 Also renamed DescendantIteratorAssertions to ElementIteratorAssertions.
2781 * GNUmakefile.list.am:
2783 * WebCore.vcxproj/WebCore.vcxproj:
2784 * WebCore.xcodeproj/project.pbxproj:
2785 * dom/ChildIterator.h:
2786 (WebCore::::ChildIterator):
2787 (WebCore::::operator):
2788 (WebCore::::ChildConstIterator):
2791 * dom/DescendantIterator.h:
2792 (WebCore::::DescendantIterator):
2793 (WebCore::::operator):
2794 (WebCore::::DescendantConstIterator):
2795 * dom/DescendantIteratorAssertions.h: Removed.
2796 * dom/ElementIterator.h: Added.
2797 (WebCore::::ElementIterator):
2798 (WebCore::::traverseNext):
2799 (WebCore::::traversePrevious):
2800 (WebCore::::traverseNextSibling):
2801 (WebCore::::traversePreviousSibling):
2802 (WebCore::::operator):
2804 (WebCore::::ElementConstIterator):
2805 * dom/ElementIteratorAssertions.h: Copied from Source/WebCore/dom/DescendantIteratorAssertions.h.
2806 (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
2807 (WebCore::ElementIteratorAssertions::domTreeHasMutated):
2808 (WebCore::ElementIteratorAssertions::dropEventDispatchAssertion):
2810 2013-08-30 Brent Fulgham <bfulgham@apple.com>
2812 [Windows] Build fix after r154921.
2814 AVFoundationCF uses an internal wrapper object around the C-API. The call point
2815 in the original patch was inside the wrapper, which did not (yet) provide
2816 a method implementation.
2818 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2819 (WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
2820 (WebCore::AVFWrapper::updateVideoLayerGravity):
2822 2013-08-30 Simon Fraser <simon.fraser@apple.com>
2824 Video with object-fit: cover can spill outside the box
2825 https://bugs.webkit.org/show_bug.cgi?id=52103
2827 Reviewed by Dean Jackson.
2829 object-fit on renderers which use accelerated compositing needs special
2832 For directly composited images, and video, GraphicsLayer needs to know
2833 both the size of the content layer, and also a rectangle at which this
2834 should be clipped (because, for the first time, that content layer can be
2835 larger than the renderer's content box).
2837 AVFoundation would always aspect-ratio fit video by default, so plumb
2838 through MediaPlayer a way to override that when object-fit requires it.
2840 Added a LAYER_TREE_INCLUDES_CONTENT_LAYERS enum to the layerTreeAsText()
2841 flags so we can dump content layers for testing.
2843 Tests: compositing/images/direct-image-object-fit.html
2844 compositing/reflections/direct-image-object-fit-reflected.html
2845 compositing/video/video-object-fit.html
2847 * page/Frame.h: New LayerTreeFlagsIncludeContentLayers flag.
2848 * platform/graphics/GraphicsLayer.h: New flag.
2849 * platform/graphics/MediaPlayer.cpp:
2850 (WebCore::MediaPlayer::shouldMaintainAspectRatio):
2851 (WebCore::MediaPlayer::setShouldMaintainAspectRatio):
2852 * platform/graphics/MediaPlayer.h:
2853 * platform/graphics/MediaPlayerPrivate.h:
2854 (WebCore::MediaPlayerPrivateInterface::shouldMaintainAspectRatio):
2855 (WebCore::MediaPlayerPrivateInterface::setShouldMaintainAspectRatio):
2856 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2857 (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
2858 (WebCore::MediaPlayerPrivateAVFoundation::setShouldMaintainAspectRatio):
2859 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2860 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2861 (WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
2862 (WebCore::AVFWrapper::platformLayer):
2863 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2864 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2865 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2866 (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
2867 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
2868 * platform/graphics/ca/GraphicsLayerCA.cpp: We need a new m_contentsClippingLayer to
2869 clip the contents layer, which only gets created when necessary. It has to be cloned
2871 (WebCore::GraphicsLayerCA::willBeDestroyed):
2872 (WebCore::GraphicsLayerCA::setContentsRect):
2873 (WebCore::GraphicsLayerCA::setContentsClippingRect):
2874 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2875 (WebCore::GraphicsLayerCA::updateSublayerList):
2876 (WebCore::GraphicsLayerCA::updateContentsImage):
2877 (WebCore::GraphicsLayerCA::updateContentsMediaLayer):
2878 (WebCore::GraphicsLayerCA::updateContentsCanvasLayer):
2879 (WebCore::GraphicsLayerCA::updateContentsColorLayer):
2880 (WebCore::GraphicsLayerCA::updateContentsRects):
2881 (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
2882 (WebCore::GraphicsLayerCA::ensureCloneLayers):
2883 (WebCore::GraphicsLayerCA::removeCloneLayers):
2884 (WebCore::GraphicsLayerCA::fetchCloneLayers):
2885 * platform/graphics/ca/GraphicsLayerCA.h:
2886 * rendering/RenderLayerBacking.cpp: Need to push both the contentsRect and
2887 the contentsClippingRect down to the GraphicsLayers. Most of the time they
2888 are the same, unless object-fit makes them different.
2889 (WebCore::RenderLayerBacking::resetContentsRect):
2890 (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
2891 (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor):
2892 (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
2893 (WebCore::RenderLayerBacking::updateImageContents):
2894 (WebCore::RenderLayerBacking::contentsBox):
2895 * rendering/RenderLayerCompositor.cpp:
2896 (WebCore::RenderLayerCompositor::layerTreeAsText):
2897 * rendering/RenderVideo.cpp:
2898 (WebCore::RenderVideo::updatePlayer):
2899 * testing/Internals.cpp:
2900 (WebCore::Internals::layerTreeAsText):
2901 * testing/Internals.h:
2902 * testing/Internals.idl:
2904 2013-08-30 Brent Fulgham <bfulgham@apple.com>
2906 [Windows] Update to incorporate additional suggestions
2907 https://bugs.webkit.org/show_bug.cgi?id=120448
2909 Reviewed by Darin Adler
2911 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Add
2912 notes as to why AVFoundationCF needs this extra method call.
2913 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Use OVERRIDE
2914 * rendering/RenderVideo.cpp: Replace ternary operator with logical &&.
2916 2013-08-30 Brent Fulgham <bfulgham@apple.com>
2918 [Windows] Vide element in page always uses non-hw accelerated mode.
2919 https://bugs.webkit.org/show_bug.cgi?id=120448
2921 Reviewed by Darin Adler
2923 This patch is unfortunately larger than my original idea, but seems to make the
2924 layout system happier. Instead of switching into composited mode when building
2925 the media player, we now build the original layout tree with compositing active
2926 if the underlying media element requires it. The AVFoundationCF player needs to
2927 have the compositor available at construction time so it can attach to the
2928 rendering device. Otherwise it falls back to CPU-only mode.
2930 * platform/graphics/MediaPlayer.cpp:
2931 (WebCore::MediaPlayer::requiresImmediateCompositing): Added
2932 * platform/graphics/MediaPlayer.h:
2933 * platform/graphics/MediaPlayerPrivate.h:
2934 (WebCore::MediaPlayerPrivateInterface::requiresImmediateCompositing): Added
2935 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2936 (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Added
2937 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2938 (WebCore::MediaPlayerPrivateAVFoundationCF::requiresImmediateCompositing):
2939 * rendering/RenderLayerCompositor.cpp:
2940 (WebCore::RenderLayerCompositor::requiresCompositingForVideo): Uses new
2941 'requiresImmediateCompositing' to short-circuit check for whether a
2942 compositor is required.
2943 * rendering/RenderVideo.cpp:
2944 (WebCore::RenderVideo::requiresImmediateCompositing):
2945 * rendering/RenderVideo.h:
2947 2013-08-30 Joseph Pecoraro <pecoraro@apple.com>
2949 Web Inspector: Breakpoints should have Automatically Continue Option
2950 https://bugs.webkit.org/show_bug.cgi?id=120187
2952 Reviewed by Timothy Hatcher.
2954 Tests: inspector-protocol/debugger/removeBreakpoint.html
2955 inspector-protocol/debugger/setBreakpoint-autoContinue.html
2956 inspector-protocol/debugger/setBreakpoint-column.html
2957 inspector-protocol/debugger/setBreakpoint-condition.html
2958 inspector-protocol/debugger/setBreakpoint.html
2960 * inspector/Inspector.json:
2961 Convert the "condition" argument of setBreakpoint and setBreakpointByUrl
2962 to a BreakpointOptions object with optional properties. One of which
2963 is "condition" and a new option "autoContinue".
2965 * bindings/js/ScriptDebugServer.h:
2966 * bindings/js/ScriptDebugServer.cpp:
2967 (WebCore::ScriptDebugServer::hasBreakpoint):
2968 (WebCore::ScriptDebugServer::pauseIfNeeded):
2969 Automatically continue if the breakpoint was hit and has autoContinue.
2971 * inspector/InspectorDebuggerAgent.h:
2972 * inspector/InspectorDebuggerAgent.cpp:
2973 (WebCore::buildObjectForBreakpointCookie):
2974 (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2975 (WebCore::InspectorDebuggerAgent::setBreakpoint):
2976 (WebCore::InspectorDebuggerAgent::continueToLocation):
2977 (WebCore::InspectorDebuggerAgent::didParseSource):
2978 * inspector/ScriptBreakpoint.h:
2979 (WebCore::ScriptBreakpoint::ScriptBreakpoint):
2980 Handle the new incoming BreakpointOptions type, and set the
2981 autoContinue state on ScriptBreakpoints.
2983 * inspector/front-end/DebuggerModel.js:
2984 (WebInspector.DebuggerModel.prototype.setBreakpointByURL):
2985 (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2986 Update old front-end to be compatible with the new API.
2988 2013-08-30 Dean Jackson <dino@apple.com>
2990 Animations should use double for key values, not floats
2991 https://bugs.webkit.org/show_bug.cgi?id=120547
2993 Reviewed by Simon Fraser.
2995 Merge https://chromium.googlesource.com/chromium/blink/+/71de046541c77120874b9bff82958ee9e0e20c7c
2997 Some files have been renamed in the Blink port, and they have made some
2998 improvements, but I took what applied to us.
3000 All our existing tests passed.
3002 * css/StyleResolver.cpp:
3003 (WebCore::StyleResolver::keyframeStylesForAnimation):
3004 * css/WebKitCSSKeyframeRule.cpp:
3005 (WebCore::StyleKeyframe::parseKeyString):
3006 * css/WebKitCSSKeyframeRule.h:
3007 (WebCore::StyleKeyframe::getKeys):
3008 * platform/graphics/GraphicsLayer.h:
3009 (WebCore::AnimationValue::keyTime):
3010 (WebCore::AnimationValue::AnimationValue):
3011 (WebCore::FloatAnimationValue::create):
3012 (WebCore::FloatAnimationValue::FloatAnimationValue):
3013 (WebCore::TransformAnimationValue::create):
3014 (WebCore::TransformAnimationValue::TransformAnimationValue):
3015 (WebCore::FilterAnimationValue::create):
3016 (WebCore::FilterAnimationValue::FilterAnimationValue):
3017 * rendering/RenderLayerBacking.cpp:
3018 (WebCore::RenderLayerBacking::startAnimation):
3019 * rendering/style/KeyframeList.h:
3020 (WebCore::KeyframeValue::KeyframeValue):
3021 (WebCore::KeyframeValue::key):
3022 (WebCore::KeyframeValue::setKey):
3024 2013-08-30 Brendan Long <b.long@cablelabs.com>
3026 [GStreamer] support in-band text tracks
3027 https://bugs.webkit.org/show_bug.cgi?id=103771
3029 Reviewed by Eric Carlson.
3031 Tests: New tests added because existing tests were too specific.
3032 media/track/in-band/track-in-band-kate-ogg-cues-added-once.html
3033 media/track/in-band/track-in-band-kate-ogg-kind.html
3034 media/track/in-band/track-in-band-kate-ogg-language.html
3035 media/track/in-band/track-in-band-kate-ogg-mode.html
3036 media/track/in-band/track-in-band-kate-ogg-style.html
3037 media/track/in-band/track-in-band-kate-ogg-track-order.html
3038 media/track/in-band/track-in-band-srt-mkv-cues-added-once.html
3039 media/track/in-band/track-in-band-srt-mkv-kind.html
3040 media/track/in-band/track-in-band-srt-mkv-language.html
3041 media/track/in-band/track-in-band-srt-mkv-mode.html
3042 media/track/in-band/track-in-band-srt-mkv-style.html
3043 media/track/in-band/track-in-band-srt-mkv-track-order.html
3045 * CMakeLists.txt: Add InbandTextTrackPrivateGStreamer, InbandGenericTextTrack, InbandWebVTTTextTrack, and TextCombinerGStreamer files.
3046 * GNUmakefile.list.am: Same.
3047 * PlatformEfl.cmake: Same.
3049 * WebCore.vcxproj/WebCore.vcxproj: Same.
3050 * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
3051 * WebCore.xcodeproj/project.pbxproj: Same.
3052 * html/track/InbandGenericTextTrack.cpp: Split out code for handling generic cues.
3053 (WebCore::GenericTextTrackCueMap::GenericTextTrackCueMap): Move from InbandTextTrack.
3054 (WebCore::GenericTextTrackCueMap::~GenericTextTrackCueMap): Same.
3055 (WebCore::GenericTextTrackCueMap::add): Same.
3056 (WebCore::GenericTextTrackCueMap::find): Same.
3057 (WebCore::GenericTextTrackCueMap::remove): Same.
3058 (WebCore::InbandGenericTextTrack::create): Same.
3059 (WebCore::InbandGenericTextTrack::updateCueFromCueData): Same.
3060 (WebCore::InbandGenericTextTrack::addGenericCue): Same.
3061 (WebCore::InbandGenericTextTrack::updateGenericCue): Same.
3062 (WebCore::InbandGenericTextTrack::removeGenericCue): Same.
3063 (WebCore::InbandGenericTextTrack::removeCue): Same.
3064 (WebCore::InbandGenericTextTrack::InbandGenericTextTrack): Empty.
3065 (WebCore::InbandGenericTextTrack::~InbandGenericTextTrack): Empty.
3066 * html/track/InbandGenericTextTrack.h: Copied from Source/WebCore/html/track/InbandTextTrack.h.
3067 The only addition is the ASSERT_NOT_REACHED() for WebVTT cues.
3068 * html/track/InbandTextTrack.cpp: Add label and language changed callbacks.
3069 (WebCore::InbandTextTrack::create): Return a generic or WebVTT text track based on the private CueFormat.
3070 (WebCore::InbandTextTrack::labelChanged): Added.
3071 (WebCore::InbandTextTrack::languageChanged): Added.
3072 * html/track/InbandTextTrack.h: Add label and language changed callbacks.
3073 * html/track/InbandWebVTTTextTrack.cpp: Added, based on InbandTextTrack.
3074 (WebCore::InbandWebVTTTextTrack::create): Same.
3075 (WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): Empty.
3076 (WebCore::InbandWebVTTTextTrack::~InbandWebVTTTextTrack): Empty.
3077 (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): Sends data to a WebVTTParser.
3078 (WebCore::InbandWebVTTTextTrack::newCuesParsed): Adds cues when WebVTTParser parses them.
3079 (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Prints a warning when WebVTTParser has a problem.
3080 * html/track/InbandWebVTTTextTrack.h: Added.
3081 * platform/graphics/InbandTextTrackPrivate.h:
3082 (WebCore::InbandTextTrackPrivate::cueFormat): For determining if the track will have generic or WebVTT cues.
3083 (WebCore::InbandTextTrackPrivate::InbandTextTrackPrivate): Pass CueFormat in the constructor.
3084 * platform/graphics/InbandTextTrackPrivateClient.h: Same.
3085 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3086 (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Pass CueFormat (Generic) to InbandTextTrackPrivate.
3087 * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Add GRefPtr specializations for GstSample and GstEvent.
3088 * platform/graphics/gstreamer/GRefPtrGStreamer.h: Same.
3089 * platform/graphics/gstreamer/GStreamerUtilities.h: Add WARN_MEDIA_MESSAGE.
3090 * platform/graphics/gstreamer/GStreamerVersioning.h: Add a function to check GStreamer version at runtime.
3091 * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Added.
3092 (WebCore::textTrackPrivateEventCallback): Watches for tag and stream start events.
3093 (WebCore::textTrackPrivateSampleTimeoutCallback): See notifyTrackOfSample();
3094 (WebCore::textTrackPrivateStreamTimeoutCallback): See notifyTrackOfStreamChanged();
3095 (WebCore::textTrackPrivateTagsChangeTimeoutCallback): See notifyTrackOfTagsChanged();
3096 (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): Initializes tags and stream and sets up event callback.
3097 (WebCore::InbandTextTrackPrivateGStreamer::~InbandTextTrackPrivateGStreamer): Calls disconnect:
3098 (WebCore::InbandTextTrackPrivateGStreamer::disconnect): Removes signal handlers and frees some memory.
3099 (WebCore::InbandTextTrackPrivateGStreamer::handleSample): Adds samples to a list and sets up callback.
3100 (WebCore::InbandTextTrackPrivateGStreamer::streamChanged): Sets up callback.
3101 (WebCore::InbandTextTrackPrivateGStreamer::tagsChanged): Same.
3102 (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample): Parses all queued samples with WebVTTParser.
3103 (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged): Keeps track of current stream.
3104 (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfTagsChanged): Sets label and language from tags.
3105 * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: Added.
3106 (WebCore::InbandTextTrackPrivateGStreamer::create): Basic RefPtr create function.
3107 (WebCore::InbandTextTrackPrivateGStreamer::pad): Returns the pad this track is associated with (used
3108 to determine if a playbin text stream has already been associated with a text track).
3109 (WebCore::InbandTextTrackPrivateGStreamer::setIndex): Sets the track index (used for sorting).
3110 (WebCore::InbandTextTrackPrivateGStreamer::streamId): Returns the stream ID (used to handle new samples).
3111 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3112 (WebCore::mediaPlayerPrivateTextChangedCallback): Called for playbin "text-changed" event. See textChanged().
3113 (WebCore::mediaPlayerPrivateTextChangeTimeoutCallback): See notifyPlayerOfText().
3114 (WebCore::mediaPlayerPrivateNewTextSampleCallback): See newTextSample().
3115 (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initialize m_textTimerHandler.
3116 (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnect text tracks (they don't necessarily
3117 get freed here, since a script could hold a reference).
3118 (WebCore::MediaPlayerPrivateGStreamer::textChanged): Setup callback for notifyPlayerOfText.
3119 (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Create text tracks.
3120 (WebCore::MediaPlayerPrivateGStreamer::newTextSample): Handle new samples by giving them to a text track
3121 with a matching stream. This method is syncryonous because we need to get the stream start sticky event
3123 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3124 * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Added. This element forwards buffers from all
3125 of its input pads, but also converts plain text to WebVTT as needed.
3126 (webkit_text_combiner_init): Setup internal funnel.
3127 (webkitTextCombinerPadEvent): If the caps are plain text make sure we have a webvttenv, otherwise connect
3128 directly to the funnel.
3129 (webkitTextCombinerRequestNewPad): Setup ghostpad and event callback.
3130 (webkitTextCombinerReleasePad): Release pad and optional associated webvttenc.
3131 (webkit_text_combiner_class_init): Setup pad templates and request/release pad functions.
3132 (webkitTextCombinerNew): Returns a new WebKitTextCombiner.
3133 * platform/graphics/gstreamer/TextCombinerGStreamer.h: Added.
3134 * platform/graphics/gstreamer/TextSinkGStreamer.cpp: Added.
3135 (webkit_text_sink_init): Set sync=false.
3136 (webkitTextSinkGetProperty): Ignore sync property.
3137 (webkitTextSinkSetProperty): Same.
3138 (webkitTextSinkQuery): Ignore position and duration queries, forward everything else to appsink.
3139 (webkit_text_sink_class_init): Setup property and query functions.
3140 (webkitTextSinkNew): Return a new WebKitTextSink.
3141 * platform/graphics/gstreamer/TextSinkGStreamer.h: Added.
3143 2013-08-30 Dirk Schulze <krit@webkit.org>
3145 Animate CSS Image filter() function
3146 https://bugs.webkit.org/show_bug.cgi?id=119938
3148 Reviewed by Simon Fraser.
3150 With this patch, the new introduced CSS Image function filter() can be
3151 animated. According to the spec, just filter functions can be
3154 The patch also prepares StyleImage blending for interpolation of other
3155 generated images like gradients or cross-fade().
3157 http://dev.w3.org/fxtf/filters/#interpolating-filter-image
3159 Test: fast/filter-image/filter-image-animation.html
3161 * css/CSSComputedStyleDeclaration.cpp: Reuse the code that creates a
3162 CSSValueList from ComputeStyle logic.
3163 (WebCore::valueForPixel):
3164 For StyleRules we want to have not-adjusted length values.
3165 (WebCore::ComputedStyleExtractor::valueForShadow):
3166 Add argument to switch between adjusted and not-adjusted length.
3167 (WebCore::ComputedStyleExtractor::valueForFilter):
3169 (WebCore::ComputedStyleExtractor::propertyValue):
3170 * css/CSSComputedStyleDeclaration.h:
3171 * css/CSSFilterImageValue.h: Add helper functions
3172 for animating filters. We need to pass the FilterOperations for
3173 the image generation and the CSSValueList for StyleRule.
3174 (WebCore::CSSFilterImageValue::filterOperations):
3175 (WebCore::CSSFilterImageValue::setFilterOperations):
3176 (WebCore::CSSFilterImageValue::cachedImage):
3177 * page/animation/CSSPropertyAnimation.cpp:
3178 Add animation code to support animations between two filter()
3180 (WebCore::blendFilterOperations):
3181 (WebCore::blendFunc):
3182 (WebCore::filterBlend):
3183 * rendering/style/StyleGeneratedImage.h: Add helper functions.
3184 (WebCore::CSSFilterImageValue::imageValue):
3187 2013-08-30 Leo Yang <leoyang@blackberry.com>
3189 Make sure remove CachedResourceClient when destructing IconLoader
3190 https://bugs.webkit.org/show_bug.cgi?id=120541
3192 Reviewed by Darin Adler.
3194 It's a good practice to call CachedResource::removeClient(client)
3195 when the client is being destructed. We need to do this for InconLoader
3196 to prevent m_resource from keeping dangling client in case m_resource
3197 is referenced by someone else in the future.
3199 Found by code inspection. Just a defensive enhancement no new tests.
3201 * loader/icon/IconLoader.cpp:
3202 (WebCore::IconLoader::~IconLoader):
3204 2013-08-30 Hans Muller <hmuller@adobe.com>
3206 [CSS Shapes] Redefine the ShapeIntervals class as a template
3207 https://bugs.webkit.org/show_bug.cgi?id=120381
3209 Reviewed by Alexandru Chiculita.
3211 No new tests, this was just an internal refactoring.
3213 The existing ShapeIntervals class has been converted into a template whose
3214 type specifies the type of the interval's x1 and x2 horizontal endpoints
3215 (formerly float). There were several other minor changes, all in the realm
3218 - The original type was a struct with public x1 and x2 fields. It's now a class
3219 with x1 and x2 accessors. ASSERTS are now used to maintain the x2 >= x1 invariant.
3220 In the original code the invariant was not checked.
3222 - The logical comparison operators have been overloaded for ShapeInterval.
3223 This obviates the IntervalX1Comparator class which has been removed.
3225 - The names of the global ShapeInterval Vector set operation methods have been
3226 changed to reflect the fact that they're now members of the template class,
3227 rather than globals.
3229 PolygonShape.cpp depended on the ShapeInterval class. In the one or two places
3230 where an interval's x1 or x1 fields had been set explicitly, ShapeInterval::set()
3231 is now used to set both fields. This also enables the invariant check mentioned
3232 earlier. The other changes to this class are syntatic, to account for the ShapeInterval
3236 * GNUmakefile.list.am:
3237 * WebCore.vcxproj/WebCore.vcxproj:
3238 * WebCore.xcodeproj/project.pbxproj:
3239 * rendering/shapes/PolygonShape.cpp:
3240 (WebCore::appendIntervalX):
3241 (WebCore::computeXIntersections):
3242 (WebCore::computeOverlappingEdgeXProjections):
3243 (WebCore::PolygonShape::getExcludedIntervals):
3244 (WebCore::PolygonShape::getIncludedIntervals):
3245 * rendering/shapes/PolygonShape.h:
3246 * rendering/shapes/ShapeInterval.cpp: Removed.
3247 * rendering/shapes/ShapeInterval.h: The entire implementation is now here.
3248 (WebCore::ShapeInterval::ShapeInterval):
3249 (WebCore::ShapeInterval::x1):
3250 (WebCore::ShapeInterval::x2):
3251 (WebCore::ShapeInterval::set):
3252 (WebCore::ShapeInterval::overlaps):
3253 (WebCore::ShapeInterval::intersect):
3254 (WebCore::ShapeInterval::sortVector):
3255 (WebCore::ShapeInterval::uniteVectors):
3256 (WebCore::ShapeInterval::intersectVectors):
3257 (WebCore::ShapeInterval::subtractVectors):
3258 (WebCore::operator==):
3259 (WebCore::operator!=):
3260 (WebCore::operator< ):
3261 (WebCore::operator> ):
3262 (WebCore::operator<=):
3263 (WebCore::operator>=):
3265 2013-08-30 Antti Koivisto <antti@apple.com>
3267 Use Element& in StyleResolveTree
3268 https://bugs.webkit.org/show_bug.cgi?id=120540
3270 Reviewed by Andreas Kling.
3272 * dom/ContainerNode.cpp:
3273 (WebCore::attachChild):
3274 (WebCore::detachChild):
3276 (WebCore::Document::recalcStyle):
3277 (WebCore::Document::createRenderTree):
3278 (WebCore::Document::detach):
3280 (WebCore::Element::lazyReattach):
3281 (WebCore::Element::updateExistingPseudoElement):
3282 (WebCore::Element::createPseudoElementIfNeeded):
3283 (WebCore::disconnectPseudoElement):
3284 * dom/ShadowRoot.cpp:
3285 (WebCore::ShadowRoot::setResetStyleInheritance):
3286 * html/HTMLDetailsElement.cpp:
3287 (WebCore::HTMLDetailsElement::parseAttribute):
3288 * html/HTMLInputElement.cpp:
3289 (WebCore::HTMLInputElement::updateType):
3290 (WebCore::HTMLInputElement::parseAttribute):
3291 * html/HTMLObjectElement.cpp:
3292 (WebCore::HTMLObjectElement::renderFallbackContent):
3293 * html/HTMLPlugInImageElement.cpp:
3294 (WebCore::HTMLPlugInImageElement::willRecalcStyle):
3295 (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
3296 (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
3297 (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
3298 * html/HTMLSelectElement.cpp:
3299 (WebCore::HTMLSelectElement::parseAttribute):
3300 (WebCore::HTMLSelectElement::parseMultipleAttribute):
3301 * html/HTMLViewSourceDocument.cpp:
3302 (WebCore::HTMLViewSourceDocument::createContainingTable):
3303 (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
3304 (WebCore::HTMLViewSourceDocument::addLine):
3305 (WebCore::HTMLViewSourceDocument::finishLine):
3306 (WebCore::HTMLViewSourceDocument::addBase):
3307 (WebCore::HTMLViewSourceDocument::addLink):
3308 * html/parser/HTMLConstructionSite.cpp:
3309 (WebCore::executeTask):
3310 * html/parser/HTMLTreeBuilder.cpp:
3311 (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3312 * html/shadow/InsertionPoint.cpp:
3313 (WebCore::InsertionPoint::willAttachRenderers):
3314 (WebCore::InsertionPoint::willDetachRenderers):
3315 * loader/PlaceholderDocument.cpp:
3316 (WebCore::PlaceholderDocument::createRenderTree):
3317 * style/StyleResolveTree.cpp:
3318 (WebCore::Style::attachChildren):
3319 (WebCore::Style::attachRenderTree):
3320 (WebCore::Style::detachChildren):
3321 (WebCore::Style::detachRenderTree):
3322 (WebCore::Style::resolveLocal):
3323 (WebCore::Style::updateTextStyle):
3324 (WebCore::Style::resolveShadowTree):
3325 (WebCore::Style::resolveTree):
3327 Documents only ever have one child element. Remove the loop.
3329 (WebCore::Style::detachRenderTreeInReattachMode):
3330 (WebCore::Style::reattachRenderTree):
3331 * style/StyleResolveTree.h:
3333 (WebCore::SVGTests::handleAttributeChange):
3334 * xml/XMLErrors.cpp:
3335 (WebCore::XMLErrors::insertErrorMessageBlock):
3336 * xml/parser/XMLDocumentParserLibxml2.cpp:
3337 (WebCore::XMLDocumentParser::startElementNs):
3339 2013-08-30 Andreas Kling <akling@apple.com>
3341 Document style resolve should take Document&.
3342 <https://webkit.org/b/120534>
3344 Reviewed by Darin Adler.
3346 Tweak Style::resolveTree(Document*) and Style::resolveForDocument(Document*) to take Document& instead.
3349 (WebCore::Document::recalcStyle):
3350 * html/HTMLLinkElement.cpp:
3351 (WebCore::HTMLLinkElement::process):
3352 * style/StyleResolveForDocument.cpp:
3353 (WebCore::Style::resolveForDocument):
3354 * style/StyleResolveForDocument.h:
3355 * style/StyleResolveTree.cpp:
3356 (WebCore::Style::resolveTree):
3357 * style/StyleResolveTree.h:
3359 2013-08-30 Darin Adler <darin@apple.com>
3361 [Mac] No need for Pasteboard::getDataSelection
3362 https://bugs.webkit.org/show_bug.cgi?id=120536
3364 Reviewed by Anders Carlsson.
3366 * editing/Editor.h: Added some Mac-only private member functions.
3368 * editing/mac/EditorMac.mm:
3369 (WebCore::Editor::selectionInWebArchiveFormat): Added.
3370 (WebCore::Editor::adjustedSelectionRange): Added.
3371 (WebCore::attributedStringForRange): Added.
3372 (WebCore::dataInRTFDFormat): Added.
3373 (WebCore::dataInRTFFormat): Added.
3374 (WebCore::Editor::dataSelectionForPasteboard): Moved the implementation
3375 of Pasteboard::getDataSelection here, refactoring to share code with the
3376 writeSelectionToPasteboard function.
3377 (WebCore::Editor::writeSelectionToPasteboard): Refactored to share code
3378 with the new function above.
3380 * platform/Pasteboard.h: Removed getDataSelection. One less layering violation.
3381 * platform/mac/PasteboardMac.mm: Ditto.
3383 2013-08-30 Rob Buis <rwlbuis@webkit.org>
3385 SVG error parsing empty path
3386 https://bugs.webkit.org/show_bug.cgi?id=78980
3388 Reviewed by Darin Adler.
3390 According to the spec (http://www.w3.org/TR/SVG/paths.html#PathData), path 'd' attribute can be empty.
3391 No error should be reported in this case.
3393 * svg/SVGPathParser.cpp:
3394 (WebCore::SVGPathParser::parsePathDataFromSource):
3395 * svg/SVGPathUtilities.cpp:
3396 (WebCore::buildPathFromString):
3397 (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
3398 (WebCore::buildPathFromByteStream):
3399 (WebCore::buildSVGPathSegListFromByteStream):
3400 (WebCore::buildStringFromByteStream):
3401 (WebCore::buildStringFromSVGPathSegList):
3402 (WebCore::buildSVGPathByteStreamFromString):
3403 (WebCore::buildAnimatedSVGPathByteStream):
3404 (WebCore::addToSVGPathByteStream):
3406 2013-08-30 Andreas Kling <akling@apple.com>
3408 Try to fix CSS_VARIABLES and CSS_DEVICE_ADAPTATION builds.
3410 * css/StyleResolver.cpp:
3411 (WebCore::StyleResolver::StyleResolver):
3412 (WebCore::StyleResolver::resolveVariables):
3414 2013-08-30 Commit Queue <commit-queue@webkit.org>
3416 Unreviewed, rolling out r154891.
3417 http://trac.webkit.org/changeset/154891
3418 https://bugs.webkit.org/show_bug.cgi?id=120539
3420 broke the mac build (Requested by Ossy on #webkit).