1 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
3 Unreviewed Mountain Lion build fix
5 * platform/spi/cocoa/CoreTextSPI.h:
7 2014-11-11 Commit Queue <commit-queue@webkit.org>
9 Unreviewed, rolling out r175852.
10 https://bugs.webkit.org/show_bug.cgi?id=138626
12 Broke PLT by introducing a crash. (Requested by rniwa on
17 "Lazily create HTMLInputElement's inputType and shadow
19 https://bugs.webkit.org/show_bug.cgi?id=138524
20 http://trac.webkit.org/changeset/175852
22 2014-11-11 Chris Dumez <cdumez@apple.com>
24 Regression(r175947): Caused assertions in debug builds
25 https://bugs.webkit.org/show_bug.cgi?id=138620
27 Reviewed by Benjamin Poulain.
29 In HTMLCollection::traverseForward(), traversedCount was incremented 1
30 time too many when hitting the end of the collection (i.e. element
31 becomes null). Doing a partial revert.
33 No new tests, already covered by existing tests.
35 * html/HTMLCollection.cpp:
36 (WebCore::HTMLCollection::traverseForward):
38 2014-11-11 Tim Horton <timothy_horton@apple.com>
40 DataDetectors' menu items aren't presented in the telephone number menu
41 https://bugs.webkit.org/show_bug.cgi?id=138602
42 <rdar://problem/18866308>
44 Reviewed by Beth Dakin.
46 * English.lproj/Localizable.strings:
47 Remove a now-unused localized string.
49 2014-11-11 Daniel Bates <dabates@apple.com>
51 [Frame Flattening] ASSERT(transaction->view == &view()) fails in RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction()
52 https://bugs.webkit.org/show_bug.cgi?id=138615
53 <rdar://problem/18928487>
55 Reviewed by David Hyatt.
57 Fixes an issue where we always expected that the RenderView associated with the RenderBlock called in
58 RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction() is the same as the RenderView associated with
59 the top transaction in the UpdateScrollInfoAfterLayoutTransaction stack regardless of frame flattening. This
60 expectation is only true when frame flattening is disabled.
62 Test: fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update.html
64 * rendering/RenderBlock.cpp:
65 (WebCore::RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction):
67 2014-11-11 Tim Horton <timothy_horton@apple.com>
69 Adopt DDActionContext menu type SPI
70 https://bugs.webkit.org/show_bug.cgi?id=138603
71 <rdar://problem/18867627>
73 Reviewed by Anders Carlsson.
75 * platform/spi/mac/DataDetectorsSPI.h:
78 2014-11-11 Tim Horton <timothy_horton@apple.com>
80 Data Detectors popovers should be dismissed upon scrolling
81 https://bugs.webkit.org/show_bug.cgi?id=138600
82 <rdar://problem/18932770>
84 Reviewed by Beth Dakin.
86 * platform/spi/mac/DataDetectorsSPI.h:
87 Adjust the SPI header.
89 2014-11-11 Tim Horton <timothy_horton@apple.com>
91 Localize strings for action menus
92 https://bugs.webkit.org/show_bug.cgi?id=138591
93 <rdar://problem/18815343>
95 Reviewed by Dan Bates.
97 * English.lproj/Localizable.strings:
98 Add a bunch of localizable strings.
100 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
103 https://bugs.webkit.org/show_bug.cgi?id=138616
105 Reviewed by Simon Fraser.
107 No new tests because there is no behavior change.
110 * platform/ios/WebCoreSystemInterfaceIOS.mm:
111 * platform/mac/WebCoreSystemInterface.h:
112 * platform/mac/WebCoreSystemInterface.mm:
114 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
116 Move CTFontTransformGlyphs out from WKSI
117 https://bugs.webkit.org/show_bug.cgi?id=138599
119 Reviewed by Simon Fraser.
121 No new tests because there is no behavior change.
125 * platform/graphics/SimpleFontData.cpp:
126 (WebCore::SimpleFontData::applyTransforms):
127 * platform/graphics/SimpleFontData.h:
128 * platform/ios/WebCoreSystemInterfaceIOS.mm:
129 * platform/mac/WebCoreSystemInterface.h:
130 * platform/mac/WebCoreSystemInterface.mm:
131 * platform/spi/cocoa/CoreTextSPI.h:
133 2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
135 Use std::unique_ptr<>|std::make_unique_ptr in RenderThemeEfl::ThemePartCacheEntry::create()
136 https://bugs.webkit.org/show_bug.cgi?id=138558
138 Reviewed by Anders Carlsson.
140 This patch removes PassOwnPtr and OwnPtr in RenderThemeEfl::ThemePartCacheEntry::create().
141 It would be good if we also remove create() factory function though, in this case, it is
142 a little hard to remove it since the create() factory function does many works to create
143 a ThemePartCacheEntry instance. Thus this patch just replaces PassOwnPtr|OwnPtr with
144 std::unique_ptr<> and std::make_unique<> in RenderThemeEfl::ThemePartCacheEntry::create().
146 Besides the theme entries have been maintained by Eina_List*. Unfortunately it doesn't support
147 std::unique_ptr<> yet. Thus the Eina_List* should be replaced with Vector<std::unique_ptr<>>
148 so that m_partCache has ownship of all EFL theme entries. This patch tries to keep original
149 cache algorithm based on Vector class.
151 No new tests, no behavior changes.
153 * platform/efl/RenderThemeEfl.cpp:
154 (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
155 (WebCore::RenderThemeEfl::getThemePartFromCache):
156 * platform/efl/RenderThemeEfl.h:
158 2014-11-09 Darin Adler <darin@apple.com>
160 Minor tweaks to HTMLCollection
161 https://bugs.webkit.org/show_bug.cgi?id=138556
163 Reviewed by Chris Dumez.
165 * accessibility/AccessibilityRenderObject.cpp:
166 (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
167 Update for namedElements function that now returns a Vector; also use
168 a new style for loop to iterate it.
170 * bindings/js/JSHTMLAllCollectionCustom.cpp: Removed some unneeded includes.
171 (WebCore::namedItems): Updated name to match WebKit coding style, and also
172 updated to use the return value from namedItems, which now returns a Vector.
173 (WebCore::callHTMLAllCollection): Updated for namedItems name change.
174 Also removed explicit Node* type from result of namedItemWithIndex, since that
175 function now returns a more specific type.
176 (WebCore::JSHTMLAllCollection::nameGetter): Update for namedItems name change.
177 (WebCore::JSHTMLAllCollection::item): Ditto.
178 (WebCore::JSHTMLAllCollection::namedItem): Ditto.
180 * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Removed some unneeded includes.
181 (WebCore::namedItems): Updated name to match WebKit coding style, and also
182 updated to use the return value from namedItems, which now returns a Vector.
183 (WebCore::JSHTMLFormControlsCollection::nameGetter): Update for namedItems name change.
184 (WebCore::JSHTMLFormControlsCollection::namedItem): Ditto.
186 * bindings/js/JSHTMLFormElementCustom.cpp:
187 (WebCore::JSHTMLFormElement::nameGetter): Updated to use the return value from
188 namedItems, which now returns a Vector.
190 * html/HTMLAllCollection.cpp:
191 (WebCore::HTMLAllCollection::HTMLAllCollection): Marked the constructor inline,
192 since it's only used in one place, the create function.
193 (WebCore::HTMLAllCollection::~HTMLAllCollection): Deleted. No need to have an
194 explicit destructor since there's nothing special to implement, and includers of
195 the header file have everything they ened to compile the compiler-generated one.
196 (WebCore::HTMLAllCollection::namedItemWithIndex): Changed return type to Element.
198 * html/HTMLAllCollection.h: Removed unneeded explicit declaration of destructor.
199 Chagned return type of namedItemWithIndex to Element.
201 * html/HTMLCollection.cpp:
202 (WebCore::HTMLCollection::rootTypeFromCollectionType): Marked this inline. Also
203 changed this to be a static member function so it can use the RootType enum, which
204 is now private to the class.
205 (WebCore::isMatchingHTMLElement): Marked this function static so it will get
207 (WebCore::isMatchingElement): Ditto.
208 (WebCore::previousElement): Marked this function inline since it's called in only
209 one place. Changed argument type to a reference since it can never be null.
210 (WebCore::HTMLCollection::iterateForPreviousElement): Changed argument name and
211 also updated for above changes.
212 (WebCore::firstMatchingElement): Marked this function static so it will get
214 (WebCore::nextMatchingElement): Ditto. Changed argument type to a reference
215 since it can never be null.
216 (WebCore::HTMLCollection::item): Changed return type to Element.
217 (WebCore::nameShouldBeVisibleInDocumentAll): Added an overload that takes an
218 Element. This streamlines the code below that calls it so it fits on one line.
219 (WebCore::firstMatchingChildElement): Marked this function static so it will get
221 (WebCore::nextMatchingSiblingElement): Ditto. Changed argument type to a reference
222 since it can never be null.
223 (WebCore::HTMLCollection::usesCustomForwardOnlyTraversal): Moved here from the
224 header since, although it's marked inline, it's only used inside this file.
225 (WebCore::HTMLCollection::traverseForward): Restructured the code a little bit
226 to make the function smaller and possibly easier to read. This does add one
227 redundant null check, but it seems OK to do that.
228 (WebCore::HTMLCollection::collectionTraverseBackward): Tweaked foramtting a bit.
229 (WebCore::HTMLCollection::namedItem): Changed return type to Element. Tightened
230 the code that calls nameShouldBeVisibleInDocumentAll so it fits better on one line.
231 Changed code that handles m_shouldOnlyIncludeDirectChildren to use a nested if
232 instead of an && since it makes the code a little easier to read.
233 (WebCore::HTMLCollection::updateNamedElementCache): Tweaked code a little bit,
234 using shorter variable names, and using references instead of pointers. Also removed
235 the call to didPopulate, since setNamedItemCache now takes care of that.
236 (WebCore::HTMLCollection::namedItems): Changed to return a Vector instead of
237 appending to an existing one. Also use reserveInitialCapacity and uncheckedAppend
238 for better performance. Added a FIXME, because there seems to be something wrong
239 here about this being non-virtual. Made other small tweaks to streamline the code.
240 (WebCore::HTMLCollection::customElementAfter): Moved this here from the header.
241 There is no reason to need to inline this.
243 * html/HTMLCollection.h: Removed unneeded includes. Moved function bodies out
244 of the class definitions so the class definitions are easier to read. Made some
245 functions that were formerly public or protected be private instead. Added a call
246 to didPopulate to setNamedItemCache so the callers don't have to do it.
248 * html/HTMLFormControlsCollection.cpp:
249 (WebCore::HTMLFormControlsCollection::namedItem): Changed return value to Element.
250 Tweaked coding style a little bit.
251 (WebCore::HTMLFormControlsCollection::updateNamedElementCache): Rearranged to
252 simplify a bit. Don't build the foundInputElements set when the owner is not a
253 form element, since we don't use the set in that case. Use shorter variable names,
254 and modern for loops. Also removed the call to didPopulate, since setNamedItemCache
255 now takes care of that.
257 * html/HTMLFormControlsCollection.h: Removed some uneeded forward declarations.
258 Updated return type for namedItem, and also made the override private.
260 * html/HTMLFormElement.cpp:
261 (WebCore::HTMLFormElement::namedElements): Changed to return a Vector and updated
262 function name accordingly.
263 * html/HTMLFormElement.h: Ditto.
265 * html/HTMLNameCollection.h: Removed a stray blank line.
267 * html/HTMLSelectElement.cpp:
268 (WebCore::HTMLSelectElement::namedItem): Changed return value to Element.
269 (WebCore::HTMLSelectElement::item): Ditto.
270 * html/HTMLSelectElement.h: Ditto.
272 * page/scrolling/AxisScrollSnapOffsets.cpp:
273 (WebCore::appendChildSnapOffsets): Rewrote loop as a for loop rather than a while
274 loop. Removed unwanted use of children()->collectionBegin() to get the first element
275 child of an HTMLElement. This function uses a mix of DOM and rendering functions that
276 is probably incorrect, but I did not tackle fixing that at this time.
278 2014-11-11 Dan Bernstein <mitz@apple.com>
280 [Mac] WebCore includes unused cursor image resources
281 https://bugs.webkit.org/show_bug.cgi?id=138605
283 Reviewed by Anders Carlsson.
285 * Resources/aliasCursor.png: Removed.
286 * Resources/cellCursor.png: Removed.
287 * Resources/contextMenuCursor.png: Removed.
288 * Resources/copyCursor.png: Removed.
289 * Resources/eastResizeCursor.png: Removed.
290 * Resources/eastWestResizeCursor.png: Removed.
291 * Resources/helpCursor.png: Removed.
292 * Resources/linkCursor.png: Removed.
293 * Resources/moveCursor.png: Removed.
294 * Resources/noDropCursor.png: Removed.
295 * Resources/noneCursor.png: Removed.
296 * Resources/northEastResizeCursor.png: Removed.
297 * Resources/northEastSouthWestResizeCursor.png: Removed.
298 * Resources/northResizeCursor.png: Removed.
299 * Resources/northSouthResizeCursor.png: Removed.
300 * Resources/northWestResizeCursor.png: Removed.
301 * Resources/northWestSouthEastResizeCursor.png: Removed.
302 * Resources/progressCursor.png: Removed.
303 * Resources/southEastResizeCursor.png: Removed.
304 * Resources/southResizeCursor.png: Removed.
305 * Resources/southWestResizeCursor.png: Removed.
306 * Resources/verticalTextCursor.png: Removed.
307 * Resources/waitCursor.png: Removed.
308 * Resources/westResizeCursor.png: Removed.
309 * Resources/zoomInCursor.png: Removed.
310 * Resources/zoomOutCursor.png: Removed.
312 * WebCore.xcodeproj/project.pbxproj: Removed references to the above files.
314 * platform/mac/CursorMac.mm:
315 (WebCore::Cursor::ensurePlatformCursor): For Help, Cell, ZoomIn and ZoomOut, don’t check
316 for a nil return value from wkCursor(), which can’t occur in any supported configuration.
317 For None, create a cursor with an empty NSImage instead of loading a transparent image from
319 (WebCore::createNamedCursor): Deleted.
321 2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
323 Unreviewed, rolling out r175844.
325 Win debug build has broken since r175844.
329 "Use std::unique_ptr<> and std::make_unique<> in WebCore"
330 https://bugs.webkit.org/show_bug.cgi?id=138560
331 http://trac.webkit.org/changeset/175844
333 2014-11-11 Philippe Normand <pnormand@igalia.com>
335 Qt/Chromium remnants in MediaPlayer
336 https://bugs.webkit.org/show_bug.cgi?id=138611
338 Reviewed by Jer Noble.
340 * platform/graphics/MediaPlayer.h: Remove unused Qt/Chromium stuff.
342 2014-11-11 Chris Dumez <cdumez@apple.com>
344 Move '-webkit-marquee-speed' CSS property to the new StyleBuilder
345 https://bugs.webkit.org/show_bug.cgi?id=138595
347 Reviewed by Antti Koivisto.
349 Move '-webkit-marquee-speed' CSS property from DeprecatedStyleBuilder
350 to the new StyleBuilder by adding a new MarqueeSpeed Converter.
352 No new tests, no behavior change.
354 * css/CSSPropertyNames.in:
355 * css/DeprecatedStyleBuilder.cpp:
356 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
357 (WebCore::ApplyPropertyMarqueeSpeed::applyValue): Deleted.
358 (WebCore::ApplyPropertyMarqueeSpeed::createHandler): Deleted.
359 * css/StyleBuilderConverter.h:
360 (WebCore::StyleBuilderConverter::convertMarqueeSpeed):
362 2014-10-07 Sergio Villar Senin <svillar@igalia.com>
364 [CSS Grid Layout] Limit the size of explicit/implicit grid
365 https://bugs.webkit.org/show_bug.cgi?id=136217
367 Reviewed by Andreas Kling.
369 A recent change in the specs allow us to set a limit (maximum
370 size) for both the explicit and implicit grids so we can protect
371 ourselves from absurdly huge grid specifications. It was decided
372 to use the recommended limit which is 1 million.
374 This means that we can remove the old limitation for the number of
375 repetitions in repeat(). Instead we now clamp the number of
376 repetitions to the maximum value that allow us to have the maximum
377 number of whole repetitions without exceeding the track number
380 * WebCore.xcodeproj/project.pbxproj:
382 (WebCore::CSSParser::parseGridTrackRepeatFunction): Replaced the
383 old limit by the new one.
384 * rendering/RenderGrid.cpp:
385 (WebCore::RenderGrid::placeItemsOnGrid): Use the amount of tracks
386 provided by GridResolvedPosition.
387 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ditto.
388 * rendering/style/GridCoordinate.h:
389 (WebCore::GridSpan::GridSpan):
390 * rendering/style/GridResolvedPosition.cpp:
391 (WebCore::GridResolvedPosition::explicitGridColumnCount): Bring
392 the static function back to life.
393 (WebCore::GridResolvedPosition::explicitGridRowCount): Ditto.
394 (WebCore::explicitGridSizeForSide):
395 * rendering/style/GridResolvedPosition.h:
397 2014-11-11 Yusuke Suzuki <utatane.tea@gmail.com>
399 CSS4 Selectors: Add multiple pseudo elements support to :matches
400 https://bugs.webkit.org/show_bug.cgi?id=138214
402 Reviewed by Benjamin Poulain.
404 In this patch, we implement (multiple) pseudo elements support to :matches.
405 Currently, we implemented it in css/SelectorChecker and there's no CSS JIT implementation.
407 And we change the semantics of pseudo element selector behavior.
408 Previously when pseudo element selector appeared in the non-rightmost
409 fragment, it was ignored. This patch changes it to unmatched.
411 * css/SelectorChecker.cpp:
412 (WebCore::SelectorChecker::CheckingContextWithStatus::CheckingContextWithStatus):
413 (WebCore::SelectorChecker::match):
414 (WebCore::hasScrollbarPseudoElement):
415 (WebCore::SelectorChecker::matchRecursively):
416 (WebCore::SelectorChecker::checkOne):
417 (WebCore::SelectorChecker::matchSelectorList):
418 * css/SelectorChecker.h:
419 (WebCore::SelectorChecker::MatchResult::matches):
420 (WebCore::SelectorChecker::MatchResult::updateWithMatchType):
421 (WebCore::SelectorChecker::MatchResult::fails):
422 * cssjit/SelectorCompiler.cpp:
423 (WebCore::SelectorCompiler::addPseudoClassType):
424 (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
425 (WebCore::SelectorCompiler::constructFragments):
426 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
427 * rendering/style/RenderStyle.h:
428 (WebCore::RenderStyle::setHasPseudoStyles):
429 * rendering/style/RenderStyleConstants.h:
430 (WebCore::PseudoIdSet::PseudoIdSet):
431 (WebCore::PseudoIdSet::fromMask):
432 (WebCore::PseudoIdSet::has):
433 (WebCore::PseudoIdSet::add):
434 (WebCore::PseudoIdSet::merge):
435 (WebCore::PseudoIdSet::operator &):
436 (WebCore::PseudoIdSet::operator |):
437 (WebCore::PseudoIdSet::operator bool):
438 (WebCore::PseudoIdSet::data):
440 2014-11-10 Chris Dumez <cdumez@apple.com>
442 Lazily create HTMLInputElement's inputType and shadow subtree
443 https://bugs.webkit.org/show_bug.cgi?id=138524
445 Reviewed by Ryosuke Niwa.
447 When an HTMLInputElement was created by the parser, we would first call
448 HTMLInputElement::create(), then call Element::parserSetAttributes() on
449 the constructed input. With the previous implementation, this was a bit
450 inefficient because HTMLInputElement::create() would construct a
451 TextInputType inputType (as this is the default) as well as its
452 corresponding shadow subtree. Then, parserSetAttributes() would often
453 set the |type| attribute and would need to destroy this input type as
454 well as its subtree if the new |type| is not 'text', to create a new
455 inputType / shadow subtree of the right type. The profiler showed that
456 this was fairly expensive.
458 To improve this, this patch delays the inputType / shadow subtree
459 creation when the HTMLInputElement is constructed by the parser, until
460 the attributes are actually set by the parser. This way, we directly
461 create an inputType / shadow subtree of the right type.
463 I see a 1.4% speed up on speedometer (73.95 -> 75.0).
465 No new tests, no behavior change.
468 (WebCore::Element::parserSetAttributes):
469 (WebCore::Element::parserDidFinishParsingAttributes):
471 * html/HTMLInputElement.cpp:
472 (WebCore::HTMLInputElement::HTMLInputElement):
473 (WebCore::HTMLInputElement::create):
474 (WebCore::HTMLInputElement::updateType):
475 (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
476 (WebCore::HTMLInputElement::ensureInputType):
477 (WebCore::HTMLInputElement::parseAttribute):
478 (WebCore::HTMLInputElement::parserDidFinishParsingAttributes):
479 * html/HTMLInputElement.h:
481 2014-11-10 Benjamin Poulain <bpoulain@apple.com>
483 Add parsing support for the extended :nth-last-child(An+B of selector-list) defined
484 https://bugs.webkit.org/show_bug.cgi?id=138520
486 Reviewed by Andreas Kling.
488 Add parsing for :nth-last-child(An+B of selector-list). The selector is defined
489 in CSS Selectors Level 4: http://dev.w3.org/csswg/selectors4/#the-nth-last-child-pseudo
491 Tests: fast/css/parsing-css-nth-last-child-of-1.html
492 fast/css/parsing-css-nth-last-child-of-2.html
493 fast/css/parsing-css-nth-last-child-of-3.html
494 fast/css/parsing-css-nth-last-child-of-4.html
496 * css/CSSGrammar.y.in:
498 (WebCore::CSSParser::detectFunctionTypeToken):
499 * css/CSSSelector.cpp:
500 (WebCore::CSSSelector::selectorText):
502 2014-11-10 Said Abou-Hallawa <sabouhallawa@apple.com>
504 SVG foreign objects do not inherit the container coordinates system if they are repainted.
505 https://bugs.webkit.org/show_bug.cgi?id=138481.
507 Reviewed by Simon Fraser.
509 If a foreign object is included in an SVG, it should inherit the coordinates system
510 of the container if it is repainted. The foreign object is actually redrawn in the
511 CSS coordinates system regardless of the transformation that may be applied to the
514 The bug is RenderSVG* classes use computeFloatRectForRepaint(), but the rest of the
515 render classes use computeRectForRepaint(). RenderSVGForeignObject::computeRectForRepaint()
516 was not defined, so we end up hitting RenderObject::computeRectForRepaint() for
517 a RenderSVGTransformableContainer and completely miss the transform.
519 Tests: svg/transforms/svg-transform-foreign-object-repaint.html
521 Implement RenderSVGForeignObject::computeRectForRepaint() so we can apply the
522 container transformation on the SVG foreign object repaint rectangle.
523 * rendering/svg/RenderSVGForeignObject.cpp:
524 (WebCore::RenderSVGForeignObject::computeRectForRepaint):
525 * rendering/svg/RenderSVGForeignObject.h:
527 2014-11-10 Gyuyoung Kim <gyuyoung.kim@samsung.com>
529 Use std::unique_ptr<> and std::make_unique<> in WebCore
530 https://bugs.webkit.org/show_bug.cgi?id=138560
532 Reviewed by Chris Dumez.
534 Clean up unused OwnPtr.h and PassOwnPtr.h and use std::unique_ptr.
536 No new tests, no behavior changes.
538 * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
539 * dom/ContainerNode.h:
540 * dom/ElementIteratorAssertions.h:
541 (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
542 * dom/ElementRareData.h:
543 * page/DragController.h:
544 * rendering/RenderView.h:
546 2014-11-10 Beth Dakin <bdakin@apple.com>
548 WK1: Support default actions for editable text with misspelled word
549 https://bugs.webkit.org/show_bug.cgi?id=138590
551 rdar://problem/18877506
553 Reviewed by Tim Horton.
557 2014-11-10 Chris Dumez <cdumez@apple.com>
559 Remove unnecessary null check in FrameSelection::nodeWillBeRemoved()
560 https://bugs.webkit.org/show_bug.cgi?id=138578
562 Reviewed by Andreas Kling.
564 Remove unnecessary null check in FrameSelection::nodeWillBeRemoved()
565 and turn the argument into a reference to make it clear it cannot be
568 No new tests, no behavior change.
570 * dom/ContainerNode.cpp:
571 (WebCore::ContainerNode::willRemoveChild):
573 (WebCore::Document::nodeChildrenWillBeRemoved):
574 (WebCore::Document::nodeWillBeRemoved):
576 * dom/NodeIterator.cpp:
577 (WebCore::NodeIterator::nodeWillBeRemoved):
578 (WebCore::NodeIterator::updateForNodeRemoval):
579 * dom/NodeIterator.h:
581 (WebCore::Range::insertNode):
582 (WebCore::boundaryNodeWillBeRemoved):
583 (WebCore::Range::nodeWillBeRemoved):
585 * dom/RangeBoundaryPoint.h:
586 (WebCore::RangeBoundaryPoint::setToBeforeChild):
587 * editing/CompositeEditCommand.cpp:
588 (WebCore::CompositeEditCommand::updatePositionForNodeRemovalPreservingChildren):
589 * editing/CompositeEditCommand.h:
590 * editing/DeleteSelectionCommand.cpp:
591 (WebCore::DeleteSelectionCommand::removeNode):
592 (WebCore::DeleteSelectionCommand::handleGeneralDelete):
593 (WebCore::DeleteSelectionCommand::removeRedundantBlocks):
594 * editing/FrameSelection.cpp:
595 (WebCore::removingNodeRemovesPosition):
596 (WebCore::DragCaretController::nodeWillBeRemoved):
597 (WebCore::FrameSelection::nodeWillBeRemoved):
598 (WebCore::FrameSelection::respondToNodeModification):
599 * editing/FrameSelection.h:
600 * editing/ReplaceSelectionCommand.cpp:
601 (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
602 * editing/htmlediting.cpp:
603 (WebCore::updatePositionForNodeRemoval):
604 * editing/htmlediting.h:
605 * page/EventHandler.cpp:
606 (WebCore::EventHandler::nodeWillBeRemoved):
607 * page/EventHandler.h:
609 2014-11-10 Benjamin Poulain <bpoulain@apple.com>
611 Fix the build when CSS Selectors Level 4 is disabled
612 https://bugs.webkit.org/show_bug.cgi?id=138533
614 * css/CSSSelector.cpp:
615 (WebCore::appendArgumentList):
616 * cssjit/SelectorCompiler.cpp:
617 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
619 2014-11-10 Chris Dumez <cdumez@apple.com>
621 Support throttling of DOMTimers using nested setTimeout() calls
622 https://bugs.webkit.org/show_bug.cgi?id=138262
624 Reviewed by Gavin Barraclough.
626 Extend DOMTimers throttling support to timers that are using nested
627 setTimeout() calls instead of a setInterval(). To achieve this, this
628 patch introduces a NestedTimersMap singleton class where nested timers
629 are added, and for which we potentially update the next firing time,
630 after the parent timer is done executing.
632 I have verified this helps on ebay.com for example, which has timers
633 interacting with non-visible plugins that are scheduled using nested
634 setTimeout() calls with a frequency of 150 / 200 ms.
636 This is a second take on r175441, which caused intermittent crashes.
637 This time, nested timers are removed from the NestedTimersMap when
638 DOMTimer::removeById() is called. It would be unsafe to use the nested
639 timer afterwards because we don't hold a strong reference to it and
640 the ScriptExecutionContext is unref'ing the DOMTimer when
641 ScriptExecutionContext::removeTimeout() is called from
642 DOMTimer::removeById().
645 (WebCore::NestedTimersMap::NestedTimersMap):
646 (WebCore::NestedTimersMap::~NestedTimersMap):
647 (WebCore::NestedTimersMap::add):
648 (WebCore::NestedTimersMap::remove):
649 (WebCore::NestedTimersMap::begin):
650 (WebCore::NestedTimersMap::end):
651 (WebCore::DOMTimer::install):
652 (WebCore::DOMTimer::removeById):
653 (WebCore::DOMTimer::fired):
655 2014-11-10 Jer Noble <jer.noble@apple.com>
657 [EME][Mac] Add a systemCode to distinguish when no expired sessions were found in response to a "keyrelease" message.
658 https://bugs.webkit.org/show_bug.cgi?id=138199
660 Reviewed by Eric Carlson.
662 Clients may want to be able to distinguish between cases where expired session data is not supported, and when
663 those data are supported, but none are found.
665 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
666 (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage):
668 2014-11-04 Jer Noble <jer.noble@apple.com>
670 REGRESSION(r174823): Several tests fail due to canplaythrough firing before tracks are available
671 https://bugs.webkit.org/show_bug.cgi?id=137882
673 Reviewed by Eric Carlson.
675 For HLS streams with only one video, audio, or text track, there will be no media selection group
676 for that media characteristic. When culling out AVPlayerItemTracks in tracksDidChange(), do not skip
677 tracks for which there is no matching AVMediaSelectionGroup.
679 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
680 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
681 (WebCore::MediaPlayerPrivateAVFoundationObjC::hasLoadedMediaSelectionGroups): Refactored.
682 (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia): Call above.
683 (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Ditto.
684 (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
685 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
687 2014-11-10 Commit Queue <commit-queue@webkit.org>
689 Unreviewed, rolling out r175813.
690 https://bugs.webkit.org/show_bug.cgi?id=138573
692 Breaks complex text layout spacing (Requested by litherum on
697 "[OSX] Some words are placed on top of each other in complex
699 https://bugs.webkit.org/show_bug.cgi?id=138348
700 http://trac.webkit.org/changeset/175813
702 2014-11-10 Beth Dakin <bdakin@apple.com>
704 Rolling out failed build fix
705 http://trac.webkit.org/changeset/175819
709 2014-11-10 Beth Dakin <bdakin@apple.com>
711 Speculative build fix.
715 2014-11-10 Beth Dakin <bdakin@apple.com>
717 Speculative build fix.
721 2014-11-10 Simon Fraser <simon.fraser@apple.com>
723 [iOS WK2] Layers with negative z position disapear behind the page tiles
724 https://bugs.webkit.org/show_bug.cgi?id=138571
725 rdar://problem/18873480
727 Reviewed by Dean Jackson.
729 Some crufty iOS-only code in RenderLayerBacking::parentForSublayers() caused us to fail
730 to use the m_childContainmentLayer as the ancestor for descendants, so layers with
731 negative z position would get depth-sorted behind the tiles.
733 Fix by removing that code.
735 This should have been detected by compositing/tile-cache-must-flatten.html, but
736 testing infrastructure suck prevented us from doing so.
738 * rendering/RenderLayerBacking.cpp:
739 (WebCore::RenderLayerBacking::parentForSublayers):
740 * rendering/RenderLayerBacking.h: Just some nullptr cleanup.
742 2014-11-10 Chris Dumez <cdumez@apple.com>
744 Move 'resize' CSS property to the new StyleBuilder
745 https://bugs.webkit.org/show_bug.cgi?id=138550
747 Reviewed by Andreas Kling.
749 No new tests, no behavior change.
751 Move 'resize' CSS property from DeprecatedStyleBuilder to the new
752 StyleBuilder by adding a new 'Resize' Converter function.
754 * css/CSSPropertyNames.in:
755 * css/DeprecatedStyleBuilder.cpp:
756 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
757 (WebCore::ApplyPropertyResize::applyValue): Deleted.
758 (WebCore::ApplyPropertyResize::createHandler): Deleted.
759 * css/StyleBuilderConverter.h:
760 (WebCore::StyleBuilderConverter::convertResize):
762 2014-11-10 Beth Dakin <bdakin@apple.com>
764 Speculative build fix.
766 * editing/DictionaryLookup.h:
767 * editing/DictionaryLookup.mm:
769 2014-11-10 Chris Dumez <cdumez@apple.com>
771 Move 'text-indent' CSS property to the new StyleBuilder
772 https://bugs.webkit.org/show_bug.cgi?id=138547
774 Reviewed by Andreas Kling.
776 Move 'text-indent' CSS property from DeprecatedStyleBuilder to the new
777 StyleBuilder, by using custom code.
779 No new tests, no behavior change.
781 * css/CSSPropertyNames.in:
782 * css/DeprecatedStyleBuilder.cpp:
783 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
784 (WebCore::ApplyPropertyTextIndent::applyInheritValue): Deleted.
785 (WebCore::ApplyPropertyTextIndent::applyInitialValue): Deleted.
786 (WebCore::ApplyPropertyTextIndent::applyValue): Deleted.
787 (WebCore::ApplyPropertyTextIndent::createHandler): Deleted.
788 * css/StyleBuilderConverter.h:
789 * css/StyleBuilderCustom.h:
790 (WebCore::StyleBuilderFunctions::applyInheritTextIndent):
791 (WebCore::StyleBuilderFunctions::applyInitialTextIndent):
792 (WebCore::StyleBuilderFunctions::applyValueTextIndent):
794 2014-11-10 Beth Dakin <bdakin@apple.com>
796 WK1: Support default actions for read-only text
797 https://bugs.webkit.org/show_bug.cgi?id=138552
799 rdar://problem/18877483
801 Reviewed by Tim Horton.
803 WK1 now needs to do a lot of dictionary lookup operations that it did not
804 previously have to handle. So this patch takes a lot of that functionality, which
805 was implemented as static functions in WebPageMac for WK2 and moves it into
809 * WebCore.xcodeproj/project.pbxproj:
810 * editing/DictionaryLookup.h: Added.
811 * editing/DictionaryLookup.mm: Added.
812 (WebCore::isPositionInRange):
813 (WebCore::shouldUseSelection):
814 (WebCore::rangeExpandedAroundPositionByCharacters):
815 (WebCore::rangeForDictionaryLookupForSelection):
816 (WebCore::rangeForDictionaryLookupAtHitTestResult):
817 * platform/mac/WebCoreSystemInterface.h:
818 * platform/mac/WebCoreSystemInterface.mm:
820 2014-11-10 Myles C. Maxfield <mmaxfield@apple.com>
822 [OSX] Some words are placed on top of each other in complex text layout
823 https://bugs.webkit.org/show_bug.cgi?id=138348
825 Reviewed by Simon Fraser.
827 Some complex text layouts have lots of diacritics being placed all over the place.
828 CoreText sometimes compensates for this by adjusting the advances of the glyphs
829 throughout the string to make glyphs appear in the correct place. This means that
830 we can't naively cache the width of a space character; instead, we must obey
831 CoreText when it gives us an advance for a space.
833 Test: fast/text/large-space-width-complex.html
835 * platform/graphics/mac/ComplexTextController.cpp:
836 (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
838 2014-11-10 Eric Carlson <eric.carlson@apple.com>
840 [iOS] wireless playback placeholder UI doesn't always draw
841 https://bugs.webkit.org/show_bug.cgi?id=138548
843 While it is important to only listen for the 'webkitplaybacktargetavailabilitychanged' event
844 when we are displaying inline controls because listening for it increases power consumption,
845 we should always listen for the 'webkitcurrentplaybacktargetiswirelesschanged' event because
846 it controls whether or not we draw the placeholder UI which is always visible during wireless
849 Reviewed by Brent Fulgham.
851 * Modules/mediacontrols/mediaControlsiOS.js:
852 (ControllerIOS.prototype.addVideoListeners): Always listen for the
853 'webkitcurrentplaybacktargetiswirelesschanged' event.
854 (ControllerIOS.prototype.removeVideoListeners): Always stop listening for the
855 'webkitcurrentplaybacktargetiswirelesschanged' event.
856 (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Call updateControls so we update
857 the type of controls rendered and start listening for wireless target changes immediately.
858 (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent): Don't start and stop
859 listening for 'webkitcurrentplaybacktargetiswirelesschanged', we should always listen for it.
861 2014-11-10 Csaba Osztrogonác <ossy@webkit.org>
863 Crash in WebCore::Node::getFlag
864 https://bugs.webkit.org/show_bug.cgi?id=137961
866 Reviewed by Antti Koivisto.
868 * editing/ApplyStyleCommand.cpp:
869 (WebCore::ApplyStyleCommand::applyBlockStyle): Null pointer check added.
871 2014-11-10 Mihnea Ovidenie <mihnea@adobe.com>
873 ASSERTION FAILED: !object || !object->parent()->isRuby() || is<RenderRubyRun>(*object) || (object->isInline() && (object->isBeforeContent() || object->isAfterContent())) || (object->isAnonymous() && ... ) in WebCore::isAnonymousRubyInlineBlock
874 https://bugs.webkit.org/show_bug.cgi?id=137958
876 Reviewed by Chris Dumez.
878 When a ruby element, with block behavior, dynamically changes its style
879 from multicol to without multicol, we have to remove its special children,
880 RenderMultiColumnFlowThread and RenderMultiColumnSet, the normal way using
881 the method in RenderBlockFlow base class. This patch adds both
882 RenderMultiColumnFlowThread and RenderMultiColumnSet to the list of RenderRuby
883 children removed normally and adds a new function - isRubyChildForNormalRemove -
884 to test the condition and use it in the assertion in RenderRuby*::removeChild
887 Test: fast/multicol/newmulticol/ruby-from-multicol-to-auto.html
889 * rendering/RenderRuby.cpp:
890 (WebCore::isRubyChildForNormalRemove):
891 (WebCore::RenderRubyAsInline::removeChild):
892 (WebCore::RenderRubyAsBlock::removeChild):
894 2014-11-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
896 [EFL] Remove GamepadDeviceEfl::create()
897 https://bugs.webkit.org/show_bug.cgi?id=138553
899 Reviewed by Darin Adler.
901 As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes GamepadDeviceEfl::create().
902 Instead we use std::make_unique<>.
904 No new tests, no behavior changes.
906 * platform/efl/GamepadsEfl.cpp:
907 (WebCore::GamepadsEfl::registerDevice):
908 (WebCore::GamepadDeviceEfl::create): Deleted.
909 (WebCore::GamepadsEfl::unregisterDevice): Deleted.
911 2014-11-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
913 Remove create() factory function in FooAnimationValue classes
914 https://bugs.webkit.org/show_bug.cgi?id=138206
916 Reviewed by Darin Adler.
918 As a step to use std::unique_ptr and std::make_unique, this patch removes create()
919 factory function in FooAnimationValue classes. As this changes, FooAnimationValue::create()
920 are changed to std::make_unique<>.
922 No new tests, no behavior changes.
924 * platform/graphics/GraphicsLayer.cpp:
925 (WebCore::KeyframeValueList::insert):
926 * platform/graphics/GraphicsLayer.h:
927 (WebCore::FloatAnimationValue::FloatAnimationValue):
928 (WebCore::TransformAnimationValue::TransformAnimationValue):
929 (WebCore::FilterAnimationValue::FilterAnimationValue):
930 (WebCore::FloatAnimationValue::create): Deleted.
931 (WebCore::TransformAnimationValue::create): Deleted.
932 (WebCore::FilterAnimationValue::create): Deleted.
933 * rendering/RenderLayerBacking.cpp:
934 (WebCore::RenderLayerBacking::startAnimation):
935 (WebCore::RenderLayerBacking::startTransition):
937 2014-11-09 Chris Dumez <cdumez@apple.com>
939 Add a more correct way to compare floating point numbers and use it
940 https://bugs.webkit.org/show_bug.cgi?id=138527
942 Reviewed by Darin Adler.
944 Use the new WTF::areEssentuallyEqual() utility function from MathExtras.h
945 to compare floating-point numbers.
947 No new tests, no behavior change.
950 (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
951 * platform/graphics/FloatQuad.cpp:
952 (WebCore::FloatQuad::isRectilinear):
953 * platform/graphics/FloatRoundedRect.cpp:
954 (WebCore::FloatRoundedRect::Radii::isUniformCornerRadius):
955 * platform/graphics/FloatSize.h:
956 (WebCore::areEssentiallyEqual):
957 (WebCore::withinEpsilon): Deleted.
959 2014-11-08 Simon Fraser <simon.fraser@apple.com>
961 Implement round-rect clipping on video elements
962 https://bugs.webkit.org/show_bug.cgi?id=138537
963 rdar://problem/9534399
965 Reviewed by Darin Adler.
967 Support border-radius on video and other layers with composited contents,
968 by pushing a FloatRoundedRect onto the GraphicsLayer as the contentsClippingRect,
969 and, on Mac, using layer corner-radius or a CAShapeLayer mask.
971 Test: compositing/video/video-border-radius.html
974 * platform/graphics/FloatRoundedRect.cpp:
975 (WebCore::FloatRoundedRect::Radii::isUniformCornerRadius): Returns true if all
976 corner radii are the same, and have equal widths and heights.
977 * platform/graphics/FloatRoundedRect.h: Allow construction without an explicit
979 * platform/graphics/GraphicsLayer.cpp:
980 (WebCore::GraphicsLayer::GraphicsLayer): nullptr goodness.
981 (showGraphicsLayerTree): Print contents layers when debugging.
982 * platform/graphics/GraphicsLayer.h:
983 (WebCore::GraphicsLayer::contentsClippingRect): Make this take a FloatRoundedRect.
984 (WebCore::GraphicsLayer::setContentsClippingRect):
985 * platform/graphics/ca/GraphicsLayerCA.cpp:
986 (WebCore::GraphicsLayerCA::setContentsClippingRect):
987 (WebCore::GraphicsLayerCA::setContentsToSolidColor):
988 (WebCore::GraphicsLayerCA::setContentsToImage):
989 (WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
990 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
991 (WebCore::GraphicsLayerCA::updateClippingStrategy): Determines whether we can simply
992 use corner-radius on the existing contentsClippingLayer, or whether we have to
993 create a shape layer to use as a mask.
994 (WebCore::GraphicsLayerCA::updateContentsRects): We have to add/remove the shape layer
995 based on the rounded rect radii. Calls updateClippingStrategy() on the clipping layer,
996 and also updates clones accordingly.
997 (WebCore::dumpInnerLayer):
998 (WebCore::GraphicsLayerCA::dumpAdditionalProperties): Dump all the inner layers
999 (requiring on test rebaseline), including the new shape and backdrop layers.
1000 * platform/graphics/ca/GraphicsLayerCA.h:
1001 * platform/graphics/ca/PlatformCALayer.h: Add a new shape layer type.
1002 * platform/graphics/ca/mac/PlatformCALayerMac.h: Support for corner radius and
1003 a rounded rect shape mask.
1004 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1005 (PlatformCALayerMac::PlatformCALayerMac):
1006 (PlatformCALayerMac::clone):
1007 (PlatformCALayerMac::setMask):
1008 (PlatformCALayerMac::cornerRadius):
1009 (PlatformCALayerMac::setCornerRadius):
1010 (PlatformCALayerMac::shapeRoundedRect):
1011 (PlatformCALayerMac::setShapeRoundedRect):
1012 * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1013 (PlatformCALayerWin::cornerRadius):
1014 (PlatformCALayerWin::setCornerRadius):
1015 (PlatformCALayerWin::shapeRoundedRect):
1016 (PlatformCALayerWin::setShapeRoundedRect):
1017 * platform/graphics/ca/win/PlatformCALayerWin.h:
1018 * rendering/RenderLayerBacking.cpp:
1019 (WebCore::RenderLayerBacking::resetContentsRect): Use getRoundedInnerBorderFor() to get
1020 the rounded rect used to clip contents.
1021 (WebCore::RenderLayerBacking::positionOverflowControlsLayers): Push a FloatRoundedRect for the contents clip,
1022 (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor): Ditto.
1023 (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): Ditto.
1024 (WebCore::RenderLayerBacking::updateImageContents): Get the rounded rect clip.
1025 * rendering/RenderLayerBacking.h: nullptr.
1027 2014-11-09 Darin Adler <darin@apple.com>
1029 Fix various cases of incorrect cross-thread capture of non-thread-safe RefCounted
1030 https://bugs.webkit.org/show_bug.cgi?id=138539
1032 Reviewed by Alexey Proskuryakov.
1034 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1035 (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect): Use StringCapture
1036 instead of isolatedCopy, to avoid a problem where the original thread does its deref
1037 after passing the string to the other thread.
1038 (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage): Ditto.
1039 (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): Ditto.
1040 (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize): Ditto.
1041 (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect): Ditto.
1042 (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): Ditto.
1043 (WebCore::WorkerThreadableWebSocketChannel::Bridge::close): Ditto.
1044 (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail): Ditto.
1047 (WebCore::Document::addConsoleMessage): Pass a StringCapture when creating
1048 AddConsoleMessageTask. Same reason as above, but in a different context.
1049 (WebCore::Document::addMessage): Ditto.
1051 * dom/ScriptExecutionContext.h: Changed AddConsoleMessageTask to take and
1052 capture a StringCapture rather than a String, for the same reason as above.
1054 * fileapi/AsyncFileStream.cpp:
1055 (WebCore::AsyncFileStream::write): Use URLCapture instead of trying to use
1056 StringCapture on a URL, since that doesn't preserve the validity flag.
1058 * loader/WorkerThreadableLoader.cpp:
1059 (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Use StringCapture.
1060 (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail): Ditto.
1061 (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck): Ditto.
1063 * platform/URL.h: Added URLCapture.
1065 * platform/network/FormData.cpp:
1066 (WebCore::appendBlobResolved): Remove incorrect pointless code that creates a new URL
1067 from an existing URL with the ParsedURLString constructor.
1069 * workers/DefaultSharedWorkerRepository.cpp: Fixed code that was trying to copy a URL
1070 by copying a string to instead just use URL::copy. The comment claimed that URL::copy
1071 is not thread safe, but that claim is incorrect.
1072 (WebCore::SharedWorkerProxy::postExceptionToWorkerObject): Use StringCapture.
1073 (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject): Ditto.
1074 (WebCore::DefaultSharedWorkerRepository::getProxy): Use URL::copy.
1076 * workers/WorkerGlobalScope.cpp:
1077 (WebCore::WorkerGlobalScope::addConsoleMessage): Use StringCapture.
1078 (WebCore::WorkerGlobalScope::addMessage): Ditto.
1079 * workers/WorkerMessagingProxy.cpp:
1080 (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject): Ditto.
1081 (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject): Ditto.
1082 (WebCore::WorkerMessagingProxy::sendMessageToInspector): Ditto.
1083 (WebCore::WorkerMessagingProxy::postMessageToPageInspector): Ditto.
1085 * workers/WorkerRunLoop.cpp:
1086 (WebCore::WorkerRunLoop::postTaskAndTerminate): Make a Task with make_unique
1087 rather than with Task::create. Removed an extra isolatedCopy, unneeded because
1088 the Task constructor already does an isolatedCopy.
1089 (WebCore::WorkerRunLoop::postTaskForMode): Ditto.
1090 (WebCore::WorkerRunLoop::Task::create): Deleted.
1092 * workers/WorkerRunLoop.h: Removed unneeded create function and explicit
1093 public empty destructor.
1095 2014-11-09 Chris Dumez <cdumez@apple.com>
1097 Use is<>() / downcast<>() for HTMLCollection subclasses
1098 https://bugs.webkit.org/show_bug.cgi?id=138541
1100 Reviewed by Sam Weinig.
1102 Use is<>() / downcast<>() for HTMLCollection subclasses for
1103 safety and consistency with the rest of the code base.
1105 No new tests, no behavior change.
1107 * bindings/gobject/WebKitDOMPrivate.cpp:
1109 * html/HTMLAllCollection.h:
1110 * html/HTMLCollection.cpp:
1111 (WebCore::isMatchingHTMLElement):
1112 (WebCore::isMatchingElement):
1113 * html/HTMLCollection.h:
1114 * html/HTMLFormControlsCollection.h:
1115 * html/HTMLNameCollection.h:
1116 * html/HTMLOptionsCollection.h:
1117 * html/HTMLSelectElement.cpp:
1118 (WebCore::HTMLSelectElement::options):
1119 * html/HTMLTableRowsCollection.h:
1121 2014-11-08 Chris Dumez <cdumez@apple.com>
1123 Call faster HTMLElement::hasTagName() in HTMLCollection
1124 https://bugs.webkit.org/show_bug.cgi?id=138529
1126 Reviewed by Darin Adler.
1128 Call faster HTMLElement::hasTagName() in HTMLCollection instead of
1129 slower Node::hasTagName() by restructuring the code a bit to
1130 distinguish collection that deal only with HTMLElements from others.
1132 No new tests, no behavior change.
1134 * html/HTMLCollection.cpp:
1135 (WebCore::isMatchingHTMLElement):
1136 (WebCore::isMatchingElement):
1138 2014-11-08 Chris Dumez <cdumez@apple.com>
1140 Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType
1141 https://bugs.webkit.org/show_bug.cgi?id=138538
1143 Reviewed by Darin Adler.
1145 Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType
1146 as this only makes sense for text field input types.
1148 No new tests, no behavior change.
1150 * html/HTMLInputElement.cpp:
1151 (WebCore::HTMLInputElement::isEmptyValue):
1152 * html/InputType.cpp:
1153 (WebCore::InputType::isEmptyValue):
1155 * html/TextFieldInputType.cpp:
1156 (WebCore::TextFieldInputType::isEmptyValue):
1157 * html/TextFieldInputType.h:
1159 2014-11-08 Darin Adler <darin@apple.com>
1161 Replace FileThread class with a single function
1162 https://bugs.webkit.org/show_bug.cgi?id=138282
1164 Reviewed by Alexey Proskuryakov.
1166 * CMakeLists.txt: Removed FileThread.cpp.
1168 * WebCore.vcxproj/WebCore.vcxproj: Removed FileThread.cpp/.h.
1169 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1170 * WebCore.xcodeproj/project.pbxproj: Ditto.
1172 * bindings/generic/ActiveDOMCallback.cpp: Removed unneeded includes.
1173 * dom/ActiveDOMObject.cpp: Ditto.
1175 * fileapi/AsyncFileStream.cpp:
1176 (WebCore::callOnFileThread): Added. Implements the file thread.
1177 (WebCore::AsyncFileStream::AsyncFileStream): Take a reference to the client.
1178 Make m_internals. Use the destroyed flag instead of trickier techniques to
1179 handle stopping. Once the stream is destroyed, there will be no further callbacks.
1180 (WebCore::AsyncFileStream::~AsyncFileStream): Added assertions and merged in the
1181 stop behavior here. This class no longer requires an explicit stop function.
1182 (WebCore::AsyncFileStream::perform): Added. Helper used for all the operations
1183 below. Takes a function that performs an operation and then returns a client
1184 callback function. Respects the m_stopped boolean on the file thread (so we
1185 don't do extra operations) and on the client thread (so we are guaranteed not
1186 to get any client callbacks even if the file thread was partway through an
1188 (WebCore::AsyncFileStream::getSize): Changed to use the perform function.
1189 (WebCore::AsyncFileStream::openForRead): Ditto. Also fixed reference count
1190 thread safety issue by capturing a StringCapture rather than a String.
1191 (WebCore::AsyncFileStream::openForWrite): Ditto.
1192 (WebCore::AsyncFileStream::close): Changed to use callOnFileThread.
1193 (WebCore::AsyncFileStream::read): Changed to use the perform function.
1194 (WebCore::AsyncFileStream::write): Ditto. Also fixed reference count
1195 thread safety issue by capturing a StringCapture rather than a URL.
1196 (WebCore::AsyncFileStream::truncate): Ditto.
1198 * fileapi/AsyncFileStream.h: Removed use of RefCounted since we only need
1199 single ownership. Removed the stop function, since we can now stop when
1200 the stream is destroyed since we have single ownership. Made a new Internals
1201 object to handle destruction while operations are still going on the file thread.
1203 * fileapi/FileThread.cpp: Removed.
1204 * fileapi/FileThread.h: Removed.
1206 * loader/ResourceLoader.cpp: Removed unneeded include.
1208 * platform/FileStream.cpp:
1209 (WebCore::FileStream::~FileStream): Merged the stop function in here.
1211 * platform/FileStream.h: Removed use of RefCounted since we only need
1212 single ownership. Removed the empty start function. Removed the stop function,
1213 since we can now stop when the stream is destroyed since we have single ownership.
1215 * platform/FileStreamClient.h: Removed unneeded didStart and didStop.
1217 * platform/network/BlobResourceHandle.cpp:
1218 (WebCore::BlobResourceHandle::BlobResourceHandle): Use make_unique to make the
1219 stream objects instead of custom create functions.
1220 (WebCore::BlobResourceHandle::~BlobResourceHandle): Removed now-unneeded code
1221 to call stop functions. Destroying the objects now takes care of the this, and
1222 that's done by the unique_ptrs.
1223 (WebCore::BlobResourceHandle::cancel): Removed the rest of the code to stop the
1224 m_asyncStream, keeping only the code that sets it to null. That now stops the
1225 stream by destroying it.
1227 * platform/network/BlobResourceHandle.h: Use std::unique_ptr rather than
1228 RefPtr for the file stream objects.
1230 * storage/StorageThread.h: Tweaked formatting of std::function<void()> to
1231 match the format used elsewhere in WebKit.
1233 2014-11-08 Simon Fraser <simon.fraser@apple.com>
1235 Don't try to schedule a GraphicsLayer flush when propagating changes to replicas inside a flush
1236 https://bugs.webkit.org/show_bug.cgi?id=138532
1238 Reviewed by Dan Bernstein.
1240 When changing masks on replica layers with certain layer configurations,
1241 it was possible to hit an assertion that a flush was being scheduled when already
1242 flushing, via propagateLayerChangeToReplicas(). Fix by passing the scheduleFlush
1245 Not testable with current GraphicsLayer configurations.
1247 * platform/graphics/ca/GraphicsLayerCA.cpp:
1248 * platform/graphics/ca/GraphicsLayerCA.h:
1250 2014-11-08 Beth Dakin <bdakin@apple.com>
1252 Implement action menu support for videos
1253 https://bugs.webkit.org/show_bug.cgi?id=138534
1255 rdar://problem/18742164
1257 Reviewed by Tim Horton.
1259 Export needed symbols and added not-yet-implemented
1260 HitTestResult::isMediaThatCanBeDownloaded() so that action menus will work as
1261 expected once it is implemented.
1263 * rendering/HitTestResult.cpp:
1264 (WebCore::HitTestResult::isMediaThatCanBeDownloaded):
1265 * rendering/HitTestResult.h:
1267 2014-11-08 Chris Dumez <cdumez@apple.com>
1269 Speed up HTMLInputElement::isEmptyValue()
1270 https://bugs.webkit.org/show_bug.cgi?id=138515
1272 Reviewed by Geoffrey Garen.
1274 HTMLInputElement::isEmptyValue() was calling
1275 HTMLTextFormControlElement::innerTextValue() which causes a full
1276 subtree traversal to construct a string representation of that subtree
1277 using a StringBuilder. In the case of HTMLInputElement::isEmptyValue(),
1278 we don't have to do all this: We don't need to construct a String
1279 and we can return false as soon as we find a non-empty descendant.
1281 No new tests, no behavior change.
1283 * html/HTMLInputElement.cpp:
1284 (WebCore::HTMLInputElement::isEmptyValue):
1285 * html/HTMLInputElement.h:
1287 2014-11-07 Eric Carlson <eric.carlson@apple.com>
1289 [iOS] video is sometimes allowed to play from the background
1290 https://bugs.webkit.org/show_bug.cgi?id=138522
1292 Reviewed by Jer Noble.
1294 * html/HTMLMediaElement.cpp:
1295 (WebCore::HTMLMediaElement::displayType): New.
1296 * html/HTMLMediaElement.h:
1298 * platform/audio/MediaSession.cpp:
1299 (WebCore::MediaSession::isHidden): New, client passthrough.
1300 (WebCore::MediaSession::displayType): Ditto.
1301 * platform/audio/MediaSession.h:
1302 (WebCore::MediaSessionClient::displayType):
1304 * platform/audio/MediaSessionManager.cpp:
1305 (WebCore::MediaSessionManager::sessionCanLoadMedia): New, default implementation returns
1306 true if client is visible or playing.
1307 * platform/audio/MediaSessionManager.h:
1309 * platform/audio/ios/MediaSessionManagerIOS.h:
1310 * platform/audio/ios/MediaSessionManagerIOS.mm:
1311 (WebCore::MediaSessionManageriOS::sessionCanLoadMedia): iOS override, also allows buffering
1312 when displaying optimized fullscreen.
1314 2014-11-07 Benjamin Poulain <bpoulain@apple.com>
1316 Fix the build after r175772
1318 * inspector/InspectorCSSAgent.cpp:
1319 (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
1321 2014-11-07 Benjamin Poulain <benjamin@webkit.org>
1323 Make the Selector's specificity part of Selector matching
1324 https://bugs.webkit.org/show_bug.cgi?id=138486
1326 Reviewed by Andreas Kling.
1328 In CSS Selectors Level 4, the specificity of selectors is computed dynamically
1329 based on which element is being matched.
1331 For example, a selector:
1332 :matches(#foo, .bar, baz)
1333 has a specificity of
1334 (1, 0, 0) on <baz id=foo class=bar>
1335 (0, 1, 0) on <baz class=bar>
1338 Previously, the specificity of each selector was computed statically when populating
1339 RuleSet. With more recent CSS, this gives us the wrong specificity because we do not know
1340 how the selectors applies to the target.
1342 This patch moves one tiny step in the direction of dynamic specificity. The specificity
1343 is removed from RuleSet and is moved inside Selector Matching.
1345 There is one bit worth keeping static: matching based on rule hash. This path is important
1346 to avoid spending time compiling trivial selectors.
1347 In order to keep rule hash matching working, the RuleData store which specificity class
1348 the rule has in addition to the information about matching/not-matching. When going through
1349 the fast path in ElementCollector, we compute the right specificity based on the type
1350 of rule-hash matching.
1352 * css/CSSSelector.cpp:
1353 (WebCore::CSSSelector::specificityForOneSelector):
1354 * css/CSSSelector.h:
1355 * css/ElementRuleCollector.cpp:
1356 (WebCore::ElementRuleCollector::addMatchedRule):
1357 (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
1358 (WebCore::ElementRuleCollector::ruleMatches):
1359 (WebCore::ElementRuleCollector::collectMatchingRulesForList):
1360 (WebCore::compareRules):
1361 * css/ElementRuleCollector.h:
1363 (WebCore::computeMatchBasedOnRuleHash):
1364 (WebCore::RuleData::RuleData):
1365 (WebCore::isSelectorMatchingHTMLBasedOnRuleHash): Deleted.
1367 (WebCore::RuleData::matchBasedOnRuleHash):
1368 (WebCore::RuleData::hasRightmostSelectorMatchingHTMLBasedOnRuleHash): Deleted.
1369 (WebCore::RuleData::specificity): Deleted.
1370 * css/SelectorChecker.cpp:
1371 (WebCore::SelectorChecker::match):
1372 * css/SelectorChecker.h:
1373 * css/StyleResolver.h:
1374 (WebCore::checkRegionSelector):
1375 * cssjit/SelectorCompiler.cpp:
1376 (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1377 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1378 * cssjit/SelectorCompiler.h:
1379 (WebCore::SelectorCompiler::ruleCollectorSimpleSelectorCheckerFunction):
1380 (WebCore::SelectorCompiler::querySelectorSimpleSelectorCheckerFunction):
1381 (WebCore::SelectorCompiler::ruleCollectorSelectorCheckerFunctionWithCheckingContext):
1382 (WebCore::SelectorCompiler::querySelectorSelectorCheckerFunctionWithCheckingContext):
1383 (WebCore::SelectorCompiler::simpleSelectorCheckerFunction): Deleted.
1384 (WebCore::SelectorCompiler::selectorCheckerFunctionWithCheckingContext): Deleted.
1385 * dom/SelectorQuery.cpp:
1386 (WebCore::SelectorDataList::selectorMatches):
1387 (WebCore::SelectorDataList::selectorClosest):
1388 (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
1389 (WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext):
1390 (WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData):
1391 (WebCore::SelectorDataList::execute):
1392 * dom/SelectorQuery.h:
1394 2014-11-07 Alexey Proskuryakov <ap@apple.com>
1396 CSP is enforced for eval in report-only mode on first page load
1397 https://bugs.webkit.org/show_bug.cgi?id=138492
1398 rdar://problem/15782525
1400 Reviewed by Daniel Bates.
1402 This is covered by existing tests when running as one test per process invocation.
1404 * page/ContentSecurityPolicy.cpp:
1405 (WebCore::CSPDirectiveList::allowEval): Allow when in report only mode. The allowEval
1406 function itself needs to return false, because it's used in checkEvalAndReportViolation().
1407 (WebCore::CSPDirectiveList::allowJavaScriptURLs): Apply the same fix, although it's
1408 not changing the behavior - this function is never called with ContentSecurityPolicy::SuppressReport.
1409 (WebCore::CSPDirectiveList::allowInlineEventHandlers): Ditto.
1410 (WebCore::CSPDirectiveList::allowInlineScript): Ditto.
1411 (WebCore::CSPDirectiveList::allowInlineStyle): Ditto.
1412 (WebCore::CSPDirectiveList::allowPluginType): Ditto.
1413 (WebCore::CSPDirectiveList::allowScriptFromSource): Ditto.
1414 (WebCore::CSPDirectiveList::allowObjectFromSource): Ditto.
1415 (WebCore::CSPDirectiveList::allowChildFrameFromSource): Ditto.
1416 (WebCore::CSPDirectiveList::allowImageFromSource): Ditto.
1417 (WebCore::CSPDirectiveList::allowStyleFromSource): Ditto.
1418 (WebCore::CSPDirectiveList::allowFontFromSource): Ditto.
1419 (WebCore::CSPDirectiveList::allowMediaFromSource): Ditto.
1420 (WebCore::CSPDirectiveList::allowConnectToSource): Ditto.
1421 (WebCore::CSPDirectiveList::allowFormAction): Ditto.
1422 (WebCore::CSPDirectiveList::allowBaseURI): Ditto.
1423 (WebCore::ContentSecurityPolicy::didReceiveHeader): Remove isReportOnly() check,
1424 which is now inside allowEval().
1426 2014-11-07 Andreas Kling <akling@apple.com>
1428 [Mac] Avoid repainting scrollbar track when the scrollbar track is transparent.
1429 <https://webkit.org/b/138521>
1430 <rdar://problem/18892090>
1432 Reviewed by Simon Fraser.
1434 Don't bother invalidating the entire WebCore scrollbar when we've opted into
1435 AppKit's special mode to use individual layers for scrollbar components.
1436 NSScrollerImp will invalidate what's necessary below e.g setKnobAlpha.
1438 * platform/mac/ScrollAnimatorMac.mm:
1439 (-[WebScrollbarPartAnimation setCurrentProgress:]):
1441 2014-11-07 Chris Dumez <cdumez@apple.com>
1443 Rename HTMLInputElement::imageLoader() to ensureImageLoader()
1444 https://bugs.webkit.org/show_bug.cgi?id=138508
1446 Reviewed by Andreas Kling.
1448 Rename HTMLInputElement::imageLoader() to ensureImageLoader() and have
1449 it return a reference to make it clear that it constructs an
1450 ImageLoader if missing.
1451 Also introduce a lightweight imageLoader() getter which just returns
1452 the imageLoader or null if missing.
1454 No new tests, no behavior change.
1456 * html/HTMLInputElement.cpp:
1457 (WebCore::HTMLInputElement::ensureImageLoader):
1458 (WebCore::HTMLInputElement::didMoveToNewDocument):
1459 (WebCore::HTMLInputElement::imageLoader): Deleted.
1460 * html/HTMLInputElement.h:
1461 (WebCore::HTMLInputElement::imageLoader):
1462 (WebCore::HTMLInputElement::hasImageLoader): Deleted.
1463 * html/ImageInputType.cpp:
1464 (WebCore::ImageInputType::srcAttributeChanged):
1465 (WebCore::ImageInputType::attach):
1466 (WebCore::ImageInputType::height):
1467 (WebCore::ImageInputType::width):
1469 2014-11-07 Chris Dumez <cdumez@apple.com>
1471 Move 'webkit-clip-path' CSS property to the new StyleBuilder
1472 https://bugs.webkit.org/show_bug.cgi?id=138452
1474 Reviewed by Andreas Kling.
1476 Move 'webkit-clip-path' CSS property from DeprecatedStyleBuilder to the
1477 new StyleBuilder so that it is now generated from CSSPropertyNames.in.
1479 A ClipPath converter was added to support this. Custom code was avoided
1480 by replacing if checks by assertions, relying on the CSSParser to make
1481 sure the input is valid.
1483 Test: fast/masking/clip-path-bad-value.html
1485 * css/CSSPropertyNames.in:
1486 * css/DeprecatedStyleBuilder.cpp:
1487 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1488 (WebCore::ApplyPropertyClipPath::setValue): Deleted.
1489 (WebCore::ApplyPropertyClipPath::applyValue): Deleted.
1490 (WebCore::ApplyPropertyClipPath::createHandler): Deleted.
1491 * css/StyleBuilderConverter.h:
1492 (WebCore::StyleBuilderConverter::convertClipPath):
1494 2014-11-07 Joseph Pecoraro <pecoraro@apple.com>
1496 Web Inspector: Pseudo element matchedCSSRules do not include matching selector info
1497 https://bugs.webkit.org/show_bug.cgi?id=138438
1499 Reviewed by Benjamin Poulain.
1501 Test: inspector/css/psuedo-element-matches.html
1503 Element::matches is not the correct API to use to check selectors with pseudo-elements.
1504 Instead we should use the CSS Selector checking machinary which understands them.
1506 * inspector/InspectorCSSAgent.cpp:
1507 (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
1508 (WebCore::InspectorCSSAgent::buildArrayForRuleList):
1509 (WebCore::InspectorCSSAgent::buildArrayForRegions):
1510 (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
1511 Some RefPtr release improvements.
1513 (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
1514 Use a SelectorChecker to check each Selector against the element.
1515 This matches the SelectorChecker used when we collected the rules
1518 2014-11-07 Chris Dumez <cdumez@apple.com>
1520 Drop useless HTMLElement::isURLAttribute() override
1521 https://bugs.webkit.org/show_bug.cgi?id=138479
1523 Reviewed by Mark Lam.
1525 Drop useless HTMLElement::isURLAttribute() override as it is doing
1526 nothing but calling the parent class' isURLAttribute().
1528 No new tests, no behavior change.
1530 * html/HTMLElement.cpp:
1531 (WebCore::HTMLElement::isURLAttribute): Deleted.
1532 * html/HTMLElement.h:
1534 2014-11-07 Eric Carlson <eric.carlson@apple.com>
1536 [iOS] Update optimized fullscreen media controls
1537 https://bugs.webkit.org/show_bug.cgi?id=138493
1539 Reviewed by Brent Fulgham.
1541 * Modules/mediacontrols/MediaControlsHost.cpp:
1542 (WebCore::MediaControlsHost::fullscreenMode): New.
1543 (WebCore::MediaControlsHost::mediaUIImageData): New.
1544 * Modules/mediacontrols/MediaControlsHost.h:
1545 * Modules/mediacontrols/MediaControlsHost.idl:
1547 * Modules/mediacontrols/mediaControlsiOS.css:
1548 Renamed -webkit-media-controls-wireless-playback-status to -webkit-media-controls-inline-playback-placeholder
1549 because it is now used for other inline playback status display. Add z-index:0 so the placeholder
1550 renders above captions. Remove the background-image, it is now set from script.
1551 (audio::-webkit-media-controls-inline-playback-placeholder):
1552 (audio::-webkit-media-controls-inline-playback-placeholder.hidden):
1553 (video::-webkit-media-controls-optimized-fullscreen-button):
1554 (audio::-webkit-media-controls-wireless-playback-status): Deleted.
1555 (audio::-webkit-media-controls-wireless-playback-status.hidden): Deleted.
1556 (video::-webkit-media-controls-optimized-fullscreen-button:active): Deleted.
1558 * Modules/mediacontrols/mediaControlsiOS.js:
1559 (ControllerIOS): Set doingSetup to true around setup so we don't draw the inline controls
1560 briefly when an element is created as a result of a user gesture.
1561 (ControllerIOS.prototype.shouldHaveStartPlaybackButton): Don't allow inline controls during
1562 initial setup to prevent inline controls from begin drawn briefly when a media element
1563 is created and inserted by a script called from a user gesture.
1564 (ControllerIOS.prototype.updateWirelessPlaybackStatus): wirelessPlaybackStatus -> inlinePlaybackPlaceholder.
1565 (ControllerIOS.prototype.createControls): Ditto. Add style rules for optimized fullscreen button.
1566 (ControllerIOS.prototype.configureInlineControls): Add the inlinePlaybackPlaceholder as a peer of
1567 the inline controls compositing child instead of as a child so it renders correctly.
1568 (ControllerIOS.prototype.addControls):
1569 (ControllerIOS.prototype.updateControls): wirelessPlaybackStatus -> inlinePlaybackPlaceholder.
1570 (ControllerIOS.prototype.handleWrapperTouchStart):
1571 (ControllerIOS.prototype.get pageScaleFactor): Cleanup.
1572 (ControllerIOS.prototype.set pageScaleFactor): Ditto.
1573 (ControllerIOS.prototype.handleFullscreenChange): Show the placeholder.
1575 * WebCore.exp.in: Export _wkGetMediaUIImageData.
1577 * html/HTMLMediaElement.h:
1578 (WebCore::HTMLMediaElement::fullscreenMode): Expose fullscreen mode.
1580 * platform/ios/WebCoreSystemInterfaceIOS.h:
1581 * platform/ios/WebCoreSystemInterfaceIOS.mm:
1583 2014-11-06 Carlos Garcia Campos <cgarcia@igalia.com>
1585 Unreviewed. Try to fix GTK build after r175719.
1587 Rename the Timer fired function as requestAnimationTimerFired() to
1590 * platform/ScrollAnimatorNone.cpp:
1591 (WebCore::ScrollAnimatorNone::ScrollAnimatorNone):
1592 (WebCore::ScrollAnimatorNone::requestAnimationTimerFired):
1593 (WebCore::ScrollAnimatorNone::animationTimerFired): Deleted.
1594 * platform/ScrollAnimatorNone.h:
1596 2014-11-06 Chris Dumez <cdumez@apple.com>
1598 Remove useless if check in HTMLInputElement::setValue()
1599 https://bugs.webkit.org/show_bug.cgi?id=138485
1601 Reviewed by Daniel Bates.
1603 Remove useless if check in HTMLInputElement::setValue(). It was
1604 inadvertently left in as part of r94836.
1606 * html/HTMLInputElement.cpp:
1607 (WebCore::HTMLInputElement::setValue):
1609 2014-11-06 Simon Fraser <simon.fraser@apple.com>
1611 Put names on a couple of video-related CALayers
1612 https://bugs.webkit.org/show_bug.cgi?id=138491
1614 Reviewed by Eric Carlson.
1616 In debug, set layer names on a couple of video-related layers to make
1619 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1620 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
1621 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1622 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
1624 2014-11-06 Darin Adler <darin@apple.com>
1626 REGRESSION (r175549): http/tests/multipart/stop-crash.html failing (assertion failure in CachedResource::setEncodedSize)
1627 https://bugs.webkit.org/show_bug.cgi?id=138358
1629 Reviewed by Alexey Proskuryakov.
1631 * loader/cache/CachedResource.cpp:
1632 (WebCore::CachedResource::setEncodedSize): Removed the incorrect assertion here.
1633 The code asserts that resources only get bigger, never smaller. This is incorrect
1634 for a multipart/mixed-replace image, where a later image that is smaller can replace
1635 an earlier one. I don't fully understand why this assertion was not firing before,
1636 but the relevant websites are working fine and the test otherwise passes.
1638 * loader/DocumentLoader.cpp:
1639 (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart): Fix another
1640 incorrect assertion that can fire for any parts after the first one. I ran into
1641 this while testing various websites that use multipart/mixed-replace.
1643 2014-11-06 Jeremy Jones <jeremyj@apple.com>
1645 Fix typo in optimized fullscreen activation.
1646 https://bugs.webkit.org/show_bug.cgi?id=138480
1648 Reviewed by Jer Noble.
1650 * Modules/mediacontrols/mediaControlsiOS.js:
1651 (ControllerIOS.prototype.handleWrapperTouchStart): fix typo doubleTouchIntervalThresholdms
1652 (ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): fix typo isFullScreen
1654 2014-11-06 Chris Dumez <cdumez@apple.com>
1656 Stop special-casing wbr elements in HTMLElement::createElementRenderer()
1657 https://bugs.webkit.org/show_bug.cgi?id=138474
1659 Reviewed by Ryosuke Niwa.
1661 Stop special-casing wbr elements in HTMLElement::createElementRenderer()
1662 and move the code to a HTMLWBRElement subclass instead, that is
1663 overriding createElementRenderer(). This function is already virtual.
1665 No new tests, no behavior change.
1668 * WebCore.vcxproj/WebCore.vcxproj:
1669 * WebCore.xcodeproj/project.pbxproj:
1670 * html/HTMLElement.cpp:
1671 (WebCore::HTMLElement::createElementRenderer):
1672 * html/HTMLElementsAllInOne.cpp:
1673 * html/HTMLTagNames.in:
1674 * html/HTMLWBRElement.cpp: Added.
1675 (WebCore::HTMLWBRElement::create):
1676 (WebCore::HTMLWBRElement::HTMLWBRElement):
1677 (WebCore::HTMLWBRElement::createElementRenderer):
1678 * html/HTMLWBRElement.h: Added.
1679 * rendering/RenderLineBreak.cpp:
1680 (WebCore::RenderLineBreak::RenderLineBreak):
1682 2014-11-05 Jer Noble <jer.noble@apple.com>
1685 https://bugs.webkit.org/show_bug.cgi?id=138450
1687 Reviewed by Anders Carlsson.
1689 Timer does not need to be a templated class; only it's constructors need to be templated.
1690 Remove the template specifier from Timer and add same to its two class method
1691 constructors. Replace the function pointer typedefs with using statements. Add a
1692 helper typedef which allows invalid combinations of TimerFiredClass and
1693 TimerFiredFunction to be caught early by the compiler, while still allowing
1694 valid combinations (such as when the caller specifies a function on a subclass of
1697 * Modules/encryptedmedia/MediaKeySession.cpp:
1698 (WebCore::MediaKeySession::keyRequestTimerFired):
1699 (WebCore::MediaKeySession::addKeyTimerFired):
1700 * Modules/encryptedmedia/MediaKeySession.h:
1701 * Modules/geolocation/Geolocation.cpp:
1702 (WebCore::Geolocation::GeoNotifier::timerFired):
1703 (WebCore::Geolocation::resumeTimerFired):
1704 * Modules/geolocation/Geolocation.h:
1705 * Modules/indexeddb/IDBTransactionBackend.cpp:
1706 (WebCore::IDBTransactionBackend::taskTimerFired):
1707 * Modules/indexeddb/IDBTransactionBackend.h:
1708 * Modules/mediasource/SourceBuffer.cpp:
1709 (WebCore::SourceBuffer::appendBufferTimerFired):
1710 (WebCore::SourceBuffer::removeTimerFired):
1711 * Modules/mediasource/SourceBuffer.h:
1712 * Modules/mediastream/MediaStream.cpp:
1713 (WebCore::MediaStream::scheduledEventTimerFired):
1714 * Modules/mediastream/MediaStream.h:
1715 * Modules/mediastream/RTCDTMFSender.cpp:
1716 (WebCore::RTCDTMFSender::scheduledEventTimerFired):
1717 * Modules/mediastream/RTCDTMFSender.h:
1718 * Modules/mediastream/RTCDataChannel.cpp:
1719 (WebCore::RTCDataChannel::scheduledEventTimerFired):
1720 * Modules/mediastream/RTCDataChannel.h:
1721 * Modules/mediastream/RTCPeerConnection.cpp:
1722 (WebCore::RTCPeerConnection::scheduledEventTimerFired):
1723 * Modules/mediastream/RTCPeerConnection.h:
1724 * Modules/notifications/Notification.cpp:
1725 (WebCore::Notification::Notification):
1726 (WebCore::Notification::taskTimerFired):
1727 * Modules/notifications/Notification.h:
1728 * Modules/notifications/NotificationCenter.cpp:
1729 (WebCore::NotificationCenter::NotificationRequestCallback::timerFired):
1730 * Modules/notifications/NotificationCenter.h:
1731 * Modules/vibration/Vibration.cpp:
1732 (WebCore::Vibration::timerFired):
1733 * Modules/vibration/Vibration.h:
1734 * Modules/websockets/WebSocketChannel.cpp:
1735 (WebCore::WebSocketChannel::resumeTimerFired):
1736 (WebCore::WebSocketChannel::closingTimerFired):
1737 * Modules/websockets/WebSocketChannel.h:
1738 * accessibility/AXObjectCache.cpp:
1739 (WebCore::AXObjectCache::notificationPostTimerFired):
1740 * accessibility/AXObjectCache.h:
1741 (WebCore::AXObjectCache::AXObjectCache):
1742 * bindings/js/GCController.cpp:
1743 (WebCore::GCController::gcTimerFired):
1744 * bindings/js/GCController.h:
1745 * css/CSSFontFaceSource.h:
1746 * css/CSSFontSelector.cpp:
1747 (WebCore::CSSFontSelector::beginLoadTimerFired):
1748 * css/CSSFontSelector.h:
1749 * css/StyleResolver.cpp:
1750 (WebCore::StyleResolver::sweepMatchedPropertiesCache):
1751 * css/StyleResolver.h:
1753 (WebCore::Document::visualUpdatesSuppressionTimerFired):
1754 (WebCore::Document::styleRecalcTimerFired):
1755 (WebCore::Document::optimizedStyleSheetUpdateTimerFired):
1756 (WebCore::Document::sharedObjectPoolClearTimerFired):
1757 (WebCore::Document::updateFocusAppearanceTimerFired):
1758 (WebCore::Document::pendingTasksTimerFired):
1759 (WebCore::Document::fullScreenChangeDelayTimerFired):
1760 (WebCore::Document::loadEventDelayTimerFired):
1761 (WebCore::Document::didAssociateFormControlsTimerFired):
1762 (WebCore::Document::domCookieCacheExpiryTimerFired):
1764 * dom/EventSender.h:
1765 (WebCore::EventSender::timerFired):
1766 * dom/GenericEventQueue.cpp:
1767 (WebCore::GenericEventQueue::timerFired):
1768 * dom/GenericEventQueue.h:
1769 * dom/ScriptRunner.cpp:
1770 (WebCore::ScriptRunner::timerFired):
1771 * dom/ScriptRunner.h:
1772 * dom/ScriptedAnimationController.cpp:
1773 (WebCore::ScriptedAnimationController::animationTimerFired):
1774 * dom/ScriptedAnimationController.h:
1775 * dom/StyledElement.cpp:
1776 (WebCore::PresentationAttributeCacheCleaner::cleanCache):
1777 * editing/AlternativeTextController.cpp:
1778 (WebCore::AlternativeTextController::timerFired):
1779 * editing/AlternativeTextController.h:
1780 * editing/Editor.cpp:
1781 (WebCore::Editor::scanSelectionForTelephoneNumbers):
1782 (WebCore::Editor::editorUIUpdateTimerFired):
1784 * editing/FrameSelection.cpp:
1785 (WebCore::FrameSelection::caretBlinkTimerFired):
1786 * editing/FrameSelection.h:
1787 * editing/SpellChecker.cpp:
1788 (WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
1789 * editing/SpellChecker.h:
1790 * html/HTMLFormElement.cpp:
1791 (WebCore::HTMLFormElement::requestAutocompleteTimerFired):
1792 * html/HTMLFormElement.h:
1793 * html/HTMLMediaElement.cpp:
1794 (WebCore::HTMLMediaElement::parseAttribute):
1795 * html/HTMLMediaElement.h:
1796 * html/HTMLPlugInElement.cpp:
1797 (WebCore::HTMLPlugInElement::swapRendererTimerFired):
1798 * html/HTMLPlugInElement.h:
1799 * html/HTMLPlugInImageElement.cpp:
1800 (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
1801 * html/HTMLPlugInImageElement.h:
1802 * html/HTMLSourceElement.cpp:
1803 (WebCore::HTMLSourceElement::errorEventTimerFired):
1804 * html/HTMLSourceElement.h:
1805 * html/HTMLTrackElement.cpp:
1806 (WebCore::HTMLTrackElement::loadTimerFired):
1807 * html/HTMLTrackElement.h:
1808 * html/MediaController.cpp:
1809 (MediaController::asyncEventTimerFired):
1810 (MediaController::clearPositionTimerFired):
1811 (MediaController::timeupdateTimerFired):
1812 * html/MediaController.h:
1813 * html/MediaDocument.cpp:
1814 (WebCore::MediaDocument::replaceMediaElementTimerFired):
1815 * html/MediaDocument.h:
1816 * html/SearchInputType.cpp:
1817 (WebCore::SearchInputType::searchEventTimerFired):
1818 * html/SearchInputType.h:
1819 * html/ValidationMessage.cpp:
1820 (WebCore::ValidationMessage::setMessage):
1821 (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
1822 (WebCore::ValidationMessage::buildBubbleTree):
1823 (WebCore::ValidationMessage::requestToHideMessage):
1824 (WebCore::ValidationMessage::deleteBubbleTree):
1825 * html/ValidationMessage.h:
1826 * html/canvas/WebGLRenderingContext.cpp:
1827 (WebCore::WebGLRenderingContext::dispatchContextLostEvent):
1828 (WebCore::WebGLRenderingContext::maybeRestoreContext):
1829 * html/canvas/WebGLRenderingContext.h:
1830 * html/parser/HTMLParserScheduler.cpp:
1831 (WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
1832 * html/parser/HTMLParserScheduler.h:
1833 * html/shadow/MediaControlElements.cpp:
1834 (WebCore::MediaControlPanelElement::transitionTimerFired):
1835 (WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
1836 * html/shadow/MediaControlElements.h:
1837 * html/shadow/MediaControls.cpp:
1838 (WebCore::MediaControls::hideFullscreenControlsTimerFired):
1839 * html/shadow/MediaControls.h:
1840 * html/shadow/SpinButtonElement.cpp:
1841 (WebCore::SpinButtonElement::repeatingTimerFired):
1842 * html/shadow/SpinButtonElement.h:
1843 * html/track/LoadableTextTrack.cpp:
1844 (WebCore::LoadableTextTrack::loadTimerFired):
1845 * html/track/LoadableTextTrack.h:
1846 * html/track/VTTRegion.cpp:
1847 (WebCore::VTTRegion::scrollTimerFired):
1848 * html/track/VTTRegion.h:
1849 * inspector/InspectorCSSAgent.cpp:
1850 (WebCore::ChangeRegionOversetTask::timerFired):
1851 * inspector/InspectorDOMAgent.cpp:
1852 (WebCore::RevalidateStyleAttributeTask::timerFired):
1853 * inspector/InspectorFrontendClientLocal.cpp:
1854 (WebCore::InspectorBackendDispatchTask::timerFired):
1855 * inspector/InspectorOverlay.cpp:
1856 (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
1857 * inspector/InspectorOverlay.h:
1858 * loader/DocumentLoader.cpp:
1859 (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
1860 * loader/DocumentLoader.h:
1861 * loader/FrameLoader.cpp:
1862 (WebCore::FrameLoader::checkTimerFired):
1863 * loader/FrameLoader.h:
1864 * loader/ImageLoader.cpp:
1865 (WebCore::ImageLoader::timerFired):
1866 * loader/ImageLoader.h:
1867 * loader/LinkLoader.cpp:
1868 (WebCore::LinkLoader::linkLoadTimerFired):
1869 (WebCore::LinkLoader::linkLoadingErrorTimerFired):
1870 * loader/LinkLoader.h:
1871 * loader/NavigationScheduler.cpp:
1872 (WebCore::ScheduledNavigation::didStartTimer):
1873 (WebCore::NavigationScheduler::timerFired):
1874 * loader/NavigationScheduler.h:
1875 * loader/PingLoader.h:
1876 (WebCore::PingLoader::timeoutTimerFired):
1877 * loader/ProgressTracker.cpp:
1878 (WebCore::ProgressTracker::progressHeartbeatTimerFired):
1879 * loader/ProgressTracker.h:
1880 * loader/ResourceLoadScheduler.cpp:
1881 (WebCore::ResourceLoadScheduler::requestTimerFired):
1882 * loader/ResourceLoadScheduler.h:
1883 * loader/TextTrackLoader.cpp:
1884 (WebCore::TextTrackLoader::cueLoadTimerFired):
1885 * loader/TextTrackLoader.h:
1886 * loader/cache/CachedResource.cpp:
1887 (WebCore::CachedResource::Callback::timerFired):
1888 * loader/cache/CachedResource.h:
1889 * loader/cache/CachedResourceLoader.cpp:
1890 (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
1891 * loader/cache/CachedResourceLoader.h:
1892 * loader/icon/IconDatabase.cpp:
1893 (WebCore::IconDatabase::syncTimerFired):
1894 * loader/icon/IconDatabase.h:
1895 * page/AutoscrollController.cpp:
1896 (WebCore::AutoscrollController::autoscrollTimerFired):
1897 * page/AutoscrollController.h:
1898 * page/CaptionUserPreferences.cpp:
1899 (WebCore::CaptionUserPreferences::timerFired):
1900 * page/CaptionUserPreferences.h:
1901 * page/CaptionUserPreferencesMediaAF.cpp:
1902 (WebCore::CaptionUserPreferencesMediaAF::updateTimerFired):
1903 * page/CaptionUserPreferencesMediaAF.h:
1904 * page/DeviceController.cpp:
1905 (WebCore::DeviceController::fireDeviceEvent):
1906 * page/DeviceController.h:
1907 * page/EventHandler.cpp:
1908 (WebCore::EventHandler::cursorUpdateTimerFired):
1909 (WebCore::EventHandler::autoHideCursorTimerFired):
1910 (WebCore::EventHandler::recognizeLongMousePress):
1911 (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
1912 (WebCore::EventHandler::hoverTimerFired):
1913 * page/EventHandler.h:
1914 * page/EventSource.cpp:
1915 (WebCore::EventSource::connectTimerFired):
1916 * page/EventSource.h:
1917 * page/FocusController.cpp:
1918 (WebCore::FocusController::focusRepaintTimerFired):
1919 * page/FocusController.h:
1921 (WebCore::Frame::overflowAutoScrollTimerFired):
1923 * page/FrameView.cpp:
1924 (WebCore::FrameView::delayedScrollEventTimerFired):
1925 (WebCore::FrameView::speculativeTilingEnableTimerFired):
1926 (WebCore::FrameView::layoutTimerFired):
1927 (WebCore::FrameView::updateEmbeddedObjectsTimerFired):
1928 (WebCore::FrameView::postLayoutTimerFired):
1930 * page/PageOverlay.cpp:
1931 (WebCore::PageOverlay::fadeAnimationTimerFired):
1932 * page/PageOverlay.h:
1933 * page/Settings.cpp:
1934 (WebCore::Settings::imageLoadingSettingsTimerFired):
1936 * page/animation/AnimationController.cpp:
1937 (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
1938 (WebCore::AnimationControllerPrivate::animationTimerFired):
1939 * page/animation/AnimationControllerPrivate.h:
1940 * page/mac/ServicesOverlayController.h:
1941 * page/mac/ServicesOverlayController.mm:
1942 (WebCore::ServicesOverlayController::determineActiveHighlightTimerFired):
1943 * page/scrolling/AsyncScrollingCoordinator.cpp:
1944 (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
1945 * page/scrolling/AsyncScrollingCoordinator.h:
1946 * page/scrolling/ios/ScrollingCoordinatorIOS.h:
1947 * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
1948 (WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired):
1949 * page/scrolling/mac/ScrollingCoordinatorMac.h:
1950 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1951 (WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired):
1952 * platform/HysteresisActivity.h:
1953 (WebCore::HysteresisActivity::hysteresisTimerFired):
1954 * platform/ScrollAnimator.cpp:
1955 (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
1956 (WebCore::ScrollAnimator::startScrollSnapTimer):
1957 (WebCore::ScrollAnimator::stopScrollSnapTimer):
1958 (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired):
1959 (WebCore::ScrollAnimator::verticalScrollSnapTimerFired):
1960 * platform/ScrollAnimator.h:
1961 * platform/ScrollAnimatorNone.cpp:
1962 (WebCore::ScrollAnimatorNone::animationTimerFired):
1963 * platform/ScrollAnimatorNone.h:
1964 * platform/Scrollbar.cpp:
1965 (WebCore::Scrollbar::autoscrollTimerFired):
1966 * platform/Scrollbar.h:
1968 (WebCore::Timer::Timer):
1969 * platform/audio/MediaSession.cpp:
1970 (WebCore::MediaSession::clientDataBufferingTimerFired):
1971 * platform/audio/MediaSession.h:
1972 * platform/efl/BatteryProviderEfl.cpp:
1973 (WebCore::BatteryProviderEfl::timerFired):
1974 * platform/efl/BatteryProviderEfl.h:
1975 * platform/graphics/BitmapImage.cpp:
1976 (WebCore::BitmapImage::startAnimation):
1977 (WebCore::BitmapImage::advanceAnimation):
1978 * platform/graphics/BitmapImage.h:
1979 * platform/graphics/MediaPlayer.cpp:
1980 (WebCore::MediaPlayer::reloadTimerFired):
1981 * platform/graphics/MediaPlayer.h:
1982 * platform/graphics/ShadowBlur.cpp:
1983 (WebCore::ScratchBuffer::timerFired):
1984 * platform/graphics/TiledBackingStore.cpp:
1985 (WebCore::TiledBackingStore::tileBufferUpdateTimerFired):
1986 (WebCore::TiledBackingStore::backingStoreUpdateTimerFired):
1987 * platform/graphics/TiledBackingStore.h:
1988 * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
1989 * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
1990 (WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired):
1991 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1992 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1993 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired):
1994 * platform/graphics/ca/LayerPool.cpp:
1995 (WebCore::LayerPool::pruneTimerFired):
1996 * platform/graphics/ca/LayerPool.h:
1997 * platform/graphics/ca/TileController.cpp:
1998 (WebCore::TileController::tileRevalidationTimerFired):
1999 * platform/graphics/ca/TileController.h:
2000 * platform/graphics/ca/TileGrid.cpp:
2001 (WebCore::TileGrid::cohortRemovalTimerFired):
2002 * platform/graphics/ca/TileGrid.h:
2003 * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
2004 (WebCore::LegacyCACFLayerTreeHost::renderTimerFired):
2005 * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h:
2006 * platform/graphics/cg/IOSurfacePool.cpp:
2007 (WebCore::IOSurfacePool::collectionTimerFired):
2008 * platform/graphics/cg/IOSurfacePool.h:
2009 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2010 (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
2011 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2012 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2013 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2014 (WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
2015 * platform/graphics/texmap/TextureMapper.cpp:
2016 (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
2017 * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
2018 (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
2019 * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
2020 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2021 (WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
2022 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2023 * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
2024 (WebCore::CoordinatedImageBacking::clearContentsTimerFired):
2025 * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
2026 * platform/ios/LegacyTileCache.h:
2027 * platform/ios/LegacyTileCache.mm:
2028 (WebCore::LegacyTileCache::tileCreationTimerFired):
2029 * platform/mac/HIDGamepadProvider.cpp:
2030 (WebCore::HIDGamepadProvider::connectionDelayTimerFired):
2031 (WebCore::HIDGamepadProvider::inputNotificationTimerFired):
2032 * platform/mac/HIDGamepadProvider.h:
2033 * platform/mac/ScrollAnimatorMac.h:
2034 * platform/mac/ScrollAnimatorMac.mm:
2035 (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2036 (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
2037 (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
2038 * platform/mock/DeviceMotionClientMock.cpp:
2039 (WebCore::DeviceMotionClientMock::timerFired):
2040 * platform/mock/DeviceMotionClientMock.h:
2041 * platform/mock/DeviceOrientationClientMock.cpp:
2042 (WebCore::DeviceOrientationClientMock::timerFired):
2043 * platform/mock/DeviceOrientationClientMock.h:
2044 * platform/mock/GeolocationClientMock.cpp:
2045 (WebCore::GeolocationClientMock::permissionTimerFired):
2046 (WebCore::GeolocationClientMock::controllerTimerFired):
2047 * platform/mock/GeolocationClientMock.h:
2048 * platform/mock/PlatformSpeechSynthesizerMock.cpp:
2049 (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
2050 * platform/mock/PlatformSpeechSynthesizerMock.h:
2051 * platform/mock/TimerEventBasedMock.h:
2052 (WebCore::TimerEvent::timerFired):
2053 * platform/network/DNSResolveQueue.cpp:
2054 (WebCore::DNSResolveQueue::timerFired):
2055 * platform/network/DNSResolveQueue.h:
2056 * platform/network/NetworkStateNotifier.h:
2057 * platform/network/ResourceHandle.cpp:
2058 (WebCore::ResourceHandle::failureTimerFired):
2059 * platform/network/ResourceHandle.h:
2060 * platform/network/ResourceHandleInternal.h:
2061 * platform/network/curl/ResourceHandleManager.cpp:
2062 (WebCore::ResourceHandleManager::downloadTimerCallback):
2063 * platform/network/curl/ResourceHandleManager.h:
2064 * platform/network/mac/NetworkStateNotifierMac.cpp:
2065 (WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
2066 * platform/network/win/ResourceHandleWin.cpp:
2067 (WebCore::ResourceHandle::fileLoadTimer):
2068 * plugins/PluginPackage.cpp:
2069 (WebCore::PluginPackage::freeLibraryTimerFired):
2070 * plugins/PluginPackage.h:
2071 * plugins/PluginStream.cpp:
2072 (WebCore::PluginStream::delayDeliveryTimerFired):
2073 * plugins/PluginStream.h:
2074 * plugins/PluginView.cpp:
2075 (WebCore::PluginView::popPopupsStateTimerFired):
2076 (WebCore::PluginView::requestTimerFired):
2077 (WebCore::PluginView::invalidateTimerFired):
2078 (WebCore::PluginView::lifeSupportTimerFired):
2079 * plugins/PluginView.h:
2080 * plugins/win/PluginMessageThrottlerWin.cpp:
2081 (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
2082 * plugins/win/PluginMessageThrottlerWin.h:
2083 * rendering/ImageQualityController.cpp:
2084 (WebCore::ImageQualityController::highQualityRepaintTimerFired):
2085 * rendering/ImageQualityController.h:
2086 * rendering/RenderButton.cpp:
2087 (WebCore::RenderButton::styleDidChange):
2088 (WebCore::RenderButton::timerFired):
2089 * rendering/RenderButton.h:
2090 * rendering/RenderLayerCompositor.cpp:
2091 (WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired):
2092 (WebCore::RenderLayerCompositor::layerFlushTimerFired):
2093 (WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
2094 * rendering/RenderLayerCompositor.h:
2095 * rendering/RenderMarquee.cpp:
2096 (WebCore::RenderMarquee::timerFired):
2097 * rendering/RenderMarquee.h:
2098 * rendering/RenderNamedFlowThread.cpp:
2099 (WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
2100 * rendering/RenderNamedFlowThread.h:
2101 * rendering/RenderProgress.cpp:
2102 (WebCore::RenderProgress::animationTimerFired):
2103 * rendering/RenderProgress.h:
2104 * rendering/RenderView.cpp:
2105 (WebCore::RenderView::lazyRepaintTimerFired):
2106 * rendering/RenderView.h:
2107 * replay/EventLoopInputDispatcher.cpp:
2108 (WebCore::EventLoopInputDispatcher::timerFired):
2109 * replay/EventLoopInputDispatcher.h:
2110 * storage/StorageAreaImpl.cpp:
2111 (WebCore::StorageAreaImpl::closeDatabaseTimerFired):
2112 * storage/StorageAreaImpl.h:
2113 * storage/StorageAreaSync.cpp:
2114 (WebCore::StorageAreaSync::syncTimerFired):
2115 * storage/StorageAreaSync.h:
2116 * svg/SVGElement.cpp:
2117 (WebCore::SVGElement::svgLoadEventTimerFired):
2118 (WebCore::SVGElement::svgLoadEventTimer):
2120 * svg/SVGScriptElement.h:
2121 * svg/SVGStyleElement.h:
2122 * svg/SVGUseElement.h:
2123 * svg/animation/SMILTimeContainer.cpp:
2124 (WebCore::SMILTimeContainer::timerFired):
2125 * svg/animation/SMILTimeContainer.h:
2126 * xml/XMLHttpRequestProgressEventThrottle.cpp:
2127 (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
2128 * xml/XMLHttpRequestProgressEventThrottle.h:
2130 2014-11-06 Yongjun Zhang <yongjun_zhang@apple.com>
2132 Don't send identifierForInitialRequest callback method for request with DoNotSendCallbacks option.
2133 https://bugs.webkit.org/show_bug.cgi?id=138473
2135 The iOS specific code that sets up a valid m_identifier is not needed any more, since this
2136 will be done later in ResourceLoader::willSendRequest. This also matches the behavior that
2137 we don't call assignIdentifierToInitialRequest callback method if the reqeust has
2138 DoNotSendCallbacks option.
2140 Reviewed by Pratik Solanki.
2142 * loader/ResourceLoader.cpp:
2143 (WebCore::ResourceLoader::willSendRequest): Remove iOS specific block for setting up a valid
2144 m_identifier. In iOS, also make sure we still bail out if the resource loader was stopped
2145 in assignIdentifierToInitialRequest callback by a client.
2147 2014-11-06 Dean Jackson <dino@apple.com>
2149 [filters2] Support for backdrop-filter
2150 https://bugs.webkit.org/show_bug.cgi?id=138384
2151 <rdar://problem/18874494>
2153 Reviewed by Simon Fraser.
2155 Take 2!! Previous patch was rolled out.
2157 Add prototype support for backdrop-filter
2158 http://dev.w3.org/fxtf/filters-2/#BackdropFilterProperty
2160 This adds support for parsing the new CSS property, adding
2161 the value to RenderStyle, noticing that on the layer tree,
2162 and the platform code in GraphicsLayer to render a backdrop
2163 and apply an effect to the result.
2165 Some things are missing:
2166 - animation of the backdrop-filter is not yet supported
2167 - backdrops will not work in cloned layers yet (e.g. reflections)
2169 Tests: css3/filters/backdrop/backdropfilter-property-computed-style.html
2170 css3/filters/backdrop/backdropfilter-property-parsing-invalid.html
2171 css3/filters/backdrop/backdropfilter-property-parsing.html
2172 css3/filters/backdrop/backdropfilter-property.html
2173 css3/filters/backdrop/effect-hw.html
2175 * WebCore.exp.in: Export the setBackdropFilters method so it can
2176 be used from WebKit.
2178 * css/CSSComputedStyleDeclaration.cpp: New property name.
2179 (WebCore::isLayoutDependent):
2180 (WebCore::ComputedStyleExtractor::propertyValue): Use the existing valueForFilter method.
2182 * css/CSSParser.cpp:
2183 (WebCore::CSSParser::parseValue): Piggyback on the filter parser.
2185 * css/CSSPropertyNames.in: Add -webkit-backdrop-filter.
2187 * css/StyleResolver.cpp:
2188 (WebCore::StyleResolver::adjustRenderStyle): Add test for backdrop.
2189 (WebCore::StyleResolver::applyProperty): Support new property.
2191 * platform/graphics/GraphicsLayer.h:
2192 (WebCore::GraphicsLayer::needsBackdrop): New method to test for existence of values.
2193 (WebCore::GraphicsLayer::backdropFilters): Keeps the list of filters.
2194 (WebCore::GraphicsLayer::setBackdropFilters):
2195 (WebCore::GraphicsLayer::clearBackdropFilters):
2197 * platform/graphics/ca/GraphicsLayerCA.cpp: This adds a new m_backdropLayer CALayer
2198 that will sit behind the contents layer and provide the element's backdrop.
2199 (WebCore::GraphicsLayerCA::willBeDestroyed):
2200 (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
2201 (WebCore::GraphicsLayerCA::setBackdropFilters): Set a custom appearance so
2202 remote layer hosts will notice the special layer. Also set the actual
2204 (WebCore::GraphicsLayerCA::addAnimation): Remove whitespace.
2205 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Update backdrop if necessary.
2206 (WebCore::GraphicsLayerCA::updateLayerNames): Give the new layer a name.
2207 (WebCore::GraphicsLayerCA::updateSublayerList):
2208 (WebCore::GraphicsLayerCA::updateGeometry): Make the backdrop layer match the contents
2210 (WebCore::GraphicsLayerCA::updateBackdropFilters): Create the backdrop layer if necessary,
2211 and copy the filter values to any clones.
2212 (WebCore::GraphicsLayerCA::ensureStructuralLayer): We need a structural layer if we
2213 have backdrop filters.
2214 (WebCore::GraphicsLayerCA::structuralLayerPurpose):
2215 (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2216 (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2217 * platform/graphics/ca/GraphicsLayerCA.h: New StructuralLayerPurpose, new LayerChangeFlag.
2219 * platform/graphics/ca/PlatformCALayer.h: New LayerType.
2221 * platform/graphics/ca/mac/PlatformCALayerMac.mm: Define CABackdropLayer.
2222 (PlatformCALayerMac::PlatformCALayerMac): Create the correct CALayer type.
2224 * rendering/RenderElement.h:
2225 (WebCore::RenderElement::createsGroup):
2226 (WebCore::RenderElement::hasBackdropFilter): This method is always around, but
2227 only can return true when FILTERS_LEVEL_2 is enabled.
2229 * rendering/RenderLayer.cpp:
2230 (WebCore::RenderLayer::paintsWithFilters): Remove an unnecessary comment.
2231 (WebCore::RenderLayer::calculateClipRects):
2233 * rendering/RenderLayer.h: Add hasBackdropFilter.
2235 * rendering/RenderLayerBacking.cpp:
2236 (WebCore::RenderLayerBacking::RenderLayerBacking):
2237 (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Update the backdrop filters.
2238 (WebCore::RenderLayerBacking::updateBackdropFilters): Set the filters on the GraphicsLayer.
2239 (WebCore::RenderLayerBacking::updateGeometry):
2240 * rendering/RenderLayerBacking.h:
2242 * rendering/RenderLayerCompositor.cpp:
2243 (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Needs backingstore if it has a backdrop filter.
2244 (WebCore::RenderLayerCompositor::reasonsForCompositing):
2245 (WebCore::RenderLayerCompositor::requiresCompositingForFilters): Return early if we have
2246 a backdrop filter, because currently we absolutely require compositing.
2248 * rendering/RenderLayerModelObject.cpp:
2249 (WebCore::RenderLayerModelObject::styleWillChange): Add hasBackdropFilter().
2251 * rendering/style/RenderStyle.cpp:
2252 (WebCore::RenderStyle::changeRequiresLayout): Check backdrops for change.
2254 * rendering/style/RenderStyle.h: Add the backdropFilter style stuff.
2255 * rendering/style/StyleRareNonInheritedData.cpp:
2256 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2257 (WebCore::StyleRareNonInheritedData::operator==):
2258 (WebCore::StyleRareNonInheritedData::hasBackdropFilters):
2259 * rendering/style/StyleRareNonInheritedData.h:
2261 2014-11-06 Benjamin Poulain <bpoulain@apple.com>
2263 Give pseudo elements the correct specificity
2264 https://bugs.webkit.org/show_bug.cgi?id=138378
2266 Reviewed by Dean Jackson.
2268 WebKit had an old silly bug where pseudo elements were given specificity in the class B
2269 instead of the class C.
2271 Now that the inspector shows the specificity, this bug is much more visible which is why
2274 Test: fast/css/pseudo-element-specificity.html
2276 * css/CSSSelector.cpp:
2277 (WebCore::CSSSelector::specificityForOneSelector):
2278 Give pseudo-elements the right specificity.
2280 * Modules/mediacontrols/mediaControlsApple.css:
2281 (video::-webkit-media-controls-volume-slider):
2282 (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
2283 (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb):
2284 (audio::-webkit-media-controls-timeline):
2285 (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
2286 (audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,):
2287 (video:-webkit-full-screen::-webkit-media-controls-volume-slider):
2288 (video:-webkit-full-screen::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
2289 * Modules/mediacontrols/mediaControlsBase.css:
2290 (video::-webkit-media-controls-volume-slider):
2291 (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
2292 (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb):
2293 (audio::-webkit-media-controls-timeline):
2294 (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
2295 (audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,):
2296 (video:-webkit-full-screen::-webkit-media-controls-volume-slider):
2297 (video:-webkit-full-screen::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
2298 * css/mediaControls.css:
2299 (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
2300 (audio::-webkit-media-controls-volume-slider-mute-button, video::-webkit-media-controls-volume-slider-mute-button):
2301 * css/mediaControlsGtk.css:
2302 (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
2303 (audio::-webkit-media-controls-timeline[disabled], video::-webkit-media-controls-timeline[disabled]):
2304 (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
2305 The media controls were relying on the bug to override the style of input[type=range].
2307 Ideally we should either:
2308 -Implement some kind of high level style isolation (e.g. CSS Scoping).
2309 -Fix the media control tree to use regular CSS scoped by a shadow pseudo ID.
2311 Until we have one of those, I just fixed the styling by forcing the properties with lower
2312 specificity with !important.
2314 2014-11-06 Beth Dakin <bdakin@apple.com>
2316 Preview views often misplaced inside popover
2317 https://bugs.webkit.org/show_bug.cgi?id=138472
2319 Reviewed by Tim Horton.
2323 2014-11-06 Michael Saboff <msaboff@apple.com>
2325 REGRESSION (r174985-174986): Site display disappears
2326 https://bugs.webkit.org/show_bug.cgi?id=138082
2328 Reviewed by Geoffrey Garen.
2330 This effectively reverts to the behavior before r174985 by using the
2331 lexical global object of the caller's frame to find the active document.
2332 Before r174985, native functions are invoked with the ScopeShain of their
2333 caller. The lexical global object is accessed from the ScopeChain.
2335 * bindings/js/JSHTMLDocumentCustom.cpp:
2336 (WebCore::JSHTMLDocument::getOwnPropertySlot):
2337 (WebCore::findOwningDocument):
2338 (WebCore::documentWrite):
2339 (WebCore::JSHTMLDocument::write):
2340 (WebCore::JSHTMLDocument::writeln):
2341 * html/HTMLDocument.idl:
2343 2014-11-05 Sam Weinig <sam@webkit.org>
2345 Use std::unique_ptr for TileController
2346 https://bugs.webkit.org/show_bug.cgi?id=138429
2348 Reviewed by Anders Carlsson.
2351 * platform/graphics/ca/TileController.cpp:
2352 (WebCore::TileController::create): Deleted.
2353 * platform/graphics/ca/TileController.h:
2354 * platform/graphics/ca/mac/WebTiledBackingLayer.h:
2355 * platform/graphics/ca/mac/WebTiledBackingLayer.mm:
2356 (-[WebTiledBackingLayer createTileController:]):
2357 * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2358 (PlatformCALayerWinInternal::createTileController):
2359 * platform/graphics/ca/win/PlatformCALayerWinInternal.h:
2361 2014-11-06 Chris Dumez <cdumez@apple.com>
2363 Use lambda functions in DocumentOrderedMap
2364 https://bugs.webkit.org/show_bug.cgi?id=138376
2366 Reviewed by Darin Adler.
2368 Use lambda functions in DocumentOrderedMap instead of separate named
2371 No new tests, no behavior change.
2373 * dom/DocumentOrderedMap.cpp:
2374 (WebCore::DocumentOrderedMap::get):
2375 (WebCore::DocumentOrderedMap::getElementById):
2376 (WebCore::DocumentOrderedMap::getElementByName):
2377 (WebCore::DocumentOrderedMap::getElementByMapName):
2378 (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
2379 (WebCore::DocumentOrderedMap::getElementByLowercasedUsemap):
2380 (WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
2381 (WebCore::DocumentOrderedMap::getElementByWindowNamedItem):
2382 (WebCore::DocumentOrderedMap::getElementByDocumentNamedItem):
2383 (WebCore::DocumentOrderedMap::getAllElementsById):
2384 (WebCore::keyMatchesId): Deleted.
2385 (WebCore::keyMatchesName): Deleted.
2386 (WebCore::keyMatchesMapName): Deleted.
2387 (WebCore::keyMatchesLowercasedMapName): Deleted.
2388 (WebCore::keyMatchesLowercasedUsemap): Deleted.
2389 (WebCore::keyMatchesLabelForAttribute): Deleted.
2390 (WebCore::keyMatchesWindowNamedItem): Deleted.
2391 (WebCore::keyMatchesDocumentNamedItem): Deleted.
2392 * dom/DocumentOrderedMap.h:
2394 2014-11-05 Shivakumar JM <shiva.jm@samsung.com>
2396 splitText API does not match DOM specification.
2397 https://bugs.webkit.org/show_bug.cgi?id=138405
2399 Reviewed by Chris Dumez.
2401 Make the offset argument for splitText API as mandatory (and thus throw if it is omitted) and stop throwing if the offset argument is
2402 negative (and wraps to a valid index) as per specification: https://w3c.github.io/dom/#interface-text. Also This matches the behavior
2403 of both Firefox 33 and Chrome 38.
2405 Test: fast/dom/Text/splitText.html
2409 2014-11-05 Commit Queue <commit-queue@webkit.org>
2411 Unreviewed, rolling out r175672.
2412 https://bugs.webkit.org/show_bug.cgi?id=138455
2414 Tries to make backdrop layers on every layer, asserts on
2415 Mavericks (Requested by smfr on #webkit).
2419 "[filters2] Support for backdrop-filter"
2420 https://bugs.webkit.org/show_bug.cgi?id=138384
2421 http://trac.webkit.org/changeset/175672
2423 2014-11-04 Ada Chan <adachan@apple.com>
2425 Figure out whether a plug-in is playing audio.
2426 https://bugs.webkit.org/show_bug.cgi?id=137219
2428 Reviewed by Anders Carlsson.
2430 Add NPPVpluginIsPlayingAudio. Export some WebCore methods that will be used in WebKit2.
2432 No new tests, but manually tested with an example plugin.
2437 2014-11-05 Simon Fraser <simon.fraser@apple.com>
2439 Fix crash introduced in r175656
2440 https://bugs.webkit.org/show_bug.cgi?id=138453
2442 Reviewed by Dan Bernstein.
2444 repaintContainer can be null sometimes.
2446 Covered by existing tests.
2448 * rendering/RenderLayerCompositor.cpp:
2449 (WebCore::styleChangeRequiresLayerRebuild):
2451 2014-11-05 Dan Bernstein <mitz@apple.com>
2453 Tried to fix the Windows build after removing the deletion UI.
2455 * WebCore.vcxproj/WebCore.vcxproj:
2456 * WebCore.vcxproj/WebCore.vcxproj.filters:
2457 * editing/EditingAllInOne.cpp:
2459 2014-11-04 Dean Jackson <dino@apple.com>
2461 [filters2] Support for backdrop-filter
2462 https://bugs.webkit.org/show_bug.cgi?id=138384
2463 <rdar://problem/18874494>
2465 Reviewed by Simon Fraser.
2467 Add prototype support for backdrop-filter
2468 http://dev.w3.org/fxtf/filters-2/#BackdropFilterProperty
2470 This adds support for parsing the new CSS property, adding
2471 the value to RenderStyle, noticing that on the layer tree,
2472 and the platform code in GraphicsLayer to render a backdrop
2473 and apply an effect to the result.
2475 Some things are missing:
2476 - animation of the backdrop-filter is not yet supported
2477 - backdrops will not work in cloned layers yet (e.g. reflections)
2479 Tests: css3/filters/backdrop/backdropfilter-property-computed-style.html
2480 css3/filters/backdrop/backdropfilter-property-parsing-invalid.html
2481 css3/filters/backdrop/backdropfilter-property-parsing.html
2482 css3/filters/backdrop/backdropfilter-property.html
2483 css3/filters/backdrop/effect-hw.html
2485 * WebCore.exp.in: Export the setBackdropFilters method so it can
2486 be used from WebKit.
2488 * css/CSSComputedStyleDeclaration.cpp: New property name.
2489 (WebCore::isLayoutDependent):
2490 (WebCore::ComputedStyleExtractor::propertyValue): Use the existing valueForFilter method.
2492 * css/CSSParser.cpp:
2493 (WebCore::CSSParser::parseValue): Piggyback on the filter parser.
2495 * css/CSSPropertyNames.in: Add -webkit-backdrop-filter.
2497 * css/StyleResolver.cpp:
2498 (WebCore::StyleResolver::adjustRenderStyle): Add test for backdrop.
2499 (WebCore::StyleResolver::applyProperty): Support new property.
2501 * platform/graphics/GraphicsLayer.h:
2502 (WebCore::GraphicsLayer::needsBackdrop): New method to test for existence of values.
2503 (WebCore::GraphicsLayer::backdropFilters): Keeps the list of filters.
2504 (WebCore::GraphicsLayer::setBackdropFilters):
2505 (WebCore::GraphicsLayer::clearBackdropFilters):
2507 * platform/graphics/ca/GraphicsLayerCA.cpp: This adds a new m_backdropLayer CALayer
2508 that will sit behind the contents layer and provide the element's backdrop.
2509 (WebCore::GraphicsLayerCA::willBeDestroyed):
2510 (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
2511 (WebCore::GraphicsLayerCA::setBackdropFilters): Set a custom appearance so
2512 remote layer hosts will notice the special layer. Also set the actual
2514 (WebCore::GraphicsLayerCA::addAnimation): Remove whitespace.
2515 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Update backdrop if necessary.
2516 (WebCore::GraphicsLayerCA::updateLayerNames): Give the new layer a name.
2517 (WebCore::GraphicsLayerCA::updateSublayerList):
2518 (WebCore::GraphicsLayerCA::updateGeometry): Make the backdrop layer match the contents
2520 (WebCore::GraphicsLayerCA::updateBackdropFilters): Create the backdrop layer if necessary,
2521 and copy the filter values to any clones.
2522 (WebCore::GraphicsLayerCA::ensureStructuralLayer): We need a structural layer if we
2523 have backdrop filters.
2524 (WebCore::GraphicsLayerCA::structuralLayerPurpose):
2525 (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2526 (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2527 * platform/graphics/ca/GraphicsLayerCA.h: New StructuralLayerPurpose, new LayerChangeFlag.
2529 * platform/graphics/ca/PlatformCALayer.h: New LayerType.
2531 * platform/graphics/ca/mac/PlatformCALayerMac.mm: Define CABackdropLayer.
2532 (PlatformCALayerMac::PlatformCALayerMac): Create the correct CALayer type.
2534 * rendering/RenderElement.h:
2535 (WebCore::RenderElement::createsGroup):
2536 (WebCore::RenderElement::hasBackdropFilter): This method is always around, but
2537 only can return true when FILTERS_LEVEL_2 is enabled.
2539 * rendering/RenderLayer.cpp:
2540 (WebCore::RenderLayer::paintsWithFilters): Remove an unnecessary comment.
2541 (WebCore::RenderLayer::calculateClipRects):
2543 * rendering/RenderLayer.h: Add hasBackdropFilter.
2545 * rendering/RenderLayerBacking.cpp:
2546 (WebCore::RenderLayerBacking::RenderLayerBacking):
2547 (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Update the backdrop filters.
2548 (WebCore::RenderLayerBacking::updateBackdropFilters): Set the filters on the GraphicsLayer.
2549 (WebCore::RenderLayerBacking::updateGeometry):
2550 * rendering/RenderLayerBacking.h:
2552 * rendering/RenderLayerCompositor.cpp:
2553 (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Needs backingstore if it has a backdrop filter.
2554 (WebCore::RenderLayerCompositor::reasonsForCompositing):
2555 (WebCore::RenderLayerCompositor::requiresCompositingForFilters): Return early if we have
2556 a backdrop filter, because currently we absolutely require compositing.
2558 * rendering/RenderLayerModelObject.cpp:
2559 (WebCore::RenderLayerModelObject::styleWillChange): Add hasBackdropFilter().
2561 * rendering/style/RenderStyle.cpp:
2562 (WebCore::RenderStyle::changeRequiresLayout): Check backdrops for change.
2564 * rendering/style/RenderStyle.h: Add the backdropFilter style stuff.
2565 * rendering/style/StyleRareNonInheritedData.cpp:
2566 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2567 (WebCore::StyleRareNonInheritedData::operator==):
2568 (WebCore::StyleRareNonInheritedData::hasBackdropFilters):
2569 * rendering/style/StyleRareNonInheritedData.h:
2571 2014-11-05 Chris Dumez <cdumez@apple.com>
2573 Move 'size' CSS property to the new StyleBuilder
2574 https://bugs.webkit.org/show_bug.cgi?id=138337
2576 Reviewed by Andreas Kling.
2578 Move 'size' CSS property from DeprecatedStyleBuilder to the new
2579 StyleBuilder by using custom code as it requires special handling.
2581 No new tests, new behavior change.
2583 * css/CSSPropertyNames.in:
2584 * css/DeprecatedStyleBuilder.cpp:
2585 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2586 (WebCore::ApplyPropertyPageSize::mmLength): Deleted.
2587 (WebCore::ApplyPropertyPageSize::inchLength): Deleted.
2588 (WebCore::ApplyPropertyPageSize::getPageSizeFromName): Deleted.
2589 (WebCore::ApplyPropertyPageSize::applyInheritValue): Deleted.
2590 (WebCore::ApplyPropertyPageSize::applyInitialValue): Deleted.
2591 (WebCore::ApplyPropertyPageSize::applyValue): Deleted.
2592 (WebCore::ApplyPropertyPageSize::createHandler): Deleted.
2593 * css/StyleBuilderCustom.h:
2594 (WebCore::StyleBuilderFunctions::mmLength):
2595 (WebCore::StyleBuilderFunctions::inchLength):
2596 (WebCore::StyleBuilderFunctions::getPageSizeFromName):
2597 (WebCore::StyleBuilderFunctions::applyInheritSize):
2598 (WebCore::StyleBuilderFunctions::applyInitialSize):
2599 (WebCore::StyleBuilderFunctions::applyValueSize):
2601 2014-11-05 Chris Dumez <cdumez@apple.com>
2603 Revert r175441 as it seems to be causing intermittent crashes in DOMTimer
2604 https://bugs.webkit.org/show_bug.cgi?id=138449
2606 Unreviewed roll out.
2608 Revert r175441 as it seems to be causing intermittent crashes in DOMTimer due
2609 to the scriptExecutionContext going away. See <rdar://problem/18883681>.
2611 * page/DOMTimer.cpp:
2612 (WebCore::DOMTimer::install):
2613 (WebCore::DOMTimer::fired):
2614 (WebCore::NestedTimersVector::NestedTimersVector): Deleted.
2615 (WebCore::NestedTimersVector::~NestedTimersVector): Deleted.
2616 (WebCore::NestedTimersVector::registerTimer): Deleted.
2617 (WebCore::NestedTimersVector::begin): Deleted.
2618 (WebCore::NestedTimersVector::end): Deleted.
2620 2014-11-05 Simon Fraser <simon.fraser@apple.com>
2622 Avoid backing store for opacity:0 descendant layers
2623 https://bugs.webkit.org/show_bug.cgi?id=138448
2625 Reviewed by Dean Jackson.
2627 If a composited layer has no rendered content but a painting zero-opacity descendant
2628 layer, than we can avoid making backing store.
2630 When the opacity on such a child changes, we need to trigger a tree rebuild
2631 to force the backing store to come back (this could be optimized later).
2633 Tests: compositing/backing/no-backing-for-opacity-0-child.html
2634 compositing/backing/toggle-opacity-0-child.html
2636 * rendering/RenderLayer.cpp:
2637 (WebCore::RenderLayer::calculateClipRects):
2638 * rendering/RenderLayerCompositor.cpp:
2639 (WebCore::styleChangeRequiresLayerRebuild):
2640 * rendering/RenderObject.cpp:
2641 (WebCore::RenderObject::containerForRepaint):
2643 2014-11-05 Chris Dumez <cdumez@apple.com>
2645 Assertion hit DOMTimer::updateTimerIntervalIfNecessary()
2646 https://bugs.webkit.org/show_bug.cgi?id=138440
2648 Reviewed by Geoffrey Garen.
2650 We sometimes hit the ASSERT(repeatInterval() == previousInterval)
2651 assertion in DOMTimer::updateTimerIntervalIfNecessary() when visiting
2652 the following pages:
2653 http://lifehacker.com/the-healthiest-foods-for-one-handed-snacking-while-gami-1654728164
2654 http://longform.org/posts/like-something-the-lord-made
2656 After debugging, the issue turned out to be that we are comparing
2657 floating point numbers using ==, and the check sometimes fails even
2658 though the values really close to each other. This patch updates the
2659 DOMTimer code to use WTF::withinEpsilon() instead of operator==()
2660 to compare the floating point intervals.
2662 I confirmed manually that the assertion is no longer hit.
2664 * page/DOMTimer.cpp:
2665 (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
2666 * platform/graphics/FloatQuad.cpp:
2667 (WebCore::FloatQuad::isRectilinear):
2668 (WebCore::withinEpsilon): Deleted.
2670 2014-11-05 Chris Fleizach <cfleizach@apple.com>
2672 AX: add "alt" as an overriding synonym of "-webkit-alt" (now in the CSS4 spec)
2673 https://bugs.webkit.org/show_bug.cgi?id=138393
2675 Reviewed by Dean Jackson.
2677 Add official "alt" CSS keyword and map -webkit-alt to that.
2679 Test: platform/mac/accessibility/alt-for-css-content.html
2681 * css/CSSComputedStyleDeclaration.cpp:
2682 (WebCore::ComputedStyleExtractor::propertyValue):
2683 * css/CSSParser.cpp:
2684 (WebCore::CSSParser::parseValue):
2685 * css/CSSPropertyNames.in:
2686 * css/StyleResolver.cpp:
2687 (WebCore::StyleResolver::applyProperty):
2689 2014-11-05 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2691 Unreviewed, EFL build fix since r175647
2693 * CMakeLists.txt: Remove DeleteButton.cpp and DeleteButtonController.cpp.
2695 2014-11-05 Chris Dumez <cdumez@apple.com>
2697 Allow constructing a PassRef from a Ref
2698 https://bugs.webkit.org/show_bug.cgi?id=138389
2700 Reviewed by Andreas Kling.
2702 Remove calls to Ref::get() now that a PassRef can be directly
2703 constructed from a Ref.
2705 No new tests, no behavior change.
2707 * css/CSSValuePool.cpp:
2708 (WebCore::CSSValuePool::createColorValue):
2709 * css/CSSValuePool.h:
2710 (WebCore::CSSValuePool::createInheritedValue):
2711 (WebCore::CSSValuePool::createImplicitInitialValue):
2712 (WebCore::CSSValuePool::createExplicitInitialValue):
2713 * html/HTMLLinkElement.cpp:
2714 (WebCore::HTMLLinkElement::setCSSStyleSheet):
2716 2014-11-05 Dan Bernstein <mitz@apple.com>
2718 Remove the unused deletion UI feature
2719 https://bugs.webkit.org/show_bug.cgi?id=138442
2721 Rubber-stamped by Alexey Proskuryakov.
2723 * Resources/deleteButton.png: Removed.
2724 * Resources/deleteButton@2x.png: Removed.
2725 * Resources/deleteButtonPressed.png: Removed.
2726 * Resources/deleteButtonPressed@2x.png: Removed.
2728 * WebCore.xcodeproj/project.pbxproj: Removed references to removed files.
2730 * dom/ContainerNode.cpp:
2731 (WebCore::ContainerNode::cloneChildNodes): Folded the below helper function into this member
2732 function, after removing the deleteButtonContainerElement parameter.
2733 (WebCore::cloneChildNodesAvoidingDeleteButton): Deleted.
2735 * editing/CompositeEditCommand.cpp:
2736 (WebCore::EditCommandComposition::unapply): Removed use of
2737 DeleteButtonControllerDisableScope.
2738 (WebCore::EditCommandComposition::reapply): Ditto.
2739 (WebCore::CompositeEditCommand::apply): Ditto.
2741 * editing/DeleteButton.cpp: Removed.
2742 * editing/DeleteButton.h: Removed.
2743 * editing/DeleteButtonController.cpp: Removed.
2744 * editing/DeleteButtonController.h: Removed.
2746 * editing/EditCommand.cpp:
2747 (WebCore::EditCommand::EditCommand): Removed use of
2748 Editor::avoidIntersectionWithDeleteButtonController.
2750 * editing/Editor.cpp:
2751 (WebCore::Editor::Editor): Removed initialization of m_deleteButtonController.
2752 (WebCore::Editor::rangeForPoint): Removed use of avoidIntersectionWithDeleteButtonController.
2753 (WebCore::Editor::editorUIUpdateTimerFired): Removed call to DeleteButtonController function.
2754 (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Deleted.
2755 (WebCore::Editor::deviceScaleFactorChanged): Deleted.
2758 (WebCore::Editor::deleteButtonController): Deleted.
2759 (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Deleted.
2761 * editing/MarkupAccumulator.cpp:
2762 (WebCore::MarkupAccumulator::serializeNodes): Removed nodeToSkip parameter.
2763 (WebCore::MarkupAccumulator::serializeNodesWithNamespaces): Ditto.
2765 * editing/MarkupAccumulator.h:
2767 * editing/markup.cpp:
2768 (WebCore::createMarkupInternal): Removed updateRange parameter, which had become identical
2769 to the range parameter, and changed to use the latter everywhere instead.
2770 (WebCore::createMarkup): Don’t compute and pass separate updateRanage parameter.
2772 * loader/EmptyClients.h: Removed shouldShowDeleteInterface override.
2773 * page/EditorClient.h: Removed shouldShowDeleteInterface.
2776 (WebCore::Page::setDeviceScaleFactor): Removed call to Editor::deviceScaleFactorChanged.
2778 * page/PageSerializer.cpp:
2779 (WebCore::PageSerializer::serializeFrame): Updated for MarkupAccumulator::serializeNodes change.
2781 * testing/Internals.cpp:
2782 (WebCore::Internals::findEditingDeleteButton): Deleted.
2783 * testing/Internals.h:
2784 * testing/Internals.idl:
2786 2014-11-04 David Hyatt <hyatt@apple.com>
2788 Descendant ends up in wrong flow thread with nested columns and spans.
2789 https://bugs.webkit.org/show_bug.cgi?id=137273
2791 Reviewed by Simon Fraser.
2793 Unskipped the two problematic span tests.
2795 * rendering/RenderMultiColumnFlowThread.cpp:
2796 (WebCore::isValidColumnSpanner):
2797 Remove the guard and comment and added the assertion back in.
2799 (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
2800 Changed to no longer use handleSpannerRemoval. Because the spanner was removed from the flow thread's map,
2801 handleSpannerRemoval was a no-op. So instead I just removed the placeholder by hand.
2803 The second fix was to stop destroying the placeholder. Since the placeholder can just have been inserted, you
2804 can't delete it, since otherwise code further up the stack will access the deleted object. For now, we just
2805 leak the placeholder.
2807 The third fix is to make sure the subtreeRoot is properly updated to be the new placeholder.
2809 2014-11-05 Andreas Kling <akling@apple.com>
2811 RenderBlock shouldn't need a pre-destructor hook.
2812 <https://webkit.org/b/138430>
2814 Reviewed by Antti Koivisto.
2816 All that was interesting in RenderBlock::willBeDestroyed() has migrated
2817 to RenderBlockFlow. removeFromUpdateScrollInfoAfterLayoutTransaction()
2818 can be called from the plain destructor, so just move it there.
2820 We don't have to worry about destroyLeftoverChildren(), since RenderElement
2821 will take care of that for us.
2823 * rendering/RenderBlock.cpp:
2824 (WebCore::RenderBlock::~RenderBlock):
2825 (WebCore::RenderBlock::willBeDestroyed): Deleted.
2826 * rendering/RenderBlock.h:
2828 2014-11-05 Chris Dumez <cdumez@apple.com>
2830 Remove 2 unnecessary virtual functions on InputType
2831 https://bugs.webkit.org/show_bug.cgi?id=138433
2833 Reviewed by Andreas Kling.
2835 Remove 2 unused virtual functions on InputType:
2836 - valueAttributeChanged()
2837 - updateClearButtonVisibility()
2839 No new tests, no behavior change.
2841 * html/HTMLInputElement.cpp:
2842 (WebCore::HTMLInputElement::parseAttribute):
2843 (WebCore::HTMLInputElement::updateClearButtonVisibility): Deleted.
2844 * html/HTMLInputElement.h:
2845 * html/InputType.cpp:
2846 (WebCore::InputType::valueAttributeChanged): Deleted.
2847 (WebCore::InputType::updateClearButtonVisibility): Deleted.
2850 2014-11-05 Chris Dumez <cdumez@apple.com>
2852 Re-evaluate if a repetitive timer should be throttled upon firing
2853 https://bugs.webkit.org/show_bug.cgi?id=138339
2855 Reviewed by Gavin Barraclough.
2857 Re-evaluate if a repetitive timer should be throttled upon firing in
2858 case the plugin observability state has changed:
2859 - It used to be visible but now isn't and thus the timer can be throttled
2860 - It used to play audio but now doesn't and thus the timer can be throttled
2862 We already stopped throttling if the plugin became observable. However,
2863 we didn't start throttling if the plugin became non-observable.
2865 * page/DOMTimer.cpp:
2866 (WebCore::DOMTimer::updateThrottlingStateIfNecessary):
2868 2014-11-03 Dean Jackson <dino@apple.com>
2870 Add ENABLE_FILTERS_LEVEL_2 feature guard.
2871 https://bugs.webkit.org/show_bug.cgi?id=138362
2873 Reviewed by Tim Horton.
2875 Add a new feature define for Level 2 of CSS Filters.
2876 http://dev.w3.org/fxtf/filters-2/
2878 * Configurations/FeatureDefines.xcconfig:
2880 2014-11-05 Chris Dumez <cdumez@apple.com>
2882 Move text-align CSS property to the new StyleBuilder
2883 https://bugs.webkit.org/show_bug.cgi?id=138398
2885 Reviewed by Antti Koivisto.
2887 Move text-align CSS property from DeprecatedStyleBuilder to the new
2888 StyleBuilder so that it is now generated from CSSPropertyNames.in.
2889 This patch adds a TextAlign Converter to support this.
2891 No new tests, no behavior change.
2893 * css/CSSPropertyNames.in:
2894 * css/DeprecatedStyleBuilder.cpp:
2895 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2896 (WebCore::ApplyPropertyTextAlign::applyValue): Deleted.
2897 (WebCore::ApplyPropertyTextAlign::createHandler): Deleted.
2898 * css/StyleBuilderConverter.h:
2899 (WebCore::StyleBuilderConverter::convertTextAlign):
2901 2014-11-05 Sanghyup Lee <sh53.lee@samsung.com>
2903 Fix build warning in SVGMarkerElement.cpp
2904 https://bugs.webkit.org/show_bug.cgi?id=138407
2906 Reviewed by Darin Adler.
2908 Build warning in debug cause 'comparison of unsigned expression >= 0 is always true [-Wtype-limits]'
2910 * svg/SVGMarkerElement.cpp:
2911 (WebCore::SVGMarkerElement::orientType): Removed useless condition in ASSERT.
2913 2014-11-05 Chris Dumez <cdumez@apple.com>
2915 Stop special-casing the empty string in HTMLInputElement.type setter
2916 https://bugs.webkit.org/show_bug.cgi?id=138403
2918 Reviewed by Ryosuke Niwa.
2920 Stop special-casing the empty string in HTMLInputElement.type setter.
2921 Previously, if input.type is set to "", we would remove the type
2922 attribute. This is inconsistent with the specification and the behavior
2923 of other browsers (tested Firefox 33 and Chrome 38). Instead, we should
2924 set the attribute to the empty string.
2926 Also stop treating null as a null string to align with the
2927 specification and other browsers (tested Firefox 33 and Chrome 38).
2929 Finally, update HTMLInputElement::setType() to take an AtomicString in
2930 argument instead of a String as it ends up calling setAttribute(), and
2931 thus needing an AtomicString.
2934 Test: fast/dom/HTMLInputElement/input-type-attribute.html
2936 * html/FileInputType.cpp:
2937 (WebCore::UploadButtonElement::UploadButtonElement):
2938 * html/HTMLInputElement.cpp:
2939 (WebCore::HTMLInputElement::setType):
2940 * html/HTMLInputElement.h:
2941 * html/HTMLInputElement.idl:
2943 2014-11-05 peavo@outlook.com <peavo@outlook.com>
2945 [WinCairo] Compile error, missing guard.
2946 https://bugs.webkit.org/show_bug.cgi?id=138421
2948 Reviewed by Brent Fulgham.
2950 There is missing a guard for CSS_SELECTORS_LEVEL4 in CSSParserValues.cpp.
2952 * css/CSSParserValues.cpp:
2954 2014-11-05 Antti Koivisto <antti@apple.com>
2956 REGRESSION(r175601): Assertion failures in SimpleLineLayout
2957 https://bugs.webkit.org/show_bug.cgi?id=138422
2961 * rendering/SimpleLineLayout.cpp:
2962 (WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter):
2963 (WebCore::SimpleLineLayout::removeTrailingWhitespace):
2965 2014-11-05 Andreas Kling <akling@apple.com>
2967 Simple line layout: support text-transform: lowercase|uppercase|capitalize
2968 <https://webkit.org/b/138406>
2970 Reviewed by Antti Koivisto.
2972 Expand the simple line layout coverage to include all text-transform values.
2973 Since the property works on the text string level, it's really only a matter
2974 of removing the short-circuit.
2976 Test: fast/text/simple-lines-text-transform.html
2978 * rendering/SimpleLineLayout.cpp:
2979 (WebCore::SimpleLineLayout::canUseFor):
2981 2014-11-05 Jer Noble <jer.noble@apple.com>
2983 [EME][Mac] Allow the client to specify FPS protocol versions in the keySystem type field.
2984 https://bugs.webkit.org/show_bug.cgi?id=138380
2986 Reviewed by Eric Carlson.
2988 Parse out the requested FPS protocol version of the keySystem type string and pass it to
2989 AVStreamDataParser as an options dictionary.
2991 * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
2992 (WebCore::validKeySystemRE): Added, match comma-separated version suffixes.
2993 (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Call above.
2994 (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Parse out the version numbers
2995 and pass into the session as a vector.
2996 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2997 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2998 (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC): Take a vector of
2999 protocol version numbers.
3000 (WebCore::CDMSessionMediaSourceAVFObjC::update): Create an NSArray and pass into
3001 the key request creation method in an options dictionary.
3003 2014-11-05 Antti Koivisto <antti@apple.com>
3005 Move HTTPHeaderMap encoding to the class
3006 https://bugs.webkit.org/show_bug.cgi?id=138412
3008 Reviewed by Andreas Kling.
3010 * platform/network/HTTPHeaderMap.h:
3011 (WebCore::HTTPHeaderMap::encode):
3012 (WebCore::HTTPHeaderMap::decode):
3014 Use generic encoding for the uncommon header map. Common headers still require custom code due to the enum class.
3016 2014-11-04 Beth Dakin <bdakin@apple.com>
3018 Un-anchor data detector popovers on scroll
3019 https://bugs.webkit.org/show_bug.cgi?id=138385
3021 rdar://problem/18869345
3023 Reviewed by Tim Horton.
3025 * platform/spi/mac/DataDetectorsSPI.h:
3027 2014-11-04 Chris Dumez <cdumez@apple.com>
3029 Avoid double hash table lookup in SpaceSplitStringData::create()
3030 https://bugs.webkit.org/show_bug.cgi?id=138396
3032 Reviewed by Ryosuke Niwa.
3034 Avoid double hash table lookup in SpaceSplitStringData::create() by
3035 calling HashMap::add() and using the AddResult, instead of calling
3036 HashMap::get() then HashMap::add().
3038 No new tests, no behavior change.
3040 * dom/SpaceSplitString.cpp:
3041 (WebCore::SpaceSplitStringData::create):
3043 2014-11-04 Zalan Bujtas <zalan@apple.com>
3045 Simple line layout: Abstract out content iteration and text handling in general.
3046 https://bugs.webkit.org/show_bug.cgi?id=138346
3048 Reviewed by Antti Koivisto.
3050 Add a class that can act as the primary iterator/fragment handling interface to the line parser.
3051 This helps adding support multiple renderer elements without changing the parser logic.
3052 Currently it operates strictly on the first child of the RenderBlockFlow.
3054 Covered by existing tests.
3056 * rendering/SimpleLineLayout.cpp:
3057 (WebCore::SimpleLineLayout::FlowContentIterator::FlowContentIterator):
3058 (WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition):
3059 (WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition):
3060 (WebCore::SimpleLineLayout::FlowContentIterator::textWidth):
3061 (WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter):
3062 (WebCore::SimpleLineLayout::FlowContentIterator::isEndOfContent):
3063 (WebCore::SimpleLineLayout::FlowContentIterator::style):
3064 (WebCore::SimpleLineLayout::computeLineLeft):
3065 (WebCore::SimpleLineLayout::TextFragment::TextFragment):
3066 (WebCore::SimpleLineLayout::removeTrailingWhitespace):
3067 (WebCore::SimpleLineLayout::initializeNewLine):
3068 (WebCore::SimpleLineLayout::splitFragmentToFitLine):
3069 (WebCore::SimpleLineLayout::nextFragment):
3070 (WebCore::SimpleLineLayout::createLineRuns):
3071 (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
3072 (WebCore::SimpleLineLayout::createTextRuns):
3073 (WebCore::SimpleLineLayout::create):
3074 (WebCore::SimpleLineLayout::skipWhitespace): Deleted.
3075 (WebCore::SimpleLineLayout::textWidth): Deleted.
3076 * rendering/SimpleLineLayout.h:
3078 2014-11-04 Jeremy Jones <jeremyj@apple.com>
3080 Fix build after r138351
3081 https://bugs.webkit.org/show_bug.cgi?id=138401
3083 Ureviewed. Make return type match.
3085 * platform/ios/WebCoreSystemInterfaceIOS.mm:
3087 2014-11-04 Tim Horton <timothy_horton@apple.com>
3089 Add bundle SPI allowing PageOverlay to customize the action menu
3090 https://bugs.webkit.org/show_bug.cgi?id=138388
3091 <rdar://problem/18875579>
3093 Reviewed by Anders Carlsson.
3095 * page/PageOverlayController.h:
3096 Expose the list of all overlays.
3098 2014-11-03 Jeremy Jones <jeremyj@apple.com>
3100 Add button and enable optimized fullscreen.
3101 https://bugs.webkit.org/show_bug.cgi?id=138351
3103 Reviewed by Eric Carlson.
3105 Added optimizedFullscreenButton to js media element controls. Remove #if conditional
3106 and use optimizedFullscreenSupported to enable feature at runtime
3108 * Modules/mediacontrols/MediaControlsHost.cpp:
3109 (WebCore::MediaControlsHost::enterFullscreenOptimized): enable
3110 (WebCore::MediaControlsHost::optimizedFullscreenSupported): added
3111 * Modules/mediacontrols/MediaControlsHost.h: add optimizedFullscreenSupported
3112 * Modules/mediacontrols/MediaControlsHost.idl: ditto
3113 * Modules/mediacontrols/mediaControlsApple.css:
3114 (audio::-webkit-media-controls-optimized-fullscreen-button): added
3115 * Modules/mediacontrols/mediaControlsApple.js:
3116 (Controller.prototype.createControls): add button
3117 (Controller.prototype.handleReadyStateChange): update button
3118 (Controller.prototype.updateOptimizedFullscreenButton): added
3119 * Modules/mediacontrols/mediaControlsiOS.css:
3120 (audio::-webkit-media-controls-optimized-fullscreen-button): added
3121 (video::-webkit-media-controls-optimized-fullscreen-button): added
3122 (video::-webkit-media-controls-optimized-fullscreen-button:active): added
3123 * Modules/mediacontrols/mediaControlsiOS.js:
3124 (ControllerIOS.prototype.createControls): listen for events from optimizedFullscreenButton
3125 (ControllerIOS.prototype.configureInlineControls): add button for non-audio when supported.
3126 (ControllerIOS.prototype.handleBaseGestureChange): 2-finger double-tap gesture for optimized fullscreen
3127 (ControllerIOS.prototype.handleWrapperTouchStart): ditto
3128 (ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): added
3129 (ControllerIOS.prototype.handleOptimizedFullscreenTouchStart): added
3130 (ControllerIOS.prototype.handleOptimizedFullscreenTouchEnd): added
3131 (ControllerIOS.prototype.handleOptimizedFullscreenTouchCancel): added
3132 (ControllerIOS.prototype.handleStartPlaybackButtonTouchStart): fix typo
3133 (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): fix typo
3134 (ControllerIOS.prototype.handleStartPlaybackButtonTouchCancel): fix typo
3136 * platform/ios/WebCoreSystemInterfaceIOS.h: added wkIsOptimizedFullscreenSupported
3137 * platform/ios/WebCoreSystemInterfaceIOS.mm: added wkIsOptimizedFullscreenSupported
3138 * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3139 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3140 (WebVideoFullscreenInterfaceAVKit::enterFullscreen): enable feature
3141 (WebVideoFullscreenInterfaceAVKit::exitFullscreen): enable feature
3142 (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): only request exit when entered and not requested exit
3143 (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
3145 2014-11-04 Joseph Pecoraro <pecoraro@apple.com>
3147 Web Inspector: Pause on exceptions should show the actual exception
3148 https://bugs.webkit.org/show_bug.cgi?id=63096
3150 Reviewed by Timothy Hatcher.
3152 * inspector/InspectorInstrumentation.cpp:
3153 (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
3154 Pass assertion message on.
3156 2014-11-04 Reza Abbasian <rabbasian@apple.com>
3158 [iOS] Fix incorrect interface orientation that can be caused by fullscreen video dismissal.
3159 https://bugs.webkit.org/show_bug.cgi?id=137930.
3161 Reviewed by Jer Noble.
3163 When a fullscreen video gets dismissed programmatically, for instance for removing
3164 a webview from the view hierarchy, it can put the device in an incorrect orientation.
3165 Make sure we retain the window of parentView when we attempt to go to fullscreen and use
3166 the retained window for putting the device in correct orientation after dismissal.
3168 * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3169 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3170 (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
3171 (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
3172 (WebVideoFullscreenInterfaceAVKit::invalidate):
3174 2014-11-04 Andreas Kling <akling@apple.com>
3176 Remove two unused ScrollingCoordinator methods.
3177 <https://webkit.org/b/138377>
3179 Reviewed by Chris Dumez.
3181 These appear to be leftovers from the now-defunct chromium port.
3183 * page/scrolling/ScrollingCoordinator.cpp:
3184 (WebCore::ScrollingCoordinator::horizontalScrollbarLayerForScrollableArea): Deleted.
3185 (WebCore::ScrollingCoordinator::verticalScrollbarLayerForScrollableArea): Deleted.
3186 * page/scrolling/ScrollingCoordinator.h:
3188 2014-11-04 Chris Dumez <cdumez@apple.com>
3190 Add ptr() method to Ref class
3191 https://bugs.webkit.org/show_bug.cgi?id=138361
3193 Reviewed by Darin Adler.
3195 Use the new Ref::ptr() method.
3197 No new tests, no behavior change.
3199 * accessibility/AccessibilityMenuList.cpp:
3200 (WebCore::AccessibilityMenuList::didUpdateActiveOption):
3201 * bindings/js/JSHTMLAllCollectionCustom.cpp:
3202 (WebCore::getNamedItems):
3203 * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
3204 (WebCore::getNamedItems):
3205 * css/CSSStyleRule.h:
3206 * css/CSSStyleSheet.cpp:
3207 (WebCore::CSSStyleSheet::insertRule):
3208 * css/CSSValueList.h:
3209 (WebCore::CSSValueList::item):
3210 (WebCore::CSSValueList::itemWithoutBoundsCheck):
3211 * css/InspectorCSSOMWrappers.cpp:
3212 (WebCore::InspectorCSSOMWrappers::collect):
3213 * dom/ChildListMutationScope.cpp:
3214 (WebCore::ChildListMutationAccumulator::~ChildListMutationAccumulator):
3215 (WebCore::ChildListMutationAccumulator::childAdded):
3216 * dom/ChildNodeList.cpp:
3217 (WebCore::ChildNodeList::namedItem):
3218 * dom/ContainerNode.cpp:
3219 (WebCore::ContainerNode::removeChild):
3220 * dom/CurrentScriptIncrementer.h:
3221 (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
3222 (WebCore::CurrentScriptIncrementer::~CurrentScriptIncrementer):
3223 * dom/MutationRecord.cpp:
3224 * dom/NodeRareData.h:
3225 (WebCore::NodeListsNodeData::ensureChildNodeList):
3226 (WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
3227 (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
3229 (WebCore::Range::setDocument):
3230 * dom/ScriptElement.cpp:
3231 (WebCore::ScriptElement::requestScript):
3232 (WebCore::ScriptElement::executeScript):
3233 * dom/StaticNodeList.cpp:
3234 (WebCore::StaticNodeList::item):
3235 (WebCore::StaticElementList::item):
3236 * editing/CompositeEditCommand.cpp:
3237 (WebCore::CompositeEditCommand::moveRemainingSiblingsToNewParent):
3238 * editing/DictationCommand.cpp:
3239 (WebCore::DictationCommand::insertText):
3240 * editing/DictationCommand.h:
3241 * editing/Editor.cpp:
3242 (WebCore::Editor::insertTextWithoutSendingTextEvent):
3243 * editing/ReplaceNodeWithSpanCommand.cpp:
3244 (WebCore::swapInNodePreservingAttributesAndChildren):
3245 * editing/SimplifyMarkupCommand.cpp:
3246 (WebCore::SimplifyMarkupCommand::doApply):
3247 * editing/markup.cpp:
3248 (WebCore::hasOneChild):
3249 (WebCore::hasOneTextChild):
3250 (WebCore::replaceChildrenWithFragment):
3251 (WebCore::replaceChildrenWithText):
3252 * html/HTMLFormControlElement.cpp:
3253 (WebCore::HTMLFormControlElement::checkValidity):
3254 * html/HTMLFormElement.cpp:
3255 (WebCore::HTMLFormElement::getNamedElements):
3256 * html/HTMLLinkElement.cpp:
3257 (WebCore::HTMLLinkElement::shouldLoadLink):
3258 * inspector/InspectorStyleSheet.cpp:
3259 (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
3260 (WebCore::InspectorStyleSheet::buildObjectForRule):
3261 (WebCore::InspectorStyleSheet::revalidateStyle):
3262 * loader/FrameLoader.cpp:
3263 (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
3264 * page/FocusController.cpp:
3265 (WebCore::FocusController::setFocusedElement):
3266 * page/PageSerializer.cpp:
3267 (WebCore::PageSerializer::retrieveResourcesForRule):
3268 * page/PageSerializer.h:
3269 * page/animation/AnimationController.cpp:
3270 (WebCore::AnimationController::updateAnimations):
3271 * platform/graphics/ca/TileCoverageMap.cpp:
3272 (WebCore::TileCoverageMap::platformCALayerPaintContents):
3273 * rendering/ClipPathOperation.h:
3274 * rendering/RenderBlock.cpp:
3275 (WebCore::styleForFirstLetter):
3276 (WebCore::RenderBlock::updateFirstLetterStyle):
3277 (WebCore::RenderBlock::createFirstLetterRenderer):
3278 * rendering/RenderBlockFlow.cpp:
3279 (WebCore::RenderBlockFlow::updateColumnProgressionFromStyle):
3280 * rendering/RenderBlockFlow.h:
3281 * rendering/RenderBox.cpp:
3282 (WebCore::RenderBox::styleDidChange):
3283 * rendering/RenderElement.cpp:
3284 (WebCore::RenderElement::setStyle):
3285 (WebCore::RenderElement::styleDidChange):
3286 * rendering/RenderNamedFlowFragment.cpp:
3287 (WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
3288 * rendering/RenderTextControl.cpp:
3289 (WebCore::RenderTextControl::adjustInnerTextStyle):
3290 * rendering/RenderTextControl.h:
3291 * rendering/RenderTextControlMultiLine.cpp:
3292 (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
3293 * rendering/RenderTextControlSingleLine.cpp:
3294 (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
3295 * rendering/style/DataRef.h:
3296 (WebCore::DataRef::get):
3297 (WebCore::DataRef::access):
3298 (WebCore::DataRef::operator==):
3299 (WebCore::DataRef::operator!=):
3300 * rendering/style/RenderStyle.cpp:
3301 (WebCore::RenderStyle::changeRequiresLayout):
3302 (WebCore::RenderStyle::changeRequiresPositionedLayoutOnly):
3303 (WebCore::RenderStyle::changeRequiresLayerRepaint):
3304 (WebCore::RenderStyle::changeRequiresRepaint):
3305 (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
3306 (WebCore::RenderStyle::changeRequiresRecompositeLayer):
3307 (WebCore::RenderStyle::diff):
3308 (WebCore::RenderStyle::diffRequiresLayerRepaint):
3309 * rendering/style/RenderStyle.h:
3310 * rendering/style/StyleGeneratedImage.cpp:
3311 (WebCore::StyleGeneratedImage::cssValue):
3312 * rendering/style/StyleGeneratedImage.h:
3313 * style/StyleResolveForDocument.cpp:
3314 (WebCore::Style::resolveForDocument):
3315 * style/StyleResolveTree.cpp:
3316 (WebCore::Style::determineChange):
3317 (WebCore::Style::resolveLocal):
3318 (WebCore::Style::resolveTree):
3319 * style/StyleResolveTree.h:
3321 2014-11-04 Chris Dumez <cdumez@apple.com>
3323 Move -webkit-text-emphasis-position to the new StyleBuilder
3324 https://bugs.webkit.org/show_bug.cgi?id=138359
3326 Reviewed by Andreas Kling.
3328 Move -webkit-text-emphasis-position from DeprecatedStyleBilder to the
3329 new StyleBuilder so that it is now generated from CSSPropertyNames.in.
3330 A new TextEmphasisPosition Converter was added to support this.
3332 No new tests, no behavior change.
3334 * css/CSSPropertyNames.in:
3335 * css/DeprecatedStyleBuilder.cpp:
3336 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3337 (WebCore::valueToEmphasisPosition): Deleted.
3338 (WebCore::ApplyPropertyTextEmphasisPosition::applyValue): Deleted.
3339 (WebCore::ApplyPropertyTextEmphasisPosition::createHandler): Deleted.
3340 * css/StyleBuilderConverter.h:
3341 (WebCore::StyleBuilderConverter::valueToEmphasisPosition):
3342 (WebCore::StyleBuilderConverter::convertTextEmphasisPosition):
3344 2014-11-04 Andreas Kling <akling@apple.com>
3346 RenderBox shouldn't need a pre-destructor hook.
3347 <https://webkit.org/b/138367>
3349 Reviewed by Antti Koivisto.
3351 Move teardown logic from willBeDestroyed() to the regular ~RenderBox()
3352 destructor since none of it depends on being in-tree or having a fully
3355 * rendering/RenderBox.cpp:
3356 (WebCore::RenderBox::~RenderBox):
3357 (WebCore::RenderBox::willBeDestroyed): Deleted.
3358 * rendering/RenderBox.h:
3360 2014-11-04 Myles C. Maxfield <mmaxfield@apple.com>
3362 [OSX] CJK characters styled with font-family: cursive are italicized
3363 https://bugs.webkit.org/show_bug.cgi?id=138328
3364 rdar://problem/18801907
3366 Reviewed by Simon Fraser.
3368 FontCache::createFontPlatformData doesn’t set the oblique flag if
3369 the requested font isn’t oblique, but
3370 FontCache::systemFallbackForCharacters() does. This patch simply
3371 adopts this behavior in both places.
3373 Test: fast/text/font-cursive-italic-cjk.html
3375 * platform/graphics/mac/FontCacheMac.mm:
3376 (WebCore::FontCache::systemFallbackForCharacters):
3378 2014-11-04 Benjamin Poulain <bpoulain@apple.com>
3380 When computing the specificity of selectors, use saturated arithmetic per component
3381 https://bugs.webkit.org/show_bug.cgi?id=138336
3383 Reviewed by Andreas Kling.
3385 The code handling overflow in CSSSelector::specificity() was assuming that the value
3386 returned by specificityForOneSelector() can only overflow one field at a time.
3388 That assumption is no longer correct with the extended :not(). It is now possible to have
3389 a complex selector saturating multiple fields inside a single :not().
3391 This patch solves the problem by considering each field independently.
3393 Test: fast/selectors/specificity-overflow-2.html
3395 * css/CSSSelector.cpp:
3396 (WebCore::CSSSelector::specificity):
3398 2014-11-04 Zalan Bujtas <zalan@apple.com>
3400 Windows build fix after r175565.
3402 MSVC requires default c'tor even if it's never called. -0 length array.
3404 * rendering/SimpleLineLayout.h:
3405 (WebCore::SimpleLineLayout::Run::Run):
3407 2014-11-04 Zalan Bujtas <zalan@apple.com>
3409 Simple line layout: Cleanup line initialization and line closing.
3410 https://bugs.webkit.org/show_bug.cgi?id=138273
3412 Reviewed by Antti Koivisto.
3414 This is in preparation to support multiple render elements.
3416 Move line start and line end activities to dedicated functions.
3418 Covered by existing tests.
3420 * rendering/SimpleLineLayout.cpp:
3421 (WebCore::SimpleLineLayout::LineState::LineState): Add lineStartRunIndex to be more explicit
3422 about whether a line advanced with new runs. Rename a few members. Introduce LineState::oveflowedFragment
3423 so that line closing can handled separately.
3424 (WebCore::SimpleLineLayout::LineState::commitAndCreateRun):
3425 (WebCore::SimpleLineLayout::LineState::addUncommitted):
3426 (WebCore::SimpleLineLayout::LineState::jumpTo):
3427 (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): Deleted. : Remove redundant function.
3428 (WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace):
3429 (WebCore::SimpleLineLayout::LineState::resetTrailingWhitespace):
3430 (WebCore::SimpleLineLayout::removeTrailingWhitespace): Add resetTrailingWhitespace()
3431 so that all trailing whitespace handling is in one function.
3432 (WebCore::SimpleLineLayout::initializeNewLine): Separate line start and line end initialization/reset.
3433 (WebCore::SimpleLineLayout::createLineRuns):
3434 (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): This function manages all line ending activities.
3435 (WebCore::SimpleLineLayout::createTextRuns):
3436 (WebCore::SimpleLineLayout::create):
3437 (WebCore::SimpleLineLayout::initializeLine): Deleted.
3438 * rendering/SimpleLineLayout.h:
3439 (WebCore::SimpleLineLayout::Run::Run): Deleted.
3441 2014-11-04 Tim Horton <timothy_horton@apple.com>