1 2013-09-05 Alberto Garcia <berto@igalia.com>
3 [GTK] MediaControlsGtk: fix warning in constructor due to incorrect order of attributes
4 https://bugs.webkit.org/show_bug.cgi?id=120703
6 Reviewed by Carlos Garcia Campos.
8 Fix member initialization so it matches their declaration [-Wreorder].
10 * html/shadow/MediaControlsGtk.cpp:
11 (WebCore::MediaControlsGtk::MediaControlsGtk):
13 2013-09-04 Dirk Schulze <krit@webkit.org>
15 Support interpolation between cross-fade() images
16 https://bugs.webkit.org/show_bug.cgi?id=119955
18 Reviewed by Darin Adler.
20 With this patch, CSS can animate from one -webkit-cross-fade
21 function to another, when the input images are the same in the
24 * css/CSSCrossfadeValue.cpp: Added blend function.
26 (WebCore::CSSCrossfadeValue::blend):
27 (WebCore::CSSCrossfadeValue::equals):
28 (WebCore::CSSCrossfadeValue::equalInputImages):
29 * css/CSSCrossfadeValue.h: Added save casting functions.
30 (WebCore::toCSSCrossfadeValue):
32 (WebCore::CSSValue::isCrossfadeValue):
33 * page/animation/CSSPropertyAnimation.cpp: Add another condition to
34 interpolate between two -webkit-cross-fade functions.
37 2013-09-04 Zoltan Herczeg <zherczeg@webkit.org>
39 <https://webkit.org/b/118553> Hash navigation doesn't affect history when the page is retrieved from appcache
41 Reviewed by Darin Adler.
43 A new flag called keepInHistory is added to allow keeping
44 certain pages in the history even if they have substitute data.
46 Test: http/tests/appcache/history-test.html
48 * loader/DocumentLoader.cpp:
49 (WebCore::DocumentLoader::urlForHistory):
50 * loader/SubstituteData.h:
51 (WebCore::SubstituteData::SubstituteData):
52 (WebCore::SubstituteData::shouldRevealToSessionHistory):
53 (WebCore::SubstituteData::setShouldRevealToSessionHistory):
54 * loader/appcache/ApplicationCacheHost.cpp:
55 (WebCore::ApplicationCacheHost::maybeLoadMainResource):
57 2013-09-04 Grzegorz Czajkowski <g.czajkowski@samsung.com>
59 Remove deprecated markersForNode(Node* node).
60 https://bugs.webkit.org/show_bug.cgi?id=120679
62 Reviewed by Ryosuke Niwa.
64 DocumentMarkerController::markersForNode(Node* node) has been marked as
65 deprecated in favor of markersFor(Node*, MarkerTypes = AllMarkers()).
67 No new tests, no behavior change.
69 * dom/DocumentMarkerController.cpp:
70 * dom/DocumentMarkerController.h:
71 Remove never used markersForNode(Node*).
73 2013-09-04 Andreas Kling <akling@apple.com>
75 CachedPage construction should begin with a Page&.
76 <https://webkit.org/b/120721>
78 Reviewed by Anders Carlsson.
80 We can't create a CachedPage from a null Page anyway.
82 * history/CachedPage.cpp:
83 (WebCore::CachedPage::create):
84 (WebCore::CachedPage::CachedPage):
85 (WebCore::CachedPage::restore):
86 * history/CachedPage.h:
87 * history/PageCache.cpp:
88 (WebCore::PageCache::add):
89 * history/PageCache.h:
90 * loader/FrameLoader.cpp:
91 (WebCore::FrameLoader::commitProvisionalLoad):
93 2013-09-04 Arpita Bahuguna <a.bah@samsung.com>
95 setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
96 https://bugs.webkit.org/show_bug.cgi?id=120293
98 Reviewed by Darin Adler.
100 setAttributeNode() performs a case-insensitive search for an existing
101 attribute. If an existing attribute is found, it retrieves the index of
102 such an attribute. For setting the attribute's new value, we call upon
103 setAttributeInternal() to which both the index as well as the name of
104 the attribute is passed.
105 The name passed to this method is the same as the one passed to the
106 setAttributeNode() API from the webpage and thus can be in any case.
108 However, setAttributeInternal() uses this name to get the corresponding
109 existing attribute node. Since this retrieval is not case-insensitive,
110 the existing node is not returned and thus the new value is not set on
112 We should instead use the passed index and use that to retrieve the
115 Note that obtaining the attribute's value using getAttributeNode() would
116 still return the correct value, i.e. the new one.
118 Also, this change shall make our behavior similar to that of FF and IE.
120 Test: fast/dom/Element/setAttributeNode-for-existing-attribute.html
123 (WebCore::Element::setAttributeInternal):
124 If the passed index is not equal to attributeNotFound, we use that index
125 to retrieve the existing attribute.
127 2013-09-04 Andreas Kling <akling@apple.com>
129 CachedFrame construction should begin with a Frame&.
130 <https://webkit.org/b/120719>
132 Reviewed by Anders Carlsson.
134 We can't create a CachedFrame from a null Frame anyway.
136 * bindings/js/ScriptCachedFrameData.cpp:
137 (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
138 (WebCore::ScriptCachedFrameData::restore):
139 * bindings/js/ScriptCachedFrameData.h:
140 * history/CachedFrame.cpp:
141 (WebCore::CachedFrameBase::CachedFrameBase):
142 (WebCore::CachedFrameBase::restore):
143 (WebCore::CachedFrame::CachedFrame):
144 * history/CachedFrame.h:
145 (WebCore::CachedFrame::create):
146 * history/CachedPage.cpp:
147 (WebCore::CachedPage::CachedPage):
149 2013-09-04 Andreas Kling <akling@apple.com>
151 Set "render tree being torn down" flag a bit earlier.
152 <https://webkit.org/b/120717>
154 Reviewed by Anders Carlsson.
156 Set the flag at the start of Document::detach() so everyone can get a chance
157 to avoid unnecessary work, not just renderers.
160 (WebCore::Document::detach):
162 2013-09-04 Andreas Kling <akling@apple.com>
164 Cached Page and Frame don't need to be ref-counted.
165 <https://webkit.org/b/120710>
167 Reviewed by Anders Carlsson.
169 - CachedPage is owned by HistoryItem.
170 - CachedFrame is owned by CachedPage.
172 Remove the ref counting from these objects to make the code less confusing.
174 The only place that used this was in FrameLoader::commitProvisionalLoad() which
175 took a temporary ref on the CachedPage. Switched this to using a raw pointer.
177 * history/CachedFrame.h:
178 (WebCore::CachedFrame::create):
179 * history/CachedPage.cpp:
180 (WebCore::CachedPage::create):
181 * history/CachedPage.h:
182 * history/HistoryItem.h:
183 * loader/FrameLoader.cpp:
184 (WebCore::FrameLoader::commitProvisionalLoad):
185 (WebCore::FrameLoader::transitionToCommitted):
186 * loader/FrameLoader.h:
188 2013-09-04 Roger Fong <roger_fong@apple.com>
190 Unreviewed. Windows build fix and WebCore project cleanup.
192 * WebCore.vcxproj/WebCore.vcxproj.filters:
193 * rendering/RenderingAllInOne.cpp:
195 2013-09-04 Mark Lam <mark.lam@apple.com>
197 Renamed StackIterator to StackVisitor.
198 https://bugs.webkit.org/show_bug.cgi?id=120706.
200 Reviewed by Geoffrey Garen.
204 * ForwardingHeaders/interpreter/StackIterator.h: Removed.
205 * ForwardingHeaders/interpreter/StackVisitor.h: Copied from Source/WebCore/ForwardingHeaders/interpreter/StackIterator.h.
206 * bindings/js/JSXMLHttpRequestCustom.cpp:
207 (WebCore::SendFunctor::operator()):
208 * bindings/js/ScriptCallStackFactory.cpp:
209 (WebCore::CreateScriptCallStackFunctor::operator()):
210 (WebCore::CreateScriptCallStackForConsoleFunctor::operator()):
212 2013-09-04 Samuel White <samuel_white@apple.com>
214 AX: when no other label on provided on form elements, WebKit should fall back to using @title
215 https://bugs.webkit.org/show_bug.cgi?id=112842
217 Reviewed by Chris Fleizach.
219 Don't let input elements include empty labels in their accessibility title.
221 Test: platform/mac/accessibility/input-title.html
223 * accessibility/AccessibilityNodeObject.cpp:
224 (WebCore::AccessibilityNodeObject::titleElementText):
226 2013-09-04 Andreas Kling <akling@apple.com>
228 Make ImageQualityController per-RenderView.
229 <https://webkit.org/b/120702>
231 Reviewed by Anders Carlsson.
233 Move ImageQualityController to its own files and add a RenderView::imageQualityController()
234 getter instead of using a global map for all render trees.
236 This avoids having to unregister every renderer (well, every RenderBoxModelObject) from the
237 global hash map during render tree teardown.
239 It also simplifies the live resize optimization a bit since it can now short-circuit if
240 the RenderView's FrameView is being resized. (Previously there could be any number of
241 RenderViews present in the map.)
244 * GNUmakefile.list.am:
246 * WebCore.vcxproj/WebCore.vcxproj:
247 * WebCore.xcodeproj/project.pbxproj:
248 * rendering/ImageQualityController.cpp: Added.
249 * rendering/ImageQualityController.h: Added.
251 2013-09-04 Roger Fong <roger_fong@apple.com>
253 Unreviewed Build fix for Windows DebugSuffix configuration.
255 * WebCore.vcxproj/WebCore.vcxproj:
256 * WebCore.vcxproj/WebCore.vcxproj.filters:
258 2013-09-04 Mark Lam <mark.lam@apple.com>
260 Refining the StackIterator callback interface.
261 https://bugs.webkit.org/show_bug.cgi?id=120695.
263 Reviewed by Geoffrey Garen.
267 * bindings/js/JSXMLHttpRequestCustom.cpp:
268 (WebCore::SendFunctor::SendFunctor):
269 (WebCore::SendFunctor::line):
270 (WebCore::SendFunctor::url):
271 (WebCore::SendFunctor::operator()):
272 (WebCore::JSXMLHttpRequest::send):
273 * bindings/js/ScriptCallStackFactory.cpp:
274 (WebCore::createScriptCallStack):
276 2013-09-04 Andreas Kling <akling@apple.com>
278 Remove unnecessary RenderView.h inclusion from headers.
279 <https://webkit.org/b/120365>
281 Reviewed by Anders Carlsson.
283 RenderView.h was overzealously included by RenderText and RenderTextTrackCue,
284 making it unpleasant to edit on my laptop.
286 * rendering/RenderText.h:
287 * rendering/RenderTextTrackCue.h:
289 Don't include RenderView.h here, do it in .cpp files.
291 2013-09-04 Alexey Proskuryakov <ap@apple.com>
293 Editor::m_removedAnchor is unused
294 https://bugs.webkit.org/show_bug.cgi?id=120701
296 Reviewed by Ryosuke Niwa.
298 * editing/Editor.h: Removed m_removedAnchor. It was not only unused, but also broken,
299 as we didn't reset it when navigating.
301 2013-09-04 Pratik Solanki <psolanki@apple.com>
303 Document::updateHoverActiveState() should allow for deferred style recalcs
304 https://bugs.webkit.org/show_bug.cgi?id=120700
306 Reviewed by Simon Fraser.
308 Add an extra argument to Document::updateHoverActiveState() to specify if a style recalc
309 should be done. The default value keeps the current behavior of doing a style recalc. iOS
310 touch handling code will pass in DeferRecalcStyleIfNeeded to avoid the work.
312 No new tests because no functional changes.
315 (WebCore::Document::updateHoverActiveState):
318 2013-09-04 Tim Horton <timothy_horton@apple.com>
320 [mac] PDFDocumentImage should use PDFKit to draw
321 https://bugs.webkit.org/show_bug.cgi?id=120651
322 <rdar://problem/12810731>
324 Reviewed by Alexey Proskuryakov.
326 Use PDFKit to draw PDF-in-<img> on Mac, so that annotations in PDF are painted.
328 Test: fast/images/pdf-as-image-with-annotations.html
330 * WebCore.xcodeproj/project.pbxproj:
331 Add PDFDocumentImageMac.mm.
333 * platform/graphics/cg/PDFDocumentImage.cpp:
334 (WebCore::PDFDocumentImage::PDFDocumentImage):
335 We don't need to initialize m_document anymore because it's now a RetainPtr.
336 Initialize m_hasPage to false.
338 (WebCore::PDFDocumentImage::~PDFDocumentImage):
339 We don't need to manually release our CGPDFDocumentRef anymore because it's now a RetainPtr.
341 (WebCore::PDFDocumentImage::size):
342 Use expandedIntSize for explicitness.
344 (WebCore::PDFDocumentImage::applyRotationForPainting):
345 Rename adjustCTM to applyRotationForPainting, and move the one non-rotation related transformation out.
346 We need to do this because PDFKit applies the rotation transformation itself, so we don't need to.
347 Also, explicitly use std::min instead of importing the whole std namespace.
349 (WebCore::PDFDocumentImage::dataChanged):
350 Assert that we don't re-enter dataChanged after we've created a document,
351 because it seems like that shouldn't happen - we only create a document when
352 we've supposedly received all data, and it would be nice if we didn't have
353 all this varying code to deal with SharedBuffers changing out from under each other.
354 Factor the code to create a CGPDFDocumentRef out into createPDFDocument, so we can
355 replace it with a different implementation that creates a PDFDocument.
357 (WebCore::PDFDocumentImage::setCurrentPage):
358 Make all page-number-related things unsigned, since they are in CG and PDFKit,
359 and add m_hasPage to denote whether we've acquired a valid page yet.
360 Factor code to retrieve the PDF box bounds into computeBoundsForCurrentPage.
361 Remove setCurrentPage itself, as we never use a page other than the first page;
362 we will call computeBoundsForCurrentPage and set hasPage in dataChanged, now.
364 (WebCore::PDFDocumentImage::draw):
366 Factor code that actually draws the PDF out into drawPDFPage.
368 The rest of the functions in this file are only built for USE(CG) && !PLATFORM(MAC):
370 (WebCore::PDFDocumentImage::createPDFDocument):
371 Factored out of dataChanged(); I only kept the !PLATFORM(MAC) branch.
373 (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
374 Factored out of setCurrentPage().
375 Use deg2rad since we have it.
377 (WebCore::PDFDocumentImage::pageCount):
378 (WebCore::PDFDocumentImage::drawPDFPage):
379 Factored out of draw().
380 Reduced an unnecessary transform (we were effectively doing mediaBox.origin - cropBox.origin - mediaBox.origin).
382 * platform/graphics/cg/PDFDocumentImage.h:
383 Unindent all the things, as we don't indent the first level inside a namespace scope.
384 Forward-declare PDFDocument.
385 Make m_currentPage unsigned as it should be.
387 Make m_document a PDFDocument on PLATFORM(MAC) and a CGPDFDocumentRef on other platforms.
389 * platform/graphics/mac/PDFDocumentImageMac.mm: Added.
390 Soft-link in PDFKit and specifically the PDFDocument class.
392 (WebCore::PDFDocumentImage::createPDFDocument):
393 Create our PDFDocument from the SharedBuffer's NSData directly. This shouldn't be a problem
394 (with respect to the SharedBuffer's data being appended to in secret), because we've waited
395 for the document to finish loading before getting here.
397 (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
398 Ask PDFKit for the page's media and crop boxes; it automatically performs the correct fallback.
399 Ask PDFKit for the page's rotation.
401 (WebCore::PDFDocumentImage::pageCount):
402 Ask PDFKit for the page count.
404 (WebCore::PDFDocumentImage::drawPDFPage):
405 Paint the current page of the PDF. Note that we do not apply the rotation here
406 via applyRotationForPainting because PDFKit will do it itself.
408 * platform/mac/SoftLinking.h:
409 I couldn't find any clients of SOFT_LINK_FRAMEWORK_IN_CORESERVICES_UMBRELLA,
410 so I made it the more generic SOFT_LINK_FRAMEWORK_IN_UMBRELLA, taking the name
411 of the umbrella framework and the subframework, so I could use it to soft link
412 Quartz.framework's PDFKit.framework.
414 2013-09-04 Roger Fong <roger_fong@apple.com>
416 Unreviewed Windows build fix.
418 * WebCore.vcxproj/WebCoreCommon.props:
420 2013-09-04 Bem Jones-Bey <bjonesbe@adobe.com>
422 FloatingObjects should manage cleaning it's line box tree pointers itself
423 https://bugs.webkit.org/show_bug.cgi?id=120692
425 Reviewed by David Hyatt.
427 This is another step in properly encapsulating FloatingObjects.
428 Instead of having RenderBlock walk and clear the line box tree
429 pointers, create a method for the behavior, and have RenderBlock call
432 In addtion, add a proper destructor to FloatingObjects, so that
433 RenderBlock does not have to explicitly delete the set in
436 And as a bonus, fix the ordering of an if to avoid the expensive
437 descendantChild check.
439 This is a port of a Blink patch by Eric Seidel.
441 No new tests, no behavior change.
443 * rendering/RenderBlock.cpp:
444 (WebCore::RenderBlock::~RenderBlock):
445 (WebCore::RenderBlock::deleteLineBoxTree):
446 (WebCore::RenderBlock::repaintOverhangingFloats):
447 (WebCore::RenderBlock::FloatingObjects::~FloatingObjects):
448 (WebCore::RenderBlock::FloatingObjects::clearLineBoxTreePointers):
449 (WebCore::RenderBlock::FloatingObjects::clear):
450 * rendering/RenderBlock.h:
452 2013-09-04 Tim Horton <timothy_horton@apple.com>
454 Rename customCssText -> customCSSText to match WebKit style
455 https://bugs.webkit.org/show_bug.cgi?id=120694
457 Reviewed by Simon Fraser.
459 No new tests, just a rename.
462 * css/CSSAspectRatioValue.cpp:
463 (WebCore::CSSAspectRatioValue::customCSSText):
464 * css/CSSAspectRatioValue.h:
465 * css/CSSBorderImageSliceValue.cpp:
466 (WebCore::CSSBorderImageSliceValue::customCSSText):
467 * css/CSSBorderImageSliceValue.h:
468 * css/CSSCalculationValue.cpp:
469 (WebCore::CSSCalcValue::customCSSText):
470 (WebCore::CSSCalcPrimitiveValue::customCSSText):
471 (WebCore::CSSCalcBinaryOperation::customCSSText):
472 * css/CSSCalculationValue.h:
473 * css/CSSCanvasValue.cpp:
474 (WebCore::CSSCanvasValue::customCSSText):
475 * css/CSSCanvasValue.h:
476 * css/CSSCrossfadeValue.cpp:
477 (WebCore::CSSCrossfadeValue::customCSSText):
478 * css/CSSCrossfadeValue.h:
479 * css/CSSCursorImageValue.cpp:
480 (WebCore::CSSCursorImageValue::customCSSText):
481 * css/CSSCursorImageValue.h:
482 * css/CSSFilterImageValue.cpp:
483 (WebCore::CSSFilterImageValue::customCSSText):
484 * css/CSSFilterImageValue.h:
485 * css/CSSFontFaceSrcValue.cpp:
486 (WebCore::CSSFontFaceSrcValue::customCSSText):
487 * css/CSSFontFaceSrcValue.h:
488 * css/CSSFunctionValue.cpp:
489 (WebCore::CSSFunctionValue::customCSSText):
490 * css/CSSFunctionValue.h:
491 * css/CSSGradientValue.cpp:
492 (WebCore::CSSLinearGradientValue::customCSSText):
493 (WebCore::CSSRadialGradientValue::customCSSText):
494 * css/CSSGradientValue.h:
495 * css/CSSImageSetValue.cpp:
496 (WebCore::CSSImageSetValue::customCSSText):
497 * css/CSSImageSetValue.h:
498 * css/CSSImageValue.cpp:
499 (WebCore::CSSImageValue::customCSSText):
500 * css/CSSImageValue.h:
501 * css/CSSInheritedValue.cpp:
502 (WebCore::CSSInheritedValue::customCSSText):
503 * css/CSSInheritedValue.h:
504 * css/CSSInitialValue.cpp:
505 (WebCore::CSSInitialValue::customCSSText):
506 * css/CSSInitialValue.h:
507 * css/CSSLineBoxContainValue.cpp:
508 (WebCore::CSSLineBoxContainValue::customCSSText):
509 * css/CSSLineBoxContainValue.h:
510 * css/CSSPrimitiveValue.cpp:
511 (WebCore::CSSPrimitiveValue::customCSSText):
512 (WebCore::CSSPrimitiveValue::customSerializeResolvingVariables):
513 * css/CSSPrimitiveValue.h:
514 * css/CSSReflectValue.cpp:
515 (WebCore::CSSReflectValue::customCSSText):
516 * css/CSSReflectValue.h:
517 * css/CSSTimingFunctionValue.cpp:
518 (WebCore::CSSLinearTimingFunctionValue::customCSSText):
519 (WebCore::CSSCubicBezierTimingFunctionValue::customCSSText):
520 (WebCore::CSSStepsTimingFunctionValue::customCSSText):
521 * css/CSSTimingFunctionValue.h:
522 * css/CSSUnicodeRangeValue.cpp:
523 (WebCore::CSSUnicodeRangeValue::customCSSText):
524 * css/CSSUnicodeRangeValue.h:
526 (WebCore::CSSValue::cssText):
527 * css/CSSValueList.cpp:
528 (WebCore::CSSValueList::customCSSText):
529 * css/CSSValueList.h:
530 * css/FontFeatureValue.cpp:
531 (WebCore::FontFeatureValue::customCSSText):
532 * css/FontFeatureValue.h:
534 (WebCore::FontValue::customCSSText):
536 * css/ShadowValue.cpp:
537 (WebCore::ShadowValue::customCSSText):
539 * css/WebKitCSSArrayFunctionValue.cpp:
540 (WebCore::WebKitCSSArrayFunctionValue::customCSSText):
541 * css/WebKitCSSArrayFunctionValue.h:
542 * css/WebKitCSSFilterValue.cpp:
543 (WebCore::WebKitCSSFilterValue::customCSSText):
544 * css/WebKitCSSFilterValue.h:
545 * css/WebKitCSSMatFunctionValue.cpp:
546 (WebCore::WebKitCSSMatFunctionValue::customCSSText):
547 * css/WebKitCSSMatFunctionValue.h:
548 * css/WebKitCSSMixFunctionValue.cpp:
549 (WebCore::WebKitCSSMixFunctionValue::customCSSText):
550 * css/WebKitCSSMixFunctionValue.h:
551 * css/WebKitCSSSVGDocumentValue.cpp:
552 (WebCore::WebKitCSSSVGDocumentValue::customCSSText):
553 * css/WebKitCSSSVGDocumentValue.h:
554 * css/WebKitCSSShaderValue.cpp:
555 (WebCore::WebKitCSSShaderValue::customCSSText):
556 * css/WebKitCSSShaderValue.h:
557 * css/WebKitCSSTransformValue.cpp:
558 (WebCore::WebKitCSSTransformValue::customCSSText):
559 * css/WebKitCSSTransformValue.h:
561 (WebCore::SVGColor::customCSSText):
564 (WebCore::SVGPaint::customCSSText):
567 2013-09-04 Chris Fleizach <cfleizach@apple.com>
569 AX: aria-valuetext property not exposing AXValueDescription
570 https://bugs.webkit.org/show_bug.cgi?id=120375
572 Reviewed by Darin Adler.
574 Expose value based attributes for incrementor roles (which are called spinbuttons by ARIA).
576 Test: platform/mac/accessibility/spinbutton-valuedescription.html
578 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
579 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
581 2013-09-04 Javier Fernandez <jfernandez@igalia.com>
583 <https://webkit.org/b/119622> [CSSRegions] Not possible to clear the selection when mixing content from different FlowThreads
585 Reviewed by David Hyatt.
587 When using CSS Regions is usual that the RenderTree doesn't match
588 the DOM Tree in terms of relative position of the nodes. Besides,
589 usually the content of a certain node is split and spread across
590 multiple blocks, rendered in different positions.
592 Regarding the Selection, this problem is even more important; the
593 selection direction changes when crossing the FlowThread
594 boundaries. This weird behavior is also present in other layouts
595 using non-regular positioning mechanisms, like absolute,
596 static. However, for those layouts the RenderTree preserves the
597 order of the nodes, unlike the CSS Regions layout model.
599 Because of how the RenderTree is generated with CSS Regions, the
600 RenderView::setSelection algorithm is not able to repaint some of
601 the rectangles defined during the selection process. In order to
602 face this issue, the proposed fix determines whether it should
603 backwards traversing the RenderTree, from the "stop" node to the
606 Test: fast/regions/selecting-text-through-different-region-flows-2.html
608 * rendering/RenderView.cpp:
609 (WebCore::getNextOrPrevRenderObjectBasedOnDirection): Added.
610 (WebCore::RenderView::setSelection):
612 2013-09-04 Eric Carlson <eric.carlson@apple.com>
614 Get MEDIA_STREAM compiling on OSX
615 https://bugs.webkit.org/show_bug.cgi?id=120650
617 Reviewed by Darin Adler.
619 No new tests, the code changed doesn't run on OSX yet.
621 * DerivedSources.make: Add MediaStream idl files.
623 * Modules/mediastream/LocalMediaStream.h: Mark class as FINAL.
625 * Modules/mediastream/MediaConstraintsImpl.cpp:
626 (WebCore::MediaConstraintsImpl::getOptionalConstraints): append -> appendRange so we don't
627 need a MediaConstraint copy constructor.
629 * Modules/mediastream/RTCDataChannel.cpp:
630 (WebCore::RTCDataChannel::send): Remove an unused parameter name.
631 * Modules/mediastream/RTCDataChannel.h: ArrayBuffer and ArrayBufferView are in the JSC namespace.
633 * Modules/mediastream/RTCPeerConnection.cpp:
634 (WebCore::RTCPeerConnection::RTCPeerConnection): loader() doesn't return a pointer.
635 (WebCore::RTCPeerConnection::localDescription): Set the ExceptionCode on error.
636 (WebCore::RTCPeerConnection::remoteDescription): Ditto.
638 * Modules/mediastream/RTCSessionDescription.cpp:
639 (WebCore::RTCSessionDescription::setSdp): Remove the unused ExceptionCode parameter.
640 * Modules/mediastream/RTCSessionDescription.h: Ditto.
641 * Modules/mediastream/RTCSessionDescription.idl: Ditto.
643 * Modules/mediastream/RTCStatsResponse.cpp:
644 (WebCore::RTCStatsResponse::canGetItemsForName): Add so JSRTCStatsResponse::canGetItemsForName
645 doesn't cause ref count churn.
646 * Modules/mediastream/RTCStatsResponse.h: Mark class as FINAL. Declare canGetItemsForName.
648 * WebCore.xcodeproj/project.pbxproj: Add new files.
650 * bindings/js/JSRTCStatsResponseCustom.cpp:
651 (WebCore::JSRTCStatsResponse::canGetItemsForName): Use canGetItemsForName instead of namedItem.
652 Use propertyNameToAtomicString instead of propertyNameToString
653 (WebCore::JSRTCStatsResponse::nameGetter): Use propertyNameToAtomicString instead of
654 propertyNameToString because namedItem takes an AtomicString.
656 * platform/mediastream/mac: Added.
657 * platform/mediastream/mac/MediaStreamCenterMac.cpp: Added.
658 * platform/mediastream/mac/MediaStreamCenterMac.h: Added.
660 2013-09-04 Daniel Bates <dabates@apple.com>
662 [iOS] Fix the build following <http://trac.webkit.org/changeset/154903>
663 (https://bugs.webkit.org/show_bug.cgi?id=120540)
665 * style/StyleResolveTree.cpp:
666 (WebCore::Style::resolveTree): Use address operator and dot-notation when
667 passing Element to CheckForVisibilityChangeOnRecalcStyle and calling
668 Element::renderStyle(), respectively.
670 2013-09-04 Bem Jones-Bey <bjonesbe@adobe.com>
672 Move logical dimension getters/setters to FloatingObject from RenderBlock
673 https://bugs.webkit.org/show_bug.cgi?id=120686
675 Reviewed by David Hyatt.
677 This is the first step in decoupling FloatingObject, FloatingObjects,
678 et al from RenderBlock. It is not ideal that the methods take a bool;
679 however, passing down the actual writing mode would require
680 refactoring the way that RenderBlock stores this information, which is
681 a task for the future.
683 No new tests, no behavior change.
685 * rendering/RenderBlock.cpp:
686 (WebCore::RenderBlock::repaintOverhangingFloats): Use new methods.
687 (WebCore::RenderBlock::insertFloatingObject): Ditto.
688 (WebCore::RenderBlock::removeFloatingObject): Ditto.
689 (WebCore::RenderBlock::removeFloatingObjectsBelow): Ditto.
690 (WebCore::RenderBlock::computeLogicalLocationForFloat): Ditto.
691 (WebCore::RenderBlock::positionNewFloats): Ditto.
692 (WebCore::::updateOffsetIfNeeded): Ditto.
693 (WebCore::::collectIfNeeded): Ditto.
694 (WebCore::::getHeightRemaining): Ditto.
695 (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
696 (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
697 (WebCore::RenderBlock::nextFloatLogicalBottomBelow): Ditto.
698 (WebCore::RenderBlock::lowestFloatLogicalBottom): Ditto.
699 (WebCore::RenderBlock::clearFloats): Ditto.
700 (WebCore::RenderBlock::addOverhangingFloats): Ditto.
701 (WebCore::RenderBlock::hasOverhangingFloat): Ditto.
702 (WebCore::RenderBlock::addIntrudingFloats): Ditto.
703 * rendering/RenderBlock.h:
704 (WebCore::RenderBlock::FloatingObject::logicalTop): Moved from RenderBlock::logicalTopForFloat
705 (WebCore::RenderBlock::FloatingObject::logicalBottom): Moved from RenderBlock::logicalBottomForFloat
706 (WebCore::RenderBlock::FloatingObject::logicalLeft): Moved from RenderBlock::logicalLeftForFloat
707 (WebCore::RenderBlock::FloatingObject::logicalRight): Moved from RenderBlock::logicalRightForFloat
708 (WebCore::RenderBlock::FloatingObject::logicalWidth): Moved from RenderBlock::logicalWidthForFloat
709 (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalTop): Moved from RenderBlock::pixelSnappedLogicalTopForFloat
710 (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalBottom): Moved from RenderBlock::pixelSnappedLogicalBottomForFloat
711 (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalLeft): Moved from RenderBlock::pixelSnappedLogicalLeftForFloat
712 (WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalRight): Moved from RenderBlock::pixelSnappedLogicalRightForFloat
713 (WebCore::RenderBlock::FloatingObject::setLogicalTop): Moved from RenderBlock::setLogicalTopForFloat
714 (WebCore::RenderBlock::FloatingObject::setLogicalLeft): Moved from RenderBlock::setLogicalLeftForFloat
715 (WebCore::RenderBlock::FloatingObject::setLogicalHeight): Moved from RenderBlock::setLogicalHeightForFloat
716 (WebCore::RenderBlock::FloatingObject::setLogicalWidth): Moved from RenderBlock::setLogicalWidthForFloat
717 * rendering/RenderBlockLineLayout.cpp:
718 (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Use new methods.
719 (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Ditto.
720 (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Ditto.
721 (WebCore::RenderBlock::positionNewFloatOnLine): Ditto.
723 2013-09-04 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
725 REGRESSION(r154977): Do not urlencode soup message on ResourceRequest::toSoupMessage()
726 https://bugs.webkit.org/show_bug.cgi?id=120681
728 Reviewed by Martin Robinson.
730 Do not call soup_message_set_uri with soupURI() (url encoded uri) on
731 ResourceRequest::toSoupMessage().
733 * platform/network/soup/ResourceRequest.h:
734 * platform/network/soup/ResourceRequestSoup.cpp:
735 (WebCore::ResourceRequest::updateSoupMessageMembers):
736 (WebCore::ResourceRequest::updateSoupMessage):
737 (WebCore::ResourceRequest::toSoupMessage):
738 Split common code from updateSoupMessage/toSoupMessage into updateSoupMessageMembers.
740 2013-09-04 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
742 [GTK] add support for subtitles on webkit2GTK
743 https://bugs.webkit.org/show_bug.cgi?id=117008
745 By activating subtitles support on webkit2GTK, the video player
746 recognizes and use text <tracks> inside <video> elements.
748 Reviewed by Martin Robinson.
750 Layout tests (track-menu) should cover this change.
752 * css/mediaControlsGtk.css:
753 (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
754 (video::-webkit-media-controls-closed-captions-container):
755 (video::-webkit-media-controls-closed-captions-track-list):
756 (video::-webkit-media-controls-closed-captions-track-list h3):
757 (video::-webkit-media-controls-closed-captions-track-list ul):
758 (video::-webkit-media-controls-closed-captions-track-list li):
759 (video::-webkit-media-controls-closed-captions-track-list li.selected):
760 * html/shadow/MediaControlElements.cpp:
761 (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
762 (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
763 * html/shadow/MediaControlElements.h:
764 * html/shadow/MediaControlsGtk.cpp:
765 (WebCore::MediaControlsGtkEventListener::create):
766 (WebCore::MediaControlsGtkEventListener::cast):
767 (WebCore::MediaControlsGtkEventListener::MediaControlsGtkEventListener):
768 (WebCore::MediaControlsGtk::MediaControlsGtk):
769 (WebCore::MediaControlsGtk::initializeControls):
770 (WebCore::MediaControlsGtk::setMediaController):
771 (WebCore::MediaControlsGtk::reset):
772 (WebCore::MediaControlsGtk::makeTransparent):
773 (WebCore::MediaControlsGtk::toggleClosedCaptionTrackList):
774 (WebCore::MediaControlsGtk::showClosedCaptionTrackList):
775 (WebCore::MediaControlsGtk::hideClosedCaptionTrackList):
776 (WebCore::MediaControlsGtk::handleClickEvent):
777 (WebCore::MediaControlsGtk::eventListener):
778 (WebCore::MediaControlsGtkEventListener::handleEvent):
779 (WebCore::MediaControlsGtkEventListener::operator==):
780 * html/shadow/MediaControlsGtk.h:
781 * page/CaptionUserPreferences.cpp:
782 (WebCore::trackDisplayName):
783 * platform/gtk/LocalizedStringsGtk.cpp:
784 (WebCore::textTrackSubtitlesText):
785 (WebCore::textTrackOffMenuItemText):
786 (WebCore::textTrackNoLabelText):
787 * platform/gtk/RenderThemeGtk.h:
789 2013-09-03 Darin Adler <darin@apple.com>
791 Use OwnPtr in the RenderLayerFilterInfo map
792 https://bugs.webkit.org/show_bug.cgi?id=120619
794 Reviewed by Anders Carlsson.
796 * rendering/RenderLayer.cpp:
797 (WebCore::RenderLayer::~RenderLayer): Use FilterInfo::remove directly instead of
798 going through removeFilterInfoIfNeeded function.
799 (WebCore::RenderLayer::paintsWithFilters): Rearranged #if a little bit and tweaked
801 (WebCore::RenderLayer::requiresFullLayerImageForFilters): Use && instead of ternary.
802 (WebCore::RenderLayer::filterRenderer): Use FilterInfo::getIfExists directly instead
803 of going through filterInfo function.
804 (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect): Use FilterInfo::get
805 directly instead of going through filterInfo function. Also use references instead
807 (WebCore::shouldDoSoftwarePaint): Marked this simple function, used only once, as
809 (WebCore::paintForFixedRootBackground): Ditto.
810 (WebCore::RenderLayer::setupFilters): Use FilterInfo::getIfExists directly instead
811 of going through filterInfo function. Also get rendererer out of filterInfo instead
812 of calling filterRenderer.
813 (WebCore::RenderLayer::updateOrRemoveFilterClients): Use FilterInfo::get and
814 FilterInfo::getIfExists directly instead of using ensureFilterInfo and
815 filterInfo functions.
816 (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Use FilterInfo::getIfExists
817 and FilterInfo::get directly instead of using filterInfo function.
819 * rendering/RenderLayer.h: Removed the ifdefs around forward declarations; overkill,
820 since there is no harm in a few extras. Marked the RenderLayer class FINAL. Removed the
821 no-longer-needed filterInfo, ensureFilterInfo, removeFilterInfoIfNeeded, hasFilterInfo,
822 and setHasFilterInfo functions. Mark everything private instead of protected since
823 there are no classes derived from this one. Made FilterInfo an embedded class so it
824 can get at the m_hasFilterInfo data member directly and has a shorter name.
826 * rendering/RenderLayerFilterInfo.cpp: Removed the ifs around includes, which were
827 overkill, since there is little harm including a few extra files.
828 (WebCore::RenderLayer::FilterInfo::map): Added. Returns the single global map.
829 (WebCore::RenderLayer::FilterInfo::getIfExists): Renamed from filterInfoForRenderLayer.
830 Also changed to take a reference instead of a pointer, and to use the new filterMap.
831 (WebCore::RenderLayer::FilterInfo::get): Renamed from createFilterInfoForRenderLayerIfNeeded.
832 Also changed to take a reference instead of a pointer, to use the new filterMap, and
833 to use add to avoid hashing twice when adding a new layer to the map.
834 (WebCore::RenderLayer::FilterInfo::remove): Renamed from removeFilterInfoForRenderLayer.
835 Also changed to take a reference instead of a pointer and eliminated the explicit
836 delete since we use OwnPtr now.
837 (WebCore::RenderLayer::FilterInfo::FilterInfo): Take a reference instead of a pointer.
838 (WebCore::RenderLayer::FilterInfo::~FilterInfo): Updated class name.
839 (WebCore::RenderLayer::FilterInfo::setRenderer): Ditto.
840 (WebCore::RenderLayer::FilterInfo::notifyFinished): Update since m_layer is a reference.
841 (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients): Update to iterate in a
842 slightly more idiomatic and efficient way. Also update since m_layer is a reference.
843 (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients): Ditto.
844 (WebCore::RenderLayer::FilterInfo::notifyCustomFilterProgramLoaded): Ditto.
845 (WebCore::RenderLayer::FilterInfo::updateCustomFilterClients): Ditto. Also switched to
846 a raw pointer for CustomFilterProgram*.
847 (WebCore::RenderLayer::FilterInfo::removeCustomFilterClients): Ditto.
849 * rendering/RenderLayerFilterInfo.h: Removed the ifs around includes, which were
850 overkill, since there is little harm including a few extra files. Changed to be a
851 member class of RenderLayer, marked the class FINAL, and changed the style of the
852 conditionals around the base classes. Renamed functions. Made overrides private and
853 used OVERRIDE. Changed functions to take references instead of pointers. Did some
854 small style cleanup. Made deleteOwnedPtr a friend so we can keep the destructor private.
855 Moved the typedef of RenderLayerFilterInfoMap into the class and named it just Map.
856 Got rid of s_filterMap and instead added a function named just map().
858 2013-09-04 Andreas Kling <akling@apple.com>
860 Simplify subtree relayout scheduling a bit.
861 <https://webkit.org/b/120684>
863 Reviewed by Antti Koivisto.
865 Subtree relayout scheduling should only happen while there's a render tree up,
866 the code can freely assume that there's a RenderView present.
868 Added an assertion that the render tree isn't being torn down. This should catch
869 renderers doing unnecessary work during document detach and could be a source
870 of "performance freebies."
872 I also un-nested scheduleRelayoutOfSubtree() with early-return style to make
873 the code more human-readable.
876 * page/FrameView.cpp:
877 (WebCore::FrameView::scheduleRelayoutOfSubtree):
878 * rendering/RenderObject.cpp:
879 (WebCore::RenderObject::scheduleRelayout):
881 2013-09-04 Jae Hyun Park <jae.park@company100.net>
883 [Coordinated Graphics] Remove unused method in CoordinatedGraphicsLayer
884 https://bugs.webkit.org/show_bug.cgi?id=120664
886 Reviewed by Darin Adler.
888 CoordinatedGraphicsLayer::hasPendingVisibleChanges is not used as of
891 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
892 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
894 2013-09-04 Hans Muller <hmuller@adobe.com>
896 [CSS Shapes] Revise the ShapeInterval set operations' implementation
897 https://bugs.webkit.org/show_bug.cgi?id=120349
899 Reviewed by Alexandru Chiculita.
901 Revised the ShapeIntervals unite, intersect, and subtract operations to
902 improve efficiency and clarity.
904 No new tests are required, this is just an internal refactoring.
906 * rendering/shapes/PolygonShape.cpp:
907 (WebCore::computeOverlappingEdgeXProjections): Removed call to ShapeInterval<T>sortVector(), since calling std::sort directly is simpler.
908 * rendering/shapes/ShapeInterval.h:
909 (WebCore::ShapeInterval::contains): True if the interval parameter is within this interval.
910 (WebCore::ShapeInterval::intersect): Substantially revised version of the original method.
911 (WebCore::ShapeInterval::uniteVectors): Ditto.
912 (WebCore::ShapeInterval::intersectVectors): Ditto.
913 (WebCore::ShapeInterval::subtractVectors): Ditto.
915 2013-09-04 Krzysztof Czech <k.czech@samsung.com>
917 [ATK] Adds an accessibility support to access a value of the color control element
918 https://bugs.webkit.org/show_bug.cgi?id=114354
920 Reviewed by Mario Sanchez Prada.
922 Implements a possibility of retrieving a value of the color control element.
924 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
925 (webkitAccessibleTextGetText):
926 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
927 (getInterfaceMaskFromObject):
929 2013-09-04 Andreas Kling <akling@apple.com>
931 Use Vector<Ref<T>> in three random WebCore loops.
932 <https://webkit.org/b/120661>
934 Reviewed by Darin Adler.
936 Clean up three little loops to use Refs to avoid null checking known-valid objects.
937 Also apply auto, reserveInitialCapacity and uncheckedAppend as appropriate.
939 * page/DOMWindow.cpp:
940 (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
941 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
942 * platform/graphics/FontCache.cpp:
943 (WebCore::FontCache::invalidate):
945 2013-09-04 Claudio Saavedra <csaavedra@igalia.com>
947 [GTK] Color of input button's text broken with recent gnome-themes-standard
948 https://bugs.webkit.org/show_bug.cgi?id=120581
950 Reviewed by Carlos Garcia Campos.
952 * platform/gtk/RenderThemeGtk3.cpp:
953 (WebCore::getStyleContext): add the "text-button" class.
954 (WebCore::RenderThemeGtk::systemColor): Use the ACTIVE state flag,
955 as this is the one actually used for button labels.
957 2013-09-04 Zan Dobersek <zdobersek@igalia.com>
959 [GTK] Add support for the Wayland build target
960 https://bugs.webkit.org/show_bug.cgi?id=120627
962 Reviewed by Gustavo Noronha Silva.
964 * GNUmakefile.list.am: Reorder the Source/WebCore/plugins/np* source files.
965 The X11-specific source files should only be included if the X11 target is being built. PluginPackageNone and
966 PluginViewNone source files must be included in non-X11-target builds. Other source files that were previously
967 guarded with the TARGET_X11 conditional should also be built for the Wayland target, so the new TARGET_X11_OR_WAYLAND
968 conditional is used. If neither of those two targets is being built we fall back to adding source files to the build
969 as necessary by the actual build target.
970 * platform/gtk/GtkVersioning.c:
971 (gdk_screen_get_monitor_workarea): Additionally guard bits of code that depend on the GDK_WINDOWING_X11 macro being
972 defined - these should only be built when building the X11 target, checked for with PLATFORM(X11).
974 2013-09-04 Mario Sanchez Prada <mario.prada@samsung.com>
976 [GTK] Reimplement atk_text_get_text_*_offset for SENTENCE boundaries
977 https://bugs.webkit.org/show_bug.cgi?id=114873
979 Reviewed by Chris Fleizach.
981 Re-implement these functions without using GailTextUtil nor Pango.
983 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
984 (webkitAccessibleTextWordForBoundary): Renamed from webkitAccessibleTextGetWordForBoundary,
985 to keep it consistent with names for new functions.
986 (isSentenceBoundary): Helper function to know when we are either
987 at the beginning or the end of a sentence.
988 (isWhiteSpaceBetweenSentences): It returns true if we are in the
989 middle of a white space between sentences. Useful for implementing
990 the SENTENCE_END boundary type.
991 (sentenceAtPositionForAtkBoundary): New helper function to find the
992 sentence at a given position considering values of AtkTextBoundary.
993 (webkitAccessibleTextSentenceForBoundary): New function,
994 implementing atk_text_get_text_*_offset for SENTENCE.
995 (webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
996 SENTENCE boundaries with webkitAccessibleTextSentenceForBoundary().
998 2013-09-04 Andrei Bucur <abucur@adobe.com>
1000 [CSS Regions] Extend the RenderRegionRange class to include overflow information + apply the layout overflow
1001 https://bugs.webkit.org/show_bug.cgi?id=116299
1003 Reviewed by David Hyatt.
1005 Patch for computing overflow for boxes per region and applying it for layout overflow.
1006 The approach is based on adding a RenderOverflow object inside the RenderBoxRegionInfo
1007 structure. The RenderOverflow object is manipulated by the RenderRegion using some utility
1008 functions that receive the target box as a parameter.
1009 When computing the portion of a box inside a region it is necessary to split the border
1010 rect of the box between regions. This means mapping the rectangle in the flow thread
1011 coordinates, making the split and then remapping the fragment in the box coordinates.
1012 For now, this is not optimized and walks the render tree to compute the block offsets.
1013 The function getRegionRangeForBox is used to determine in what regions a box should
1014 be rendered into. The range is computed at layout time and it depends on the height of
1015 the box, if its unsplittable for fragmentation etc.
1016 The patch also propagates the layout overflow to the regions. This enables to correctly
1017 display scrollbars when chaining varying size regions (currently the horizontal overflow
1018 is as wide as the widest region for all the regions). Unsplittable boxes will also generate
1019 layout overflow in the start region so they can be scrolled and fully reachable. This
1020 functionality depends on fixing the visual overflow and adapting the layout to take into
1021 account the unsplittable box. Besides this, the relative positioning and transforms are applied
1022 at a fragment level. This is in line with the CSS3 Break specification:
1023 http://dev.w3.org/csswg/css-break/#transforms
1025 Tests: fast/regions/overflow-scrollable-rel-pos-fragment.html
1026 fast/regions/overflow-scrollable-rotated-fragment.html
1027 fast/regions/overflow-scrollable-unsplittable-fragment.html
1028 fast/regions/overflow-scrollable-varying-width-1.html
1029 fast/regions/overflow-scrollable-varying-width-2.html
1031 * rendering/RenderBlock.cpp:
1032 (WebCore::RenderBlock::computeOverflow):
1033 (WebCore::RenderBlock::clearLayoutOverflow):
1034 (WebCore::RenderBlock::addVisualOverflowFromTheme):
1035 (WebCore::RenderBlock::relayoutForPagination):
1036 * rendering/RenderBlockLineLayout.cpp:
1037 (WebCore::RenderBlock::addOverflowFromInlineChildren):
1038 * rendering/RenderBox.cpp:
1039 (WebCore::RenderBox::clientBoxRectInRegion):
1040 (WebCore::RenderBox::addVisualEffectOverflow):
1041 (WebCore::RenderBox::applyVisualEffectOverflow):
1042 (WebCore::RenderBox::addOverflowFromChild):
1043 (WebCore::RenderBox::clearOverflow):
1044 * rendering/RenderBox.h:
1045 * rendering/RenderBoxRegionInfo.h:
1046 (WebCore::RenderBoxRegionInfo::createOverflow):
1047 (WebCore::RenderBoxRegionInfo::overflow):
1048 (WebCore::RenderBoxRegionInfo::clearOverflow):
1049 * rendering/RenderEmbeddedObject.cpp:
1050 (WebCore::RenderEmbeddedObject::layout):
1051 * rendering/RenderFlowThread.cpp:
1052 (WebCore::RenderFlowThread::updateLogicalWidth):
1053 (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
1054 (WebCore::RenderFlowThread::mapFromLocalToFlowThread):
1055 (WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
1056 (WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
1057 (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
1058 (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
1059 (WebCore::RenderFlowThread::addRegionsLayoutOverflow):
1060 (WebCore::RenderFlowThread::clearRegionsOverflow):
1061 * rendering/RenderFlowThread.h:
1062 * rendering/RenderIFrame.cpp:
1063 (WebCore::RenderIFrame::layout):
1064 * rendering/RenderRegion.cpp:
1065 (WebCore::RenderRegion::computeOverflowFromFlowThread):
1066 (WebCore::RenderRegion::setRenderBoxRegionInfo):
1067 (WebCore::RenderRegion::ensureOverflowForBox):
1068 (WebCore::RenderRegion::rectFlowPortionForBox):
1069 (WebCore::RenderRegion::addLayoutOverflowForBox):
1070 (WebCore::RenderRegion::addVisualOverflowForBox):
1071 (WebCore::RenderRegion::layoutOverflowRectForBox):
1072 (WebCore::RenderRegion::visualOverflowRectForBox):
1073 (WebCore::RenderRegion::layoutOverflowRectForBoxForPropagation):
1074 (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
1075 * rendering/RenderRegion.h:
1076 * rendering/RenderReplaced.cpp:
1077 (WebCore::RenderReplaced::layout):
1078 * rendering/RenderTableSection.cpp:
1079 (WebCore::RenderTableSection::computeOverflowFromCells):
1081 2013-09-04 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
1083 [GStreamer] cannot play live streams
1084 https://bugs.webkit.org/show_bug.cgi?id=116831
1086 Reviewed by Philippe Normand.
1088 Fix issues with rtsp streams embedded on <video> not loading.
1090 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1091 Do not reset pipeline to READY state on STATE_CHANGE_ASYNC when entering PAUSED state for
1092 live streams, otherwise we enter an endless loop of READY->PAUSED->READY->PAUSED when
1095 2013-09-03 Chris Fleizach <cfleizach@apple.com>
1097 AX: REGRESSION: @title is exposed as AXDescription when label label from contents already exists.
1098 https://bugs.webkit.org/show_bug.cgi?id=120550
1100 Reviewed by Mario Sanchez Prada.
1102 Resolve a FIXME from the accessible name computation refactoring so that alternative text for links do not
1103 show up in the title field and do not duplicate naming when a title tag is used.
1105 Effectively, this means that links no longer use AXTitle for alternative text. They use AXDescription
1106 like all other elements.
1108 Test: platform/mac/accessibility/link-with-title.html
1110 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1111 (-[WebAccessibilityObjectWrapper accessibilityTitle]):
1112 (-[WebAccessibilityObjectWrapper accessibilityDescription]):
1114 2013-09-03 Darin Adler <darin@apple.com>
1116 Change type of Document::doctype back to a raw pointer
1117 https://bugs.webkit.org/show_bug.cgi?id=120617
1119 Reviewed by Andreas Kling.
1122 (WebCore::Document::doctype): Return a raw pointer.
1123 (WebCore::Document::childrenChanged): Use the raw pointer.
1124 Also added a FIXME about this code that is probably in the wrong place.
1125 * dom/Document.h: More of the same.
1127 * editing/markup.cpp:
1128 (WebCore::documentTypeString): Get rid of local variable entirely,
1129 since null is already handled right by createMarkup, and also remove
1130 the call to get since doctype is just a raw pointer.
1132 2013-09-03 Andreas Kling <akling@apple.com>
1134 ASSERTION FAILED: frame().view() == this closing a page with SVG or video
1135 <https://webkit.org/b/120645>
1137 Reviewed by Antti Koivisto.
1139 Have RenderSVGResourceContainer check if the document is being destroyed before
1140 triggering any repaints. This replaces the previous check for a null RenderView
1141 which meant basically the same thing.
1143 We could add more and better assertions to catch unnecessary work during tree
1144 teardown, but let's do that separately.
1146 * rendering/svg/RenderSVGResourceContainer.cpp:
1147 (WebCore::RenderSVGResourceContainer::markClientForInvalidation):
1149 2013-09-03 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1151 Fix uninitialized build warning in make_names.pl
1152 https://bugs.webkit.org/show_bug.cgi?id=120658
1154 Reviewed by Andreas Kling.
1156 No new tests, no behavior change.
1158 * dom/make_names.pl:
1159 (printTypeChecks): Fixed a build warning since r154965.
1161 2013-09-03 Darin Adler <darin@apple.com>
1163 Fix backwards branch in ~Node from r154967
1164 https://bugs.webkit.org/show_bug.cgi?id=120659
1166 Reviewed by Andreas Kling.
1169 (WebCore::Node::~Node): Fix backwards branch. The old code ran the code only
1170 when we did not remove the item from the table. I removed a ! from this expression
1171 after review; bad idea.
1173 2013-09-03 Enrica Casucci <enrica@apple.com>
1175 Can't select Katakana word by double-clicking.
1176 <rdar://problem/14654926>
1178 Reviewed by Alexey Proskuryakov and Ryosuke Niwa.
1180 For some languages, like Japanese we need
1181 to use more context for word breaking.
1183 New test: editing/selection/doubleclick-japanese-text.html
1185 * platform/text/TextBoundaries.h:
1186 (WebCore::requiresContextForWordBoundary):
1188 2013-09-03 Mark Lam <mark.lam@apple.com>
1190 Converting StackIterator to a callback interface.
1191 https://bugs.webkit.org/show_bug.cgi?id=120564.
1193 Reviewed by Filip Pizlo.
1197 * bindings/js/JSXMLHttpRequestCustom.cpp:
1198 (WebCore::SendFunctor::SendFunctor):
1199 (WebCore::SendFunctor::hasViableFrame):
1200 (WebCore::SendFunctor::operator()):
1201 (WebCore::JSXMLHttpRequest::send):
1202 * bindings/js/ScriptCallStackFactory.cpp:
1203 (WebCore::CreateScriptCallStackFunctor::CreateScriptCallStackFunctor):
1204 (WebCore::CreateScriptCallStackFunctor::operator()):
1205 (WebCore::createScriptCallStack):
1206 (WebCore::CreateScriptCallStackForConsoleFunctor::CreateScriptCallStackForConsoleFunctor):
1207 (WebCore::CreateScriptCallStackForConsoleFunctor::operator()):
1209 2013-09-03 Oliver Hunt <oliver@apple.com>
1211 Support structured clone of Map and Set
1212 https://bugs.webkit.org/show_bug.cgi?id=120654
1214 Reviewed by Simon Fraser.
1216 Add support for cloning Map and Set. Fairly self explanatory change.
1217 Needed to add Forwarding headers for the JSMap, JSSet and MapData classes.
1219 * ForwardingHeaders/runtime/JSMap.h: Added.
1220 * ForwardingHeaders/runtime/JSSet.h: Added.
1221 * ForwardingHeaders/runtime/MapData.h: Added.
1222 * bindings/js/SerializedScriptValue.cpp:
1223 (WebCore::CloneSerializer::isMap):
1224 (WebCore::CloneSerializer::isSet):
1225 (WebCore::CloneSerializer::startSet):
1226 (WebCore::CloneSerializer::startMap):
1227 (WebCore::CloneSerializer::serialize):
1228 (WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible):
1229 (WebCore::CloneDeserializer::deserialize):
1231 2013-09-03 Bear Travis <betravis@adobe.com>
1233 [CSS Shapes] Shape's content gets extra left offset when left-border is positive on the content box
1234 https://bugs.webkit.org/show_bug.cgi?id=117573
1236 Reviewed by David Hyatt.
1238 Nested blocks need to take into account their offset from the shape-inside container.
1239 The new code calculates the offset from the shape-inside container, then applies the
1240 offset to the computed segments. The line must be moved down by the offset's height,
1241 and each segment must be moved left by the offset's width.
1243 Test: fast/shapes/shape-inside/shape-inside-offset-block-children.html
1245 * rendering/RenderBlock.cpp:
1246 (WebCore::RenderBlock::relayoutShapeDescendantIfMoved): Relayout a block child if its
1247 new logical left would cause it to rest at a new position within a shape container.
1248 (WebCore::RenderBlock::logicalOffsetFromShapeAncestorContainer): Calculate the logical
1249 offset form a shape inside ancestor container.
1250 (WebCore::RenderBlock::layoutBlockChild): Call relayoutShapeDescendantIfMoved with the
1251 new position offset.
1252 * rendering/RenderBlock.h:
1253 * rendering/RenderBlockLineLayout.cpp:
1254 (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Use layout offset, rather
1255 than just vertical offset.
1256 (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Ditto.
1257 (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Ditto.
1258 * rendering/shapes/ShapeInsideInfo.h:
1259 (WebCore::ShapeInsideInfo::computeSegmentsForLine): Shift segments logically left when
1260 there is an inline offset.
1262 2013-09-03 Antoine Quint <graouts@apple.com>
1264 Web Inspector: exceptions triggered from console evaluation do not pause the debugger
1265 https://bugs.webkit.org/show_bug.cgi?id=120460
1267 Reviewed by Timothy Hatcher.
1269 * inspector/InjectedScriptSource.js:
1270 Explicitly set a sourceURL such that the frontend may identify injected script when
1271 processing call frames in order to hide such code from the debugger.
1273 2013-09-03 Andreas Kling <akling@apple.com>
1275 Support Vector<Ref<T>>.
1276 <https://webkit.org/b/120637>
1278 Reviewed by Antti Koivisto.
1280 Use Vector<Ref<T>> internally in Page.
1283 (WebCore::networkStateChanged):
1284 (WebCore::Page::refreshPlugins):
1286 Clean up these functions and use Vector<Ref<Frame>> to store pointers to frames
1287 since we know they are not going to be null.
1289 (WebCore::Page::pluginViews):
1291 Changed this to return a Vector<Ref<PluginView>> by value instead of passing a
1292 writable vector as an argument. Clean up loops with 'auto'.
1294 (WebCore::Page::storageBlockingStateChanged):
1295 (WebCore::Page::privateBrowsingStateChanged):
1297 Tweaked for pluginViews() returning a Vector now.
1299 (WebCore::Page::setVisibilityState):
1301 Store Documents that need a visibilitychange event in a Vector<Ref<Document>>.
1303 2013-08-28 Sergio Villar Senin <svillar@igalia.com>
1305 [CSS Grid Layout] Add parsing for named grid lines
1306 https://bugs.webkit.org/show_bug.cgi?id=119540
1308 Reviewed by Andreas Kling.
1310 From Blink r150381,r150587 by <jchaffraix@chromium.org>
1312 Adds parsing support for named grid lines at <grid-line> level,
1313 i.e., inside grid-{row|column}-{start|end}. This change covers
1314 only the parsing, layout changes coming in a follow up patch.
1316 * css/CSSComputedStyleDeclaration.cpp:
1317 (WebCore::valueForGridPosition):
1318 * css/CSSParser.cpp:
1319 (WebCore::CSSParser::parseIntegerOrStringFromGridPosition):
1320 (WebCore::CSSParser::parseGridPosition):
1322 * css/StyleResolver.cpp:
1323 (WebCore::createGridPosition):
1324 * rendering/RenderGrid.cpp:
1325 (WebCore::RenderGrid::resolveGridPositionFromStyle):
1326 * rendering/style/GridPosition.h:
1327 (WebCore::GridPosition::setExplicitPosition):
1328 (WebCore::GridPosition::setSpanPosition):
1329 (WebCore::GridPosition::integerPosition):
1330 (WebCore::GridPosition::namedGridLine):
1332 2013-09-03 Alexey Proskuryakov <ap@apple.com>
1334 [Mac] Hyphenation respects regional format settings language instead of primary language
1335 https://bugs.webkit.org/show_bug.cgi?id=120641
1337 Reviewed by Dan Bernstein.
1339 Fixes hyphenation tests on my machine with non-English regional format settings.
1341 * platform/text/cf/HyphenationCF.cpp: (createValueForNullKey):
1342 Use primary UI language for hyphenation, not regional settings language.
1344 2013-09-03 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
1346 [GTK][EFL] include missing localized strings for subtitle auto track
1347 https://bugs.webkit.org/show_bug.cgi?id=120629
1349 those methods are necessary to show the "Auto" track on webkitgtk
1351 Reviewed by Gustavo Noronha Silva.
1353 * platform/efl/LocalizedStringsEfl.cpp:
1354 (WebCore::textTrackAutomaticMenuItemText):
1355 * platform/gtk/LocalizedStringsGtk.cpp:
1356 (WebCore::textTrackAutomaticMenuItemText):
1358 2013-09-03 Daniel Bates <dabates@apple.com>
1360 Require layout when -webkit-overflow-scrolling changes
1361 https://bugs.webkit.org/show_bug.cgi?id=120535
1363 Reviewed by Darin Adler.
1365 Test: fast/repaint/overflow-scroll-touch-repaint.html
1367 We want to require a layout when the value of -webkit-overflow-scrolling changes
1368 since -webkit-overflow-scrolling creates a stacking context.
1370 * rendering/style/RenderStyle.cpp:
1371 (WebCore::RenderStyle::changeRequiresLayout):
1373 2013-09-02 Ryosuke Niwa <rniwa@webkit.org>
1375 Support the "json" responseType and JSON response entity in XHR
1376 https://bugs.webkit.org/show_bug.cgi?id=73648
1378 Reviewed by Oliver Hunt.
1380 Based on the patch written by Jarred Nicholls.
1382 Implement 'json' type for XMLHttpRequest.response. We cache the result on JSC side as a cached attribute
1383 unlike other response types like 'document' and 'blob' for which the parsed response object is cached
1384 in XMLHttpRequest itself. In the long run, we should do the same for other types of response types.
1386 Also refactored the various code to share the code.
1388 Tests: fast/xmlhttprequest/xmlhttprequest-responsetype-json-invalid.html
1389 fast/xmlhttprequest/xmlhttprequest-responsetype-json-utf16.html
1390 fast/xmlhttprequest/xmlhttprequest-responsetype-json-valid.html
1392 * ForwardingHeaders/runtime/JSONObject.h: Added.
1394 * bindings/js/JSXMLHttpRequestCustom.cpp:
1395 (WebCore::JSXMLHttpRequest::visitChildren):
1396 (WebCore::JSXMLHttpRequest::response): Use JSONParse to parse the response text and cache the result.
1397 Call didCacheResponseJSON to set the cache status and clear the original response buffer.
1399 * xml/XMLHttpRequest.cpp:
1400 (WebCore::XMLHttpRequest::XMLHttpRequest): Added m_responseCacheIsValid to invalidate the cache of
1402 (WebCore::XMLHttpRequest::responseText):
1403 (WebCore::XMLHttpRequest::didCacheResponseJSON): Added; Updates m_responseCacheIsValid and clears the
1404 response buffer to save memory.
1405 (WebCore::XMLHttpRequest::responseXML):
1406 (WebCore::XMLHttpRequest::setResponseType):
1407 (WebCore::XMLHttpRequest::responseType):
1408 (WebCore::XMLHttpRequest::clearResponseBuffers):
1409 (WebCore::XMLHttpRequest::didReceiveData):
1411 * xml/XMLHttpRequest.h:
1412 (WebCore::XMLHttpRequest::doneWithoutErrors): Extracted from responseXML.
1413 (WebCore::XMLHttpRequest::responseTextIgnoringResponseType): Extracted from responseText.
1414 (WebCore::XMLHttpRequest::responseCacheIsValid): Added.
1415 (WebCore::XMLHttpRequest::shouldDecodeResponse): Extracted from didReceiveData.
1416 Also modified to decode when the response type is ResponseTypeJSON.
1418 * xml/XMLHttpRequest.idl: Added CachedAttribute IDL extention on response property. This cache is
1419 used when the response type is 'json'.
1421 2013-09-03 Commit Queue <commit-queue@webkit.org>
1423 Unreviewed, rolling out r154881.
1424 http://trac.webkit.org/changeset/154881
1425 https://bugs.webkit.org/show_bug.cgi?id=120643
1427 Crashes on macworld.com (Requested by kling on #webkit).
1430 (WebCore::Element::setAttributeInternal):
1432 2013-09-03 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
1434 [GStreamer] Don't set state to NULL until element is destroyed
1435 https://bugs.webkit.org/show_bug.cgi?id=117354
1437 Reviewed by Philippe Normand.
1439 Don't set playbin to NULL until it is going to be destroyed or if we stay
1440 for too long on the READY state. Instead only set the state to READY as this
1441 allows much faster state changes to PAUSED/PLAYING again. playbin internally
1442 caches some state that is destroyed when setting it to NULL.
1443 This state is independent of the URI and it is even possible to change the
1446 To avoid having resources (e.g. audio devices) open indefinitely,
1447 when setting the state to READY we create a timeout and if the timeout
1448 is reached we reset the pipeline state to NULL to free resources.
1450 Also now all state changes use the changePipelineState method instead of setting
1451 the playbin state directly with gst_element_set_state, so we have a better control
1452 of when we are requesting state changes.
1454 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1455 (WebCore::mediaPlayerPrivateReadyStateTimeoutCallback):
1456 (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1457 (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1458 (WebCore::MediaPlayerPrivateGStreamer::commitLoad):
1459 (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
1460 (WebCore::MediaPlayerPrivateGStreamer::setRate):
1461 (WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult):
1462 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1464 2013-09-03 peavo@outlook.com <peavo@outlook.com>
1466 [WinCairo] Unneeded code in method GlyphPage::fill().
1467 https://bugs.webkit.org/show_bug.cgi?id=120634
1469 Reviewed by Andreas Kling.
1471 * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
1472 (WebCore::GlyphPage::fill): Remove unneeded call to GetTextMetrics() function.
1474 2013-09-03 Mihnea Ovidenie <mihnea@adobe.com>
1476 [CSSRegions] Pseudo-elements as regions should not be exposed to JS
1477 https://bugs.webkit.org/show_bug.cgi?id=120633
1479 Reviewed by Andreas Kling.
1481 Until we properly implement the Region interface (http://dev.w3.org/csswg/css-regions/#the-region-interface)
1482 for pseudo-elements, we should not return these as regions in JS.
1484 Tests: fast/regions/get-regions-by-content-pseudo.html
1485 fast/regions/webkit-named-flow-get-regions-pseudo.html
1487 * dom/WebKitNamedFlow.cpp:
1488 (WebCore::WebKitNamedFlow::firstEmptyRegionIndex): Skip pseudo-elements as regions here too,
1489 otherwise we may get an index that cannot be used with getRegions().
1490 (WebCore::WebKitNamedFlow::getRegionsByContent):
1491 (WebCore::WebKitNamedFlow::getRegions):
1493 2013-09-03 Zan Dobersek <zdobersek@igalia.com>
1495 REGRESSION(r154967): http appcache tests crashing on WK1
1496 https://bugs.webkit.org/show_bug.cgi?id=120620
1498 Reviewed by Andreas Kling.
1500 * loader/appcache/ApplicationCacheGroup.cpp:
1501 (WebCore::ApplicationCacheGroup::cacheDestroyed): Reintroduce pre-r154967 behavior that returned early in
1502 this method if the passed-in ApplicationCache object was not found in the ApplicationCacheGroup's HashSet
1503 of all the caches. This is now done by checking that the HashSet<T>::remove(T) returns true (meaning the
1504 object was found in the HashSet and removed from it) in addition to that HashSet being subsequently empty
1505 before the method moves on to destroying its ApplicationCacheGroup instance.
1507 2013-09-03 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
1509 [gstreamer] Disable HTTP request "Accept-Encoding:" header field on gstreamer source element to avoid receiving the wrong size when retrieving data
1510 https://bugs.webkit.org/show_bug.cgi?id=115354
1512 Reviewed by Philippe Normand.
1514 Also disable Accept-Encoding on ResourceRequest::toSoupMessage accordingly.
1516 * platform/network/soup/ResourceRequestSoup.cpp:
1517 (WebCore::ResourceRequest::toSoupMessage):
1518 Call ResourceRequest::updateSoupMessage from ResourceRequest::toSoupMessage so that the
1519 Accept-Encoding header is also respected.
1521 2013-09-03 Krzysztof Czech <k.czech@samsung.com>
1523 [AX][ATK] Added support for sort and help attributes.
1524 https://bugs.webkit.org/show_bug.cgi?id=120456
1526 Reviewed by Chris Fleizach.
1528 Added support for aria-sort and aria-help attributes.
1530 Test: accessibility/aria-sort.html
1532 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1533 (webkitAccessibleGetAttributes):
1535 2013-09-03 Allan Sandfeld Jensen <allan.jensen@digia.com>
1537 [Qt] Remove dead code for QtXmlPatterns
1538 https://bugs.webkit.org/show_bug.cgi?id=120624
1540 Reviewed by Simon Hausmann.
1542 Remove code supporting XSLT using QtXmlPatterns which has been
1547 * dom/TransformSourceQt.cpp: Removed.
1548 * xml/XSLStyleSheetQt.cpp: Removed.
1549 * xml/XSLTProcessorQt.cpp: Removed.
1550 * xml/parser/XMLDocumentParserQt.cpp:
1551 (WebCore::XMLDocumentParser::doEnd):
1552 (WebCore::XMLDocumentParser::parseProcessingInstruction):
1554 2013-09-03 Mihnea Ovidenie <mihnea@adobe.com>
1556 [CSS Regions] position: fixed is computed relative to the first region, not the viewport
1557 https://bugs.webkit.org/show_bug.cgi?id=111176
1559 Reviewed by David Hyatt.
1561 Fixed positioned elements inside a named flow should be positioned and sized relative to the viewport,
1562 not on the first region, as described in the spec: http://dev.w3.org/csswg/css-regions/#the-flow-into-property.
1563 While the flow thread will still act as containing block for the fixed positioned elements, the painting and hit
1564 testing for the fixed positioned elements is done by RenderView. The layers for the fixed positioned elements
1565 are collected by the flow thread.
1567 Tests: fast/regions/element-in-named-flow-absolute-from-fixed.html
1568 fast/regions/element-in-named-flow-fixed-from-absolute.html
1569 fast/regions/element-inflow-fixed-from-outflow-static.html
1570 fast/regions/element-outflow-static-from-inflow-fixed.html
1571 fast/regions/fixed-element-transformed-parent.html
1572 fast/regions/fixed-in-named-flow-scroll.html
1573 fast/regions/fixed-inside-fixed-in-named-flow.html
1574 fast/regions/fixed-inside-named-flow-zIndex.html
1575 fast/regions/fixed-pos-elem-in-namedflow-noregions.html
1576 fast/regions/fixed-pos-region-in-nested-flow.html
1578 * rendering/FlowThreadController.cpp:
1579 (WebCore::FlowThreadController::collectFixedPositionedLayers):
1580 Return the list of layers for the fixed positioned elements with named flows as containing blocks.
1581 Used in RenderLayer:: paintFixedLayersInNamedFlows and RenderLayer:: hitTestFixedLayersInNamedFlows.
1582 * rendering/FlowThreadController.h:
1583 * rendering/RenderBox.cpp:
1584 (WebCore::RenderBox::mapLocalToContainer):
1585 (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
1586 (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
1587 For fixed positioned elements, width and height are given by the view instead of the first region.
1588 * rendering/RenderLayer.cpp:
1589 (WebCore::accumulateOffsetTowardsAncestor):
1590 Modified for the fixed positioned elements inside named flows with the named flows as containing block
1591 to take into account the view scroll.
1592 (WebCore::compareZIndex):
1593 Moved upwards because it is used in RenderLayer::paintFixedLayersInNamedFlows.
1594 (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
1595 Paint the list of fixed layers directly from the RenderView instead of painting them through regions -> named flows.
1596 (WebCore::RenderLayer::paintLayerContents):
1597 (WebCore::RenderLayer::paintList):
1598 (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
1599 Hit test the layers for the fix positioned elements inside named flows from the RenderView layer
1600 instead of the region -> named flow layer.
1601 (WebCore::RenderLayer::hitTestLayer):
1602 (WebCore::RenderLayer::calculateRects):
1603 * rendering/RenderLayer.h:
1604 * rendering/RenderLayerCompositor.cpp:
1605 (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
1606 We do not support yet the accelerated compositing for elements in named flows,
1607 so bail out early here. We need to revisit fixed elements once we finish accelerated compositing for elements in named flows.
1608 * rendering/RenderObject.cpp:
1609 (WebCore::RenderObject::fixedPositionedWithNamedFlowContainingBlock):
1610 (WebCore::hasFixedPosInNamedFlowContainingBlock):
1611 (WebCore::RenderObject::containerForRepaint):
1612 Changed to take into account that RenderView should be the repaintContainer for the
1613 fixed positioned elements with named flow as the containing block.
1614 * rendering/RenderObject.h:
1616 2013-09-03 Arvid Nilsson <anilsson@rim.com>
1618 [BlackBerry] Remove LayerData::LayerProgram
1619 https://bugs.webkit.org/show_bug.cgi?id=120601
1621 Reviewed by Anders Carlsson.
1624 All layer contents are RGBA now, so there's no need to support BGRA any
1625 more and the LayerData::LayerProgram enum can be removed. Related dead
1628 No new tests, no change in behavior.
1630 * platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp:
1631 (WebCore::EGLImageLayerWebKitThread::EGLImageLayerWebKitThread):
1632 * platform/graphics/blackberry/LayerData.h:
1633 (WebCore::LayerData::LayerData):
1634 * platform/graphics/blackberry/LayerRenderer.cpp:
1635 (WebCore::LayerRenderer::compositeLayersRecursive):
1636 (WebCore::LayerRenderer::createProgram):
1637 * platform/graphics/blackberry/LayerRenderer.h:
1638 * platform/graphics/blackberry/LayerWebKitThread.h:
1639 * platform/graphics/blackberry/PluginLayerWebKitThread.cpp:
1640 (WebCore::PluginLayerWebKitThread::setPluginView):
1642 2013-09-03 Xabier Rodriguez Calvar <calvaris@igalia.com>
1644 [GStreamer] Video player sets system volume to 100%
1645 https://bugs.webkit.org/show_bug.cgi?id=118974
1647 Reviewed by Philippe Normand.
1649 In order to preserve the system volume we need to keep track of
1650 the volume being initialized in the HTMLMediaElement and then just
1651 setting the volume to the sink when initializing the pipeline if
1652 that volume was changed before.
1654 * html/HTMLMediaElement.cpp:
1655 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialized
1657 (WebCore::HTMLMediaElement::setVolume): Set the attribute to true
1658 when volume is changed.
1659 (WebCore::HTMLMediaElement::updateVolume): Set the volume only if
1660 volume was initialized.
1661 (WebCore::HTMLMediaElement::mediaPlayerPlatformVolumeConfigurationRequired):
1662 Platform volume configuration is required only if volume was not
1664 * html/HTMLMediaElement.h: Added attribute and interface method.
1665 * platform/graphics/MediaPlayer.h:
1666 (WebCore::MediaPlayerClient::mediaPlayerPlatformVolumeConfigurationRequired):
1667 Declared and added default implementation for the interface method.
1668 (WebCore::MediaPlayer::platformVolumeConfigurationRequired):
1669 Asked the client, meaning the HTMLMediaElement if the platform
1670 volume configuration is required.
1671 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1672 (WebCore::mediaPlayerPrivateVolumeChangedCallback): Added log.
1673 (WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Added log.
1674 (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
1675 Set the volume only if not platform volume is required and added log.
1677 2013-09-02 Darin Adler <darin@apple.com>
1679 * inspector/InspectorProfilerAgent.cpp:
1680 (WebCore::InspectorProfilerAgent::removeProfile): Fix braces here; a review
1681 comment I forgot to address in my last check-in.
1683 2013-09-02 Darin Adler <darin@apple.com>
1685 Cut down on double hashing and code needlessly using hash table iterators
1686 https://bugs.webkit.org/show_bug.cgi?id=120611
1688 Reviewed by Andreas Kling.
1690 Some of these changes are primarily code cleanup, but others could provide
1691 a small code size and speed improvement by avoiding extra hashing.
1693 * Modules/geolocation/Geolocation.cpp:
1694 (WebCore::Geolocation::Watchers::find): Use get instead of find.
1695 (WebCore::Geolocation::Watchers::remove): Use take instead of find.
1696 (WebCore::Geolocation::makeCachedPositionCallbacks): Use the return
1697 value from remove to avoid hashing twice.
1699 * Modules/webaudio/AudioContext.cpp:
1700 (WebCore::AudioContext::addAutomaticPullNode): Use the return value from
1701 add to avoid hashing twice.
1702 (WebCore::AudioContext::removeAutomaticPullNode): Use the return value
1703 from remove to avoid hashing twice.
1705 * Modules/webaudio/AudioNodeInput.cpp:
1706 (WebCore::AudioNodeInput::connect): Use the return value from add to avoid
1708 (WebCore::AudioNodeInput::disconnect): Use the return value from remove
1709 to avoid hashing twice.
1711 * Modules/webaudio/AudioParam.cpp:
1712 (WebCore::AudioParam::connect): Use the return value from add to avoid
1714 (WebCore::AudioParam::disconnect): Use the return value from remove to
1715 avoid hashing twice.
1717 * bridge/NP_jsobject.cpp:
1718 (ObjectMap::remove): Use remove instead of find/remove.
1721 (WebCore::Node::~Node): Use the return value from remove instead of
1724 * inspector/InspectorProfilerAgent.cpp:
1725 (WebCore::InspectorProfilerAgent::removeProfile): Remove needless
1728 * loader/DocumentLoader.cpp:
1729 (WebCore::DocumentLoader::removeSubresourceLoader): Use the return
1730 value from remove instead of find/remove.
1732 * loader/ResourceLoadScheduler.cpp:
1733 (WebCore::ResourceLoadScheduler::HostInformation::remove): Use the
1734 return value from remove to avoid hashing twice.
1736 * loader/appcache/ApplicationCacheGroup.cpp:
1737 (WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Use
1738 remove instead of find/remove.
1739 (WebCore::ApplicationCacheGroup::cacheDestroyed): Removed a needless
1740 call to contains to avoid hashing twice. It's fine to do the check
1741 for an empty hash table unconditionally.
1743 * page/DOMWindow.cpp:
1744 (WebCore::addUnloadEventListener): Eliminated a local variable for clarity.
1745 (WebCore::removeUnloadEventListener): Ditto. Also use remove instead
1747 (WebCore::removeAllUnloadEventListeners): Ditto. Also use removeAll instead
1749 (WebCore::addBeforeUnloadEventListener): Ditto.
1750 (WebCore::removeBeforeUnloadEventListener): Ditto.
1751 (WebCore::removeAllBeforeUnloadEventListeners): Ditto.
1753 * page/FrameView.cpp:
1754 (WebCore::FrameView::removeViewportConstrainedObject): Use the return
1755 value from remove to avoid hashing twice.
1756 (WebCore::FrameView::removeScrollableArea): Use the return value from
1757 remove instead of find/remove.
1758 (WebCore::FrameView::containsScrollableArea): Use && instead of an if
1759 statement in a way that is idiomatic for this kind of function.
1762 (WebCore::Page::addRelevantRepaintedObject): Use the return value from
1763 remove instead of find/remove.
1765 * page/PageGroup.cpp:
1766 (WebCore::PageGroup::removeUserScriptsFromWorld): Use remove instead
1768 (WebCore::PageGroup::removeUserStyleSheetsFromWorld): Use the return
1769 value from remove instead of find/remove.
1771 * page/PerformanceUserTiming.cpp:
1772 (WebCore::clearPeformanceEntries): Removed a needless call to contains.
1774 * platform/graphics/DisplayRefreshMonitor.cpp:
1775 (WebCore::DisplayRefreshMonitor::removeClient): Use the return value
1776 from remove instead of find/remove.
1777 (WebCore::DisplayRefreshMonitorManager::displayDidRefresh): Use remove
1778 instead of find/remove.
1780 * platform/graphics/blackberry/LayerRenderer.cpp:
1781 (WebCore::LayerRenderer::removeLayer): Use the return value from remove
1782 instead of find/remove.
1784 * platform/win/WindowMessageBroadcaster.cpp:
1785 (WebCore::WindowMessageBroadcaster::removeListener): Use remove instead
1786 of find/remove. It's fine to do the check for an empty hash table unconditionally.
1788 * plugins/PluginDatabase.cpp:
1789 (WebCore::PluginDatabase::removeDisabledPluginFile): Use the return value
1790 from remove instead of find/remove.
1792 * rendering/style/StyleCustomFilterProgramCache.cpp:
1793 (WebCore::StyleCustomFilterProgramCache::lookup): Use get instead of find.
1794 (WebCore::StyleCustomFilterProgramCache::add): Use contains instead of find
1796 (WebCore::StyleCustomFilterProgramCache::remove): Use remove instead of
1799 * svg/SVGCursorElement.cpp:
1800 (WebCore::SVGCursorElement::removeClient): Use the return value from remove
1801 instead of find/remove.
1803 * svg/SVGDocumentExtensions.cpp:
1804 (WebCore::SVGDocumentExtensions::removeResource): Removed an unneeded call
1806 (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): Use
1807 remove instead of find/remove. It's fine to do the check for an empty hash
1808 table unconditionally.
1809 (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Use
1810 remove instead of find/remove. Also removed unhelpful assertions. One is
1811 already done by HashMap, and the other is just checking a basic invariant
1812 of every HashMap that doesn't need to be checked.
1814 * svg/graphics/SVGImageCache.cpp:
1815 (WebCore::SVGImageCache::removeClientFromCache): Removed an unneeded call
1818 * svg/properties/SVGAnimatedProperty.cpp:
1819 (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty): Use the version of
1820 remove that takes an iterator rather than the one that takes a key, so
1821 we don't need to redo the hashing.
1823 2013-09-02 Andreas Kling <akling@apple.com>
1825 Generate isFooElement() functions from tagname data.
1826 <https://webkit.org/b/120584>
1828 Reviewed by Antti Koivisto.
1830 Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
1831 If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
1832 This also outputs an isElementOfType<T> check for the Element iterators.
1834 Removed all the hand-written isFooElement() functions that only checked tag name.
1836 * html/HTMLTagNames.in:
1839 Added "generateTypeChecks" attribute as appropriate.
1842 * GNUmakefile.list.am:
1843 * WebCore.vcxproj/WebCore.vcxproj:
1844 * WebCore.xcodeproj/project.pbxproj:
1846 Added to build systems based on how HTMLNames.h was done.
1847 We're just outputting an additional header file in the generated code directory
1848 so I suspect most ports will just pick this up automagically.
1850 * dom/make_names.pl:
1851 (defaultTagPropertyHash):
1852 (printLicenseHeader):
1854 (printTypeChecksHeaderFile):
1856 Generate a separate file for each namespace with isFooElement() helpers for
1857 elements with "generateTypeChecks" attribute set.
1859 2013-09-02 Darin Adler <darin@apple.com>
1861 [Mac] No need for HardAutorelease, which is same as CFBridgingRelease
1862 https://bugs.webkit.org/show_bug.cgi?id=120569
1864 Reviewed by Andy Estes.
1866 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1867 (AXTextMarkerRange):
1868 (AXTextMarkerRangeStart):
1869 (AXTextMarkerRangeEnd):
1870 (textMarkerForVisiblePosition):
1871 Use CFBridgingRelease.
1873 * platform/mac/KURLMac.mm:
1874 (WebCore::KURL::operator NSURL *): Use CFBridgingRelease.
1875 (WebCore::KURL::createCFURL): Get rid of needless local variable.
1877 * platform/mac/WebCoreNSURLExtras.mm:
1878 (WebCore::mapHostNameWithRange):
1879 (WebCore::URLWithData):
1880 (WebCore::userVisibleString):
1881 * platform/text/mac/StringImplMac.mm:
1882 (WTF::StringImpl::operator NSString *):
1883 Use CFBridgingRelease.
1885 2013-09-01 Andreas Kling <akling@apple.com>
1887 Ref: A smart pointer for the reference age.
1888 <https://webkit.org/b/120570>
1890 Reviewed by Antti Koivisto.
1892 Use Ref<T> for various stack guards where null checking isn't needed.
1894 2013-09-02 Andreas Kling <akling@apple.com>
1896 Simplify DocumentType handling.
1897 <https://webkit.org/b/120529>
1899 Reviewed by Antti Koivisto.
1901 Removed the insertedInto()/removedFrom() handlers from DocumentType.
1903 Document no longer keeps a pointer to its doctype node, it was only used for the
1904 document.doctype DOM API, which now just looks through the list of (<=2) children.
1906 The ENABLE(LEGACY_VIEWPORT_ADAPTION) hunk from Document::setDocType() was moved
1907 into Document::childrenChanged().
1909 We no longer clear the style resolver on doctype insertion/removal since it
1910 doesn't actually affect style anyway.
1912 Also made doctype() return a PassRefPtr<DocumentType> instead of a raw pointer.
1915 (WebCore::Document::dispose):
1916 (WebCore::Document::doctype):
1917 (WebCore::Document::childrenChanged):
1919 * dom/DocumentType.cpp:
1920 * dom/DocumentType.h:
1921 * editing/markup.cpp:
1922 (WebCore::documentTypeString):
1924 2013-09-02 Anton Obzhirov <a.obzhirov@samsung.com>
1926 <https://webkit.org/b/98350> [GTK] accessibility/aria-invalid.html times out
1928 Reviewed by Mario Sanchez Prada.
1930 The patch exposes aria-invalid attribute to ATK.
1932 * accessibility/atk/AXObjectCacheAtk.cpp:
1933 (WebCore::AXObjectCache::postPlatformNotification):
1934 Added emitting state-change signal for aria-invalid event.
1935 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1936 (webkitAccessibleGetAttributes):
1937 Added aria-invalid attribute.
1939 2013-09-02 Commit Queue <commit-queue@webkit.org>
1941 Unreviewed, rolling out r154955.
1942 http://trac.webkit.org/changeset/154955
1943 https://bugs.webkit.org/show_bug.cgi?id=120605
1945 broke xcode4 build :| (Requested by kling on #webkit).
1948 * GNUmakefile.list.am:
1949 * WebCore.vcxproj/WebCore.vcxproj:
1950 * WebCore.xcodeproj/project.pbxproj:
1951 * dom/make_names.pl:
1952 (defaultTagPropertyHash):
1953 (printLicenseHeader):
1954 * html/HTMLAnchorElement.h:
1955 (WebCore::isHTMLAnchorElement):
1956 (WebCore::HTMLAnchorElement):
1957 * html/HTMLAreaElement.h:
1958 (WebCore::isHTMLAreaElement):
1959 (WebCore::HTMLAreaElement):
1960 * html/HTMLAudioElement.h:
1961 (WebCore::isHTMLAudioElement):
1962 * html/HTMLBaseElement.h:
1963 (WebCore::isHTMLBaseElement):
1964 (WebCore::HTMLBaseElement):
1965 * html/HTMLCanvasElement.h:
1966 (WebCore::isHTMLCanvasElement):
1967 * html/HTMLElement.h:
1968 * html/HTMLFieldSetElement.h:
1969 (WebCore::isHTMLFieldSetElement):
1970 (WebCore::HTMLFieldSetElement):
1971 * html/HTMLFormElement.h:
1972 (WebCore::isHTMLFormElement):
1973 * html/HTMLFrameSetElement.h:
1974 (WebCore::isHTMLFrameSetElement):
1975 (WebCore::HTMLFrameSetElement):
1976 * html/HTMLImageElement.h:
1977 (WebCore::isHTMLImageElement):
1978 * html/HTMLInputElement.h:
1979 (WebCore::isHTMLInputElement):
1980 * html/HTMLLabelElement.h:
1981 (WebCore::isHTMLLabelElement):
1982 (WebCore::HTMLLabelElement):
1983 * html/HTMLLegendElement.h:
1984 (WebCore::isHTMLLegendElement):
1985 (WebCore::HTMLLegendElement):
1986 * html/HTMLMapElement.h:
1987 (WebCore::isHTMLMapElement):
1988 * html/HTMLMeterElement.h:
1989 (WebCore::isHTMLMeterElement):
1990 * html/HTMLOptGroupElement.h:
1991 (WebCore::isHTMLOptGroupElement):
1992 * html/HTMLOptionElement.h:
1993 (WebCore::isHTMLOptionElement):
1994 * html/HTMLParamElement.h:
1995 (WebCore::isHTMLParamElement):
1996 (WebCore::HTMLParamElement):
1997 * html/HTMLProgressElement.h:
1998 (WebCore::isHTMLProgressElement):
1999 * html/HTMLScriptElement.h:
2000 (WebCore::isHTMLScriptElement):
2001 * html/HTMLSourceElement.h:
2002 (WebCore::isHTMLSourceElement):
2003 (WebCore::HTMLSourceElement):
2004 * html/HTMLStyleElement.h:
2005 (WebCore::isHTMLStyleElement):
2006 (WebCore::HTMLStyleElement):
2007 * html/HTMLTableElement.h:
2008 (WebCore::isHTMLTableElement):
2009 * html/HTMLTableRowElement.h:
2010 (WebCore::isHTMLTableRowElement):
2011 (WebCore::HTMLTableRowElement):
2012 * html/HTMLTagNames.in:
2013 * html/HTMLTextAreaElement.h:
2014 (WebCore::isHTMLTextAreaElement):
2015 * html/HTMLTitleElement.h:
2016 (WebCore::isHTMLTitleElement):
2017 (WebCore::HTMLTitleElement):
2018 * html/HTMLTrackElement.h:
2019 (WebCore::isHTMLTrackElement):
2020 (WebCore::HTMLTrackElement):
2022 * svg/SVGFontElement.h:
2023 (WebCore::isSVGFontElement):
2024 * svg/SVGFontFaceElement.h:
2025 (WebCore::isSVGFontFaceElement):
2026 (WebCore::SVGFontFaceElement):
2027 * svg/SVGForeignObjectElement.h:
2028 (WebCore::isSVGForeignObjectElement):
2029 (WebCore::SVGForeignObjectElement):
2030 * svg/SVGImageElement.h:
2031 (WebCore::isSVGImageElement):
2032 * svg/SVGScriptElement.h:
2033 (WebCore::isSVGScriptElement):
2036 2013-09-02 Antti Koivisto <antti@apple.com>
2038 Clean up ContainerNode::childrenChanged
2039 https://bugs.webkit.org/show_bug.cgi?id=120599
2041 Reviewed by Andreas Kling.
2043 - Make childrenChanged take a single struct argument instead of a long list of arguments.
2044 - Use enum instead of childCountDelta. It was always -1, 0, 1 or the total number of children (in case of removing them all).
2045 - Remove use of Node*, give the change range as Elements.
2049 (WebCore::Attr::childrenChanged):
2051 * dom/CharacterData.cpp:
2052 (WebCore::CharacterData::parserAppendData):
2053 (WebCore::CharacterData::dispatchModifiedEvent):
2054 * dom/ContainerNode.cpp:
2055 (WebCore::ContainerNode::insertBefore):
2056 (WebCore::ContainerNode::notifyChildInserted):
2057 (WebCore::ContainerNode::notifyChildRemoved):
2059 Add private helpers for setting up the struct.
2061 (WebCore::ContainerNode::parserInsertBefore):
2062 (WebCore::ContainerNode::replaceChild):
2063 (WebCore::ContainerNode::removeChild):
2064 (WebCore::ContainerNode::parserRemoveChild):
2065 (WebCore::ContainerNode::removeChildren):
2066 (WebCore::ContainerNode::appendChild):
2067 (WebCore::ContainerNode::parserAppendChild):
2068 (WebCore::ContainerNode::childrenChanged):
2069 (WebCore::ContainerNode::updateTreeAfterInsertion):
2070 * dom/ContainerNode.h:
2072 (WebCore::Document::childrenChanged):
2075 (WebCore::checkForSiblingStyleChanges):
2077 Clean up and simplify. Since we now get element range automatically we don't need to compute it.
2079 (WebCore::Element::childrenChanged):
2080 (WebCore::Element::finishParsingChildren):
2082 * dom/ShadowRoot.cpp:
2083 (WebCore::ShadowRoot::childrenChanged):
2085 * html/HTMLElement.cpp:
2086 (WebCore::HTMLElement::childrenChanged):
2087 (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
2089 Try to keep the existing behavior. This code needs more cleanup to be sane. It shouldn't operate on Nodes
2090 as it only really cares about Elements.
2092 * html/HTMLElement.h:
2093 * html/HTMLFieldSetElement.cpp:
2094 (WebCore::HTMLFieldSetElement::childrenChanged):
2095 * html/HTMLFieldSetElement.h:
2096 * html/HTMLObjectElement.cpp:
2097 (WebCore::HTMLObjectElement::childrenChanged):
2098 * html/HTMLObjectElement.h:
2099 * html/HTMLOptGroupElement.cpp:
2100 (WebCore::HTMLOptGroupElement::childrenChanged):
2101 * html/HTMLOptGroupElement.h:
2102 * html/HTMLOptionElement.cpp:
2103 (WebCore::HTMLOptionElement::childrenChanged):
2104 * html/HTMLOptionElement.h:
2105 * html/HTMLOutputElement.cpp:
2106 (WebCore::HTMLOutputElement::childrenChanged):
2107 * html/HTMLOutputElement.h:
2108 * html/HTMLScriptElement.cpp:
2109 (WebCore::HTMLScriptElement::childrenChanged):
2110 * html/HTMLScriptElement.h:
2111 * html/HTMLSelectElement.cpp:
2112 (WebCore::HTMLSelectElement::childrenChanged):
2113 * html/HTMLSelectElement.h:
2114 * html/HTMLStyleElement.cpp:
2115 (WebCore::HTMLStyleElement::childrenChanged):
2116 * html/HTMLStyleElement.h:
2117 * html/HTMLTextAreaElement.cpp:
2118 (WebCore::HTMLTextAreaElement::childrenChanged):
2119 * html/HTMLTextAreaElement.h:
2120 * html/HTMLTitleElement.cpp:
2121 (WebCore::HTMLTitleElement::childrenChanged):
2122 * html/HTMLTitleElement.h:
2123 * html/shadow/InsertionPoint.cpp:
2124 (WebCore::InsertionPoint::childrenChanged):
2125 * html/shadow/InsertionPoint.h:
2126 * svg/SVGClipPathElement.cpp:
2127 (WebCore::SVGClipPathElement::childrenChanged):
2128 * svg/SVGClipPathElement.h:
2129 * svg/SVGElement.cpp:
2130 (WebCore::SVGElement::childrenChanged):
2132 * svg/SVGFELightElement.cpp:
2133 (WebCore::SVGFELightElement::childrenChanged):
2134 * svg/SVGFELightElement.h:
2135 * svg/SVGFilterElement.cpp:
2136 (WebCore::SVGFilterElement::childrenChanged):
2137 * svg/SVGFilterElement.h:
2138 * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2139 (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
2140 * svg/SVGFilterPrimitiveStandardAttributes.h:
2141 * svg/SVGFontFaceElement.cpp:
2142 (WebCore::SVGFontFaceElement::childrenChanged):
2143 * svg/SVGFontFaceElement.h:
2144 * svg/SVGFontFaceFormatElement.cpp:
2145 (WebCore::SVGFontFaceFormatElement::childrenChanged):
2146 * svg/SVGFontFaceFormatElement.h:
2147 * svg/SVGFontFaceSrcElement.cpp:
2148 (WebCore::SVGFontFaceSrcElement::childrenChanged):
2149 * svg/SVGFontFaceSrcElement.h:
2150 * svg/SVGFontFaceUriElement.cpp:
2151 (WebCore::SVGFontFaceUriElement::childrenChanged):
2152 * svg/SVGFontFaceUriElement.h:
2153 * svg/SVGGradientElement.cpp:
2154 (WebCore::SVGGradientElement::childrenChanged):
2155 * svg/SVGGradientElement.h:
2156 * svg/SVGMarkerElement.cpp:
2157 (WebCore::SVGMarkerElement::childrenChanged):
2158 * svg/SVGMarkerElement.h:
2159 * svg/SVGMaskElement.cpp:
2160 (WebCore::SVGMaskElement::childrenChanged):
2161 * svg/SVGMaskElement.h:
2162 * svg/SVGPatternElement.cpp:
2163 (WebCore::SVGPatternElement::childrenChanged):
2164 * svg/SVGPatternElement.h:
2165 * svg/SVGScriptElement.cpp:
2166 (WebCore::SVGScriptElement::childrenChanged):
2167 * svg/SVGScriptElement.h:
2168 * svg/SVGStyleElement.cpp:
2169 (WebCore::SVGStyleElement::childrenChanged):
2170 * svg/SVGStyleElement.h:
2171 * svg/SVGTitleElement.cpp:
2172 (WebCore::SVGTitleElement::childrenChanged):
2173 * svg/SVGTitleElement.h:
2175 2013-09-02 Andreas Kling <akling@apple.com>
2177 Generate isFooElement() functions from tagname data.
2178 <https://webkit.org/b/120584>
2180 Reviewed by Antti Koivisto.
2182 Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
2183 If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
2184 This also outputs an isElementOfType<T> check for the Element iterators.
2186 Removed all the hand-written isFooElement() functions that only checked tag name.
2188 * html/HTMLTagNames.in:
2191 Added "generateTypeChecks" attribute as appropriate.
2194 * GNUmakefile.list.am:
2195 * WebCore.vcxproj/WebCore.vcxproj:
2196 * WebCore.xcodeproj/project.pbxproj:
2198 Added to build systems based on how HTMLNames.h was done.
2199 We're just outputting an additional header file in the generated code directory
2200 so I suspect most ports will just pick this up automagically.
2202 * dom/make_names.pl:
2203 (defaultTagPropertyHash):
2204 (printLicenseHeader):
2206 (printTypeChecksHeaderFile):
2208 Generate a separate file for each namespace with isFooElement() helpers for
2209 elements with "generateTypeChecks" attribute set.
2211 2013-09-02 Dirk Schulze <krit@webkit.org>
2213 Use edgeMode=duplicate for blurring on filter() function
2214 https://bugs.webkit.org/show_bug.cgi?id=120590
2216 Reviewed by Antti Koivisto.
2218 Filters on the CSS Image function filter() are not allowed to extend the
2219 dimension of the input image. This causes weird results on blurring an image,
2220 where the fading on the edges is clipped at the half of the fading.
2221 We shouldn't fade edges at all and use the edgeMode=duplicate instead.
2222 This will duplicate the pixel value on the nearest edge of the input image
2223 instead of taking transparent black and results in nice blurred images with
2226 Spec: http://dev.w3.org/fxtf/filters/#blurEquivalent
2228 Test: fast/filter-image/filter-image-blur.html
2230 * css/CSSFilterImageValue.cpp: Pass consumer information to the renderer.
2231 (WebCore::CSSFilterImageValue::image):
2232 * rendering/FilterEffectRenderer.cpp: Set edgeMode for feGaussianBlur to
2233 'duplicate' or 'none' depending on the consumer.
2234 (WebCore::FilterEffectRenderer::build):
2235 * rendering/FilterEffectRenderer.h: Add enumeration to differ between the
2236 different consumers of the renderer.
2237 * rendering/RenderLayer.cpp:
2238 (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Pass consumer
2239 information to the renderer.
2241 2013-09-01 Dirk Schulze <krit@webkit.org>
2243 Add 'edgeMode' attribute to SVGFEGaussianBlur
2244 https://bugs.webkit.org/show_bug.cgi?id=120582
2246 Add 'edgeMode' attribute to the SVGFEGaussianBlur element. This attribute
2247 allows users to define the behavior on edges with the values 'none' where
2248 pixel values outside the input image are treated as transparent black. (The
2249 current blurring behavior.) 'duplicate' which repeats the values on the
2250 nearest edge and 'warp', which takes the pixel of the opposite site of
2252 Beside the attribute, this patch implements the behavior of 'duplicate'.
2254 http://dev.w3.org/fxtf/filters/#feGaussianBlurEdgeModeAttribute
2256 Reviewed by Rob Buis.
2258 Tests: svg/dynamic-updates/SVGFEGaussianBlurElement-dom-edgeMode-attr.html
2259 svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop.html
2260 svg/filters/svg-gaussianblur-edgeMode-duplicate-expected.svg
2261 svg/filters/svg-gaussianblur-edgeMode-duplicate.svg
2263 * platform/graphics/filters/FEGaussianBlur.cpp:
2264 (WebCore::FEGaussianBlur::FEGaussianBlur):
2265 (WebCore::FEGaussianBlur::create):
2266 (WebCore::FEGaussianBlur::edgeMode):
2267 (WebCore::FEGaussianBlur::setEdgeMode):
2269 (WebCore::FEGaussianBlur::platformApplyGeneric):
2270 (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
2271 * platform/graphics/filters/FEGaussianBlur.h:
2272 * rendering/FilterEffectRenderer.cpp:
2273 (WebCore::FilterEffectRenderer::build):
2274 * svg/SVGFEGaussianBlurElement.cpp:
2275 (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
2276 (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
2277 (WebCore::SVGFEGaussianBlurElement::parseAttribute):
2278 (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
2279 (WebCore::SVGFEGaussianBlurElement::build):
2280 * svg/SVGFEGaussianBlurElement.h:
2281 * svg/SVGFEGaussianBlurElement.idl:
2283 2013-09-01 Andreas Kling <akling@apple.com>
2285 EventHandler::m_frame should be a Frame&.
2286 <https://webkit.org/b/120580>
2288 Reviewed by Darin Adler.
2290 EventHandler is tied to the lifetime of its frame, so let m_frame be a Frame&.
2291 A handful of null checks and assertions removed.
2293 2013-09-01 Darin Adler <darin@apple.com>
2295 Fix a mistake in my recent pasteboard/editor refactoring that was causing tests to fail.
2297 * editing/mac/EditorMac.mm:
2298 (WebCore::getImage): One place this said cachedImage but it should have said tentativeCachedImage.
2300 2013-09-01 Darin Adler <darin@apple.com>
2302 HitTestResult should have innerNonSharedElement
2303 https://bugs.webkit.org/show_bug.cgi?id=120579
2305 Reviewed by Andreas Kling.
2307 * editing/Editor.cpp:
2308 (WebCore::Editor::copyImage): Call HitTestResult member function version of
2309 innerNonSharedElement instead of a local function that does it.
2312 (WebCore::Chrome::setToolTip): Use innerNonSharedElement instead of getting
2313 the node and checking if it's an input element. Also added some missing braces.
2315 * page/EventHandler.cpp:
2316 (WebCore::EventHandler::selectClosestWordFromHitTestResult): Use targetNode for
2317 local variables instead of innerNode to match the HitTestResult function name.
2318 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Ditto.
2319 (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
2320 (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
2321 (WebCore::EventHandler::handleMousePressEvent): Ditto.
2323 * rendering/HitTestResult.cpp:
2324 (WebCore::HitTestResult::innerElement): Rewrote so there there is no loop.
2325 (WebCore::HitTestResult::innerNonSharedElement): Ditto.
2327 * rendering/HitTestResult.h: Added innerNonSharedElement. Generally speaking,
2328 we'd like to avoid using Node unless there is some real need.
2330 2013-09-01 Xabier Rodriguez Calvar <calvaris@igalia.com>
2332 Volume slider value should be 0 when audio is muted
2333 https://bugs.webkit.org/show_bug.cgi?id=120553
2335 Reviewed by Eric Carlson.
2337 Fixed the problem of showing a non empty slider when audio is
2340 Test: media/volume-bar-empty-when-muted.html.
2342 * html/shadow/MediaControls.cpp:
2343 (WebCore::MediaControls::reset): Use setSliderVolume.
2344 (WebCore::MediaControls::changedVolume): Use setSliderVolume.
2345 (WebCore::MediaControls::setSliderVolume): Added to set the volume
2346 to 0 when muted and to its value otherwise.
2347 * html/shadow/MediaControls.h: Added setSliderVolume.
2348 * html/shadow/MediaControlsApple.cpp:
2349 (WebCore::MediaControlsApple::reset): Used setSliderVolume and
2350 setFullscreenSliderVolume.
2351 (WebCore::MediaControlsApple::changedVolume): Used
2352 setFullscreenSliderVolume.
2353 (WebCore::MediaControlsApple::setFullscreenSliderVolume): Added to
2354 set the volume to 0 when muted and to its value otherwise.
2355 * html/shadow/MediaControlsApple.h: Added setFullscreenSliderVolume
2356 * html/shadow/MediaControlsBlackBerry.cpp:
2357 (WebCore::MediaControlsBlackBerry::reset): Used setSliderVolume.
2359 2013-09-01 Andreas Kling <akling@apple.com>
2361 Give EditCommand a protected Frame& getter.
2362 <https://webkit.org/b/120574>
2364 Reviewed by Darin Adler.
2366 EditCommand is only created for documents that are attached to a Frame,
2367 we already ASSERTed as much in the EditCommand constructor.
2369 This patch adds a "Frame& EditCommand::frame()" helper, so EditCommand
2370 and its subclasses don't have to fumble around with pointers.
2372 2013-08-31 Antti Koivisto <antti@apple.com>
2374 Add element ancestor iterator
2375 https://bugs.webkit.org/show_bug.cgi?id=120563
2377 Reviewed by Andreas Kling.
2379 This patch adds ancestor iterators. They iterate over elements parent chain up to the root.
2381 To iterate over Element ancestors:
2383 auto ancestors = elementAncestors(this);
2384 for (auto it = ancestors.begin(), end = ancestors.end(); it != end; ++it) {
2385 Element& element = *it;
2388 To iterate over Element ancestors including the current element:
2390 auto lineage = elementLineage(this);
2391 for (auto it = lineage.begin(), end = lineage.end(); it != end; ++it) {
2392 Element& element = *it;
2395 To iterate over ancestors of a specific Element subclass:
2397 auto htmlAncestors = ancestorsOfType<HTMLElement>(this);
2398 for (auto it = htmlAncestors.begin(), end = htmlAncestors.end(); it != end; ++it) {
2399 HTMLElement& htmlElement = *it;
2402 To iterate over ancestors of a specific Element subclass including the current element:
2404 auto htmlLineage = lineageOfType<HTMLElement>(this);
2405 for (auto it = htmlLineage.begin(), end = htmlLineage.end(); it != end; ++it) {
2406 HTMLElement& htmlElement = *it;
2409 The patch also uses the new types in a few places.
2411 * WebCore.xcodeproj/project.pbxproj:
2412 * accessibility/AccessibilityNodeObject.cpp:
2413 (WebCore::AccessibilityNodeObject::mouseButtonListener):
2414 (WebCore::AccessibilityNodeObject::labelForElement):
2415 * dom/ElementAncestorIterator.h: Added.
2416 (WebCore::::ElementAncestorIterator):
2417 (WebCore::::operator):
2418 (WebCore::::ElementAncestorConstIterator):
2419 (WebCore::::ElementAncestorIteratorAdapter):
2422 (WebCore::::ElementAncestorConstIteratorAdapter):
2423 (WebCore::elementLineage):
2424 (WebCore::elementAncestors):
2425 (WebCore::ancestorsOfType):
2426 * dom/ElementIterator.h:
2427 (WebCore::findElementAncestorOfType):
2428 (WebCore::::traverseAncestor):
2430 * html/HTMLElement.cpp:
2431 (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
2432 * html/HTMLFieldSetElement.h:
2433 (WebCore::isHTMLFieldSetElement):
2434 (WebCore::HTMLFieldSetElement):
2435 * html/HTMLFrameSetElement.cpp:
2436 (WebCore::HTMLFrameSetElement::findContaining):
2437 * html/HTMLFrameSetElement.h:
2438 (WebCore::HTMLFrameSetElement):
2439 * html/HTMLInputElement.h:
2440 (WebCore::isHTMLInputElement):
2441 (WebCore::toHTMLInputElement):
2442 * html/HTMLLegendElement.cpp:
2443 (WebCore::HTMLLegendElement::associatedControl):
2445 2013-08-31 Darin Adler <darin@apple.com>
2447 Refactor URL and image writing so layer-violating parts are in Editor, not Pasteboard (Mac-only at first)
2448 https://bugs.webkit.org/show_bug.cgi?id=120573
2450 Reviewed by Andreas Kling.
2452 * editing/Editor.cpp:
2453 (WebCore::Editor::copy): Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
2454 (WebCore::Editor::copyURL): Use writeURLToPasteboard instead of Pasteboard::writeURL on Mac.
2455 (WebCore::innerNonSharedElement): Added. Used in copyImage.
2456 (WebCore::Editor::copyImage): Use innerNonSharedElement instead of innerNonSharedNode.
2457 Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
2459 * editing/Editor.h: Add new functions, writeURLToPasteboard and writeImageToPasteboard,
2460 both Mac-only for now.
2462 * editing/mac/EditorMac.mm:
2463 (WebCore::Editor::pasteWithPasteboard): Removed unneeded "m_frame.editor()" round trip that
2464 was left behind in this function.
2465 (WebCore::getImage): Added. Helper used by writeImageToPasteboard.
2466 (WebCore::Editor::writeURLToPasteboard): Added. Sets up PasteboardURL and then calls
2467 Pasteboard::write with it.
2468 (WebCore::Editor::writeImageToPasteboard): Added. Sets up PasteboardImage and then calls
2469 Pasteboard::write with it.
2470 * page/DragController.cpp:
2471 (WebCore::DragController::startDrag): Use Editor::writeURLToPasteboard instead of
2472 Pasteboard::writeURL on Mac.
2474 * platform/Pasteboard.h: Added PasteboardURL and PasteboardImage structures.
2475 Declare write functions for PasteboardWebContent, PasteboardURL, and PasteboardImage.
2476 Guard writeURL and writeImage with !PLATFORM(MAC).
2478 * platform/mac/PasteboardMac.mm:
2479 (WebCore::writeURLForTypes): Changed this to take a PasteboardURL.
2480 (WebCore::Pasteboard::write): Renamed writeURL and writeImage to this. Refactor both
2481 to take PasteboardURL and PasteboardImage arguments.
2482 (WebCore::fileWrapper): Renamed from fileWrapperForImage since the fact that this is
2483 for an image is now clear from its argument, a PasteboardImage.
2484 (WebCore::writeFileWrapperAsRTFDAttachment): Changed this function to use early return.
2486 2013-08-31 Andreas Kling <akling@apple.com>
2488 EditCommand constructors should take Document&.
2489 <https://webkit.org/b/120566>
2491 Reviewed by Darin Adler.
2493 Let EditCommand's and all subclass constructors take Document& instead of Document*.
2494 EditCommand::document() now returns a Document&.
2496 Added Editor::document() which returns Editor::frame().document() after asserting
2497 that it's non-null, to make passing a Document& from Editor functions easier.
2499 2013-08-31 Andreas Kling <akling@apple.com>
2501 Make more use of toRenderFoo(RenderObject&) cast helpers.
2502 <https://webkit.org/b/120565>
2504 Reviewed by Darin Adler.
2506 To make amends for putting ugly toRenderFoo(&renderer) casts everywhere,
2507 here's a patch that switches a bunch of code over to using reference-based casts.
2509 I removed pointer-based casts altogether for these renderers:
2517 2013-08-31 Santosh Mahto <santosh.ma@samsung.com>
2519 warning: unused parameter ‘renderingMode' in ImageBufferCairo.cpp:94
2520 https://bugs.webkit.org/show_bug.cgi?id=120543
2522 Reviewed by Darin Adler.
2524 Fixing warning by adding ASSERT_UNUSED.
2526 * platform/graphics/cairo/ImageBufferCairo.cpp:
2527 (WebCore::ImageBuffer::ImageBuffer):
2529 2013-08-31 Andreas Kling <akling@apple.com>
2531 Fix typo in r154931 that caused assertions in continuation tests.
2533 * rendering/InlineFlowBox.cpp:
2534 (WebCore::InlineFlowBox::paint):
2536 2013-08-31 Rob Buis <rwlbuis@webkit.org>
2538 XMLSerializer-attribute-namespace-prefix-conflicts can't produce reliable results
2539 https://bugs.webkit.org/show_bug.cgi?id=120490
2541 Reviewed by Ryosuke Niwa.
2543 Retain the key of the namespaces map by using AtomicString as key instead of AtomicStringImpl*.
2545 * editing/MarkupAccumulator.h:
2547 2013-08-31 Andreas Kling <akling@apple.com>
2549 InlineBox::renderer() and pals should return references.
2550 <https://webkit.org/b/120562>
2552 Reviewed by Antti Koivisto.
2554 Make InlineBox::renderer() and its friends return references instead of pointers.
2555 Every box always has a renderer, so this clears up any ambiguity, and a number of
2556 weird assertions in SVG code.
2558 Made InlineBox::m_renderer private so subclasses have to go through renderer().
2559 The next step will be to replace renderer() with tightly-typed accessors where
2560 applicable (e.g InlineTextBox's renderer is always a RenderText.)
2562 Also added reference versions of these RenderObject casts:
2567 - toRenderSVGInlineText()
2569 2013-08-31 Andreas Kling <akling@apple.com>
2571 PostAttachCallbackDisabler should take a ContainerNode&.
2572 <https://webkit.org/b/120560>
2574 Reviewed by Antti Koivisto.
2576 Let PostAttachCallbackDisabler take a reference and remove an ugly assertion.
2578 * dom/ContainerNode.h:
2579 (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
2580 (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
2582 (WebCore::Document::recalcStyle):
2583 * style/StyleResolveTree.cpp:
2584 (WebCore::Style::attachRenderTree):
2586 2013-08-31 Antti Koivisto <antti@apple.com>
2588 Rename ChildIterator -> ElementChildIterator, DescendantIterator -> ElementDescendantIterator
2589 https://bugs.webkit.org/show_bug.cgi?id=120561
2591 Reviewed by Andreas Kling.
2593 New names are more descriptive and consistent. They also put related iterator files close by in file lists.
2594 The types are always used with auto so longer names don't make them any clumsier to use.
2596 For simplicity included all Element iterator types from ElementIterator.h so it is the only file that has
2597 to be included by the clients.
2599 * GNUmakefile.list.am:
2601 * WebCore.vcxproj/WebCore.vcxproj:
2602 * WebCore.xcodeproj/project.pbxproj:
2603 * accessibility/AccessibilityNodeObject.cpp:
2604 * accessibility/AccessibilityRenderObject.cpp:
2605 * accessibility/AccessibilityTable.cpp:
2606 * css/CSSFontFaceSource.cpp:
2607 * dom/ChildIterator.h: Removed.
2608 * dom/DescendantIterator.h: Removed.
2610 * dom/ElementChildIterator.h: Copied from Source/WebCore/dom/ChildIterator.h.
2611 (WebCore::::ElementChildIterator):
2612 (WebCore::::operator):
2613 (WebCore::::ElementChildConstIterator):
2614 (WebCore::::ElementChildIteratorAdapter):
2617 (WebCore::::ElementChildConstIteratorAdapter):
2618 (WebCore::elementChildren):
2619 (WebCore::childrenOfType):
2620 * dom/ElementDescendantIterator.h: Copied from Source/WebCore/dom/DescendantIterator.h.
2621 (WebCore::::ElementDescendantIterator):
2622 (WebCore::::operator):
2623 (WebCore::::ElementDescendantConstIterator):
2624 (WebCore::::ElementDescendantIteratorAdapter):
2627 (WebCore::::ElementDescendantConstIteratorAdapter):
2628 (WebCore::elementDescendants):
2629 (WebCore::descendantsOfType):
2630 * dom/ElementIterator.h:
2632 * dom/TreeScope.cpp:
2633 * editing/ApplyStyleCommand.cpp:
2634 * editing/markup.cpp:
2635 * html/HTMLAppletElement.cpp:
2636 * html/HTMLFieldSetElement.cpp:
2637 * html/HTMLLabelElement.cpp:
2638 * html/HTMLMapElement.cpp:
2639 * html/HTMLMediaElement.cpp:
2640 * html/HTMLObjectElement.cpp:
2641 * loader/PlaceholderDocument.cpp:
2642 * rendering/FilterEffectRenderer.cpp:
2643 * style/StyleResolveTree.cpp:
2644 * svg/SVGElement.cpp:
2645 * svg/SVGSVGElement.cpp:
2646 * svg/animation/SMILTimeContainer.cpp:
2647 * svg/graphics/SVGImage.cpp:
2649 2013-08-31 Andreas Kling <akling@apple.com>
2651 Don't do document style recalc unless there's a RenderView.
2652 <https://webkit.org/b/120558>
2654 Reviewed by Antti Koivisto.
2656 There's no sense in computing style for a Document that has no RenderView.
2657 Checking this before continuing also lets us know that there's a Frame & FrameView
2658 present, simplifying some things later on.
2661 (WebCore::Document::recalcStyle):
2662 * style/StyleResolveForDocument.cpp:
2663 (WebCore::Style::resolveForDocument):
2665 2013-08-31 Antti Koivisto <antti@apple.com>
2667 Add common base for element iterators
2668 https://bugs.webkit.org/show_bug.cgi?id=120557
2670 Reviewed by Andreas Kling.
2672 Add ElementIterator and use it as the base for child and descendant iterators. The only difference is the definition of operator++.
2674 Also renamed DescendantIteratorAssertions to ElementIteratorAssertions.
2676 * GNUmakefile.list.am:
2678 * WebCore.vcxproj/WebCore.vcxproj:
2679 * WebCore.xcodeproj/project.pbxproj:
2680 * dom/ChildIterator.h:
2681 (WebCore::::ChildIterator):
2682 (WebCore::::operator):
2683 (WebCore::::ChildConstIterator):
2686 * dom/DescendantIterator.h:
2687 (WebCore::::DescendantIterator):
2688 (WebCore::::operator):
2689 (WebCore::::DescendantConstIterator):
2690 * dom/DescendantIteratorAssertions.h: Removed.
2691 * dom/ElementIterator.h: Added.
2692 (WebCore::::ElementIterator):
2693 (WebCore::::traverseNext):
2694 (WebCore::::traversePrevious):
2695 (WebCore::::traverseNextSibling):
2696 (WebCore::::traversePreviousSibling):
2697 (WebCore::::operator):
2699 (WebCore::::ElementConstIterator):
2700 * dom/ElementIteratorAssertions.h: Copied from Source/WebCore/dom/DescendantIteratorAssertions.h.
2701 (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
2702 (WebCore::ElementIteratorAssertions::domTreeHasMutated):
2703 (WebCore::ElementIteratorAssertions::dropEventDispatchAssertion):
2705 2013-08-30 Brent Fulgham <bfulgham@apple.com>
2707 [Windows] Build fix after r154921.
2709 AVFoundationCF uses an internal wrapper object around the C-API. The call point
2710 in the original patch was inside the wrapper, which did not (yet) provide
2711 a method implementation.
2713 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2714 (WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
2715 (WebCore::AVFWrapper::updateVideoLayerGravity):
2717 2013-08-30 Simon Fraser <simon.fraser@apple.com>
2719 Video with object-fit: cover can spill outside the box
2720 https://bugs.webkit.org/show_bug.cgi?id=52103
2722 Reviewed by Dean Jackson.
2724 object-fit on renderers which use accelerated compositing needs special
2727 For directly composited images, and video, GraphicsLayer needs to know
2728 both the size of the content layer, and also a rectangle at which this
2729 should be clipped (because, for the first time, that content layer can be
2730 larger than the renderer's content box).
2732 AVFoundation would always aspect-ratio fit video by default, so plumb
2733 through MediaPlayer a way to override that when object-fit requires it.
2735 Added a LAYER_TREE_INCLUDES_CONTENT_LAYERS enum to the layerTreeAsText()
2736 flags so we can dump content layers for testing.
2738 Tests: compositing/images/direct-image-object-fit.html
2739 compositing/reflections/direct-image-object-fit-reflected.html
2740 compositing/video/video-object-fit.html
2742 * page/Frame.h: New LayerTreeFlagsIncludeContentLayers flag.
2743 * platform/graphics/GraphicsLayer.h: New flag.
2744 * platform/graphics/MediaPlayer.cpp:
2745 (WebCore::MediaPlayer::shouldMaintainAspectRatio):
2746 (WebCore::MediaPlayer::setShouldMaintainAspectRatio):
2747 * platform/graphics/MediaPlayer.h:
2748 * platform/graphics/MediaPlayerPrivate.h:
2749 (WebCore::MediaPlayerPrivateInterface::shouldMaintainAspectRatio):
2750 (WebCore::MediaPlayerPrivateInterface::setShouldMaintainAspectRatio):
2751 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2752 (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
2753 (WebCore::MediaPlayerPrivateAVFoundation::setShouldMaintainAspectRatio):
2754 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2755 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2756 (WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
2757 (WebCore::AVFWrapper::platformLayer):
2758 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2759 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2760 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2761 (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
2762 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
2763 * platform/graphics/ca/GraphicsLayerCA.cpp: We need a new m_contentsClippingLayer to
2764 clip the contents layer, which only gets created when necessary. It has to be cloned
2766 (WebCore::GraphicsLayerCA::willBeDestroyed):
2767 (WebCore::GraphicsLayerCA::setContentsRect):
2768 (WebCore::GraphicsLayerCA::setContentsClippingRect):
2769 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2770 (WebCore::GraphicsLayerCA::updateSublayerList):
2771 (WebCore::GraphicsLayerCA::updateContentsImage):
2772 (WebCore::GraphicsLayerCA::updateContentsMediaLayer):
2773 (WebCore::GraphicsLayerCA::updateContentsCanvasLayer):
2774 (WebCore::GraphicsLayerCA::updateContentsColorLayer):
2775 (WebCore::GraphicsLayerCA::updateContentsRects):
2776 (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
2777 (WebCore::GraphicsLayerCA::ensureCloneLayers):
2778 (WebCore::GraphicsLayerCA::removeCloneLayers):
2779 (WebCore::GraphicsLayerCA::fetchCloneLayers):
2780 * platform/graphics/ca/GraphicsLayerCA.h:
2781 * rendering/RenderLayerBacking.cpp: Need to push both the contentsRect and
2782 the contentsClippingRect down to the GraphicsLayers. Most of the time they
2783 are the same, unless object-fit makes them different.
2784 (WebCore::RenderLayerBacking::resetContentsRect):
2785 (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
2786 (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor):
2787 (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
2788 (WebCore::RenderLayerBacking::updateImageContents):
2789 (WebCore::RenderLayerBacking::contentsBox):
2790 * rendering/RenderLayerCompositor.cpp:
2791 (WebCore::RenderLayerCompositor::layerTreeAsText):
2792 * rendering/RenderVideo.cpp:
2793 (WebCore::RenderVideo::updatePlayer):
2794 * testing/Internals.cpp:
2795 (WebCore::Internals::layerTreeAsText):
2796 * testing/Internals.h:
2797 * testing/Internals.idl:
2799 2013-08-30 Brent Fulgham <bfulgham@apple.com>
2801 [Windows] Update to incorporate additional suggestions
2802 https://bugs.webkit.org/show_bug.cgi?id=120448
2804 Reviewed by Darin Adler
2806 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Add
2807 notes as to why AVFoundationCF needs this extra method call.
2808 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Use OVERRIDE
2809 * rendering/RenderVideo.cpp: Replace ternary operator with logical &&.
2811 2013-08-30 Brent Fulgham <bfulgham@apple.com>
2813 [Windows] Vide element in page always uses non-hw accelerated mode.
2814 https://bugs.webkit.org/show_bug.cgi?id=120448
2816 Reviewed by Darin Adler
2818 This patch is unfortunately larger than my original idea, but seems to make the
2819 layout system happier. Instead of switching into composited mode when building
2820 the media player, we now build the original layout tree with compositing active
2821 if the underlying media element requires it. The AVFoundationCF player needs to
2822 have the compositor available at construction time so it can attach to the
2823 rendering device. Otherwise it falls back to CPU-only mode.
2825 * platform/graphics/MediaPlayer.cpp:
2826 (WebCore::MediaPlayer::requiresImmediateCompositing): Added
2827 * platform/graphics/MediaPlayer.h:
2828 * platform/graphics/MediaPlayerPrivate.h:
2829 (WebCore::MediaPlayerPrivateInterface::requiresImmediateCompositing): Added
2830 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2831 (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Added
2832 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2833 (WebCore::MediaPlayerPrivateAVFoundationCF::requiresImmediateCompositing):
2834 * rendering/RenderLayerCompositor.cpp:
2835 (WebCore::RenderLayerCompositor::requiresCompositingForVideo): Uses new
2836 'requiresImmediateCompositing' to short-circuit check for whether a
2837 compositor is required.
2838 * rendering/RenderVideo.cpp:
2839 (WebCore::RenderVideo::requiresImmediateCompositing):
2840 * rendering/RenderVideo.h:
2842 2013-08-30 Joseph Pecoraro <pecoraro@apple.com>
2844 Web Inspector: Breakpoints should have Automatically Continue Option
2845 https://bugs.webkit.org/show_bug.cgi?id=120187
2847 Reviewed by Timothy Hatcher.
2849 Tests: inspector-protocol/debugger/removeBreakpoint.html
2850 inspector-protocol/debugger/setBreakpoint-autoContinue.html
2851 inspector-protocol/debugger/setBreakpoint-column.html
2852 inspector-protocol/debugger/setBreakpoint-condition.html
2853 inspector-protocol/debugger/setBreakpoint.html
2855 * inspector/Inspector.json:
2856 Convert the "condition" argument of setBreakpoint and setBreakpointByUrl
2857 to a BreakpointOptions object with optional properties. One of which
2858 is "condition" and a new option "autoContinue".
2860 * bindings/js/ScriptDebugServer.h:
2861 * bindings/js/ScriptDebugServer.cpp:
2862 (WebCore::ScriptDebugServer::hasBreakpoint):
2863 (WebCore::ScriptDebugServer::pauseIfNeeded):
2864 Automatically continue if the breakpoint was hit and has autoContinue.
2866 * inspector/InspectorDebuggerAgent.h:
2867 * inspector/InspectorDebuggerAgent.cpp:
2868 (WebCore::buildObjectForBreakpointCookie):
2869 (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2870 (WebCore::InspectorDebuggerAgent::setBreakpoint):
2871 (WebCore::InspectorDebuggerAgent::continueToLocation):
2872 (WebCore::InspectorDebuggerAgent::didParseSource):
2873 * inspector/ScriptBreakpoint.h:
2874 (WebCore::ScriptBreakpoint::ScriptBreakpoint):
2875 Handle the new incoming BreakpointOptions type, and set the
2876 autoContinue state on ScriptBreakpoints.
2878 * inspector/front-end/DebuggerModel.js:
2879 (WebInspector.DebuggerModel.prototype.setBreakpointByURL):
2880 (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2881 Update old front-end to be compatible with the new API.
2883 2013-08-30 Dean Jackson <dino@apple.com>
2885 Animations should use double for key values, not floats
2886 https://bugs.webkit.org/show_bug.cgi?id=120547
2888 Reviewed by Simon Fraser.
2890 Merge https://chromium.googlesource.com/chromium/blink/+/71de046541c77120874b9bff82958ee9e0e20c7c
2892 Some files have been renamed in the Blink port, and they have made some
2893 improvements, but I took what applied to us.
2895 All our existing tests passed.
2897 * css/StyleResolver.cpp:
2898 (WebCore::StyleResolver::keyframeStylesForAnimation):
2899 * css/WebKitCSSKeyframeRule.cpp:
2900 (WebCore::StyleKeyframe::parseKeyString):
2901 * css/WebKitCSSKeyframeRule.h:
2902 (WebCore::StyleKeyframe::getKeys):
2903 * platform/graphics/GraphicsLayer.h:
2904 (WebCore::AnimationValue::keyTime):
2905 (WebCore::AnimationValue::AnimationValue):
2906 (WebCore::FloatAnimationValue::create):
2907 (WebCore::FloatAnimationValue::FloatAnimationValue):
2908 (WebCore::TransformAnimationValue::create):
2909 (WebCore::TransformAnimationValue::TransformAnimationValue):
2910 (WebCore::FilterAnimationValue::create):
2911 (WebCore::FilterAnimationValue::FilterAnimationValue):
2912 * rendering/RenderLayerBacking.cpp:
2913 (WebCore::RenderLayerBacking::startAnimation):
2914 * rendering/style/KeyframeList.h:
2915 (WebCore::KeyframeValue::KeyframeValue):
2916 (WebCore::KeyframeValue::key):
2917 (WebCore::KeyframeValue::setKey):
2919 2013-08-30 Brendan Long <b.long@cablelabs.com>
2921 [GStreamer] support in-band text tracks
2922 https://bugs.webkit.org/show_bug.cgi?id=103771
2924 Reviewed by Eric Carlson.
2926 Tests: New tests added because existing tests were too specific.
2927 media/track/in-band/track-in-band-kate-ogg-cues-added-once.html
2928 media/track/in-band/track-in-band-kate-ogg-kind.html
2929 media/track/in-band/track-in-band-kate-ogg-language.html
2930 media/track/in-band/track-in-band-kate-ogg-mode.html
2931 media/track/in-band/track-in-band-kate-ogg-style.html
2932 media/track/in-band/track-in-band-kate-ogg-track-order.html
2933 media/track/in-band/track-in-band-srt-mkv-cues-added-once.html
2934 media/track/in-band/track-in-band-srt-mkv-kind.html
2935 media/track/in-band/track-in-band-srt-mkv-language.html
2936 media/track/in-band/track-in-band-srt-mkv-mode.html
2937 media/track/in-band/track-in-band-srt-mkv-style.html
2938 media/track/in-band/track-in-band-srt-mkv-track-order.html
2940 * CMakeLists.txt: Add InbandTextTrackPrivateGStreamer, InbandGenericTextTrack, InbandWebVTTTextTrack, and TextCombinerGStreamer files.
2941 * GNUmakefile.list.am: Same.
2942 * PlatformEfl.cmake: Same.
2944 * WebCore.vcxproj/WebCore.vcxproj: Same.
2945 * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
2946 * WebCore.xcodeproj/project.pbxproj: Same.
2947 * html/track/InbandGenericTextTrack.cpp: Split out code for handling generic cues.
2948 (WebCore::GenericTextTrackCueMap::GenericTextTrackCueMap): Move from InbandTextTrack.
2949 (WebCore::GenericTextTrackCueMap::~GenericTextTrackCueMap): Same.
2950 (WebCore::GenericTextTrackCueMap::add): Same.
2951 (WebCore::GenericTextTrackCueMap::find): Same.
2952 (WebCore::GenericTextTrackCueMap::remove): Same.
2953 (WebCore::InbandGenericTextTrack::create): Same.
2954 (WebCore::InbandGenericTextTrack::updateCueFromCueData): Same.
2955 (WebCore::InbandGenericTextTrack::addGenericCue): Same.
2956 (WebCore::InbandGenericTextTrack::updateGenericCue): Same.
2957 (WebCore::InbandGenericTextTrack::removeGenericCue): Same.
2958 (WebCore::InbandGenericTextTrack::removeCue): Same.
2959 (WebCore::InbandGenericTextTrack::InbandGenericTextTrack): Empty.
2960 (WebCore::InbandGenericTextTrack::~InbandGenericTextTrack): Empty.
2961 * html/track/InbandGenericTextTrack.h: Copied from Source/WebCore/html/track/InbandTextTrack.h.
2962 The only addition is the ASSERT_NOT_REACHED() for WebVTT cues.
2963 * html/track/InbandTextTrack.cpp: Add label and language changed callbacks.
2964 (WebCore::InbandTextTrack::create): Return a generic or WebVTT text track based on the private CueFormat.
2965 (WebCore::InbandTextTrack::labelChanged): Added.
2966 (WebCore::InbandTextTrack::languageChanged): Added.
2967 * html/track/InbandTextTrack.h: Add label and language changed callbacks.
2968 * html/track/InbandWebVTTTextTrack.cpp: Added, based on InbandTextTrack.
2969 (WebCore::InbandWebVTTTextTrack::create): Same.
2970 (WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): Empty.
2971 (WebCore::InbandWebVTTTextTrack::~InbandWebVTTTextTrack): Empty.
2972 (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): Sends data to a WebVTTParser.
2973 (WebCore::InbandWebVTTTextTrack::newCuesParsed): Adds cues when WebVTTParser parses them.
2974 (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Prints a warning when WebVTTParser has a problem.
2975 * html/track/InbandWebVTTTextTrack.h: Added.
2976 * platform/graphics/InbandTextTrackPrivate.h:
2977 (WebCore::InbandTextTrackPrivate::cueFormat): For determining if the track will have generic or WebVTT cues.
2978 (WebCore::InbandTextTrackPrivate::InbandTextTrackPrivate): Pass CueFormat in the constructor.
2979 * platform/graphics/InbandTextTrackPrivateClient.h: Same.
2980 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2981 (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Pass CueFormat (Generic) to InbandTextTrackPrivate.
2982 * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Add GRefPtr specializations for GstSample and GstEvent.
2983 * platform/graphics/gstreamer/GRefPtrGStreamer.h: Same.
2984 * platform/graphics/gstreamer/GStreamerUtilities.h: Add WARN_MEDIA_MESSAGE.
2985 * platform/graphics/gstreamer/GStreamerVersioning.h: Add a function to check GStreamer version at runtime.
2986 * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Added.
2987 (WebCore::textTrackPrivateEventCallback): Watches for tag and stream start events.
2988 (WebCore::textTrackPrivateSampleTimeoutCallback): See notifyTrackOfSample();
2989 (WebCore::textTrackPrivateStreamTimeoutCallback): See notifyTrackOfStreamChanged();
2990 (WebCore::textTrackPrivateTagsChangeTimeoutCallback): See notifyTrackOfTagsChanged();
2991 (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): Initializes tags and stream and sets up event callback.
2992 (WebCore::InbandTextTrackPrivateGStreamer::~InbandTextTrackPrivateGStreamer): Calls disconnect:
2993 (WebCore::InbandTextTrackPrivateGStreamer::disconnect): Removes signal handlers and frees some memory.
2994 (WebCore::InbandTextTrackPrivateGStreamer::handleSample): Adds samples to a list and sets up callback.
2995 (WebCore::InbandTextTrackPrivateGStreamer::streamChanged): Sets up callback.
2996 (WebCore::InbandTextTrackPrivateGStreamer::tagsChanged): Same.
2997 (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample): Parses all queued samples with WebVTTParser.
2998 (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged): Keeps track of current stream.
2999 (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfTagsChanged): Sets label and language from tags.
3000 * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: Added.
3001 (WebCore::InbandTextTrackPrivateGStreamer::create): Basic RefPtr create function.
3002 (WebCore::InbandTextTrackPrivateGStreamer::pad): Returns the pad this track is associated with (used
3003 to determine if a playbin text stream has already been associated with a text track).
3004 (WebCore::InbandTextTrackPrivateGStreamer::setIndex): Sets the track index (used for sorting).
3005 (WebCore::InbandTextTrackPrivateGStreamer::streamId): Returns the stream ID (used to handle new samples).
3006 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3007 (WebCore::mediaPlayerPrivateTextChangedCallback): Called for playbin "text-changed" event. See textChanged().
3008 (WebCore::mediaPlayerPrivateTextChangeTimeoutCallback): See notifyPlayerOfText().
3009 (WebCore::mediaPlayerPrivateNewTextSampleCallback): See newTextSample().
3010 (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initialize m_textTimerHandler.
3011 (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnect text tracks (they don't necessarily
3012 get freed here, since a script could hold a reference).
3013 (WebCore::MediaPlayerPrivateGStreamer::textChanged): Setup callback for notifyPlayerOfText.
3014 (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Create text tracks.
3015 (WebCore::MediaPlayerPrivateGStreamer::newTextSample): Handle new samples by giving them to a text track
3016 with a matching stream. This method is syncryonous because we need to get the stream start sticky event
3018 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3019 * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Added. This element forwards buffers from all
3020 of its input pads, but also converts plain text to WebVTT as needed.
3021 (webkit_text_combiner_init): Setup internal funnel.
3022 (webkitTextCombinerPadEvent): If the caps are plain text make sure we have a webvttenv, otherwise connect
3023 directly to the funnel.
3024 (webkitTextCombinerRequestNewPad): Setup ghostpad and event callback.
3025 (webkitTextCombinerReleasePad): Release pad and optional associated webvttenc.
3026 (webkit_text_combiner_class_init): Setup pad templates and request/release pad functions.
3027 (webkitTextCombinerNew): Returns a new WebKitTextCombiner.
3028 * platform/graphics/gstreamer/TextCombinerGStreamer.h: Added.
3029 * platform/graphics/gstreamer/TextSinkGStreamer.cpp: Added.
3030 (webkit_text_sink_init): Set sync=false.
3031 (webkitTextSinkGetProperty): Ignore sync property.
3032 (webkitTextSinkSetProperty): Same.
3033 (webkitTextSinkQuery): Ignore position and duration queries, forward everything else to appsink.
3034 (webkit_text_sink_class_init): Setup property and query functions.
3035 (webkitTextSinkNew): Return a new WebKitTextSink.
3036 * platform/graphics/gstreamer/TextSinkGStreamer.h: Added.
3038 2013-08-30 Dirk Schulze <krit@webkit.org>
3040 Animate CSS Image filter() function
3041 https://bugs.webkit.org/show_bug.cgi?id=119938
3043 Reviewed by Simon Fraser.
3045 With this patch, the new introduced CSS Image function filter() can be
3046 animated. According to the spec, just filter functions can be
3049 The patch also prepares StyleImage blending for interpolation of other
3050 generated images like gradients or cross-fade().
3052 http://dev.w3.org/fxtf/filters/#interpolating-filter-image
3054 Test: fast/filter-image/filter-image-animation.html
3056 * css/CSSComputedStyleDeclaration.cpp: Reuse the code that creates a
3057 CSSValueList from ComputeStyle logic.
3058 (WebCore::valueForPixel):
3059 For StyleRules we want to have not-adjusted length values.
3060 (WebCore::ComputedStyleExtractor::valueForShadow):
3061 Add argument to switch between adjusted and not-adjusted length.
3062 (WebCore::ComputedStyleExtractor::valueForFilter):
3064 (WebCore::ComputedStyleExtractor::propertyValue):
3065 * css/CSSComputedStyleDeclaration.h:
3066 * css/CSSFilterImageValue.h: Add helper functions
3067 for animating filters. We need to pass the FilterOperations for
3068 the image generation and the CSSValueList for StyleRule.
3069 (WebCore::CSSFilterImageValue::filterOperations):
3070 (WebCore::CSSFilterImageValue::setFilterOperations):
3071 (WebCore::CSSFilterImageValue::cachedImage):
3072 * page/animation/CSSPropertyAnimation.cpp:
3073 Add animation code to support animations between two filter()
3075 (WebCore::blendFilterOperations):
3076 (WebCore::blendFunc):
3077 (WebCore::filterBlend):
3078 * rendering/style/StyleGeneratedImage.h: Add helper functions.
3079 (WebCore::CSSFilterImageValue::imageValue):
3082 2013-08-30 Leo Yang <leoyang@blackberry.com>
3084 Make sure remove CachedResourceClient when destructing IconLoader
3085 https://bugs.webkit.org/show_bug.cgi?id=120541
3087 Reviewed by Darin Adler.
3089 It's a good practice to call CachedResource::removeClient(client)
3090 when the client is being destructed. We need to do this for InconLoader
3091 to prevent m_resource from keeping dangling client in case m_resource
3092 is referenced by someone else in the future.
3094 Found by code inspection. Just a defensive enhancement no new tests.
3096 * loader/icon/IconLoader.cpp:
3097 (WebCore::IconLoader::~IconLoader):
3099 2013-08-30 Hans Muller <hmuller@adobe.com>
3101 [CSS Shapes] Redefine the ShapeIntervals class as a template
3102 https://bugs.webkit.org/show_bug.cgi?id=120381
3104 Reviewed by Alexandru Chiculita.
3106 No new tests, this was just an internal refactoring.
3108 The existing ShapeIntervals class has been converted into a template whose
3109 type specifies the type of the interval's x1 and x2 horizontal endpoints
3110 (formerly float). There were several other minor changes, all in the realm
3113 - The original type was a struct with public x1 and x2 fields. It's now a class
3114 with x1 and x2 accessors. ASSERTS are now used to maintain the x2 >= x1 invariant.
3115 In the original code the invariant was not checked.
3117 - The logical comparison operators have been overloaded for ShapeInterval.
3118 This obviates the IntervalX1Comparator class which has been removed.
3120 - The names of the global ShapeInterval Vector set operation methods have been
3121 changed to reflect the fact that they're now members of the template class,
3122 rather than globals.
3124 PolygonShape.cpp depended on the ShapeInterval class. In the one or two places
3125 where an interval's x1 or x1 fields had been set explicitly, ShapeInterval::set()
3126 is now used to set both fields. This also enables the invariant check mentioned
3127 earlier. The other changes to this class are syntatic, to account for the ShapeInterval
3131 * GNUmakefile.list.am:
3132 * WebCore.vcxproj/WebCore.vcxproj:
3133 * WebCore.xcodeproj/project.pbxproj:
3134 * rendering/shapes/PolygonShape.cpp:
3135 (WebCore::appendIntervalX):
3136 (WebCore::computeXIntersections):
3137 (WebCore::computeOverlappingEdgeXProjections):
3138 (WebCore::PolygonShape::getExcludedIntervals):
3139 (WebCore::PolygonShape::getIncludedIntervals):
3140 * rendering/shapes/PolygonShape.h:
3141 * rendering/shapes/ShapeInterval.cpp: Removed.
3142 * rendering/shapes/ShapeInterval.h: The entire implementation is now here.
3143 (WebCore::ShapeInterval::ShapeInterval):
3144 (WebCore::ShapeInterval::x1):
3145 (WebCore::ShapeInterval::x2):
3146 (WebCore::ShapeInterval::set):
3147 (WebCore::ShapeInterval::overlaps):
3148 (WebCore::ShapeInterval::intersect):
3149 (WebCore::ShapeInterval::sortVector):
3150 (WebCore::ShapeInterval::uniteVectors):
3151 (WebCore::ShapeInterval::intersectVectors):
3152 (WebCore::ShapeInterval::subtractVectors):
3153 (WebCore::operator==):
3154 (WebCore::operator!=):
3155 (WebCore::operator< ):
3156 (WebCore::operator> ):
3157 (WebCore::operator<=):
3158 (WebCore::operator>=):
3160 2013-08-30 Antti Koivisto <antti@apple.com>
3162 Use Element& in StyleResolveTree
3163 https://bugs.webkit.org/show_bug.cgi?id=120540
3165 Reviewed by Andreas Kling.
3167 * dom/ContainerNode.cpp:
3168 (WebCore::attachChild):
3169 (WebCore::detachChild):
3171 (WebCore::Document::recalcStyle):
3172 (WebCore::Document::createRenderTree):
3173 (WebCore::Document::detach):
3175 (WebCore::Element::lazyReattach):
3176 (WebCore::Element::updateExistingPseudoElement):
3177 (WebCore::Element::createPseudoElementIfNeeded):
3178 (WebCore::disconnectPseudoElement):
3179 * dom/ShadowRoot.cpp:
3180 (WebCore::ShadowRoot::setResetStyleInheritance):
3181 * html/HTMLDetailsElement.cpp:
3182 (WebCore::HTMLDetailsElement::parseAttribute):
3183 * html/HTMLInputElement.cpp:
3184 (WebCore::HTMLInputElement::updateType):
3185 (WebCore::HTMLInputElement::parseAttribute):
3186 * html/HTMLObjectElement.cpp:
3187 (WebCore::HTMLObjectElement::renderFallbackContent):
3188 * html/HTMLPlugInImageElement.cpp:
3189 (WebCore::HTMLPlugInImageElement::willRecalcStyle):
3190 (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
3191 (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
3192 (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
3193 * html/HTMLSelectElement.cpp:
3194 (WebCore::HTMLSelectElement::parseAttribute):
3195 (WebCore::HTMLSelectElement::parseMultipleAttribute):
3196 * html/HTMLViewSourceDocument.cpp:
3197 (WebCore::HTMLViewSourceDocument::createContainingTable):
3198 (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
3199 (WebCore::HTMLViewSourceDocument::addLine):
3200 (WebCore::HTMLViewSourceDocument::finishLine):
3201 (WebCore::HTMLViewSourceDocument::addBase):
3202 (WebCore::HTMLViewSourceDocument::addLink):
3203 * html/parser/HTMLConstructionSite.cpp:
3204 (WebCore::executeTask):
3205 * html/parser/HTMLTreeBuilder.cpp:
3206 (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3207 * html/shadow/InsertionPoint.cpp:
3208 (WebCore::InsertionPoint::willAttachRenderers):
3209 (WebCore::InsertionPoint::willDetachRenderers):
3210 * loader/PlaceholderDocument.cpp:
3211 (WebCore::PlaceholderDocument::createRenderTree):
3212 * style/StyleResolveTree.cpp:
3213 (WebCore::Style::attachChildren):
3214 (WebCore::Style::attachRenderTree):
3215 (WebCore::Style::detachChildren):
3216 (WebCore::Style::detachRenderTree):
3217 (WebCore::Style::resolveLocal):
3218 (WebCore::Style::updateTextStyle):
3219 (WebCore::Style::resolveShadowTree):
3220 (WebCore::Style::resolveTree):
3222 Documents only ever have one child element. Remove the loop.
3224 (WebCore::Style::detachRenderTreeInReattachMode):
3225 (WebCore::Style::reattachRenderTree):
3226 * style/StyleResolveTree.h:
3228 (WebCore::SVGTests::handleAttributeChange):
3229 * xml/XMLErrors.cpp:
3230 (WebCore::XMLErrors::insertErrorMessageBlock):
3231 * xml/parser/XMLDocumentParserLibxml2.cpp:
3232 (WebCore::XMLDocumentParser::startElementNs):
3234 2013-08-30 Andreas Kling <akling@apple.com>
3236 Document style resolve should take Document&.
3237 <https://webkit.org/b/120534>
3239 Reviewed by Darin Adler.
3241 Tweak Style::resolveTree(Document*) and Style::resolveForDocument(Document*) to take Document& instead.
3244 (WebCore::Document::recalcStyle):
3245 * html/HTMLLinkElement.cpp:
3246 (WebCore::HTMLLinkElement::process):
3247 * style/StyleResolveForDocument.cpp:
3248 (WebCore::Style::resolveForDocument):
3249 * style/StyleResolveForDocument.h:
3250 * style/StyleResolveTree.cpp:
3251 (WebCore::Style::resolveTree):
3252 * style/StyleResolveTree.h:
3254 2013-08-30 Darin Adler <darin@apple.com>
3256 [Mac] No need for Pasteboard::getDataSelection
3257 https://bugs.webkit.org/show_bug.cgi?id=120536
3259 Reviewed by Anders Carlsson.
3261 * editing/Editor.h: Added some Mac-only private member functions.
3263 * editing/mac/EditorMac.mm:
3264 (WebCore::Editor::selectionInWebArchiveFormat): Added.
3265 (WebCore::Editor::adjustedSelectionRange): Added.
3266 (WebCore::attributedStringForRange): Added.
3267 (WebCore::dataInRTFDFormat): Added.
3268 (WebCore::dataInRTFFormat): Added.
3269 (WebCore::Editor::dataSelectionForPasteboard): Moved the implementation
3270 of Pasteboard::getDataSelection here, refactoring to share code with the
3271 writeSelectionToPasteboard function.
3272 (WebCore::Editor::writeSelectionToPasteboard): Refactored to share code
3273 with the new function above.
3275 * platform/Pasteboard.h: Removed getDataSelection. One less layering violation.
3276 * platform/mac/PasteboardMac.mm: Ditto.
3278 2013-08-30 Rob Buis <rwlbuis@webkit.org>
3280 SVG error parsing empty path
3281 https://bugs.webkit.org/show_bug.cgi?id=78980
3283 Reviewed by Darin Adler.
3285 According to the spec (http://www.w3.org/TR/SVG/paths.html#PathData), path 'd' attribute can be empty.
3286 No error should be reported in this case.
3288 * svg/SVGPathParser.cpp:
3289 (WebCore::SVGPathParser::parsePathDataFromSource):
3290 * svg/SVGPathUtilities.cpp:
3291 (WebCore::buildPathFromString):
3292 (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
3293 (WebCore::buildPathFromByteStream):
3294 (WebCore::buildSVGPathSegListFromByteStream):
3295 (WebCore::buildStringFromByteStream):
3296 (WebCore::buildStringFromSVGPathSegList):
3297 (WebCore::buildSVGPathByteStreamFromString):
3298 (WebCore::buildAnimatedSVGPathByteStream):
3299 (WebCore::addToSVGPathByteStream):
3301 2013-08-30 Andreas Kling <akling@apple.com>
3303 Try to fix CSS_VARIABLES and CSS_DEVICE_ADAPTATION builds.
3305 * css/StyleResolver.cpp:
3306 (WebCore::StyleResolver::StyleResolver):
3307 (WebCore::StyleResolver::resolveVariables):
3309 2013-08-30 Commit Queue <commit-queue@webkit.org>
3311 Unreviewed, rolling out r154891.
3312 http://trac.webkit.org/changeset/154891
3313 https://bugs.webkit.org/show_bug.cgi?id=120539
3315 broke the mac build (Requested by Ossy on #webkit).
3317 * platform/network/SynchronousLoaderClient.h:
3319 2013-08-30 Csaba Osztrogonác <ossy@webkit.org>
3321 Add USE(CFNETWORK) guard to SynchronousLoaderClient::didReceiveAuthenticationChallengedidReceiveAuthenticationChallenge()
3322 https://bugs.webkit.org/show_bug.cgi?id=120532
3324 Reviewed by Darin Adler.
3326 * platform/network/SynchronousLoaderClient.h:
3328 2013-08-30 Brent Fulgham <bfulgham@apple.com>
3330 [Windows] Video inside page always uses non-hardware accelerated playback
3331 https://bugs.webkit.org/show_bug.cgi?id=120448
3333 Reviewed by Eric Carlson.
3335 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3336 (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Check for
3337 D3D device. If it doesn't exist, switch to compositing mode and try again.
3339 2013-08-30 Leo Yang <leoyang@blackberry.com>
3341 Possible dangling CachedResourceClient of StyleRuleImport and XSLImportRule
3342 https://bugs.webkit.org/show_bug.cgi?id=120479
3344 Reviewed by Darin Adler.
3346 In StyleRuleImport::requestStyleSheet() and XSLImportRule::loadSheet() we
3347 didn't call removeClient() for m_cachedSheet before assigning m_cachedSheet
3348 a new value. This could leave the client as a client of the old cached
3349 sheet and dangling after the client is deleted. Fix them by calling removeClient()
3350 before assigning m_cacheSheet a new value.
3352 Found by code inspection. Seems no way to test it automatically.
3354 * css/StyleRuleImport.cpp:
3355 (WebCore::StyleRuleImport::requestStyleSheet):
3356 * xml/XSLImportRule.cpp:
3357 (WebCore::XSLImportRule::loadSheet):
3359 2013-08-30 Gabor Abraham <abrhm@inf.u-szeged.hu>
3361 Fix unused parameter warning in graphics/cairo/GraphicsContextCairo.cpp file.
3362 https://bugs.webkit.org/show_bug.cgi?id=120524
3364 Reviewed by Darin Adler.
3366 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3367 (WebCore::GraphicsContext::fillRectWithRoundedHole):
3369 2013-08-30 Andreas Kling <akling@apple.com>
3371 StyleResolver & friends should use Document&.
3372 <https://webkit.org/b/120527>
3374 Reviewed by Antti Koivisto.
3376 Document&-ify StyleResolver, ElementRuleCollector and SelectorChecker.
3378 2013-08-30 Brent Fulgham <bfulgham@apple.com>
3380 [Windows] Unreviewed build correction after r154835. Only seen when doing a
3381 full (clean) rebuild.
3383 * DerivedSources.cpp: Remove reference to deleted JSHTMLDialogElement.cpp
3385 2013-08-30 Tamas Czene <tczene@inf.u-szeged.hu>
3387 Resolve unused parameter warning in FindController.cpp
3388 https://bugs.webkit.org/show_bug.cgi?id=120407
3390 Reviewed by Darin Adler.
3392 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3393 (wordAtPositionForAtkBoundary):
3395 2013-08-30 Arpita Bahuguna <a.bah@samsung.com>
3397 setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
3398 https://bugs.webkit.org/show_bug.cgi?id=120293
3400 Reviewed by Darin Adler.
3402 setAttributeNode() performs a case-insensitive search for an existing
3403 attribute. If an existing attribute is found, it retrieves the index of
3404 such an attribute. For setting the attribute's new value, we call upon
3405 setAttributeInternal() to which both the index as well as the name of
3406 the attribute is passed.
3407 The name passed to this method is the same as the one passed to the
3408 setAttributeNode() API from the webpage and thus can be in any case.
3410 However, setAttributeInternal() uses this name to get the corresponding
3411 existing attribute node. Since this retrieval is not case-insensitive,
3412 the existing node is not returned and thus the new value is not set on
3414 We should instead use the passed index and use that to retrieve the
3417 Note that obtaining the attribute's value using getAttributeNode() would
3418 still return the correct value, i.e. the new one.
3420 Also, this change shall make our behavior similar to that of FF and IE.
3422 Test: fast/dom/Element/setAttributeNode-for-existing-attribute.html
3425 (WebCore::Element::setAttributeInternal):
3426 If the passed index is not equal to attributeNotFound, we use that index
3427 to retrieve the existing attribute.
3429 2013-08-30 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
3431 SimpleClassVectorTraits shall be used for RuleData
3432 https://bugs.webkit.org/show_bug.cgi?id=120526
3434 Reviewed by Andreas Kling.
3436 Whereas RuleData is POD type and whereas there are quite a lot of Vector<RuleData> occurrences in the code,
3437 it makes sense to use SimpleClassVectorTraits for RuleData and hence to allow using more efficient mem functions
3442 2013-08-30 Andreas Kling <akling@apple.com>
3444 Node::document() should return a reference.
3445 <https://webkit.org/b/120496>
3447 Reviewed by Antti Koivisto.
3449 Now that orphan DocumentType nodes also have document pointers, it's no longer
3450 possible to have a null Node::document().
3452 Cement this by making document() return a reference, and remove the various
3453 null checks exposed by this.
3455 2013-08-30 Andrei Parvu <parvu@adobe.com>
3457 [CSS Masking] -webkit-mask-repeat: space does not work
3458 Added the space option to background-repeat and -webkit-mask-repeat.
3459 With the property value 'space', the background or mask image gets repeated as often as it fits within the background positioning
3460 area. The repeated images are spaced equally to fill the unused area.
3461 https://bugs.webkit.org/show_bug.cgi?id=119324
3463 Reviewed by Dirk Schulze.
3465 Tests: css3/background/background-repeat-space-border.html
3466 css3/background/background-repeat-space-content.html
3467 css3/background/background-repeat-space-padding.html
3468 css3/masking/mask-repeat-space-border.html
3469 css3/masking/mask-repeat-space-content.html
3470 css3/masking/mask-repeat-space-padding.html
3472 * platform/graphics/GeneratorGeneratedImage.cpp:
3473 (WebCore::GeneratorGeneratedImage::drawPattern): Passed the space values to the image buffer.
3474 * platform/graphics/Image.cpp:
3475 (WebCore::Image::drawTiled): Added the space values when computing the location of the tile.
3476 * platform/graphics/Image.h: Added the space property.
3477 (WebCore::Image::spaceSize):
3478 (WebCore::Image::setSpaceSize):
3479 * platform/graphics/ImageBuffer.h: Added the space property.
3480 (WebCore::ImageBuffer::spaceSize):
3481 (WebCore::ImageBuffer::setSpaceSize):
3482 * platform/graphics/cg/ImageBufferCG.cpp: Passed the space values when copying an image.
3483 (WebCore::ImageBuffer::copyImage):
3484 * platform/graphics/cg/ImageCG.cpp: Added the space values when creating a platform pattern.
3485 (WebCore::Image::drawPattern):
3486 * rendering/RenderBoxModelObject.cpp:
3487 (WebCore::RenderBoxModelObject::paintFillLayerExtended): Computed the space values on x and y axis.
3488 (WebCore::getSpace):
3489 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Pass the space values to the Image class.
3490 * rendering/RenderBoxModelObject.h: Added the space property.
3491 (WebCore::RenderBoxModelObject::BackgroundImageGeometry::spaceSize):
3492 (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setSpaceSize):
3493 * svg/graphics/SVGImage.cpp: Passed the space property to the created image.
3494 (WebCore::SVGImage::drawPatternForContainer):
3495 * svg/graphics/SVGImageForContainer.cpp: Passed the space property to the image property.
3496 (WebCore::SVGImageForContainer::drawPattern):
3498 2013-08-30 Antti Koivisto <antti@apple.com>
3500 Remove AttachContext
3501 https://bugs.webkit.org/show_bug.cgi?id=120518
3503 Reviewed by Andreas Kling.
3505 This type is not useful anymore. Just pass the precomputed style to attachRenderTree and reattach-or-not flag to detachRenderTree.
3507 * style/StyleResolveTree.cpp:
3508 (WebCore::Style::createRendererIfNeeded):
3509 (WebCore::Style::attachChildren):
3510 (WebCore::Style::attachShadowRoot):
3511 (WebCore::Style::attachRenderTree):
3512 (WebCore::Style::detachChildren):
3513 (WebCore::Style::detachShadowRoot):
3514 (WebCore::Style::detachRenderTree):
3515 (WebCore::Style::reattachRenderTree):
3516 (WebCore::Style::resolveLocal):
3517 * style/StyleResolveTree.h:
3519 2013-08-30 Commit Queue <commit-queue@webkit.org>
3521 Unreviewed, rolling out r154826.
3522 http://trac.webkit.org/changeset/154826
3523 https://bugs.webkit.org/show_bug.cgi?id=120517
3525 Still breaks icloud.com (Requested by mwenge_ on #webkit).
3527 * rendering/RenderBox.cpp:
3528 (WebCore::RenderBox::computePositionedLogicalWidth):
3529 (WebCore::RenderBox::computePositionedLogicalHeight):
3530 * rendering/RenderBox.h:
3531 (WebCore::RenderBox::intrinsicSize):
3532 * rendering/RenderButton.h:
3533 * rendering/RenderFileUploadControl.cpp:
3534 (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
3535 * rendering/RenderListBox.cpp:
3536 (WebCore::RenderListBox::RenderListBox):
3537 (WebCore::RenderListBox::computePreferredLogicalWidths):
3538 (WebCore::RenderListBox::computeLogicalHeight):
3539 * rendering/RenderListBox.h:
3540 * rendering/RenderMenuList.h:
3541 * rendering/RenderSlider.cpp:
3542 (WebCore::RenderSlider::computePreferredLogicalWidths):
3543 * rendering/RenderTextControl.cpp:
3544 (WebCore::RenderTextControl::RenderTextControl):
3545 (WebCore::RenderTextControl::computeLogicalHeight):
3546 * rendering/RenderTextControl.h:
3548 2013-08-29 Ryosuke Niwa <rniwa@webkit.org>
3550 Unduplicate the code to convert between VisiblePosition and index
3551 https://bugs.webkit.org/show_bug.cgi?id=120506
3553 Reviewed by Darin Adler.
3555 Encapsulate the conversion between VisiblePosition and index into indexForVisiblePosition
3556 and visiblePositionForIndexUsingCharacterIterator. It's unfortunate that these two functions
3557 are different from the two other existing functions of similar names but we've at least
3558 confined problems into a single cpp file now.
3560 * accessibility/AccessibilityRenderObject.cpp:
3561 (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
3562 (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
3563 * editing/Editor.cpp:
3564 (WebCore::findFirstMarkable):
3565 * editing/htmlediting.cpp:
3566 (WebCore::indexForVisiblePosition):
3567 (WebCore::visiblePositionForIndexUsingCharacterIterator):
3568 * editing/htmlediting.h:
3569 * html/HTMLTextFormControlElement.cpp:
3570 (WebCore::hasVisibleTextArea):
3571 (WebCore::HTMLTextFormControlElement::setSelectionRange):
3572 (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
3573 (WebCore::HTMLTextFormControlElement::visiblePositionForIndex):
3574 * html/HTMLTextFormControlElement.h:
3575 * rendering/RenderTextControl.cpp:
3576 * rendering/RenderTextControl.h:
3578 2013-08-29 Ryosuke Niwa <rniwa@webkit.org>
3580 Avoid Node references from AXObjectCache from leaking
3581 https://bugs.webkit.org/show_bug.cgi?id=120501
3583 Reviewed by Darin Adler.
3585 Merge https://chromium.googlesource.com/chromium/blink/+/454f31497613b6d0fbcfb0df757254b64a177c06
3586 without any tests since we don't have the same infrastructure to detect leaks in WebKit.
3588 A real world example of this would be selecting an <option> item inside frame by keyboard. The node will not be deref()-ed until the topDocument() is detached.
3590 The issue was that AccessibilityMenuListOption is created in childrenChanged()
3591 hook called when its RenderObject is being destroyed. This patch modifies AccessibilityMenuListPopup so it won't create AccessibilityMenuListOption if its
3592 element is already detached.
3594 * accessibility/AccessibilityMenuListPopup.cpp:
3595 (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
3596 * rendering/RenderMenuList.cpp:
3597 (WebCore::RenderMenuList::didUpdateActiveOption):
3599 2013-08-26 Simon Fraser <simon.fraser@apple.com>
3601 Implement object-fit CSS property
3602 https://bugs.webkit.org/show_bug.cgi?id=52040
3604 Reviewed by Antti Koivisto, Sam Weinig.
3606 Merge object-fit patch from Blink r156535, which started as a patch
3609 Since then, the spec has gone to CR. This patch is an
3610 implementation of object-fit as described in
3611 http://www.w3.org/TR/2012/CR-css3-images-20120417/#object-fit
3613 Object-fit is used to maintain the aspect ratio of replaced content
3614 within its content box. All object-fit values but the initial one
3615 ('fill') will always ensure that the aspect ratio is retained, in
3616 different ways (fit inside the content box, cover the content box, or
3617 use intrinsic size). Painting is always clipped against the content
3618 box, regardless of the 'overflow' property.
3620 Tests: fast/css/object-fit/object-fit-canvas.html
3621 fast/css/object-fit/object-fit-embed.html
3622 fast/css/object-fit/object-fit-grow-landscape.html
3623 fast/css/object-fit/object-fit-grow-portrait.html
3624 fast/css/object-fit/object-fit-img-svg.html
3625 fast/css/object-fit/object-fit-img-svg2.html
3626 fast/css/object-fit/object-fit-img.html
3627 fast/css/object-fit/object-fit-input-image.html
3628 fast/css/object-fit/object-fit-object.html
3629 fast/css/object-fit/object-fit-shrink.html
3630 fast/css/object-fit/object-fit-video-poster.html
3631 fast/css/parsing-object-fit.html
3632 http/tests/css/object-fit-delayed-img-svg.html
3633 media/video-object-fit-change.html
3634 media/video-object-fit.html
3636 * css/CSSComputedStyleDeclaration.cpp:
3637 (WebCore::ComputedStyleExtractor::propertyValue):
3638 * css/CSSParser.cpp:
3639 (WebCore::isValidKeywordPropertyAndValue):
3640 (WebCore::isKeywordPropertyID):
3641 (WebCore::CSSParser::parseValue):
3642 * css/CSSPrimitiveValueMappings.h:
3643 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3644 (WebCore::CSSPrimitiveValue::operator EObjectFit):
3645 * css/CSSProperty.cpp:
3646 (WebCore::CSSProperty::isInheritedProperty):
3647 * css/CSSPropertyNames.in:
3648 * css/CSSValueKeywords.in:
3649 * css/DeprecatedStyleBuilder.cpp:
3650 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3651 * css/StyleResolver.cpp:
3652 (WebCore::StyleResolver::applyProperty):
3654 (video): Set object-fit to 'contain'. This is how VIDEO elements
3656 * loader/cache/CachedImage.cpp:
3657 (WebCore::CachedImage::imageSizeForRenderer):
3658 * loader/cache/CachedImage.h:
3659 * platform/graphics/LayoutSize.h:
3660 (WebCore::fitLayoutSizeToAspectRatio): New function to grow or shrink
3661 in one dimension to fit to the aspect ratio.
3662 * rendering/RenderHTMLCanvas.cpp:
3663 (WebCore::RenderHTMLCanvas::paintReplaced): Apply object-fit and
3665 * rendering/RenderImage.cpp:
3666 (WebCore::RenderImage::updateInnerContentRect):
3667 (WebCore::RenderImage::imageDimensionsChanged): Update intrinsic
3668 size properly, and recalculate the inner content rectangle (the
3669 exact area occupied by the replaced content) again if appropriate.
3670 (WebCore::RenderImage::paintReplaced): Apply object-fit and clip
3672 (WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
3673 object-fit may leave parts of the content box empty, in which case
3674 it won't be fully obscured.
3675 (WebCore::RenderImage::layout):
3676 * rendering/RenderImage.h:
3677 * rendering/RenderImageResource.cpp:
3678 (WebCore::RenderImageResource::intrinsicSize): Need this to
3679 differentiate between intrinsic and extrinsic size for SVG images.
3680 * rendering/RenderImageResource.h:
3681 * rendering/RenderImageResourceStyleImage.h:
3682 * rendering/RenderReplaced.cpp:
3683 (WebCore::RenderReplaced::replacedContentRect): Return the
3684 rectangle occupied by the replaced content. This will be identical
3685 to the content box if object-fit is 'fill', but will typically be
3686 something else for other values.
3687 * rendering/RenderReplaced.h:
3688 * rendering/RenderVideo.cpp:
3689 (WebCore::RenderVideo::videoBox): Not much left to do here, with
3690 the new RenderReplaced::replacedContentRect() method in place.
3691 (WebCore::RenderVideo::paintReplaced): Apply object-fit and clip
3693 * rendering/style/RenderStyle.cpp:
3694 (WebCore::RenderStyle::changeRequiresRepaint):
3695 * rendering/style/RenderStyle.h:
3696 * rendering/style/RenderStyleConstants.h:
3697 * rendering/style/StyleRareNonInheritedData.cpp:
3698 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3699 (WebCore::StyleRareNonInheritedData::operator==):
3700 * rendering/style/StyleRareNonInheritedData.h:
3702 2013-08-29 Tim Horton <timothy_horton@apple.com>
3704 SVG clipping, masking, and gradients-on-text do not respect the device scale factor
3705 https://bugs.webkit.org/show_bug.cgi?id=120377
3706 <rdar://problem/14777944>
3708 Reviewed by Simon Fraser.
3710 Tests: svg/custom/masking-clipping-hidpi.svg
3712 calculateTransformationToOutermostCoordinateSystem should include the page's
3713 device scale factor in its transform.
3715 * rendering/svg/SVGRenderingContext.cpp:
3716 (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
3718 2013-08-29 Chris Fleizach <cfleizach@apple.com>
3720 AX: Crash when VoiceOver reference a TextMarker from an iframe that has been removed
3721 https://bugs.webkit.org/show_bug.cgi?id=120318
3723 Reviewed by Darin Adler.
3725 These crashes occur because an AXTextMarker is retrieved that reference a Node in an iframe.
3726 The iframe goes away, but when it tries to clean up and remove that Node from the InUse cache,
3727 the document() tree has already been detached, so it never clears the actual InUse cache.
3729 The fix here is to pre-emptively clean up any nodes in the document going away when the frame is about to disconnect.
3731 I'm removing the clearAXObjectCache() at the disconnectOwnerElement because it
3732 1) Cleared the AXObjectCache for the iframe document (which is always empty -- only the top level doc maintains the cache), because
3733 the document() tree had already been detached... so it essentially did nothing.
3734 2) And if it did work, we wouldn't want this behavior -- that is to say, when an iframe goes away, we don't want to clear the entire cache for all
3735 the other documents (there's even an existing layout test to verify this behavior).
3737 Test: platform/mac/accessibility/stale-textmarker-crash.html
3739 * accessibility/AXObjectCache.cpp:
3740 (WebCore::AXObjectCache::clearTextMarkerNodesInUse):
3741 * accessibility/AXObjectCache.h:
3743 (WebCore::Frame::disconnectOwnerElement):
3745 2013-08-29 Brent Fulgham <bfulgham@apple.com>
3747 [Windows] More unreviewed gardening of project file.
3748 Move css files inline with related source code.
3750 * WebCore.vcxproj/WebCore.vcxproj:
3751 * WebCore.vcxproj/WebCore.vcxproj.filters:
3753 2013-08-29 Sam Weinig <sam@webkit.org>
3755 Add ENABLE guards for Promises
3756 https://bugs.webkit.org/show_bug.cgi?id=120488
3758 Reviewed by Andreas Kling.
3760 * Configurations/FeatureDefines.xcconfig:
3762 2013-08-29 Andreas Kling <akling@apple.com>
3764 Inspector: Use a bit of RefPtr::release() in generated code.
3765 <https://webkit.org/b/120485>
3767 Reviewed by Darin Adler.
3769 Just something I spotted while reading InspectorBackendDispatcher.cpp.
3770 Avoid 3 cases of reference count churnery.
3772 * inspector/CodeGeneratorInspectorStrings.py:
3774 2013-08-29 Christophe Dumez <ch.dumez@sisa.samsung.com>
3776 According to DOM4, all DocType nodes should have a document
3777 https://bugs.webkit.org/show_bug.cgi?id=99244
3779 Reviewed by Darin Adler.
3781 Doctypes now always have a node document and can be moved across document boundaries as per
3782 the latest DOM4 specification:
3783 http://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype
3784 http://dom.spec.whatwg.org/#dom-node-ownerdocument
3786 This means that DOMImplementation.createDocumentType() now sets the ownerDocument of the
3787 new DocumentType Node to the associated document of the current "context" object. In
3788 DOM4, all nodes have a document at all times. DocumentType nodes can now be moved across
3789 document boundaries so that the node can be added to a Document after being created.
3791 This means we will no longer need to special case DocumentType nodes in the code and
3792 Node::document() can no longer return NULL, which means that we'll be able to remove
3793 NULL checks in call sites.
3795 Firefox stable and since recently Blink already follow DOM4 here while IE10 does not (yet).
3797 Test: fast/dom/createDocumentType-ownerDocument.html
3799 * dom/ContainerNode.cpp:
3800 (WebCore::checkAcceptChild):
3801 * dom/DOMImplementation.cpp:
3802 (WebCore::DOMImplementation::createDocumentType):
3803 (WebCore::DOMImplementation::createDocument):
3805 (WebCore::Node::document):
3807 2013-08-29 Darin Adler <darin@apple.com>
3809 Pasteboard::writeSelection violates layering (first step, fixes it for Mac platform only)
3810 https://bugs.webkit.org/show_bug.cgi?id=120483
3812 Reviewed by Anders Carlsson.
3814 * editing/Editor.cpp:
3815 (WebCore::Editor::cut): Added some comments. Use the new writeSelectionToPasteboard
3816 function on Mac instead of Pasteboard::writeSelection.
3817 (WebCore::Editor::copy): Ditto.
3819 * editing/Editor.h: Removed an old unused Mac-only writeSelectionToPasteboard function
3820 that was a cover that called through to Pasteboard::writeSelectionForTypes. Added a new
3821 Mac-only writeSelectionToPasteboard function that is destined to become cross-platform soon.
3823 * editing/mac/EditorMac.mm:
3824 (WebCore::Editor::writeSelectionToPasteboard): Added. Uses a new pattern where the Editor
3825 puts all the data into a structure called PasteboardWebContent then calls the Pasteboard to
3826 do the work. The platform-specific aspect of PasteboardWebContent is what formats are needed
3829 * page/DragController.cpp:
3830 (WebCore::DragController::startDrag): Added some comments. Use the new writeSelectionToPasteboard
3831 function on Mac instead of Pasteboard::writeSelection.
3833 * platform/Pasteboard.h: Remove some unneeded forward declarations. Added comments for all functions
3834 that don't belong in this class because they are layering violations; this becomes the to do list for
3835 the project we are beginning here. Added the new PasteboardWebContent structure, empty on all platforms
3836 except for Mac for now. Removed writeSelectionForTypes, a Mac-only function that is no longer used.
3837 Added setTypes and writeAfterSettingTypes, the two halves of the future function named writeWebContent.
3838 Put the writeSelection function inside a "not Mac" if statement. Later to be deleted entirely.
3840 * platform/mac/PasteboardMac.mm: Removed now-unneeded selectionPasteboardTypes,
3841 Pasteboard::writeSelectionForTypes, and writeSelection functions.
3842 (WebCore::Pasteboard::setTypes): Added. First half of writing web content to the pasteboard.
3843 (WebCore::Pasteboard::writeAfterSettingTypes): Added. Second half of writing web content to the pasteboard.
3845 2013-08-29 Antti Koivisto <antti@apple.com>
3847 Remove code behind ENABLE(DIALOG_ELEMENT)
3848 https://bugs.webkit.org/show_bug.cgi?id=120467
3850 Reviewed by Darin Adler.
3852 It is incomplete and no one is building it.
3855 * Configurations/FeatureDefines.xcconfig:
3856 * DerivedSources.make:
3857 * DerivedSources.pri:
3858 * GNUmakefile.list.am:
3861 * WebCore.xcodeproj/project.pbxproj:
3862 * bindings/generic/RuntimeEnabledFeatures.cpp:
3863 * bindings/generic/RuntimeEnabledFeatures.h:
3864 * css/StyleResolver.cpp:
3865 (WebCore::StyleResolver::adjustRenderStyle):
3867 * dom/ContextFeatures.cpp:
3868 * dom/ContextFeatures.h:
3872 (WebCore::Element::removedFrom):
3873 (WebCore::Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries):
3875 (WebCore::Element::isDisabledFormControl):
3876 * dom/ElementRareData.h:
3877 (WebCore::ElementRareData::ElementRareData):
3878 * html/HTMLDialogElement.cpp: Removed.
3879 * html/HTMLDialogElement.h: Removed.
3880 * html/HTMLDialogElement.idl: Removed.
3881 * html/HTMLElementsAllInOne.cpp:
3882 * html/HTMLTagNames.in:
3883 * rendering/RenderDialog.cpp: Removed.
3884 * rendering/RenderDialog.h: Removed.
3885 * rendering/RenderLayer.cpp:
3886 (WebCore::RenderLayer::rebuildZOrderLists):
3887 (WebCore::RenderLayer::collectLayers):
3888 * rendering/RenderLayer.h:
3889 * rendering/RenderObject.h:
3890 (WebCore::RenderObject::isCounter):
3891 * rendering/RenderingAllInOne.cpp:
3892 * testing/InternalSettings.cpp:
3893 (WebCore::InternalSettings::Backup::Backup):
3894 (WebCore::InternalSettings::Backup::restoreTo):
3895 * testing/InternalSettings.h:
3897 2013-08-29 Simon Fraser <simon.fraser@apple.com>
3899 Fix slider thumb event handling to use local, not absolute coordinates
3900 https://bugs.webkit.org/show_bug.cgi?id=120480
3902 Reviewed by Darin Adler.
3904 SliderThumbElement::setPositionFromPoint() did all of its coordinate
3905 math by mapping renderer rects into absolute coordinates, which was
3906 unnecessary and expensive.
3908 Fix by doing all the math in the coordinate space of the input's
3909 renderer. This simplified the code. Also, currentPosition
3910 was computed but unused, so was removed.
3912 No behavior change. Tested by fast/forms/range/slider-transformed.html
3914 * html/shadow/SliderThumbElement.cpp:
3915 (WebCore::SliderThumbElement::setPositionFromPoint):
3917 2013-08-29 Zan Dobersek <zdobersek@igalia.com>
3919 [Automake] libWebCoreDOM.la could use a better name
3920 https://bugs.webkit.org/show_bug.cgi?id=120232
3922 Reviewed by Martin Robinson.
3924 * bindings/gobject/GNUmakefile.am: Rename the libWebCoreDOM library to libGObjectDOMBindings.
3926 2013-08-29 Joseph Pecoraro <pecoraro@apple.com>
3928 Web Inspector: Download Web Archive of Inspected Page
3929 https://bugs.webkit.org/show_bug.cgi?id=119774
3931 Reviewed by Timothy Hatcher.
3933 Add PageAgent.archive which will return a Base-64 encoded web archive
3934 when successful. In order to then allow saving non-string files, extend
3935 InspectorFrontendHost.save to allow for Base-64 encoded data.
3937 * inspector/Inspector.json:
3938 * inspector/InspectorPageAgent.cpp:
3939 (WebCore::InspectorPageAgent::archive):
3940 * inspector/InspectorPageAgent.h:
3941 Introduce and implement PageAgent.archive. Create a Web Archive of the
3944 * inspector/InspectorFrontendClient.h:
3945 * inspector/InspectorFrontendClientLocal.h:
3946 (WebCore::InspectorFrontendClientLocal::save):
3947 * inspector/InspectorFrontendHost.cpp:
3948 (WebCore::InspectorFrontendHost::save):
3949 * inspector/InspectorFrontendHost.h:
3950 * inspector/InspectorFrontendHost.idl:
3951 Extend InspectorFrontendHost.save to include a base64Encoded param.
3953 * inspector/front-end/FileManager.js:
3954 * inspector/front-end/InspectorFrontendHostStub.js:
3955 (.WebInspector.InspectorFrontendHostStub.prototype.save):
3956 Misc. updates to the old inspector for function changes.
3958 2013-08-29 Robert Hogan <robert@webkit.org>
3960 Positioned Replaced Elements That Aren't RenderReplaced get Incorrect Width
3961 https://bugs.webkit.org/show_bug.cgi?id=93735
3963 Reviewed by David Hyatt.
3965 Replaced elements that aren't RenderReplaced aren't |isReplaced| and don't have an
3966 intrinsic height or width. This causes them to go down the wrong height and width computation
3967 path in RenderBox when they are absolute positioned.
3969 The notion of |isReplaced| is entwined with the notion of being |isInline| so it isn't really
3970 possible to make them isReplaced without re-wiring a lot of code. So instead use an ad-hoc definition
3971 of isReplacedElement in RenderBox to bring all replaced elements into the height and width calculation.
3972 To make sure we get the right height and width in there, give non-RenderReplaced replaced renderers
3973 the helpers for returning their approximation of intrinsic height and width.
3975 The initial attempt at landing this patch had to be rolled out because it used LayoutUnit() for default
3976 intrinsic height of some replaced elements and this made the layout of the elements unstable in some sites.
3977 The fix for this issue is captured in intrinsic-button-and-input-height.html.
3979 Tests: fast/replaced/intrinsic-button-and-input-height.html
3980 fast/replaced/width-and-height-of-positioned-replaced-elements.html
3982 * rendering/RenderBox.cpp:
3983 (WebCore::isReplacedElement):
3984 (WebCore::RenderBox::computePositionedLogicalWidth):
3985 (WebCore::RenderBox::computePositionedLogicalHeight):
3986 * rendering/RenderBox.h:
3987 (WebCore::RenderBox::intrinsicSize):
3988 * rendering/RenderButton.h:
3989 * rendering/RenderFileUploadControl.cpp:
3990 (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
3991 * rendering/RenderListBox.cpp: