1 2014-11-16 Andreas Kling <akling@apple.com>
3 Avoid synchronous style recalc when mutating a Node inside FrameSelection.
4 <https://webkit.org/b/138791>
6 Reviewed by Antti Koivisto.
8 We can safely clear the RenderView's selection without doing a synchronous
11 This is a small progression on Speedometer locally.
13 * editing/FrameSelection.cpp:
14 (WebCore::DragCaretController::nodeWillBeRemoved):
15 (WebCore::FrameSelection::respondToNodeModification):
16 (WebCore::clearRenderViewSelection): Deleted.
18 Merged clearRenderViewSelection() into the call sites and removed
19 the now-unnecessary protection of the Document.
21 2014-11-17 Eric Carlson <eric.carlson@apple.com>
23 [iOS] allow host application to opt-out of alternate fullscreen
24 https://bugs.webkit.org/show_bug.cgi?id=138787
26 Reviewed by Darin Adler.
28 * Modules/mediacontrols/MediaControlsHost.cpp:
29 (WebCore::MediaControlsHost::optimizedFullscreenSupported): Check mediaSession().allowsAlternateFullscreen.
31 * html/HTMLMediaElement.cpp:
32 (WebCore::HTMLMediaElement::enterFullscreenOptimized): Do nothing if
33 mediaSession().allowsAlternateFullscreen says it isn't allowed.
35 * html/HTMLMediaSession.cpp:
36 (WebCore::HTMLMediaSession::allowsAlternateFullscreen): New, check settings.
37 * html/HTMLMediaSession.h:
39 * page/Settings.cpp: Add allowsAlternateFullscreen.
40 * page/Settings.in: Ditto.
42 2014-11-16 Zan Dobersek <zdobersek@igalia.com>
44 Replace RenderSVGResource::cast<T>() with downcast<T>()
45 https://bugs.webkit.org/show_bug.cgi?id=138290
47 Reviewed by Chris Dumez.
49 Add type traits for the RenderSVGResource hierarchy. This enables
50 using the typecasting framework in getRenderSVGResourceById() that
51 in return renders the RenderSVGResource::cast<>() template and all
52 the static s_resourceType member variables in the hierarchy removable.
55 * rendering/svg/RenderSVGResource.h:
56 (WebCore::RenderSVGResource::cast): Deleted.
57 * rendering/svg/RenderSVGResourceClipper.h:
58 * rendering/svg/RenderSVGResourceContainer.h:
59 (WebCore::getRenderSVGResourceById):
60 * rendering/svg/RenderSVGResourceFilter.h:
62 * rendering/svg/RenderSVGResourceLinearGradient.h:
63 * rendering/svg/RenderSVGResourceMarker.h:
64 * rendering/svg/RenderSVGResourceMasker.h:
65 * rendering/svg/RenderSVGResourcePattern.h:
66 * rendering/svg/RenderSVGResourceRadialGradient.h:
67 * rendering/svg/RenderSVGResourceSolidColor.h:
69 2014-11-16 Benjamin Poulain <benjamin@webkit.org>
71 Implement :valid and :invalid matching for the fieldset element
72 https://bugs.webkit.org/show_bug.cgi?id=138769
74 Reviewed by Darin Adler.
76 In the latest HTML spec, the pseudo classes :valid and :invalid match
77 a fieldset element based on its descendants:
78 https://html.spec.whatwg.org/#selector-valid
79 https://html.spec.whatwg.org/#selector-invalid
81 This patch adds that behavior.
83 There are two key problems to solve with these pseudo classes on fieldset:
85 -Style invalidation when any of the descendant changes.
87 To implement the style invalidation, I have modified HTMLFormControlElement
88 to notify its ancestor when its state changes.
90 The first change is making the state fully internal to HTMLFormControlElement,
91 we do not want subclass to be able to change the behavior and forget to update
94 To achieve that encapsulation, the interface was changed a bit:
95 -Neither willValidate() nor isValidFormControlElement() inherit from Element.
96 Instead, willValidate() is the implementation of FormAssociatedElement's interface
97 and it is final. The method isValidFormControlElement() becomes completely internal
98 to HTMLFormControlElement.
99 -Since willValidate() should no longer be re-implemented by subclass, the elements
100 that were depending on it have been migrated to recalcWillValidate() to set
101 the initial state as needed.
103 With the validity state fully encapsulated in HTMLFormControlElement, all I need
104 is a way to communicate that information to HTMLFieldSetElement ancestors.
105 This is done in two cases:
106 -The validity state changes.
107 -The tree changes in a way that would make the input element not a descendant
108 of a HTMLFieldSetElement.
110 The invalidation is simply done by walking up the ancestors and adding the current
111 element to a "validity dependency list" on each HTMLFieldSetElement.
113 Tests: fast/css/pseudo-invalid-fieldset-invalidation-optimization.html
114 fast/css/pseudo-invalid-fieldset-style-sharing.html
115 fast/css/pseudo-invalid-fieldset.html
116 fast/css/pseudo-valid-fieldset-invalidation-optimization.html
117 fast/css/pseudo-valid-fieldset-style-sharing.html
118 fast/css/pseudo-valid-fieldset.html
119 fast/selectors/invalid-fieldset-style-update-1.html
120 fast/selectors/invalid-fieldset-style-update-2.html
121 fast/selectors/invalid-fieldset-style-update-3.html
122 fast/selectors/invalid-fieldset-style-update-4.html
123 fast/selectors/invalid-fieldset-style-update-5.html
124 fast/selectors/valid-fieldset-style-update-1.html
125 fast/selectors/valid-fieldset-style-update-2.html
126 fast/selectors/valid-fieldset-style-update-3.html
127 fast/selectors/valid-fieldset-style-update-4.html
128 fast/selectors/valid-fieldset-style-update-5.html
130 * css/SelectorCheckerTestFunctions.h:
131 (WebCore::isInRange):
132 (WebCore::isOutOfRange):
133 (WebCore::isInvalid):
135 The hack "ContainsValidityStyleRules" is in the way of correct styling
136 of FieldSet and Form.
137 It is not the right way to get stylesheet properties anyway.
139 * css/StyleResolver.cpp:
140 (WebCore::StyleResolver::canShareStyleWithControl):
141 Make sure style sharing does not incorrectly share style for fieldset elements.
144 (WebCore::Document::Document):
146 (WebCore::Document::containsValidityStyleRules): Deleted.
147 (WebCore::Document::setContainsValidityStyleRules): Deleted.
149 (WebCore::Element::matchesValidPseudoClass):
150 (WebCore::Element::matchesInvalidPseudoClass):
151 (WebCore::Element::willValidate): Deleted.
152 (WebCore::Element::isValidFormControlElement): Deleted.
153 * html/FormAssociatedElement.cpp:
154 (WebCore::FormAssociatedElement::customError):
155 * html/FormAssociatedElement.h:
157 * html/HTMLFieldSetElement.cpp:
158 (WebCore::HTMLFieldSetElement::matchesValidPseudoClass):
159 (WebCore::HTMLFieldSetElement::matchesInvalidPseudoClass):
160 (WebCore::HTMLFieldSetElement::addInvalidDescendant):
161 (WebCore::HTMLFieldSetElement::removeInvalidDescendant):
162 Each HTMLFormControlElement that has constraint validation adds or removes
163 itself from its HTMLFieldSetElement ancestors.
165 It should be possible to just keep track of a count instead of a HashSet.
166 I decided to got with the HashSet to make the code more robust and easier
167 to debug. A few assertions ensure that the HashSet is actually used as a counter.
169 * html/HTMLFieldSetElement.h:
170 * html/HTMLFormControlElement.cpp:
171 (WebCore::addInvalidElementToAncestorFromInsertionPoint):
172 (WebCore::removeInvalidElementToAncestorFromInsertionPoint):
174 (WebCore::HTMLFormControlElement::insertedInto):
175 (WebCore::HTMLFormControlElement::removedFrom):
176 One tricky part of those two functions is that we cannot use
177 matchesValidPseudoClass() or matchesInvalidPseudoClass().
179 The reason is that HTMLFieldSetElement is a subclass of HTMLFormControlElement
180 and it has its own definition of what Valid and Invalid mean when matching selectors.
182 In HTMLFormControlElement, we must use the internal state,
183 willValidate() and isValidFormControlElement() must be used directly.
185 (WebCore::HTMLFormControlElement::matchesValidPseudoClass):
186 (WebCore::HTMLFormControlElement::matchesInvalidPseudoClass):
187 (WebCore::HTMLFormControlElement::willValidate):
188 (WebCore::addInvalidElementToAncestors):
189 (WebCore::removeInvalidElementFromAncestors):
190 (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
191 (WebCore::HTMLFormControlElement::setNeedsValidityCheck):
192 (WebCore::HTMLFormControlElement::isValidFormControlElement): Deleted.
193 * html/HTMLFormControlElement.h:
194 (WebCore::HTMLFormControlElement::isValidFormControlElement):
195 * html/HTMLKeygenElement.h:
196 * html/HTMLObjectElement.h:
197 * html/HTMLOutputElement.h:
199 2014-11-16 Zan Dobersek <zdobersek@igalia.com>
201 [TexMap] Add typecasting support for GraphicsLayerTextureMapper
202 https://bugs.webkit.org/show_bug.cgi?id=138741
204 Reviewed by Martin Robinson.
206 Add type traits for the GraphicsLayerTextureMapper class.
207 This enables using typecasting functions instead of
208 toGraphicsLayerTextureMapper().
210 Remove toTextureMapperLayer() casting function which actually
211 returned the TextureMapperLayer object that belonged to the
212 passed-in GraphicsLayerTextureMapper. Instead, the GraphicsLayer
213 object is now downcasted and the TextureMapperLayer is accessed
214 by calling the GraphicsLayerTextureMapper::layer() method.
216 * platform/graphics/GraphicsLayer.h:
217 (WebCore::GraphicsLayer::isGraphicsLayerTextureMapper):
218 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
219 (WebCore::toTextureMapperLayerVector):
220 (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
221 (WebCore::toTextureMapperLayer): Deleted.
222 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
223 (WebCore::toGraphicsLayerTextureMapper): Deleted.
225 2014-11-16 Gyuyoung Kim <gyuyoung.kim@samsung.com>
227 Move WebCore/loader to std::unique_ptr
228 https://bugs.webkit.org/show_bug.cgi?id=138646
230 Reviewed by Chris Dumez.
232 Replace OwnPtr with std::unique_ptr<> and std::make_unique<>.
233 However this patch leaves ResourceRequest::adopt() because this need
234 to be handled by different patch.
236 No new tests, no behavior changes.
238 * loader/DocumentThreadableLoader.cpp:
239 (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
240 (WebCore::DocumentThreadableLoader::preflightSuccess):
241 * loader/DocumentThreadableLoader.h:
242 * loader/SubresourceLoader.cpp:
243 (WebCore::SubresourceLoader::SubresourceLoader):
244 (WebCore::SubresourceLoader::didReceiveResponse):
245 (WebCore::SubresourceLoader::notifyDone):
246 * loader/SubresourceLoader.h:
247 * loader/TextTrackLoader.h:
248 * loader/appcache/ApplicationCacheHost.h:
249 * loader/appcache/ApplicationCacheStorage.cpp:
250 (WebCore::ApplicationCacheStorage::storeCopyOfCache):
251 * loader/archive/cf/LegacyWebArchive.cpp:
252 (WebCore::LegacyWebArchive::create):
253 * loader/cache/CachedResourceLoader.cpp:
254 (WebCore::CachedResourceLoader::requestPreload):
255 (WebCore::CachedResourceLoader::clearPreloads):
256 (WebCore::CachedResourceLoader::printPreloadStats):
257 * loader/cache/CachedResourceLoader.h:
258 * loader/icon/IconDatabase.cpp:
259 (WebCore::IconDatabase::deleteAllPreparedStatements):
260 (WebCore::readySQLiteStatement):
261 * loader/icon/IconDatabase.h:
262 * loader/icon/IconRecord.h:
264 2014-11-16 Chris Dumez <cdumez@apple.com>
266 Crash when setting 'order' CSS property to a calculated value
267 https://bugs.webkit.org/show_bug.cgi?id=138780
269 Reviewed by Darin Adler.
271 CSS Calculated values were not handled by the CSS parser for 'order'
272 CSS property. As a result, using calculated values wouldn't work in
273 release builds and would hit an assertion in debug builds.
275 This patch updates the CSS parser to directly convert the
276 CSS Calculated value into a simple integer CSSPrimitiveValue for
277 'order' property. We could have marked CSS Calculated values as
278 valid in the CSS Parser instead but this would have brought issues:
279 - The calculated value needs to be adjusted to INT_MIN + 2 if it is less
280 than that. This would force us to calculate the expression anyway.
281 - The StyleBuilder would need updating to properly handle CSS Calculated
284 Test: fast/css/order-calculated-value.html
287 (WebCore::CSSParser::parseValue):
289 2014-11-16 Chris Dumez <cdumez@apple.com>
291 Assertion hit when setting a very large value to 'border-width' / 'font-size' CSS properties
292 https://bugs.webkit.org/show_bug.cgi?id=138770
294 Reviewed by Darin Adler.
296 When setting a very large value to a CSS property, it is represented internally as
297 infinity. r166114 already tried to deal with this by adding an std::isinf() check
298 in CSSValuePool::createValue() and returning an identifier CSSPrimitiveValue with
299 CSSValueInvalid value in such case. The issue is that doing leads to the
300 StyleBuilder getting a CSSValueInvalid CSSPrimitive value as input, which is not
301 handled and leads to assertions.
303 This patch updates the CSSParser to detect cases where the double value is
304 infinity earlier (in CSSParser::validUnit() and parseSimpleLengthValue()), so
305 that we mark the value as invalid and actually drop it. As a result,
306 CSSPrimitiveValues with CSSValueInvalid value no longer make their way to the
309 Test: fast/css/style-builder-infinite-value.html
310 fast/css/infinite-floating-value.html
313 (WebCore::parseSimpleLengthValue):
314 (WebCore::CSSParser::validUnit):
315 * css/CSSValuePool.cpp:
316 (WebCore::CSSValuePool::createValue):
318 2014-11-16 Shivakumar JM <shiva.jm@samsung.com>
320 Attribute text in HTMLAnchorElement should behave as per specification.
321 https://bugs.webkit.org/show_bug.cgi?id=138557
323 Reviewed by Darin Adler.
325 attribute text in HTMLAnchorElement should not be readonly as per specification
326 http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute.
327 Also This matches the behavior of Chrome 38 and FireFox.
329 Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html
331 * html/HTMLAnchorElement.cpp:
332 (WebCore::HTMLAnchorElement::text):
333 (WebCore::HTMLAnchorElement::setText):
334 * html/HTMLAnchorElement.h:
335 * html/HTMLAnchorElement.idl:
337 2014-11-16 Chris Dumez <cdumez@apple.com>
339 Move 'vertical-align' CSS property to the new StyleBuilder
340 https://bugs.webkit.org/show_bug.cgi?id=138764
342 Reviewed by Darin Adler.
344 Move 'vertical-align' CSS property from DeprecatedStyleBuilder to the
345 new StyleBuilder by using custom code.
347 No new tests, no behavior change.
349 * css/CSSPropertyNames.in:
350 * css/DeprecatedStyleBuilder.cpp:
351 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
352 (WebCore::ApplyPropertyVerticalAlign::applyValue): Deleted.
353 (WebCore::ApplyPropertyVerticalAlign::createHandler): Deleted.
354 * css/StyleBuilderCustom.h:
355 (WebCore::StyleBuilderFunctions::applyValueVerticalAlign):
357 2014-11-16 Tim Horton <timothy_horton@apple.com>
359 Use TextIndicator instead of the built in Lookup highlight
360 https://bugs.webkit.org/show_bug.cgi?id=138775
361 <rdar://problem/18953982>
363 Follow-up to r176164.
365 * platform/spi/mac/LookupSPI.h:
366 (WebCore::canDisableLookupIndicator): Deleted.
367 Remove canDisableLookupIndicator.
369 2014-11-16 Chris Dumez <cdumez@apple.com>
371 Crash when setting '-webkit-line-clamp' CSS property to a calculated value
372 https://bugs.webkit.org/show_bug.cgi?id=138777
374 Reviewed by Benjamin Poulain.
376 CSS Calculated values were not handled when converting a CSSPrimitiveValue
377 to a LineClampValue. As a result, we would hit an ASSERT_NOT_REACHED()
378 assertion. To address this issue, this patch updates the code to use
379 primitiveType() / getValue<>() instead of m_primitiveUnitType /
380 m_value.num, as those getter function properly handle CSS Calculated
383 Test: fast/css/webkit-line-clamp-calculated-value.html
385 * css/CSSPrimitiveValueMappings.h:
386 (WebCore::CSSPrimitiveValue::operator LineClampValue):
388 2014-11-16 Tim Horton <timothy_horton@apple.com>
390 Use TextIndicator instead of the built in Lookup highlight
391 https://bugs.webkit.org/show_bug.cgi?id=138775
392 <rdar://problem/18953982>
394 Reviewed by Anders Carlsson.
397 * platform/mac/WebCoreSystemInterface.h:
398 * platform/mac/WebCoreSystemInterface.mm:
399 Remove a WKSI import/export that we don't need anymore.
401 * platform/spi/mac/LookupSPI.h: Added.
402 (WebCore::canDisableLookupIndicator):
403 Add Lookup SPI header.
404 Add a 'canDisableLookupIndicator', which must be called in any translation
405 unit that wants to use either of the soft-linked constants related to
406 that functionality, before calling the get* function.
408 * WebCore.xcodeproj/project.pbxproj:
409 * editing/mac/DictionaryLookup.mm:
410 (WebCore::rangeForDictionaryLookupForSelection):
411 (WebCore::rangeForDictionaryLookupAtHitTestResult):
412 Adopt the Lookup SPI header.
414 2014-11-16 Joanmarie Diggs <jdiggs@igalia.com>
416 AX: [ATK] REGRESSION(r166288): Accessible values are no longer accessible via AT-SPI2
417 https://bugs.webkit.org/show_bug.cgi?id=138776
419 Reviewed by Chris Fleizach.
421 r166288 used #if...#else instead of #if...#endif, thus disabling the old
422 AtkValue support. Unfortunately AT-SPI2 doesn't yet have support for the
423 new AtkValue API. Thus r166288 broke access to value-holding elements for
424 AT-SPI2 assistive technologies. Replacing #else with #endif fixes things.
426 No new tests because catching this regression would require AT-SPI2.
428 * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
429 (webkitAccessibleValueGetMinimumIncrement):
430 (webkitAccessibleValueInterfaceInit):
432 2014-11-16 Joanmarie Diggs <jdiggs@igalia.com>
434 AX: [ATK] Expose the blockquote element using ATK_ROLE_BLOCK_QUOTE
435 https://bugs.webkit.org/show_bug.cgi?id=138771
437 Reviewed by Chris Fleizach.
439 Add BlockquoteRole and assigns it to blockquote elements. Make
440 corresponding changes to platform role mappings: ATK_ROLE_BLOCK_QUOTE
441 for GTK and EFL; AXGroup (which was being used already) for the Mac.
443 No new tests are required. Instead, updated the existing expectations
444 to reflect the new mapping.
446 * accessibility/AccessibilityNodeObject.cpp:
447 (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
448 * accessibility/AccessibilityObject.cpp:
449 (WebCore::AccessibilityObject::isBlockquote):
450 * accessibility/AccessibilityObject.h:
451 * accessibility/AccessibilityRenderObject.cpp:
452 (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
453 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
455 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
456 (createAccessibilityRoleMap):
458 2014-11-16 Chris Dumez <cdumez@apple.com>
460 Crash when setting 'alt' CSS property to inherit or initial
461 https://bugs.webkit.org/show_bug.cgi?id=138774
462 <rdar://problem/18995409>
464 Reviewed by Chris Fleizach.
466 The StyleResolver was not handling 'inherit' or 'initial' values for
467 'alt' CSS property. As a result, the code was assuming the CSSValue
468 was a CSSPrimitiveValue (although it could be a CSSInitialValue or
469 a CSSInheritValue). In such case, the code would dereference a null
470 pointer because primitiveValue is initialized using:
471 CSSPrimitiveValue* primitiveValue = is<CSSPrimitiveValue>(*value)
472 ? downcast<CSSPrimitiveValue>(value)
475 Test: fast/css/alt-inherit-initial.html
477 * css/StyleResolver.cpp:
478 (WebCore::StyleResolver::applyProperty):
480 2014-11-15 Joanmarie Diggs <jdiggs@igalia.com>
482 AX: [ATK] Lists with selectable children should have ATK_ROLE_LIST_BOX
483 https://bugs.webkit.org/show_bug.cgi?id=127060
485 Reviewed by Chris Fleizach.
487 Corrected the mapping from ATK_ROLE_LIST to ATK_ROLE_LIST_BOX.
489 No new tests. Instead, updated the expectations of roles-exposed.html to
490 reflect the corrected mapping.
492 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
495 2014-11-15 Joanmarie Diggs <jdiggs@igalia.com>
497 AX: [ATK] Video and audio elements should be exposed using ATK's video and audio roles.
498 https://bugs.webkit.org/show_bug.cgi?id=138767
500 Reviewed by Chris Fleizach.
502 Map AudioRole and VideoRole to ATK_ROLE_AUDIO and ATK_ROLE_VIDEO
503 respectively, falling back on the existing mapping to ATK_ROLE_EMBEDDED
504 in environments which have an older version of ATK.
506 No new tests are required. Instead, existing expectations were updated
507 to reflect the new mapping.
509 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
512 2014-11-15 Joanmarie Diggs <jdiggs@igalia.com>
514 AX: [ATK] Expose the footer element as ATK_ROLE_FOOTER
515 https://bugs.webkit.org/show_bug.cgi?id=138773
517 Reviewed by Chris Fleizach.
519 Map FooterRole to ATK_ROLE_FOOTER.
521 No new tests. Unskipped a test that verifies this mapping.
523 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
526 2014-11-14 Dean Jackson <dino@apple.com>
528 Rename WebKitCSSKeyframe(s)Rule into CSSKeyframe(s)Rule
529 https://bugs.webkit.org/show_bug.cgi?id=138763
530 <rdar://problem/18991569>
532 Reviewed by Simon Fraser.
534 Globally rename WebKitCSSKeyframeRule and WebKitCSSKeyframesRule to
535 CSSKeyframeRule and CSSKeyframesRule respectively.
537 This *may* break some existing content, but is compatible with
538 what Blink and Firefox are doing. To minimize breakage, I kept an
539 alias for the old constant values on CSSRule: WEBKIT_KEYFRAMES_RULE
540 and WEBKIT_KEYFRAME_RULE.
542 Covered by existing tests.
545 * DerivedSources.cpp:
546 * DerivedSources.make:
547 * WebCore.vcxproj/WebCore.vcxproj:
548 * WebCore.vcxproj/WebCore.vcxproj.filters:
549 * WebCore.xcodeproj/project.pbxproj:
550 * bindings/js/JSCSSRuleCustom.cpp:
552 * bindings/objc/DOMCSS.mm:
554 * css/CSSGrammar.y.includes:
555 * css/CSSKeyframeRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.cpp.
556 (WebCore::StyleKeyframe::StyleKeyframe):
557 (WebCore::StyleKeyframe::~StyleKeyframe):
558 (WebCore::StyleKeyframe::mutableProperties):
559 (WebCore::StyleKeyframe::parseKeyString):
560 (WebCore::StyleKeyframe::cssText):
561 (WebCore::CSSKeyframeRule::CSSKeyframeRule):
562 (WebCore::CSSKeyframeRule::~CSSKeyframeRule):
563 (WebCore::CSSKeyframeRule::style):
564 (WebCore::CSSKeyframeRule::reattach):
565 * css/CSSKeyframeRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.h.
566 (WebCore::StyleKeyframe::create):
567 (WebCore::StyleKeyframe::keyText):
568 (WebCore::StyleKeyframe::setKeyText):
569 (WebCore::StyleKeyframe::getKeys):
570 (WebCore::StyleKeyframe::properties):
571 * css/CSSKeyframeRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.idl.
572 * css/CSSKeyframesRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.cpp.
573 (WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
574 (WebCore::StyleRuleKeyframes::~StyleRuleKeyframes):
575 (WebCore::StyleRuleKeyframes::parserAppendKeyframe):
576 (WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
577 (WebCore::StyleRuleKeyframes::wrapperRemoveKeyframe):
578 (WebCore::StyleRuleKeyframes::findKeyframeIndex):
579 (WebCore::CSSKeyframesRule::CSSKeyframesRule):
580 (WebCore::CSSKeyframesRule::~CSSKeyframesRule):
581 (WebCore::CSSKeyframesRule::setName):
582 (WebCore::CSSKeyframesRule::appendRule):
583 (WebCore::CSSKeyframesRule::insertRule):
584 (WebCore::CSSKeyframesRule::deleteRule):
585 (WebCore::CSSKeyframesRule::findRule):
586 (WebCore::CSSKeyframesRule::cssText):
587 (WebCore::CSSKeyframesRule::length):
588 (WebCore::CSSKeyframesRule::item):
589 (WebCore::CSSKeyframesRule::cssRules):
590 (WebCore::CSSKeyframesRule::reattach):
591 * css/CSSKeyframesRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.h.
592 (WebCore::StyleRuleKeyframes::create):
593 (WebCore::StyleRuleKeyframes::keyframes):
594 (WebCore::StyleRuleKeyframes::name):
595 (WebCore::StyleRuleKeyframes::setName):
596 (WebCore::StyleRuleKeyframes::copy):
597 * css/CSSKeyframesRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.idl.
601 * css/CSSStyleSheet.cpp:
603 * css/StyleResolver.cpp:
605 (WebCore::StyleRuleBase::createCSSOMWrapper):
606 * inspector/InspectorStyleSheet.cpp:
607 (WebCore::asCSSRuleList):
609 2014-11-15 David Kilzer <ddkilzer@apple.com>
611 REGRESSION (r176137): iOS build broke after moving DataDetectors scanning code to WebCore
613 This regressed with the following commit:
615 Move DataDetectors scanning code to WebCore
616 https://bugs.webkit.org/show_bug.cgi?id=138731
617 <rdar://problem/18877535>
619 This fixes the following build failures:
621 In file included from WebCore/editing/mac/DataDetection.mm:29:
622 WebCore/platform/spi/mac/DataDetectorsSPI.h:66:11: error: unknown type name 'NSRect'
623 @property NSRect highlightFrame;
625 WebCore/editing/mac/DataDetection.mm:42:28: error: use of undeclared identifier 'DataDetection'
626 RetainPtr<DDActionContext> DataDetection::detectItemAroundHitTestResult(const HitTestResult& hitTestResult, FloatRect& detectedDataBoundingBox, RefPtr<Range>& detectedDataRange)
631 (DataDetection::detectItemAroundHitTestResult): Move symbol from
632 shared section to Mac-only section.
633 * editing/mac/DataDetection.mm: Add PLATFORM(MAC) check around
634 the entire implementation since it it unused on iOS.
635 * platform/spi/mac/DataDetectorsSPI.h: Expand PLATFORM(MAC)
636 check around DDActionContext class declarations.
638 2014-11-14 Benjamin Poulain <benjamin@webkit.org>
640 Compute the selector specificity as we match simple selectors
641 https://bugs.webkit.org/show_bug.cgi?id=138718
643 Reviewed by Andreas Kling.
645 This is an other tiny step toward dynamic specificity. Instead of computing
646 the entire specificity at the end, compute it dynamically as we are matching
647 each individual simple selector.
649 * css/CSSSelector.cpp:
650 (WebCore::CSSSelector::specificity):
651 (WebCore::CSSSelector::simpleSelectorSpecificity):
652 (WebCore::CSSSelector::addSpecificities):
653 (WebCore::CSSSelector::specificityForPage):
654 (WebCore::CSSSelector::specificityForOneSelector): Deleted.
656 * css/SelectorChecker.cpp:
657 (WebCore::SelectorChecker::match):
658 (WebCore::SelectorChecker::matchRecursively):
659 (WebCore::SelectorChecker::checkOne):
660 (WebCore::SelectorChecker::matchSelectorList):
661 * css/SelectorChecker.h:
663 2014-11-14 Andreas Kling <akling@apple.com>
665 [mac] Only images that are actually purgeable should be advertised as such.
666 <https://webkit.org/b/138759>
667 <rdar://problem/13205438>
669 Reviewed by Tim Horton.
671 Instead of saying that all images on >=Yosemite are purgeable, have BitmapImage
672 forward the question to CGImage for the correct answer.
674 The memory may be marked non-volatile by frameworks underneath WebKit at any
675 given time, but that's not something we need to worry about.
677 * platform/graphics/BitmapImage.cpp:
678 (WebCore::BitmapImage::decodedDataIsPurgeable):
679 * platform/graphics/BitmapImage.h:
680 * platform/graphics/cg/BitmapImageCG.cpp:
681 (WebCore::BitmapImage::decodedDataIsPurgeable):
682 * platform/graphics/cg/ImageSourceCG.cpp:
683 (WebCore::ImageSource::createFrameAtIndex):
684 * platform/spi/cg/CoreGraphicsSPI.h:
686 2014-11-14 Zalan Bujtas <zalan@apple.com>
688 Remove computeTextPaintStyle's RenderText dependency.
689 https://bugs.webkit.org/show_bug.cgi?id=138754
691 Reviewed by Simon Fraser.
693 So that we can compute text paint style across renderers in simple line layout.
695 No change in functionality.
697 * rendering/InlineTextBox.cpp:
698 (WebCore::InlineTextBox::paint):
699 * rendering/SimpleLineLayoutFunctions.cpp:
700 (WebCore::SimpleLineLayout::paintFlow):
701 * rendering/TextPaintStyle.cpp:
702 (WebCore::computeTextPaintStyle):
703 * rendering/TextPaintStyle.h:
705 2014-11-14 Myles C. Maxfield <mmaxfield@apple.com>
707 Get rid of WebFontCache
708 https://bugs.webkit.org/show_bug.cgi?id=134752
710 Reviewed by Dave Hyatt.
712 No new tests because there is no behavior change.
714 * Configurations/WebCore.xcconfig:
718 * WebCore.xcodeproj/project.pbxproj:
719 * platform/graphics/mac/FontCacheMac.mm:
720 (WebCore::acceptableChoice):
721 (WebCore::betterChoice):
722 (WebCore::toTraitsMask):
723 (WebCore::desiredFamilyToAvailableFamilyDictionary):
724 (WebCore::rememberDesiredFamilyToAvailableFamilyMapping):
725 (WebCore::fontWithFamily):
726 (WebCore::invalidateFontCache):
727 (WebCore::FontCache::getTraitsInFamily):
728 (WebCore::FontCache::createFontPlatformData):
729 * platform/mac/WebFontCache.h: Removed.
730 * platform/mac/WebFontCache.mm: Removed.
732 2014-11-14 Daniel Bates <dabates@apple.com>
734 [iOS] NSFileManager and QuickLook SPI not available in public SDK
735 https://bugs.webkit.org/show_bug.cgi?id=138742
737 Reviewed by Pratik Solanki.
739 Add a SPI wrapper headers {NSFileManager, QuickLook}SPI.h that forward declares
740 NSFileManager and QuickLook SPI, respectively, and use these header instead of
741 including private headers of Foundation and QuickLook directly.
743 * WebCore.xcodeproj/project.pbxproj: Add project and private header QuickLookSPI.h
744 and NSFileManagerSPI.h, respectively.
745 * platform/network/ios/QuickLook.mm: Include headers QuickLookSPI.h and NSFileManagerSPI.h
746 instead of including headers of QuickLook and Foundation directly.
747 * platform/spi/cocoa/NSFileManagerSPI.h: Added.
748 * platform/spi/ios/QuickLookSPI.h: Added.
750 2014-11-14 Daniel Bates <dabates@apple.com>
752 [iOS] CoreGraphics SPI not available in public SDK
753 https://bugs.webkit.org/show_bug.cgi?id=138709
755 Reviewed by David Kilzer.
757 Add a SPI wrapper header called CoreGraphicsSPI.h that forward declares
758 CoreGraphics SPI and use this header instead of including private headers
759 of CoreGraphics directly.
761 * WebCore.xcodeproj/project.pbxproj: Add WebCore private header CoreGraphicsSPI.h. Also remove header
762 CGFontUnicodeSupportSPI.h as its functionality has been incorporated into header CoreGraphicsSPI.h.
763 * WebCore.vcxproj/WebCore.vcxproj: Add WebCore private header CoreGraphicsSPI.h.
764 * WebCore.vcxproj/WebCore.vcxproj.filters: Add directories platform/spi and platform/spi/cg.
765 * WebCore.vcxproj/WebCoreCG.props: Add include directory platform/spi/cg.
766 * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy WebCore headers from directory platform/spi/cg. This
767 is necessary because WebCore/platform/graphics/SimpleFontData.h includes CoreGraphicsSPI.h. And
768 WebCore/platform/graphics/SimpleFontData.h is compiled for the Apple Windows port.
769 * platform/graphics/SimpleFontData.h: Move CGFontRenderingStyle declaration and associated enum
770 from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
771 * platform/graphics/cg/BitmapImageCG.cpp: Remove unnecessary #include of header CGContextPrivate.h.
772 * platform/graphics/cg/ColorCG.cpp: Include header CoreGraphicsSPI.h instead of including headers
773 of CoreGraphics directly.
774 * platform/graphics/cg/GraphicsContextCG.cpp: Move forward declarations of CoreGraphics functions
775 from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h. Also sort the list
776 of #include directives.
777 * platform/graphics/cg/ImageSourceCG.cpp: Include header CoreGraphicsSPI.h instead of including
778 headers of CoreGraphics directly.
779 * platform/graphics/cg/PDFDocumentImage.cpp: Ditto.
780 * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Ditto.
781 * platform/graphics/ios/FontCacheIOS.mm: Include header CoreGraphicsSPI.h instead of including
782 header <CoreGraphics/CGFontUnicodeSupport.h> directly.
783 * platform/graphics/ios/FontServicesIOS.mm: Include header CoreGraphicsSPI.h instead of including
784 headers of CoreGraphics directly.
785 * platform/graphics/ios/SimpleFontDataIOS.mm: Ditto.
786 * platform/graphics/mac/FontMac.mm: Move forward declarations of CoreGraphics functions from this
787 file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
788 * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Substitute header CoreGraphicsSPI.h for CGFontUnicodeSupportSPI.h
789 and remove #include of headers CGFontUnicodeSupport.h (it will be included by CoreGraphicsSPI.h).
790 * platform/graphics/mac/SimpleFontDataMac.mm: Move forward declarations of CoreGraphics functions
791 from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
792 * platform/ios/LegacyTileGrid.mm: Include header CoreGraphicsSPI.h instead of including headers of
793 CoreGraphics directly.
794 * platform/ios/wak/WKGraphics.h: Remove #include of header CoreGraphicsPrivate.h and forward declare
795 CGFontAntialiasingStyle Additionally, declare WKCompositeOperation as an alias of int and use this
796 data type instead of CGCompositeOperation (SPI). This approach lets us keep the definition of
797 CGCompositeOperation in file CoreGraphicsSPI.h, where all the other definitions/forward declarations
798 of CoreGraphics data types reside, as opposed to defining it in this file.
799 * platform/ios/wak/WKGraphics.mm:
800 (WKRectFillUsingOperation): Cast data type WKCompositeOperation to CGCompositeOperation and added
801 compile-time assert to ensure that the size of WKCompositeOperation is identical to the size of CGCompositeOperation.
802 * platform/graphics/cg/ImageSourceCG.cpp: Move CGImageCachingFlags declaration, associated enum, and
803 forward declaration of CGImageSetCachingFlags() from this file to file CoreGraphicsSPI.h and include
804 header CoreGraphicsSPI.h.
805 (WebCore::ImageSource::createFrameAtIndex): Fix incorrect comment.
806 * platform/spi/cocoa/CGFontUnicodeSupportSPI.h: Removed; moved its functionality into header CoreGraphicsSPI.h.
807 * platform/spi/cg/CoreGraphicsSPI.h: Added.
809 * rendering/RenderThemeIOS.mm: Substitute header CoreGraphics.h for CGPathPrivate.h as we no longer
810 make use of any functionality from CGPathPrivate.h in this file. The functionality we used from
811 CGPathPrivate.h, including CGPathAddRoundedRect(), has been moved to the public API header, CGPath.h,
812 which is included from header CoreGraphics.h.
814 2014-11-14 Dean Jackson <dino@apple.com>
816 [Media] Timeline scrubber not updating as the video plays
817 https://bugs.webkit.org/show_bug.cgi?id=138717
818 <rdar://problem/18957509>
820 Reviewed by Jer Noble.
822 There is some confusing logic that determines
823 whether or not the controls are hidden, and a
824 slight error caused timelines to not advance unless
825 they were explicitly showing.
827 The fix was to be a bit more liberal in deciding
828 when the controls are showing, but still cautious
829 enough to stop up causing repaints when things
832 Test: media/media-controls-timeline-updates.html
834 * Modules/mediacontrols/mediaControlsApple.js:
835 (Controller.prototype.controlsAreHidden): We only need
836 to check if we're an audio element or explicitly
838 (Controller.prototype.showControls): Explicitly call
841 2014-11-14 Tim Horton <timothy_horton@apple.com>
843 Move DataDetectors scanning code to WebCore
844 https://bugs.webkit.org/show_bug.cgi?id=138731
845 <rdar://problem/18877535>
847 Reviewed by Anders Carlsson.
850 Export our new function.
852 * WebCore.xcodeproj/project.pbxproj:
853 Add DataDetection.{mm, h}
854 Adjust the project so that editing/mac actually points to editing/mac instead of editing/
856 * editing/mac/DictionaryLookup.h:
857 * editing/mac/DictionaryLookup.mm:
858 Swap to PLATFORM(MAC) instead of !PLATFORM(IOS).
859 Move DictionaryLookup.{mm, h} to editing/mac, where they were in the project but not on disk.
861 * editing/mac/DataDetection.h: Added.
862 * editing/mac/DataDetection.mm: Added.
863 (WebCore::DataDetection::detectItemAroundHitTestResult):
866 2014-11-14 Dan Bernstein <mitz@apple.com>
868 <rdar://problem/18978497> Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button back/forward navigation
869 https://bugs.webkit.org/show_bug.cgi?id=138753
871 Reviewed by Tim Horton.
873 Removed a FrameLoaderClient function that no one overrides anymore.
875 * loader/FrameLoaderClient.h:
876 (WebCore::FrameLoaderClient::willChangeCurrentHistoryItem): Deleted.
877 * loader/HistoryController.cpp:
878 (WebCore::HistoryController::setCurrentItem): Removed call to willChangeCurrentHistoryItem.
879 (WebCore::HistoryController::replaceCurrentItem): Ditto.
881 2014-11-14 Jeremy Jones <jeremyj@apple.com>
883 Do proper teardown for optimized fullscreen
884 https://bugs.webkit.org/show_bug.cgi?id=138648
886 Reviewed by Eric Carlson.
888 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
889 (WebVideoFullscreenInterfaceAVKit::invalidate): must do corresponding teardown based on mode.
891 2014-11-11 David Hyatt <hyatt@apple.com>
893 Table rows repaint entire table when their background color changes.
894 https://bugs.webkit.org/show_bug.cgi?id=26662
896 Reviewed by Simon Fraser.
898 Added fast/repaint/table-row-repaint.html
900 * rendering/RenderTableCell.h:
901 * rendering/RenderTableRow.cpp:
902 (WebCore::RenderTableRow::clippedOverflowRectForRepaint):
903 Improve table row's function to unite with the cell rects that can possibly
904 have the the row's background color painted behind them.
906 2014-11-14 Zalan Bujtas <zalan@apple.com>
908 Simple line layout: Move simple line layout RunResolver and LineResolver implementation to SimpleLineLayoutResolver.cpp
909 https://bugs.webkit.org/show_bug.cgi?id=138704
911 Reviewed by Antti Koivisto.
913 No change in functionality.
916 * WebCore.vcxproj/WebCore.vcxproj:
917 * WebCore.vcxproj/WebCore.vcxproj.filters:
918 * WebCore.xcodeproj/project.pbxproj:
919 * rendering/SimpleLineLayoutResolver.cpp: Added.
920 (WebCore::SimpleLineLayout::RunResolver::Run::Run):
921 (WebCore::SimpleLineLayout::RunResolver::Run::rect):
922 (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
923 (WebCore::SimpleLineLayout::RunResolver::Run::text):
924 (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
925 (WebCore::SimpleLineLayout::RunResolver::Iterator::advance):
926 (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
927 (WebCore::SimpleLineLayout::RunResolver::RunResolver):
928 (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
929 (WebCore::SimpleLineLayout::RunResolver::rangeForRect):
930 (WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator):
931 (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
932 (WebCore::SimpleLineLayout::LineResolver::LineResolver):
933 * rendering/SimpleLineLayoutResolver.h:
934 (WebCore::SimpleLineLayout::RunResolver::Run::Run): Deleted.
935 (WebCore::SimpleLineLayout::RunResolver::Run::rect): Deleted.
936 (WebCore::SimpleLineLayout::RunResolver::Run::baseline): Deleted.
937 (WebCore::SimpleLineLayout::RunResolver::Run::text): Deleted.
938 (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator): Deleted.
939 (WebCore::SimpleLineLayout::RunResolver::Iterator::advance): Deleted.
940 (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines): Deleted.
941 (WebCore::SimpleLineLayout::RunResolver::RunResolver): Deleted.
942 (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight): Deleted.
943 (WebCore::SimpleLineLayout::RunResolver::rangeForRect): Deleted.
944 (WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator): Deleted.
945 (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*): Deleted.
946 (WebCore::SimpleLineLayout::LineResolver::LineResolver): Deleted.
948 2014-11-14 Andrzej Badowski <a.badowski@samsung.com>
950 AX: Improve AccessibilityTableCell isColumnHeaderCell function.
951 https://bugs.webkit.org/show_bug.cgi?id=138423
953 Reviewed by Chris Fleizach.
955 <th> cell in the zero row should be column header.
957 New tests are not necessary.
959 * accessibility/AccessibilityTableCell.cpp:
960 (WebCore::AccessibilityTableCell::isColumnHeaderCell):
962 2014-11-14 Carlos Garcia Campos <cgarcia@igalia.com>
964 [SOUP] Use GMainLoopSource for request timeout in ResourceHandle
965 https://bugs.webkit.org/show_bug.cgi?id=138695
967 Reviewed by Sergio Villar Senin.
969 We are currently using soup_timeout_add() that simply creates a
970 GSource and attaches it to the given context. Using
971 GMainLoopSource we simplify the code and fix any potential problem
972 of converting the double value into milliseconds.
974 * platform/network/ResourceHandleInternal.h:
975 * platform/network/soup/ResourceHandleSoup.cpp:
976 (WebCore::cleanupSoupRequestOperation):
977 (WebCore::ResourceHandle::sendPendingRequest):
978 (WebCore::ResourceHandle::platformSetDefersLoading):
979 (WebCore::requestTimeoutCallback): Deleted.
981 2014-11-13 Tim Horton <timothy_horton@apple.com>
983 [mac] Keep around more decoded image data, since it's purgeable
984 https://bugs.webkit.org/show_bug.cgi?id=125273
985 <rdar://problem/13205438>
987 Reviewed by Simon Fraser.
989 No new tests, just an optimization.
991 Instead of throwing away decoded image data eagerly, allow the operating
992 system to manage the memory via the standard purgeability mechanism,
995 This improves the performance on some pathological cases (extremely large
996 animated GIFs) by up to 8x.
998 * loader/cache/MemoryCache.cpp:
999 (WebCore::MemoryCache::pruneLiveResourcesToSize):
1000 Don't prune live resources' decoded data if it is purgeable.
1002 * platform/graphics/BitmapImage.cpp:
1003 (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
1004 Don't eagerly throw away decoded image data if it's purgeable.
1006 * loader/cache/CachedImage.h:
1007 * loader/cache/CachedResource.h:
1008 (WebCore::CachedResource::decodedDataIsPurgeable):
1009 * platform/graphics/BitmapImage.h:
1010 * platform/graphics/Image.h:
1011 (WebCore::Image::decodedDataIsPurgeable):
1013 2014-11-13 Myles C. Maxfield <litherum@gmail.com>
1015 Addressing post-review comment
1016 https://bugs.webkit.org/show_bug.cgi?id=138633
1018 * platform/spi/cg/CoreGraphicsSPI.h:
1020 2014-11-13 Myles C. Maxfield <mmaxfield@apple.com>
1022 Move FontMac and FontCacheMac off of WKSI
1023 https://bugs.webkit.org/show_bug.cgi?id=138633
1025 Reviewed by Simon Fraser.
1027 No new tests because there is no behavior change.
1031 * WebCore.vcxproj/WebCoreCG.props:
1032 * WebCore.xcodeproj/project.pbxproj:
1033 * platform/graphics/ios/FontCacheIOS.mm:
1034 (WebCore::FontCache::platformInit):
1035 * platform/graphics/mac/FontCacheMac.mm:
1036 (WebCore::FontCache::platformInit):
1037 (WebCore::FontCache::systemFallbackForCharacters):
1038 * platform/graphics/mac/FontMac.mm:
1039 (WebCore::isIntegral):
1040 (WebCore::setCGFontRenderingMode):
1041 (WebCore::Font::drawGlyphs):
1042 * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1043 * platform/graphics/win/FontCacheWin.cpp:
1044 (WebCore::FontCache::platformInit):
1045 * platform/ios/WebCoreSystemInterfaceIOS.mm:
1046 * platform/mac/WebCoreSystemInterface.h:
1047 * platform/mac/WebCoreSystemInterface.mm:
1048 * platform/spi/cocoa/CoreGraphicsSPI.h: Copied from Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h.
1049 * platform/spi/cocoa/CoreTextSPI.h:
1050 * platform/spi/mac/NSFontSPI.h: Renamed from Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h.
1052 2014-11-13 Chris Dumez <cdumez@apple.com>
1054 Move 'image-resolution' CSS property to the new StyleBuilder
1055 https://bugs.webkit.org/show_bug.cgi?id=138715
1057 Reviewed by Andreas Kling.
1059 Move 'image-resolution' CSS property from DeprecatedStyleBuilder to
1060 the new StyleBuilder by using custom code.
1062 No new tests, no behavior change.
1064 * css/CSSPropertyNames.in:
1065 * css/DeprecatedStyleBuilder.cpp:
1066 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1067 (WebCore::ApplyPropertyImageResolution::applyInheritValue): Deleted.
1068 (WebCore::ApplyPropertyImageResolution::applyInitialValue): Deleted.
1069 (WebCore::ApplyPropertyImageResolution::applyValue): Deleted.
1070 (WebCore::ApplyPropertyImageResolution::createHandler): Deleted.
1071 * css/StyleBuilderCustom.h:
1072 (WebCore::StyleBuilderFunctions::applyInheritImageResolution):
1073 (WebCore::StyleBuilderFunctions::applyInitialImageResolution):
1074 (WebCore::StyleBuilderFunctions::applyValueImageResolution):
1076 2014-11-13 Commit Queue <commit-queue@webkit.org>
1078 Unreviewed, rolling out r176106.
1079 https://bugs.webkit.org/show_bug.cgi?id=138719
1081 needs build love (Requested by kling on #webkit).
1085 "[mac] Keep around more decoded image data, since it's
1087 https://bugs.webkit.org/show_bug.cgi?id=125273
1088 http://trac.webkit.org/changeset/176106
1090 2014-11-13 Eric Carlson <eric.carlson@apple.com>
1092 Context menus should not offer the "Download video" option for videos that cannot
1094 https://bugs.webkit.org/show_bug.cgi?id=138530
1096 rdar://problem/18919130
1098 Reviewed by Tim Horton.
1100 * html/HTMLMediaElement.cpp:
1101 (WebCore::HTMLMediaElement::parseAttribute):
1102 * html/HTMLMediaElement.h:
1103 * page/ContextMenuController.cpp:
1104 (WebCore::ContextMenuController::populate):
1105 * platform/graphics/MediaPlayer.cpp:
1106 (WebCore::MediaPlayer::canSaveMediaData):
1107 (WebCore::MediaPlayer::supportsSave): Deleted.
1108 * platform/graphics/MediaPlayer.h:
1109 * platform/graphics/MediaPlayerPrivate.h:
1110 (WebCore::MediaPlayerPrivateInterface::supportsFullscreen):
1111 (WebCore::MediaPlayerPrivateInterface::canSaveMediaData):
1112 (WebCore::MediaPlayerPrivateInterface::supportsSave): Deleted.
1113 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1114 (WebCore::MediaPlayerPrivateAVFoundation::resolvedURL):
1115 (WebCore::MediaPlayerPrivateAVFoundation::canSaveMediaData):
1116 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1117 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1118 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1119 (WebCore::MediaPlayerPrivateAVFoundationObjC::resolvedURL):
1120 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1121 (WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData):
1122 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1123 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1124 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1125 (WebCore::MediaPlayerPrivateQTKit::canSaveMediaData):
1126 * rendering/HitTestResult.cpp:
1127 (WebCore::HitTestResult::isDownloadableMedia):
1129 2014-11-02 Tim Horton <timothy_horton@apple.com>
1131 [mac] Keep around more decoded image data, since it's purgeable
1132 <https://webkit.org/b/125273>
1133 <rdar://problem/13205438>
1135 Reviewed by Simon Fraser and Andreas Kling.
1137 No new tests, just an optimization.
1139 Instead of throwing away decoded image data eagerly, allow the operating
1140 system to manage the memory via the standard purgeability mechanism,
1143 This improves the performance on some pathological cases (extremely large
1144 animated GIFs) by up to 8x.
1146 * loader/cache/MemoryCache.cpp:
1147 (WebCore::MemoryCache::pruneLiveResourcesToSize):
1148 Don't prune live resources' decoded data if it is purgeable.
1150 * platform/graphics/BitmapImage.cpp:
1151 (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
1152 Don't eagerly throw away decoded image data if it's purgeable.
1154 * loader/cache/CachedImage.h:
1155 * loader/cache/CachedResource.h:
1156 (WebCore::CachedResource::decodedDataIsPurgeable):
1157 * platform/graphics/BitmapImage.h:
1158 * platform/graphics/Image.h:
1159 (WebCore::Image::decodedDataIsPurgeable):
1161 2014-11-13 Daniel Bates <dabates@apple.com>
1163 [iOS] NSGeometry data types are not available in the public SDK
1164 https://bugs.webkit.org/show_bug.cgi?id=137536
1166 Reviewed by David Kilzer.
1168 Towards building iOS WebKit with the public iOS SDK, define NSGeometry
1169 data types and functions in terms of CGGeometry data types and functions
1170 because the former is SPI on iOS.
1172 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Include
1173 header WAKAppKitStubs.h when building for iOS. Otherwise, include header NSGeometry.h.
1174 * platform/graphics/ca/mac/PlatformCALayerMac.mm: Remove import of private header NSGeometry.h.
1175 We will use the NSGeometry data types defined in WAKAppKitStubs.h, which is implicitly imported
1176 by header WAKWindow.h.
1177 * platform/graphics/mac/MediaPlayerProxy.h: Substitute WAKAppKitStubs.h for NSGeometry.h.
1178 * platform/ios/PlatformEventFactoryIOS.mm: Ditto. Also fix up style issues with #import directives.
1179 * platform/ios/WebEvent.mm: Ditto.
1180 * platform/ios/wak/WAKAppKitStubs.h: Define typedefs and macros that map NSGeometry data types
1181 and functions to the analogous CGGeometry data types and functions. Also, remove #ifdef __OBJC__-
1182 guard as the existing content in WAKAppKitStubs.h assumes that this file will only be included
1183 in an Objective-C/Objective-C++ file.
1184 * platform/ios/wak/WAKView.h: Import header WAKAppKitStubs.h instead of defining macros for some
1185 NSGeometry data types.
1187 2014-11-13 Simon Fraser <simon.fraser@apple.com>
1189 [WK2] Fire a layout milestone on session restore based on render tree size
1190 https://bugs.webkit.org/show_bug.cgi?id=138711
1191 rdar://problem/16033854
1193 Reviewed by Anders Carlsson.
1195 New layout milestone for session restore based on render tree size. Only used
1198 * page/LayoutMilestones.h:
1200 2014-11-13 Dan Bernstein <mitz@apple.com>
1202 Policy client not called for navigations through the page cache
1203 https://bugs.webkit.org/show_bug.cgi?id=138703
1205 Reviewed by Alexey Proskuryakov.
1207 Test added to TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm.
1209 * loader/FrameLoader.cpp:
1210 (WebCore::FrameLoader::loadDifferentDocumentItem): When using a cached page, which already
1211 has a document loader, set the document loader’s triggering action (so that the policy
1212 client sees that this is a back/forward navigation) and clear its last checked request (so
1213 that the policy client gets called).
1215 2014-11-13 Joanmarie Diggs <jdiggs@igalia.com>
1217 AX: [ATK] Do not return ATK_ROLE_UNKNOWN for null or otherwise invalid accessible objects
1218 https://bugs.webkit.org/show_bug.cgi?id=137867
1220 Reviewed by Chris Fleizach.
1222 Return ATK_ROLE_INVALID for null or otherwise invalid accessible objects.
1224 Test: platform/gtk/accessibility/detached-object-role.html
1226 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1227 (webkitAccessibleGetRole):
1229 2014-11-13 Eric Carlson <eric.carlson@apple.com>
1231 [iOS] update optimized fullscreen media controls artwork
1232 https://bugs.webkit.org/show_bug.cgi?id=138705
1234 Reviewed by Dean Jackson.
1236 * Modules/mediacontrols/MediaControlsHost.cpp:
1237 (WebCore::MediaControlsHost::mediaUIImageData): Remove one button.
1238 * Modules/mediacontrols/MediaControlsHost.idl:
1240 * Modules/mediacontrols/mediaControlsApple.js:
1241 (Controller.prototype.controlsAreHidden): Add parentheses to fix the logic.
1243 * Modules/mediacontrols/mediaControlsiOS.js:
1244 (ControllerIOS.prototype.shouldHaveStartPlaybackButton): The big play button should not be
1245 visible during playback.
1246 (ControllerIOS.prototype.createControls): No longer necessary to insert style dynamically,
1247 (ControllerIOS.prototype.setPlaying): Call the base class first so "isPlaying" is set before
1248 calling updateControls, which calls shouldHaveStartPlaybackButton.
1250 * platform/ios/WebCoreSystemInterfaceIOS.h: Update constants.
1252 * rendering/RenderThemeIOS.mm:
1253 (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Add button style to the media controls sheet.
1255 2014-11-13 Benjamin Poulain <bpoulain@apple.com>
1257 Implement the matching for :nth-last-child(An+B of selector-list)
1258 https://bugs.webkit.org/show_bug.cgi?id=138650
1260 Reviewed by Andreas Kling.
1262 Matching is trivial based on the existing CSS4 infrastructure.
1264 The tricky part is style invalidation. In the cases of the old :nth-last-child()
1265 and :nth-last-of-type(), we were using the flag ChildrenAffectedByBackwardPositionalRules.
1267 The problem with ChildrenAffectedByBackwardPositionalRules is that it only invalidate
1268 subtrees when nodes are being added or removed. It is a valuable optimization by itself
1269 since tree updates are less common than property updates.
1271 For the case of property updates, I have added the new flag "ChildrenAffectedByPropertyBasedBackwardPositionalRules".
1272 It pretty much work the same way but invalidates subtree on style recalc.
1274 Tests: fast/css/nth-child-and-nth-last-child.html
1275 fast/css/nth-last-child-of-classname.html
1276 fast/css/nth-last-child-of-complex-selector.html
1277 fast/css/nth-last-child-of-compound-selector.html
1278 fast/css/nth-last-child-of-style-sharing-1.html
1279 fast/css/nth-last-child-of-style-sharing-2.html
1280 fast/css/nth-last-child-of-style-update-optimization.html
1281 fast/css/nth-last-child-of-tagname.html
1282 fast/selectors/nth-last-child-of-class-style-update.html
1284 * css/SelectorChecker.cpp:
1285 (WebCore::SelectorChecker::checkOne):
1287 (WebCore::Element::setChildrenAffectedByPropertyBasedBackwardPositionalRules):
1288 (WebCore::Element::hasFlagsSetDuringStylingOfChildren):
1289 (WebCore::Element::rareDataChildrenAffectedByPropertyBasedBackwardPositionalRules):
1291 (WebCore::Element::childrenAffectedByPropertyBasedBackwardPositionalRules):
1292 * dom/ElementRareData.h:
1293 (WebCore::ElementRareData::childrenAffectedByPropertyBasedBackwardPositionalRules):
1294 (WebCore::ElementRareData::setChildrenAffectedByPropertyBasedBackwardPositionalRules):
1295 (WebCore::ElementRareData::ElementRareData):
1296 (WebCore::ElementRareData::resetDynamicRestyleObservations):
1298 (WebCore::Node::updateAncestorsForStyleRecalc):
1299 (WebCore::Node::setNeedsStyleRecalc):
1300 (WebCore::markAncestorsWithChildNeedsStyleRecalc): Deleted.
1302 Unlike the other marking steps, ChildrenAffectedByPropertyBasedBackwardPositionalRules can only really
1303 affect one level (because we don't have a parent-selectors). It is quite easy to mark large
1304 trees with ChildrenAffectedByPropertyBasedBackwardPositionalRules by using a selector list that is a bit
1305 too generic. When that happen, we must be careful not invalidating everything, just the affected subtree.
1307 2014-11-12 Jon Honeycutt <jhoneycutt@apple.com>
1309 REGRESSION (r172826): Password field placeholder text is missing if
1310 placeholder attribute precedes type attribute
1312 <https://bugs.webkit.org/show_bug.cgi?id=138682>
1313 <rdar://problem/18574213>
1315 When the placeholder attribute is encountered, a shadow tree is created
1316 to include the placeholder element. When the type attribute is
1317 encountered, the previous shadow tree is destroyed, and a new shadow
1318 tree is created. TextFieldInputType::createShadowSubtree() did not
1319 handle creating the placeholder element.
1321 This regressed in r172826 because prior to r172826, the placeholder
1322 element would be recreated when
1323 HTMLTextFormControlElement::updatePlaceholderVisibility() was called.
1324 In r172826, updatePlaceholderVisibility() was changed to only show or
1325 hide the placeholder element if it exists.
1327 Reviewed by Benjamin Poulain.
1329 * html/TextFieldInputType.cpp:
1330 (WebCore::TextFieldInputType::createShadowSubtree):
1331 Call updatePlaceholderVisibility() to insert the placeholder element
1332 (after the inner text element has been inserted, as it appears before
1333 it in the shadow DOM).
1335 2014-11-13 Joanmarie Diggs <jdiggs@igalia.com>
1337 AX: [ATK] Accessible focus events are emitted when the selection is changed in non-focused combo boxes
1338 https://bugs.webkit.org/show_bug.cgi?id=137866
1340 Reviewed by Mario Sanchez Prada.
1342 Check that the AccessibilityMenuList is really focused before notifying
1343 the platform that it is focused. Likewise, only notify the platform of
1344 an AccessibilityMenuListOption focus gain if the AccessibilityMenuList
1345 containing that option is expanded.
1347 Test: platform/gtk/accessibility/menu-list-unfocused-notifications.html
1349 * accessibility/atk/AXObjectCacheAtk.cpp:
1350 (WebCore::notifyChildrenSelectionChange):
1351 (WebCore::AXObjectCache::postPlatformNotification):
1353 2014-11-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1355 [EFL] Unexpected crashes in layout test after r175953
1356 https://bugs.webkit.org/show_bug.cgi?id=138652
1358 Reviewed by Csaba Osztrogonác.
1360 In r175953, it set reusableNodeIndex value with m_partCache's size(). It causes
1361 out of bound index crash because the reusableNodeIndex is Vector object.
1363 No new test. This patch is to fix broken tests related to widgets on EFL port.
1365 * platform/efl/RenderThemeEfl.cpp:
1366 (WebCore::RenderThemeEfl::getThemePartFromCache): Need to set reusableNodeIndex with "size() - 1".
1368 2014-11-13 Chris Dumez <cdumez@apple.com>
1370 Lazily create HTMLInputElement's inputType and shadow subtree
1371 https://bugs.webkit.org/show_bug.cgi?id=138524
1373 Reviewed by Ryosuke Niwa.
1375 When an HTMLInputElement was created by the parser, we would first call
1376 HTMLInputElement::create(), then call Element::parserSetAttributes() on
1377 the constructed input. With the previous implementation, this was a bit
1378 inefficient because HTMLInputElement::create() would construct a
1379 TextInputType inputType (as this is the default) as well as its
1380 corresponding shadow subtree. Then, parserSetAttributes() would often
1381 set the |type| attribute and would need to destroy this input type as
1382 well as its subtree if the new |type| is not 'text', to create a new
1383 inputType / shadow subtree of the right type. The profiler showed that
1384 this was fairly expensive.
1386 To improve this, this patch delays the inputType / shadow subtree
1387 creation when the HTMLInputElement is constructed by the parser, until
1388 the attributes are actually set by the parser. This way, we directly
1389 create an inputType / shadow subtree of the right type.
1391 I see a 1.4% speed up on speedometer (73.95 -> 75.0).
1393 Test: fast/dom/HTMLInputElement/border-attribute-crash.html
1396 (WebCore::Element::parserSetAttributes):
1397 (WebCore::Element::parserDidSetAttributes):
1399 * html/HTMLInputElement.cpp:
1400 (WebCore::HTMLInputElement::HTMLInputElement):
1401 (WebCore::HTMLInputElement::create):
1402 (WebCore::HTMLInputElement::updateType):
1403 (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
1404 (WebCore::HTMLInputElement::initializeInputType):
1405 (WebCore::HTMLInputElement::parseAttribute):
1406 (WebCore::HTMLInputElement::parserDidSetAttributes):
1407 (WebCore::HTMLInputElement::finishParsingChildren):
1408 * html/HTMLInputElement.h:
1410 2014-11-12 Chris Dumez <cdumez@apple.com>
1412 Have DOMTimer deal with more ScriptExecutionContext references
1413 https://bugs.webkit.org/show_bug.cgi?id=138679
1415 Reviewed by Andreas Kling.
1417 Have DOMTimer deal with more ScriptExecutionContext references instead
1418 of pointers, to make it clear the script execution context cannot be
1421 No new tests, no behavior change.
1423 * bindings/js/ScheduledAction.cpp:
1424 (WebCore::ScheduledAction::execute):
1425 (WebCore::ScheduledAction::executeFunctionInContext):
1426 * bindings/js/ScheduledAction.h:
1427 * dom/DocumentEventQueue.cpp:
1428 * page/DOMTimer.cpp:
1429 (WebCore::DOMTimerFireState::DOMTimerFireState):
1430 (WebCore::NestedTimersMap::instanceForContext):
1431 (WebCore::DOMTimer::DOMTimer):
1432 (WebCore::DOMTimer::install):
1433 (WebCore::DOMTimer::removeById):
1434 (WebCore::DOMTimer::fired):
1436 * page/DOMWindow.cpp:
1437 (WebCore::DOMWindow::setTimeout):
1438 (WebCore::DOMWindow::clearTimeout):
1439 (WebCore::DOMWindow::setInterval):
1440 (WebCore::DOMWindow::clearInterval):
1441 * page/SuspendableTimer.cpp:
1442 (WebCore::SuspendableTimer::SuspendableTimer):
1443 * page/SuspendableTimer.h:
1444 * workers/WorkerGlobalScope.cpp:
1445 (WebCore::WorkerGlobalScope::setTimeout):
1446 (WebCore::WorkerGlobalScope::clearTimeout):
1447 (WebCore::WorkerGlobalScope::setInterval):
1448 (WebCore::WorkerGlobalScope::clearInterval):
1450 2014-11-12 Dean Jackson <dino@apple.com>
1452 Support unprefixed animation property names
1453 https://bugs.webkit.org/show_bug.cgi?id=138678
1454 <rdar://problem/18943059>
1456 Reviewed by Simon Fraser.
1458 Step 1 of 3 in unprefixing CSS animations: handling the
1459 property names and values.
1461 Unlike other unprefixing, where we use an alias that
1462 effectively removes the prefixed values from the code,
1463 for animations we need to keep the old values around so that
1464 existing content will not break (e.g. computed style).
1466 During testing I noticed that we didn't handle the
1467 (relatively) new animation-direction values of
1468 "reverse" and "alternate-reverse" when querying
1471 Tests: animations/unprefixed-properties.html
1472 animations/unprefixed-shorthand.html
1474 * css/CSSComputedStyleDeclaration.cpp:
1475 (WebCore::ComputedStyleExtractor::propertyValue): Handle the unprefixed
1476 values, but also get animation direction to produce the correct
1477 results when "reverse" and "alternate-reverse" is specified.
1479 * css/CSSParser.cpp: Handle the new values. If necessary, pass a flag
1480 around indicating whether it is prefixed or unprefixed.
1481 (WebCore::CSSParser::parseValue):
1482 (WebCore::CSSParser::parseAnimationShorthand): Use the flag to decide
1483 which of the forms we're going to check.
1484 (WebCore::CSSParser::parseAnimationProperty):
1487 * css/CSSProperty.h:
1488 (WebCore::prefixingVariantForPropertyId): Add prefixing/unprefixing variants for
1489 all the animation values, and clean up the code a bit.
1491 * css/CSSPropertyNames.in: Add new properties.
1493 * css/DeprecatedStyleBuilder.cpp:
1494 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): We need handlers for the
1495 unprefixed forms. This should move to the new StyleBuilder soon.
1497 * css/StyleProperties.cpp: Handle new values.
1498 (WebCore::StyleProperties::getPropertyValue):
1499 (WebCore::StyleProperties::asText):
1501 * css/StylePropertyShorthand.cpp:
1502 (WebCore::animationShorthand):
1503 (WebCore::animationShorthandForParsing): Decide which list of properties to use.
1504 (WebCore::shorthandForProperty):
1505 (WebCore::matchingShorthandsForLonghand):
1506 (WebCore::webkitAnimationShorthandForParsing): Deleted.
1507 * css/StylePropertyShorthand.h:
1509 * css/StyleResolver.cpp: Since the new properties come before "background" in
1510 alphabetical order, they are earlier in the CSSPropertyNames.in file, and thus
1511 we need to update the call sites that think CSSPropertyBackground is the first
1513 (WebCore::StyleResolver::styleForKeyframe): Replace CSSPropertyBackground with CSSPropertyAnimation.
1514 (WebCore::StyleResolver::styleForPage):
1515 (WebCore::StyleResolver::applyMatchedProperties):
1516 (WebCore::StyleResolver::applyProperty):
1518 2014-11-12 Beth Dakin <bdakin@apple.com>
1520 Speculative build fix.
1524 2014-11-12 Timothy Horton <timothy_horton@apple.com>
1528 * platform/spi/mac/DataDetectorsSPI.h:
1529 It's likely that more of this file should be compiled out on iOS,
1530 but this is all we need to build.
1532 2014-11-12 Beth Dakin <bdakin@apple.com>
1534 WK1: Support default actions for images
1535 https://bugs.webkit.org/show_bug.cgi?id=138668
1537 rdar://problem/18785434
1539 Reviewed by Tim Horton.
1541 Symbol needed for copying image.
1544 2014-11-05 Ada Chan <adachan@apple.com>
1546 Implement new plug-in API for muting plug-ins
1547 https://bugs.webkit.org/show_bug.cgi?id=138105
1549 Reviewed by Anders Carlsson.
1551 Add the new NPNVmuteAudioBool NPNVariable.
1553 Test: platform/mac-wk2/plugins/muted-state.html
1557 2014-11-12 Tim Horton <timothy_horton@apple.com>
1559 Need to show the text indicator when Data Detectors shows a popover
1560 https://bugs.webkit.org/show_bug.cgi?id=138664
1561 <rdar://problem/18869900>
1563 Reviewed by Beth Dakin.
1565 * platform/spi/mac/DataDetectorsSPI.h:
1566 Add new DataDetectors SPI.
1568 2014-11-12 Chris Dumez <cdumez@apple.com>
1570 Minor improvements to RenderListItem
1571 https://bugs.webkit.org/show_bug.cgi?id=138601
1573 Reviewed by Darin Adler.
1575 Make several minor improvements to RenderListItem and clean up the
1578 No new tests, no behavior change.
1580 * rendering/RenderListItem.cpp:
1581 (WebCore::isHTMLListElement):
1582 - Rename isList to isHTMLListElement() for clarity as it checks
1583 for HTMLOListElement and HTMLUListElement types
1584 - Inline the function as it is short.
1585 - Use is<HTML*Element>() for type checking
1586 - Update the argument to take a Node& instead of an Element*. This
1587 is because the argument is expected to the non-null. Also using
1588 looser typing here allows us to use this utility function is one
1589 more place, without impacting performance as
1590 hasTagName(HTMLQualifiedName) is defined on Node.
1592 (WebCore::enclosingList):
1593 - Pass the argument as a reference instead of a pointer as it is
1594 expected to be non-null.
1595 - Initialize firstNode before the loop to avoid the if (!firstNode)
1596 check for every iteration.
1598 (WebCore::nextListItem):
1599 - Take an Element as second argument instead of a RenderListItem*
1600 and provide convenience overloads so that we don't need to do
1601 null checks just because some calls sites call this function
1602 with 2 arguments and others with 1 argument. This way, we avoid
1603 unnecessary null checks as most call sites already do such
1604 checks (or have references).
1605 - Transform the while loop into a for loop for clarity.
1606 - Don't traverse an Element's subtree if the Element does not have
1607 a renderer as it is impossible of any of its descendant to have
1608 a renderer (and we are looking for a specific type of renderer).
1610 (WebCore::previousListItem):
1611 - Pass the item argument as a reference instead of a pointer as it
1612 is expected to be non-null.
1613 - Reduce the scope of the |current| so that it is now declared
1616 (WebCore::RenderListItem::updateItemValuesForOrderedList):
1617 (WebCore::RenderListItem::itemCountForOrderedList):
1618 - Pass argument as a reference instead of a pointer as it was expected
1619 to be non-null (There was an assertion in place to make sure of it).
1621 (WebCore::RenderListItem::calcValue):
1622 - Use is<HTMLOListElement>() instead of hasTagName().
1624 (WebCore::getParentOfFirstLineBox):
1625 - Rename variables to stop using abbreviations.
1626 - Pass arguments as references instead of pointers as they are expected
1628 - Remove the firstChild null check before the loop as it does not
1629 change behavior. The loop will abort early if firstChild is null
1630 and we will end up returning nullptr as well.
1631 - Use is<>() more for type checking.
1632 - Reuse the isHTMLListElement() utility function instead of duplicating
1633 its code inside this function.
1635 (WebCore::firstNonMarkerChild):
1636 - Pass argument as a reference as it is expected to be non-null.
1637 - Rename variable from result to child for clarity, as we are traversing
1640 (WebCore::RenderListItem::markerTextWithSuffix):
1641 - Use String appending instead of StringBuilder as it simplifies the
1642 code a lot and should not impact performance in this case.
1644 (WebCore::RenderListItem::explicitValueChanged):
1645 - Restructure the code a bit to do the |listNode| null check before the
1646 loop, now that nextListItem() takes a reference in argument. This is
1647 the only call site where we didn't already know that listNode is
1650 (WebCore::previousOrNextItem):
1651 - Mark this function as inline as it is short and called repeatedly.
1653 2014-11-12 Chris Dumez <cdumez@apple.com>
1655 Speed up HTMLTextFormControlElement::setInnerTextValue() a bit
1656 https://bugs.webkit.org/show_bug.cgi?id=138619
1658 Reviewed by Darin Adler.
1660 Speed up HTMLTextFormControlElement::setInnerTextValue() a bit by:
1661 - Not doing a virtual isTextFormControl() call. Relying on innerTextElement()
1662 not returning null is sufficient.
1663 - Caching the result of innerTextElement() instead of repeatedly calling that
1665 - De-virtualizing setFormControlValueMatchesRenderer() /
1666 formControlValueMatchesRenderer() as these are never overridden.
1667 - Moving the code constructing the innerTextValue from a
1668 TextControlInnerTextElement from innerTextValue() to a new
1669 innerTextValueFrom(TextControlInnerTextElement&) function and call this new
1670 function from setInnerTextValue() to avoid calling innerTextElement() again
1671 and making sure it is non-null
1672 - Do the tree traversal from innerTextElement's firstChild instead of from
1673 innerTextElement. The innerTextElement is a TextControlInnerTextElement.
1674 Therefore, it cannot be an HTMLBRElement or a Text node.
1676 No new tests, no behavior change.
1678 * html/HTMLFormControlElement.h:
1679 (WebCore::HTMLFormControlElement::formControlValueMatchesRenderer):
1680 (WebCore::HTMLFormControlElement::setFormControlValueMatchesRenderer):
1681 * html/HTMLTextFormControlElement.cpp:
1682 (WebCore::stripTrailingNewline):
1683 (WebCore::innerTextValueFrom):
1684 (WebCore::HTMLTextFormControlElement::setInnerTextValue):
1685 (WebCore::HTMLTextFormControlElement::innerTextValue):
1686 (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
1687 (WebCore::finishText): Deleted.
1689 2014-11-12 Jer Noble <jer.noble@apple.com>
1691 [Mac] media/track/audio-track.html is flakey
1692 https://bugs.webkit.org/show_bug.cgi?id=138394
1694 Reviewed by Alexey Proskuryakov.
1696 The above test fails if the HTMLMediaElement's "canplaythrough" event fires before the AudioTrackList's
1697 "addtrack" event fires. This can happen because each object keeps its own GenericEventQueue, which
1698 empties when that individual queue's timer fires. So events can be enqueued in the following order:
1699 1, A, 2, B, 3, C; but fired in a different order: 1, 2, 3, A, B, C.
1701 Make events enqueued in GenericEventQueues globally ordered, so that events are fired in the order
1702 which they are enqueued, regardless of which object owns the queue. Use a static queue of
1703 GenericEventQueues to manage which GenericEventQueue fires and in what order.
1705 GenericEventQueues will use a WeakPtrFactory to cancel pending events. Revoking a GenericEventQueue's
1706 weak pointers means those queue's entries will be skipped the next time the meta-queue is processed.
1708 * dom/GenericEventQueue.cpp:
1709 (WebCore::GenericEventQueue::GenericEventQueue): Create a WeakPtrFactory instead of a Timer.
1710 (WebCore::GenericEventQueue::enqueueEvent): Enqueue this queue with the MetaQueue.
1711 (WebCore::GenericEventQueue::sharedTimer): Lazily-initializing accessor.
1712 (WebCore::GenericEventQueue::sharedTimerFired): Ask each queue to dispatch one event.
1713 (WebCore::GenericEventQueue::pendingQueues): Lazily-initializing accessor.
1714 (WebCore::GenericEventQueue::dispatchOneEvent): Renamed from timerFired.
1715 (WebCore::GenericEventQueue::close): Revoke all WeakPtrs.
1716 (WebCore::GenericEventQueue::cancelAllEvents): Ditto.
1717 (WebCore::GenericEventQueue::hasPendingEvents): Use !isEmpty().
1718 (WebCore::GenericEventQueue::timerFired): Deleted.
1719 * dom/GenericEventQueue.h:
1721 2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
1723 [GTK] Expose user script messages to GObject DOM bindings
1724 https://bugs.webkit.org/show_bug.cgi?id=138411
1726 Reviewed by Philippe Normand.
1728 * PlatformGTK.cmake: Add WebKitDOMCustomUnstable.h to the list of
1729 installed headers and make a symlink for it in the DerivedSources dir.
1730 * bindings/gobject/WebKitDOMCustomUnstable.h: Added.
1731 * bindings/gobject/WebKitDOMCustom.cpp:
1732 (webkit_dom_dom_window_get_webkit_namespace):
1733 (webkit_dom_user_message_handlers_namespace_get_handler):
1734 * bindings/scripts/CodeGeneratorGObject.pm:
1735 (HasUnstableCustomAPI): Helper function to check if the given
1736 class has custom unstable API.
1737 (WriteData): Include WebKitDOMCustomUnstable.h header if the class
1738 has API defined there.
1740 2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
1742 [GTK] Fix how SerializedScriptValue is exposed to GObject DOM bindings
1743 https://bugs.webkit.org/show_bug.cgi?id=138409
1745 Reviewed by Philippe Normand.
1747 It's currently exposed as a WebKitDOMSerializedScriptValue class
1748 that doesn't really exist. It should be handled as a string, that
1749 is used to create a SerializedScriptValue when coming from the
1750 API, and converted to a string again when returned to the API.
1752 * bindings/scripts/CodeGeneratorGObject.pm:
1753 (GetGlibTypeName): Return gchar* as glib type of SerializedScriptValue.
1754 (IsGDOMClassType): Don't consider SerializedScriptValue as a GDOM class.
1755 (GenerateFunction): Handle SerializedScriptValue parameters and
1756 return values specially.
1757 * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1758 (webkit_dom_test_callback_callback_with_serialized_script_value_param):
1759 * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
1760 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1761 (webkit_dom_test_obj_serialized_value):
1762 * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1763 * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1764 (webkit_dom_test_serialized_script_value_interface_class_init):
1765 (webkit_dom_test_serialized_script_value_interface_get_value):
1766 (webkit_dom_test_serialized_script_value_interface_set_value):
1767 (webkit_dom_test_serialized_script_value_interface_get_readonly_value):
1768 (webkit_dom_test_serialized_script_value_interface_get_cached_value):
1769 (webkit_dom_test_serialized_script_value_interface_set_cached_value):
1770 (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
1771 * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
1772 * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
1773 (webkit_dom_test_typedefs_class_init):
1774 (webkit_dom_test_typedefs_get_immutable_serialized_script_value):
1775 (webkit_dom_test_typedefs_set_immutable_serialized_script_value):
1776 * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
1778 2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>
1780 [GTK] Move RedirectedXCompositeWindow from platform to WebKit2 layer
1781 https://bugs.webkit.org/show_bug.cgi?id=138093
1783 Reviewed by Martin Robinson.
1785 Remove RedirectedXCompositeWindow.
1787 * PlatformGTK.cmake:
1789 2014-09-01 Philippe Normand <pnormand@igalia.com>
1791 [WK2] UserMediaClient support
1792 https://bugs.webkit.org/show_bug.cgi?id=123158
1794 Reviewed by Benjamin Poulain.
1796 Added document and frame accessors, needed by the
1797 UserMediaRequestManager of the WebProcess. Also added two methods
1798 used by the permission request manager to know if access to audio
1799 or video devices is requested.
1801 Tests: fast/mediastream/error.html
1802 fast/mediastream/success.html
1803 fast/mediastream/delayed-permission-allowed.html
1804 fast/mediastream/delayed-permission-denied.html
1805 http/tests/media/media-stream/disconnected-frame-already.html
1806 http/tests/media/media-stream/disconnected-frame-permission-denied.html
1807 http/tests/media/media-stream/disconnected-frame.html
1809 * Modules/mediastream/UserMediaRequest.cpp:
1810 (WebCore::UserMediaRequest::document):
1811 (WebCore::UserMediaRequest::frame):
1812 * Modules/mediastream/UserMediaRequest.h:
1813 (WebCore::UserMediaRequest::requiresAudio):
1814 (WebCore::UserMediaRequest::requiresVideo):
1816 2014-11-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1818 [EFL] Clean up OwnPtr in RenderThemeEfl
1819 https://bugs.webkit.org/show_bug.cgi?id=138642
1821 Reviewed by Zoltan Herczeg.
1823 No new tests, no behavior change.
1825 * platform/efl/RenderThemeEfl.cpp:
1826 (WebCore::RenderThemeEfl::applyEdjeRTLState): Clean up all remaining OwnPtr.
1828 2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1830 Move Modules/websockets to std::unique_ptr
1831 https://bugs.webkit.org/show_bug.cgi?id=138649
1833 Reviewed by Chris Dumez.
1835 Remove create() factory function and use std::make_unique<>, std::unique_ptr<>
1836 instead of OwnPtr, PassOwnPtr.
1837 However didReceiveBinaryData() is still using PassOwnPtr. It should be replaced
1838 with std::unique_ptr<>
1840 No new tests, no behavior.
1842 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
1843 * Modules/websockets/WebSocket.cpp:
1844 * Modules/websockets/WebSocketChannel.cpp:
1845 (WebCore::WebSocketChannel::connect):
1846 (WebCore::WebSocketChannel::didFail):
1847 (WebCore::WebSocketChannel::processFrame):
1848 (WebCore::WebSocketChannel::enqueueTextFrame):
1849 (WebCore::WebSocketChannel::enqueueRawFrame):
1850 (WebCore::WebSocketChannel::enqueueBlobFrame):
1851 (WebCore::WebSocketChannel::processOutgoingFrameQueue):
1852 (WebCore::WebSocketChannel::sendFrame):
1853 * Modules/websockets/WebSocketChannel.h:
1854 * Modules/websockets/WebSocketDeflateFramer.cpp:
1855 (WebCore::WebSocketDeflateFramer::createExtensionProcessor):
1856 (WebCore::WebSocketDeflateFramer::enableDeflate):
1857 (WebCore::WebSocketDeflateFramer::deflate):
1858 (WebCore::WebSocketDeflateFramer::inflate):
1859 (WebCore::WebSocketExtensionDeflateFrame::create): Deleted.
1860 * Modules/websockets/WebSocketDeflateFramer.h:
1861 (WebCore::DeflateResultHolder::create): Deleted.
1862 (WebCore::InflateResultHolder::create): Deleted.
1863 * Modules/websockets/WebSocketDeflater.cpp:
1864 (WebCore::WebSocketDeflater::WebSocketDeflater):
1865 (WebCore::WebSocketInflater::WebSocketInflater):
1866 (WebCore::WebSocketDeflater::create): Deleted.
1867 (WebCore::WebSocketInflater::create): Deleted.
1868 * Modules/websockets/WebSocketDeflater.h:
1869 * Modules/websockets/WebSocketExtensionDispatcher.cpp:
1870 (WebCore::WebSocketExtensionDispatcher::addProcessor):
1871 * Modules/websockets/WebSocketExtensionDispatcher.h:
1872 * Modules/websockets/WebSocketHandshake.cpp:
1873 (WebCore::WebSocketHandshake::addExtensionProcessor):
1874 * Modules/websockets/WebSocketHandshake.h:
1876 2014-11-11 Chris Dumez <cdumez@apple.com>
1878 Unreviewed iOS build fix after r176001.
1880 Export an additional symbol.
1884 2014-11-11 Jer Noble <jer.noble@apple.com>
1886 [Mac] Add diagnostic logging for per-media-engine load failures
1887 https://bugs.webkit.org/show_bug.cgi?id=138647
1889 Reviewed by Eric Carlson.
1891 Add diagnostic logging fired whenever a media engine fails to load media,
1892 even if another engine subsequentially succeeds. Add a mechanism for retrieving
1893 the platform-specific error code from a given engine.
1895 * html/HTMLMediaElement.cpp:
1896 (WebCore::HTMLMediaElement::parseAttribute):
1897 * html/HTMLMediaElement.h:
1898 * page/DiagnosticLoggingKeys.cpp:
1899 (WebCore::DiagnosticLoggingKeys::engineFailedToLoadKey):
1900 * page/DiagnosticLoggingKeys.h:
1901 * platform/graphics/MediaPlayer.cpp:
1902 (WebCore::MediaPlayer::networkStateChanged):
1903 (WebCore::MediaPlayer::platformErrorCode):
1904 * platform/graphics/MediaPlayer.h:
1905 (WebCore::MediaPlayerClient::mediaPlayerEngineFailedToLoad):
1906 * platform/graphics/MediaPlayerPrivate.h:
1907 (WebCore::MediaPlayerPrivateInterface::platformErrorCode):
1908 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1909 (WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode):
1910 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1911 (WebCore::MediaPlayerPrivateAVFoundationCF::assetErrorCode):
1912 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1913 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1914 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1915 (WebCore::MediaPlayerPrivateAVFoundationObjC::assetErrorCode):
1916 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1917 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1918 (WebCore::MediaPlayerPrivateQTKit::platformErrorCode):
1920 2014-11-11 Chris Dumez <cdumez@apple.com>
1922 Mark more virtual functions in HTMLInputElement as final
1923 https://bugs.webkit.org/show_bug.cgi?id=138644
1925 Reviewed by Andreas Kling.
1927 Mark more virtual functions in HTMLInputElement as final to help the
1928 compiler optimize better.
1930 No new tests, no behavior change.
1932 * html/HTMLInputElement.h:
1934 2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1936 Remove IncrementalSweeper::create()
1937 https://bugs.webkit.org/show_bug.cgi?id=138243
1939 Reviewed by Filip Pizlo.
1941 As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes
1942 IncrementalSweeper::create(), then set constructor of IncrementalSweeper to public.
1943 Now we begins to use std::make_unique<> to create IncrementalSweeper instance.
1945 No new tests, no behavior changes.
1947 * bindings/js/JSDOMWindowBase.cpp:
1948 (WebCore::JSDOMWindowBase::commonVM):
1949 * platform/ios/WebSafeIncrementalSweeperIOS.h:
1951 2014-11-11 Chris Dumez <cdumez@apple.com>
1953 Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties to the new StyleBuilder
1954 https://bugs.webkit.org/show_bug.cgi?id=138594
1956 Reviewed by Antti Koivisto.
1958 Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties from
1959 DeprecatedStyleBuilder to the new StyleBuilder using custom code.
1961 No new tests, no behavior change.
1963 * css/CSSPropertyNames.in:
1964 * css/DeprecatedStyleBuilder.cpp:
1965 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1966 (WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted.
1967 (WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted.
1968 (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted.
1969 (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted.
1970 (WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted.
1971 (WebCore::ApplyPropertyBorderImageModifier::createHandler): Deleted.
1972 * css/StyleBuilderCustom.h:
1973 (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInheritValue):
1974 (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInitialValue):
1975 (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyValue):
1976 (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::getValue):
1977 (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::setValue):
1979 2014-11-11 David Kilzer <ddkilzer@apple.com>
1981 Modernize $buildingForIPhone in CodeGeneratorObjC.pm
1982 <http://webkit.org/b/138640>
1984 Reviewed by Daniel Bates.
1986 Mac OS X is the only platform that supports NSColor, so rename
1987 $buildingForIPhone to $shouldUseCGColor (which is actually what
1988 the variable represents) and define it in terms of the "macosx"
1991 * bindings/scripts/CodeGeneratorObjC.pm:
1992 ($buildingForIPhone): Rename to $shouldUseCGColor.
1993 ($shouldUseCGColor): False if PLATFORM_NAME is not defined,
1994 which is the case on older Xcodes when building for Mac OS X, or
1995 if PLATFORM_NAME is equal to "macosx". True otherwise.
1996 (GetClassName): Switch to use new variable name.
1997 (AddIncludesForType): Ditto.
1998 (GenerateHeader): Remove dead code. The
1999 $buildingForTigerOrEarlier variable was accidentally
2000 re-introduced in r161638, but was originally removed in r127032!
2001 (GenerateImplementation): Switch to use new variable name.
2003 2014-11-11 Tim Horton <timothy_horton@apple.com>
2005 Add support for mailto: link action menus
2006 https://bugs.webkit.org/show_bug.cgi?id=138641
2007 <rdar://problem/18741567>
2009 Reviewed by Beth Dakin.
2014 * platform/spi/mac/DataDetectorsSPI.h:
2015 Add some DataDetectors SPI.
2017 2014-11-11 Eric Carlson <eric.carlson@apple.com>
2019 [iOS] video is sometimes allowed to play from the background
2020 https://bugs.webkit.org/show_bug.cgi?id=138522
2022 Rubber-stamped by Jer Noble.
2024 * platform/audio/MediaSession.cpp:
2025 (WebCore::MediaSession::updateClientDataBuffering): Call MediaSessionManager::sessionCanLoadMedia.
2027 2014-11-11 Eric Carlson <eric.carlson@apple.com>
2029 [iOS] a page with video in optimized fullscreen is visible
2030 https://bugs.webkit.org/show_bug.cgi?id=138632
2032 Reviewed by Anders Carlsson.
2034 * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2035 (WebCore::WebVideoFullscreenInterfaceAVKit::mode): Expose fullscreen mode.
2037 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
2039 Mountain Lion build fix
2040 https://bugs.webkit.org/show_bug.cgi?id=138631
2042 Reviewed by Simon Fraser.
2044 * platform/spi/cocoa/CoreTextSPI.h:
2046 2014-11-11 Eric Carlson <eric.carlson@apple.com>
2048 [iOS] cleanup wireless route monitoring
2049 https://bugs.webkit.org/show_bug.cgi?id=138614
2051 Reviewed by Jer Noble.
2053 * html/HTMLMediaElement.cpp:
2054 (WebCore::HTMLMediaElement::clearMediaPlayer): Add logging.
2055 (WebCore::HTMLMediaElement::removeEventListener): Ditto.
2056 (WebCore::HTMLMediaElement::createMediaPlayer): Ditto.
2058 * platform/audio/ios/MediaSessionManagerIOS.mm:
2059 (WebCore::MediaSessionManageriOS::resetRestrictions): Add logging.
2060 (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Ditto.
2061 (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Ditto.
2062 (-[WebMediaSessionHelper initWithCallback:]): Ditto.
2063 (-[WebMediaSessionHelper dealloc]): Always deallocate volume view and routing controller
2065 (-[WebMediaSessionHelper clearCallback]): Add logging.
2066 (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Ditto.
2067 (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Always call routing controller on
2069 (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Ditto.
2070 (-[WebMediaSessionHelper interruption:]): Add logging.
2071 (-[WebMediaSessionHelper applicationWillEnterForeground:]): Ditto.
2072 (-[WebMediaSessionHelper applicationDidBecomeActive:]): Ditto.
2073 (-[WebMediaSessionHelper applicationWillResignActive:]): Ditto.
2074 (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Ditto.
2076 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
2078 Unreviewd iOS build fix
2080 * platform/spi/cocoa/CoreTextSPI.h:
2082 2014-11-11 David Kilzer <ddkilzer@apple.com>
2084 Protect Document in ProcessingInstruction::setXSLStyleSheet()
2085 <http://webkit.org/b/138621>
2087 Reviewed by Andreas Kling.
2089 The patch is inspired by the following Blink revision by
2091 <https://src.chromium.org/viewvc/blink?view=rev&revision=182309>
2093 * dom/ProcessingInstruction.cpp:
2094 (WebCore::ProcessingInstruction::setXSLStyleSheet):
2096 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
2098 Finish moving CTFontGetVerticalGlyphsForCharacters and CTLineCreateWithUniCharProvider out from WKSI
2099 https://bugs.webkit.org/show_bug.cgi?id=138623
2101 Reviewed by Geoff Garen.
2103 No new tests because there is no behavior change.
2107 * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
2108 (WebCore::GlyphPage::fill):
2109 * platform/graphics/mac/SimpleFontDataMac.mm:
2110 (WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
2111 * platform/ios/WebCoreSystemInterfaceIOS.mm:
2112 * platform/mac/WebCoreSystemInterface.h:
2113 * platform/mac/WebCoreSystemInterface.mm:
2114 * platform/spi/cocoa/CoreTextSPI.h:
2116 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
2118 Unreviewed Mountain Lion build fix
2120 * platform/spi/cocoa/CoreTextSPI.h:
2122 2014-11-11 Commit Queue <commit-queue@webkit.org>
2124 Unreviewed, rolling out r175852.
2125 https://bugs.webkit.org/show_bug.cgi?id=138626
2127 Broke PLT by introducing a crash. (Requested by rniwa on
2132 "Lazily create HTMLInputElement's inputType and shadow
2134 https://bugs.webkit.org/show_bug.cgi?id=138524
2135 http://trac.webkit.org/changeset/175852
2137 2014-11-11 Chris Dumez <cdumez@apple.com>
2139 Regression(r175947): Caused assertions in debug builds
2140 https://bugs.webkit.org/show_bug.cgi?id=138620
2142 Reviewed by Benjamin Poulain.
2144 In HTMLCollection::traverseForward(), traversedCount was incremented 1
2145 time too many when hitting the end of the collection (i.e. element
2146 becomes null). Doing a partial revert.
2148 No new tests, already covered by existing tests.
2150 * html/HTMLCollection.cpp:
2151 (WebCore::HTMLCollection::traverseForward):
2153 2014-11-11 Tim Horton <timothy_horton@apple.com>
2155 DataDetectors' menu items aren't presented in the telephone number menu
2156 https://bugs.webkit.org/show_bug.cgi?id=138602
2157 <rdar://problem/18866308>
2159 Reviewed by Beth Dakin.
2161 * English.lproj/Localizable.strings:
2162 Remove a now-unused localized string.
2164 2014-11-11 Daniel Bates <dabates@apple.com>
2166 [Frame Flattening] ASSERT(transaction->view == &view()) fails in RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction()
2167 https://bugs.webkit.org/show_bug.cgi?id=138615
2168 <rdar://problem/18928487>
2170 Reviewed by David Hyatt.
2172 Fixes an issue where we always expected that the RenderView associated with the RenderBlock called in
2173 RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction() is the same as the RenderView associated with
2174 the top transaction in the UpdateScrollInfoAfterLayoutTransaction stack regardless of frame flattening. This
2175 expectation is only true when frame flattening is disabled.
2177 Test: fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update.html
2179 * rendering/RenderBlock.cpp:
2180 (WebCore::RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction):
2182 2014-11-11 Tim Horton <timothy_horton@apple.com>
2184 Adopt DDActionContext menu type SPI
2185 https://bugs.webkit.org/show_bug.cgi?id=138603
2186 <rdar://problem/18867627>
2188 Reviewed by Anders Carlsson.
2190 * platform/spi/mac/DataDetectorsSPI.h:
2193 2014-11-11 Tim Horton <timothy_horton@apple.com>
2195 Data Detectors popovers should be dismissed upon scrolling
2196 https://bugs.webkit.org/show_bug.cgi?id=138600
2197 <rdar://problem/18932770>
2199 Reviewed by Beth Dakin.
2201 * platform/spi/mac/DataDetectorsSPI.h:
2202 Adjust the SPI header.
2204 2014-11-11 Tim Horton <timothy_horton@apple.com>
2206 Localize strings for action menus
2207 https://bugs.webkit.org/show_bug.cgi?id=138591
2208 <rdar://problem/18815343>
2210 Reviewed by Dan Bates.
2212 * English.lproj/Localizable.strings:
2213 Add a bunch of localizable strings.
2215 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
2217 Cleanup from r175379
2218 https://bugs.webkit.org/show_bug.cgi?id=138616
2220 Reviewed by Simon Fraser.
2222 No new tests because there is no behavior change.
2225 * platform/ios/WebCoreSystemInterfaceIOS.mm:
2226 * platform/mac/WebCoreSystemInterface.h:
2227 * platform/mac/WebCoreSystemInterface.mm:
2229 2014-11-11 Myles C. Maxfield <mmaxfield@apple.com>
2231 Move CTFontTransformGlyphs out from WKSI
2232 https://bugs.webkit.org/show_bug.cgi?id=138599
2234 Reviewed by Simon Fraser.
2236 No new tests because there is no behavior change.
2240 * platform/graphics/SimpleFontData.cpp:
2241 (WebCore::SimpleFontData::applyTransforms):
2242 * platform/graphics/SimpleFontData.h:
2243 * platform/ios/WebCoreSystemInterfaceIOS.mm:
2244 * platform/mac/WebCoreSystemInterface.h:
2245 * platform/mac/WebCoreSystemInterface.mm:
2246 * platform/spi/cocoa/CoreTextSPI.h:
2248 2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2250 Use std::unique_ptr<>|std::make_unique_ptr in RenderThemeEfl::ThemePartCacheEntry::create()
2251 https://bugs.webkit.org/show_bug.cgi?id=138558
2253 Reviewed by Anders Carlsson.
2255 This patch removes PassOwnPtr and OwnPtr in RenderThemeEfl::ThemePartCacheEntry::create().
2256 It would be good if we also remove create() factory function though, in this case, it is
2257 a little hard to remove it since the create() factory function does many works to create
2258 a ThemePartCacheEntry instance. Thus this patch just replaces PassOwnPtr|OwnPtr with
2259 std::unique_ptr<> and std::make_unique<> in RenderThemeEfl::ThemePartCacheEntry::create().
2261 Besides the theme entries have been maintained by Eina_List*. Unfortunately it doesn't support
2262 std::unique_ptr<> yet. Thus the Eina_List* should be replaced with Vector<std::unique_ptr<>>
2263 so that m_partCache has ownship of all EFL theme entries. This patch tries to keep original
2264 cache algorithm based on Vector class.
2266 No new tests, no behavior changes.
2268 * platform/efl/RenderThemeEfl.cpp:
2269 (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
2270 (WebCore::RenderThemeEfl::getThemePartFromCache):
2271 * platform/efl/RenderThemeEfl.h:
2273 2014-11-09 Darin Adler <darin@apple.com>
2275 Minor tweaks to HTMLCollection
2276 https://bugs.webkit.org/show_bug.cgi?id=138556
2278 Reviewed by Chris Dumez.
2280 * accessibility/AccessibilityRenderObject.cpp:
2281 (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
2282 Update for namedElements function that now returns a Vector; also use
2283 a new style for loop to iterate it.
2285 * bindings/js/JSHTMLAllCollectionCustom.cpp: Removed some unneeded includes.
2286 (WebCore::namedItems): Updated name to match WebKit coding style, and also
2287 updated to use the return value from namedItems, which now returns a Vector.
2288 (WebCore::callHTMLAllCollection): Updated for namedItems name change.
2289 Also removed explicit Node* type from result of namedItemWithIndex, since that
2290 function now returns a more specific type.
2291 (WebCore::JSHTMLAllCollection::nameGetter): Update for namedItems name change.
2292 (WebCore::JSHTMLAllCollection::item): Ditto.
2293 (WebCore::JSHTMLAllCollection::namedItem): Ditto.
2295 * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Removed some unneeded includes.
2296 (WebCore::namedItems): Updated name to match WebKit coding style, and also
2297 updated to use the return value from namedItems, which now returns a Vector.
2298 (WebCore::JSHTMLFormControlsCollection::nameGetter): Update for namedItems name change.
2299 (WebCore::JSHTMLFormControlsCollection::namedItem): Ditto.
2301 * bindings/js/JSHTMLFormElementCustom.cpp:
2302 (WebCore::JSHTMLFormElement::nameGetter): Updated to use the return value from
2303 namedItems, which now returns a Vector.
2305 * html/HTMLAllCollection.cpp:
2306 (WebCore::HTMLAllCollection::HTMLAllCollection): Marked the constructor inline,
2307 since it's only used in one place, the create function.
2308 (WebCore::HTMLAllCollection::~HTMLAllCollection): Deleted. No need to have an
2309 explicit destructor since there's nothing special to implement, and includers of
2310 the header file have everything they ened to compile the compiler-generated one.
2311 (WebCore::HTMLAllCollection::namedItemWithIndex): Changed return type to Element.
2313 * html/HTMLAllCollection.h: Removed unneeded explicit declaration of destructor.
2314 Chagned return type of namedItemWithIndex to Element.
2316 * html/HTMLCollection.cpp:
2317 (WebCore::HTMLCollection::rootTypeFromCollectionType): Marked this inline. Also
2318 changed this to be a static member function so it can use the RootType enum, which
2319 is now private to the class.
2320 (WebCore::isMatchingHTMLElement): Marked this function static so it will get
2322 (WebCore::isMatchingElement): Ditto.
2323 (WebCore::previousElement): Marked this function inline since it's called in only
2324 one place. Changed argument type to a reference since it can never be null.
2325 (WebCore::HTMLCollection::iterateForPreviousElement): Changed argument name and
2326 also updated for above changes.
2327 (WebCore::firstMatchingElement): Marked this function static so it will get
2329 (WebCore::nextMatchingElement): Ditto. Changed argument type to a reference
2330 since it can never be null.
2331 (WebCore::HTMLCollection::item): Changed return type to Element.
2332 (WebCore::nameShouldBeVisibleInDocumentAll): Added an overload that takes an
2333 Element. This streamlines the code below that calls it so it fits on one line.
2334 (WebCore::firstMatchingChildElement): Marked this function static so it will get
2336 (WebCore::nextMatchingSiblingElement): Ditto. Changed argument type to a reference
2337 since it can never be null.
2338 (WebCore::HTMLCollection::usesCustomForwardOnlyTraversal): Moved here from the
2339 header since, although it's marked inline, it's only used inside this file.
2340 (WebCore::HTMLCollection::traverseForward): Restructured the code a little bit
2341 to make the function smaller and possibly easier to read. This does add one
2342 redundant null check, but it seems OK to do that.
2343 (WebCore::HTMLCollection::collectionTraverseBackward): Tweaked foramtting a bit.
2344 (WebCore::HTMLCollection::namedItem): Changed return type to Element. Tightened
2345 the code that calls nameShouldBeVisibleInDocumentAll so it fits better on one line.
2346 Changed code that handles m_shouldOnlyIncludeDirectChildren to use a nested if
2347 instead of an && since it makes the code a little easier to read.
2348 (WebCore::HTMLCollection::updateNamedElementCache): Tweaked code a little bit,
2349 using shorter variable names, and using references instead of pointers. Also removed
2350 the call to didPopulate, since setNamedItemCache now takes care of that.
2351 (WebCore::HTMLCollection::namedItems): Changed to return a Vector instead of
2352 appending to an existing one. Also use reserveInitialCapacity and uncheckedAppend
2353 for better performance. Added a FIXME, because there seems to be something wrong
2354 here about this being non-virtual. Made other small tweaks to streamline the code.
2355 (WebCore::HTMLCollection::customElementAfter): Moved this here from the header.
2356 There is no reason to need to inline this.
2358 * html/HTMLCollection.h: Removed unneeded includes. Moved function bodies out
2359 of the class definitions so the class definitions are easier to read. Made some
2360 functions that were formerly public or protected be private instead. Added a call
2361 to didPopulate to setNamedItemCache so the callers don't have to do it.
2363 * html/HTMLFormControlsCollection.cpp:
2364 (WebCore::HTMLFormControlsCollection::namedItem): Changed return value to Element.
2365 Tweaked coding style a little bit.
2366 (WebCore::HTMLFormControlsCollection::updateNamedElementCache): Rearranged to
2367 simplify a bit. Don't build the foundInputElements set when the owner is not a
2368 form element, since we don't use the set in that case. Use shorter variable names,
2369 and modern for loops. Also removed the call to didPopulate, since setNamedItemCache
2370 now takes care of that.
2372 * html/HTMLFormControlsCollection.h: Removed some uneeded forward declarations.
2373 Updated return type for namedItem, and also made the override private.
2375 * html/HTMLFormElement.cpp:
2376 (WebCore::HTMLFormElement::namedElements): Changed to return a Vector and updated
2377 function name accordingly.
2378 * html/HTMLFormElement.h: Ditto.
2380 * html/HTMLNameCollection.h: Removed a stray blank line.
2382 * html/HTMLSelectElement.cpp:
2383 (WebCore::HTMLSelectElement::namedItem): Changed return value to Element.
2384 (WebCore::HTMLSelectElement::item): Ditto.
2385 * html/HTMLSelectElement.h: Ditto.
2387 * page/scrolling/AxisScrollSnapOffsets.cpp:
2388 (WebCore::appendChildSnapOffsets): Rewrote loop as a for loop rather than a while
2389 loop. Removed unwanted use of children()->collectionBegin() to get the first element
2390 child of an HTMLElement. This function uses a mix of DOM and rendering functions that
2391 is probably incorrect, but I did not tackle fixing that at this time.
2393 2014-11-11 Dan Bernstein <mitz@apple.com>
2395 [Mac] WebCore includes unused cursor image resources
2396 https://bugs.webkit.org/show_bug.cgi?id=138605
2398 Reviewed by Anders Carlsson.
2400 * Resources/aliasCursor.png: Removed.
2401 * Resources/cellCursor.png: Removed.
2402 * Resources/contextMenuCursor.png: Removed.
2403 * Resources/copyCursor.png: Removed.
2404 * Resources/eastResizeCursor.png: Removed.
2405 * Resources/eastWestResizeCursor.png: Removed.
2406 * Resources/helpCursor.png: Removed.
2407 * Resources/linkCursor.png: Removed.
2408 * Resources/moveCursor.png: Removed.
2409 * Resources/noDropCursor.png: Removed.
2410 * Resources/noneCursor.png: Removed.
2411 * Resources/northEastResizeCursor.png: Removed.
2412 * Resources/northEastSouthWestResizeCursor.png: Removed.
2413 * Resources/northResizeCursor.png: Removed.
2414 * Resources/northSouthResizeCursor.png: Removed.
2415 * Resources/northWestResizeCursor.png: Removed.
2416 * Resources/northWestSouthEastResizeCursor.png: Removed.
2417 * Resources/progressCursor.png: Removed.
2418 * Resources/southEastResizeCursor.png: Removed.
2419 * Resources/southResizeCursor.png: Removed.
2420 * Resources/southWestResizeCursor.png: Removed.
2421 * Resources/verticalTextCursor.png: Removed.
2422 * Resources/waitCursor.png: Removed.
2423 * Resources/westResizeCursor.png: Removed.
2424 * Resources/zoomInCursor.png: Removed.
2425 * Resources/zoomOutCursor.png: Removed.
2427 * WebCore.xcodeproj/project.pbxproj: Removed references to the above files.
2429 * platform/mac/CursorMac.mm:
2430 (WebCore::Cursor::ensurePlatformCursor): For Help, Cell, ZoomIn and ZoomOut, don’t check
2431 for a nil return value from wkCursor(), which can’t occur in any supported configuration.
2432 For None, create a cursor with an empty NSImage instead of loading a transparent image from
2434 (WebCore::createNamedCursor): Deleted.
2436 2014-11-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2438 Unreviewed, rolling out r175844.
2440 Win debug build has broken since r175844.
2444 "Use std::unique_ptr<> and std::make_unique<> in WebCore"
2445 https://bugs.webkit.org/show_bug.cgi?id=138560
2446 http://trac.webkit.org/changeset/175844
2448 2014-11-11 Philippe Normand <pnormand@igalia.com>
2450 Qt/Chromium remnants in MediaPlayer
2451 https://bugs.webkit.org/show_bug.cgi?id=138611
2453 Reviewed by Jer Noble.
2455 * platform/graphics/MediaPlayer.h: Remove unused Qt/Chromium stuff.
2457 2014-11-11 Chris Dumez <cdumez@apple.com>
2459 Move '-webkit-marquee-speed' CSS property to the new StyleBuilder
2460 https://bugs.webkit.org/show_bug.cgi?id=138595
2462 Reviewed by Antti Koivisto.
2464 Move '-webkit-marquee-speed' CSS property from DeprecatedStyleBuilder
2465 to the new StyleBuilder by adding a new MarqueeSpeed Converter.
2467 No new tests, no behavior change.
2469 * css/CSSPropertyNames.in:
2470 * css/DeprecatedStyleBuilder.cpp:
2471 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2472 (WebCore::ApplyPropertyMarqueeSpeed::applyValue): Deleted.
2473 (WebCore::ApplyPropertyMarqueeSpeed::createHandler): Deleted.
2474 * css/StyleBuilderConverter.h:
2475 (WebCore::StyleBuilderConverter::convertMarqueeSpeed):
2477 2014-10-07 Sergio Villar Senin <svillar@igalia.com>
2479 [CSS Grid Layout] Limit the size of explicit/implicit grid
2480 https://bugs.webkit.org/show_bug.cgi?id=136217
2482 Reviewed by Andreas Kling.
2484 A recent change in the specs allow us to set a limit (maximum
2485 size) for both the explicit and implicit grids so we can protect
2486 ourselves from absurdly huge grid specifications. It was decided
2487 to use the recommended limit which is 1 million.
2489 This means that we can remove the old limitation for the number of
2490 repetitions in repeat(). Instead we now clamp the number of
2491 repetitions to the maximum value that allow us to have the maximum
2492 number of whole repetitions without exceeding the track number
2495 * WebCore.xcodeproj/project.pbxproj:
2496 * css/CSSParser.cpp:
2497 (WebCore::CSSParser::parseGridTrackRepeatFunction): Replaced the
2498 old limit by the new one.
2499 * rendering/RenderGrid.cpp:
2500 (WebCore::RenderGrid::placeItemsOnGrid): Use the amount of tracks
2501 provided by GridResolvedPosition.
2502 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ditto.
2503 * rendering/style/GridCoordinate.h:
2504 (WebCore::GridSpan::GridSpan):
2505 * rendering/style/GridResolvedPosition.cpp:
2506 (WebCore::GridResolvedPosition::explicitGridColumnCount): Bring
2507 the static function back to life.
2508 (WebCore::GridResolvedPosition::explicitGridRowCount): Ditto.
2509 (WebCore::explicitGridSizeForSide):
2510 * rendering/style/GridResolvedPosition.h:
2512 2014-11-11 Yusuke Suzuki <utatane.tea@gmail.com>
2514 CSS4 Selectors: Add multiple pseudo elements support to :matches
2515 https://bugs.webkit.org/show_bug.cgi?id=138214
2517 Reviewed by Benjamin Poulain.
2519 In this patch, we implement (multiple) pseudo elements support to :matches.
2520 Currently, we implemented it in css/SelectorChecker and there's no CSS JIT implementation.
2522 And we change the semantics of pseudo element selector behavior.
2523 Previously when pseudo element selector appeared in the non-rightmost
2524 fragment, it was ignored. This patch changes it to unmatched.
2526 * css/SelectorChecker.cpp:
2527 (WebCore::SelectorChecker::CheckingContextWithStatus::CheckingContextWithStatus):
2528 (WebCore::SelectorChecker::match):
2529 (WebCore::hasScrollbarPseudoElement):
2530 (WebCore::SelectorChecker::matchRecursively):
2531 (WebCore::SelectorChecker::checkOne):
2532 (WebCore::SelectorChecker::matchSelectorList):
2533 * css/SelectorChecker.h:
2534 (WebCore::SelectorChecker::MatchResult::matches):
2535 (WebCore::SelectorChecker::MatchResult::updateWithMatchType):
2536 (WebCore::SelectorChecker::MatchResult::fails):
2537 * cssjit/SelectorCompiler.cpp:
2538 (WebCore::SelectorCompiler::addPseudoClassType):
2539 (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2540 (WebCore::SelectorCompiler::constructFragments):
2541 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
2542 * rendering/style/RenderStyle.h:
2543 (WebCore::RenderStyle::setHasPseudoStyles):
2544 * rendering/style/RenderStyleConstants.h:
2545 (WebCore::PseudoIdSet::PseudoIdSet):
2546 (WebCore::PseudoIdSet::fromMask):
2547 (WebCore::PseudoIdSet::has):
2548 (WebCore::PseudoIdSet::add):
2549 (WebCore::PseudoIdSet::merge):
2550 (WebCore::PseudoIdSet::operator &):
2551 (WebCore::PseudoIdSet::operator |):
2552 (WebCore::PseudoIdSet::operator bool):
2553 (WebCore::PseudoIdSet::data):
2555 2014-11-10 Chris Dumez <cdumez@apple.com>
2557 Lazily create HTMLInputElement's inputType and shadow subtree
2558 https://bugs.webkit.org/show_bug.cgi?id=138524
2560 Reviewed by Ryosuke Niwa.
2562 When an HTMLInputElement was created by the parser, we would first call
2563 HTMLInputElement::create(), then call Element::parserSetAttributes() on
2564 the constructed input. With the previous implementation, this was a bit
2565 inefficient because HTMLInputElement::create() would construct a
2566 TextInputType inputType (as this is the default) as well as its
2567 corresponding shadow subtree. Then, parserSetAttributes() would often
2568 set the |type| attribute and would need to destroy this input type as
2569 well as its subtree if the new |type| is not 'text', to create a new
2570 inputType / shadow subtree of the right type. The profiler showed that
2571 this was fairly expensive.
2573 To improve this, this patch delays the inputType / shadow subtree
2574 creation when the HTMLInputElement is constructed by the parser, until
2575 the attributes are actually set by the parser. This way, we directly
2576 create an inputType / shadow subtree of the right type.
2578 I see a 1.4% speed up on speedometer (73.95 -> 75.0).
2580 No new tests, no behavior change.
2583 (WebCore::Element::parserSetAttributes):
2584 (WebCore::Element::parserDidFinishParsingAttributes):
2586 * html/HTMLInputElement.cpp:
2587 (WebCore::HTMLInputElement::HTMLInputElement):
2588 (WebCore::HTMLInputElement::create):
2589 (WebCore::HTMLInputElement::updateType):
2590 (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
2591 (WebCore::HTMLInputElement::ensureInputType):
2592 (WebCore::HTMLInputElement::parseAttribute):
2593 (WebCore::HTMLInputElement::parserDidFinishParsingAttributes):
2594 * html/HTMLInputElement.h:
2596 2014-11-10 Benjamin Poulain <bpoulain@apple.com>
2598 Add parsing support for the extended :nth-last-child(An+B of selector-list) defined
2599 https://bugs.webkit.org/show_bug.cgi?id=138520
2601 Reviewed by Andreas Kling.
2603 Add parsing for :nth-last-child(An+B of selector-list). The selector is defined
2604 in CSS Selectors Level 4: http://dev.w3.org/csswg/selectors4/#the-nth-last-child-pseudo
2606 Tests: fast/css/parsing-css-nth-last-child-of-1.html
2607 fast/css/parsing-css-nth-last-child-of-2.html
2608 fast/css/parsing-css-nth-last-child-of-3.html
2609 fast/css/parsing-css-nth-last-child-of-4.html
2611 * css/CSSGrammar.y.in:
2612 * css/CSSParser.cpp:
2613 (WebCore::CSSParser::detectFunctionTypeToken):
2614 * css/CSSSelector.cpp:
2615 (WebCore::CSSSelector::selectorText):
2617 2014-11-10 Said Abou-Hallawa <sabouhallawa@apple.com>
2619 SVG foreign objects do not inherit the container coordinates system if they are repainted.
2620 https://bugs.webkit.org/show_bug.cgi?id=138481.
2622 Reviewed by Simon Fraser.
2624 If a foreign object is included in an SVG, it should inherit the coordinates system
2625 of the container if it is repainted. The foreign object is actually redrawn in the
2626 CSS coordinates system regardless of the transformation that may be applied to the
2629 The bug is RenderSVG* classes use computeFloatRectForRepaint(), but the rest of the
2630 render classes use computeRectForRepaint(). RenderSVGForeignObject::computeRectForRepaint()
2631 was not defined, so we end up hitting RenderObject::computeRectForRepaint() for
2632 a RenderSVGTransformableContainer and completely miss the transform.
2634 Tests: svg/transforms/svg-transform-foreign-object-repaint.html
2636 Implement RenderSVGForeignObject::computeRectForRepaint() so we can apply the
2637 container transformation on the SVG foreign object repaint rectangle.
2638 * rendering/svg/RenderSVGForeignObject.cpp:
2639 (WebCore::RenderSVGForeignObject::computeRectForRepaint):
2640 * rendering/svg/RenderSVGForeignObject.h:
2642 2014-11-10 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2644 Use std::unique_ptr<> and std::make_unique<> in WebCore
2645 https://bugs.webkit.org/show_bug.cgi?id=138560
2647 Reviewed by Chris Dumez.
2649 Clean up unused OwnPtr.h and PassOwnPtr.h and use std::unique_ptr.
2651 No new tests, no behavior changes.
2653 * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
2654 * dom/ContainerNode.h:
2655 * dom/ElementIteratorAssertions.h:
2656 (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
2657 * dom/ElementRareData.h:
2658 * page/DragController.h:
2659 * rendering/RenderView.h:
2661 2014-11-10 Beth Dakin <bdakin@apple.com>
2663 WK1: Support default actions for editable text with misspelled word
2664 https://bugs.webkit.org/show_bug.cgi?id=138590
2666 rdar://problem/18877506
2668 Reviewed by Tim Horton.
2672 2014-11-10 Chris Dumez <cdumez@apple.com>
2674 Remove unnecessary null check in FrameSelection::nodeWillBeRemoved()
2675 https://bugs.webkit.org/show_bug.cgi?id=138578
2677 Reviewed by Andreas Kling.
2679 Remove unnecessary null check in FrameSelection::nodeWillBeRemoved()
2680 and turn the argument into a reference to make it clear it cannot be
2683 No new tests, no behavior change.
2685 * dom/ContainerNode.cpp:
2686 (WebCore::ContainerNode::willRemoveChild):
2688 (WebCore::Document::nodeChildrenWillBeRemoved):
2689 (WebCore::Document::nodeWillBeRemoved):
2691 * dom/NodeIterator.cpp:
2692 (WebCore::NodeIterator::nodeWillBeRemoved):
2693 (WebCore::NodeIterator::updateForNodeRemoval):
2694 * dom/NodeIterator.h:
2696 (WebCore::Range::insertNode):
2697 (WebCore::boundaryNodeWillBeRemoved):
2698 (WebCore::Range::nodeWillBeRemoved):
2700 * dom/RangeBoundaryPoint.h:
2701 (WebCore::RangeBoundaryPoint::setToBeforeChild):
2702 * editing/CompositeEditCommand.cpp:
2703 (WebCore::CompositeEditCommand::updatePositionForNodeRemovalPreservingChildren):
2704 * editing/CompositeEditCommand.h:
2705 * editing/DeleteSelectionCommand.cpp:
2706 (WebCore::DeleteSelectionCommand::removeNode):
2707 (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2708 (WebCore::DeleteSelectionCommand::removeRedundantBlocks):
2709 * editing/FrameSelection.cpp:
2710 (WebCore::removingNodeRemovesPosition):
2711 (WebCore::DragCaretController::nodeWillBeRemoved):
2712 (WebCore::FrameSelection::nodeWillBeRemoved):
2713 (WebCore::FrameSelection::respondToNodeModification):
2714 * editing/FrameSelection.h:
2715 * editing/ReplaceSelectionCommand.cpp:
2716 (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
2717 * editing/htmlediting.cpp:
2718 (WebCore::updatePositionForNodeRemoval):
2719 * editing/htmlediting.h:
2720 * page/EventHandler.cpp:
2721 (WebCore::EventHandler::nodeWillBeRemoved):
2722 * page/EventHandler.h:
2724 2014-11-10 Benjamin Poulain <bpoulain@apple.com>
2726 Fix the build when CSS Selectors Level 4 is disabled
2727 https://bugs.webkit.org/show_bug.cgi?id=138533
2729 * css/CSSSelector.cpp:
2730 (WebCore::appendArgumentList):
2731 * cssjit/SelectorCompiler.cpp:
2732 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
2734 2014-11-10 Chris Dumez <cdumez@apple.com>
2736 Support throttling of DOMTimers using nested setTimeout() calls
2737 https://bugs.webkit.org/show_bug.cgi?id=138262
2739 Reviewed by Gavin Barraclough.
2741 Extend DOMTimers throttling support to timers that are using nested
2742 setTimeout() calls instead of a setInterval(). To achieve this, this
2743 patch introduces a NestedTimersMap singleton class where nested timers
2744 are added, and for which we potentially update the next firing time,
2745 after the parent timer is done executing.
2747 I have verified this helps on ebay.com for example, which has timers
2748 interacting with non-visible plugins that are scheduled using nested
2749 setTimeout() calls with a frequency of 150 / 200 ms.
2751 This is a second take on r175441, which caused intermittent crashes.
2752 This time, nested timers are removed from the NestedTimersMap when
2753 DOMTimer::removeById() is called. It would be unsafe to use the nested
2754 timer afterwards because we don't hold a strong reference to it and
2755 the ScriptExecutionContext is unref'ing the DOMTimer when
2756 ScriptExecutionContext::removeTimeout() is called from
2757 DOMTimer::removeById().
2759 * page/DOMTimer.cpp:
2760 (WebCore::NestedTimersMap::NestedTimersMap):
2761 (WebCore::NestedTimersMap::~NestedTimersMap):
2762 (WebCore::NestedTimersMap::add):
2763 (WebCore::NestedTimersMap::remove):
2764 (WebCore::NestedTimersMap::begin):
2765 (WebCore::NestedTimersMap::end):
2766 (WebCore::DOMTimer::install):
2767 (WebCore::DOMTimer::removeById):
2768 (WebCore::DOMTimer::fired):
2770 2014-11-10 Jer Noble <jer.noble@apple.com>
2772 [EME][Mac] Add a systemCode to distinguish when no expired sessions were found in response to a "keyrelease" message.
2773 https://bugs.webkit.org/show_bug.cgi?id=138199
2775 Reviewed by Eric Carlson.
2777 Clients may want to be able to distinguish between cases where expired session data is not supported, and when
2778 those data are supported, but none are found.
2780 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2781 (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage):
2783 2014-11-04 Jer Noble <jer.noble@apple.com>
2785 REGRESSION(r174823): Several tests fail due to canplaythrough firing before tracks are available
2786 https://bugs.webkit.org/show_bug.cgi?id=137882
2788 Reviewed by Eric Carlson.
2790 For HLS streams with only one video, audio, or text track, there will be no media selection group
2791 for that media characteristic. When culling out AVPlayerItemTracks in tracksDidChange(), do not skip
2792 tracks for which there is no matching AVMediaSelectionGroup.
2794 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2795 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2796 (WebCore::MediaPlayerPrivateAVFoundationObjC::hasLoadedMediaSelectionGroups): Refactored.
2797 (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia): Call above.
2798 (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Ditto.
2799 (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
2800 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
2802 2014-11-10 Commit Queue <commit-queue@webkit.org>
2804 Unreviewed, rolling out r175813.
2805 https://bugs.webkit.org/show_bug.cgi?id=138573
2807 Breaks complex text layout spacing (Requested by litherum on
2812 "[OSX] Some words are placed on top of each other in complex
2814 https://bugs.webkit.org/show_bug.cgi?id=138348
2815 http://trac.webkit.org/changeset/175813
2817 2014-11-10 Beth Dakin <bdakin@apple.com>
2819 Rolling out failed build fix
2820 http://trac.webkit.org/changeset/175819
2824 2014-11-10 Beth Dakin <bdakin@apple.com>
2826 Speculative build fix.
2830 2014-11-10 Beth Dakin <bdakin@apple.com>
2832 Speculative build fix.
2836 2014-11-10 Simon Fraser <simon.fraser@apple.com>
2838 [iOS WK2] Layers with negative z position disapear behind the page tiles
2839 https://bugs.webkit.org/show_bug.cgi?id=138571
2840 rdar://problem/18873480
2842 Reviewed by Dean Jackson.
2844 Some crufty iOS-only code in RenderLayerBacking::parentForSublayers() caused us to fail
2845 to use the m_childContainmentLayer as the ancestor for descendants, so layers with
2846 negative z position would get depth-sorted behind the tiles.
2848 Fix by removing that code.
2850 This should have been detected by compositing/tile-cache-must-flatten.html, but
2851 testing infrastructure suck prevented us from doing so.
2853 * rendering/RenderLayerBacking.cpp:
2854 (WebCore::RenderLayerBacking::parentForSublayers):
2855 * rendering/RenderLayerBacking.h: Just some nullptr cleanup.
2857 2014-11-10 Chris Dumez <cdumez@apple.com>
2859 Move 'resize' CSS property to the new StyleBuilder
2860 https://bugs.webkit.org/show_bug.cgi?id=138550
2862 Reviewed by Andreas Kling.
2864 No new tests, no behavior change.
2866 Move 'resize' CSS property from DeprecatedStyleBuilder to the new
2867 StyleBuilder by adding a new 'Resize' Converter function.
2869 * css/CSSPropertyNames.in:
2870 * css/DeprecatedStyleBuilder.cpp:
2871 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2872 (WebCore::ApplyPropertyResize::applyValue): Deleted.
2873 (WebCore::ApplyPropertyResize::createHandler): Deleted.
2874 * css/StyleBuilderConverter.h:
2875 (WebCore::StyleBuilderConverter::convertResize):
2877 2014-11-10 Beth Dakin <bdakin@apple.com>
2879 Speculative build fix.
2881 * editing/DictionaryLookup.h:
2882 * editing/DictionaryLookup.mm:
2884 2014-11-10 Chris Dumez <cdumez@apple.com>
2886 Move 'text-indent' CSS property to the new StyleBuilder
2887 https://bugs.webkit.org/show_bug.cgi?id=138547
2889 Reviewed by Andreas Kling.
2891 Move 'text-indent' CSS property from DeprecatedStyleBuilder to the new
2892 StyleBuilder, by using custom code.
2894 No new tests, no behavior change.
2896 * css/CSSPropertyNames.in:
2897 * css/DeprecatedStyleBuilder.cpp:
2898 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2899 (WebCore::ApplyPropertyTextIndent::applyInheritValue): Deleted.
2900 (WebCore::ApplyPropertyTextIndent::applyInitialValue): Deleted.
2901 (WebCore::ApplyPropertyTextIndent::applyValue): Deleted.
2902 (WebCore::ApplyPropertyTextIndent::createHandler): Deleted.
2903 * css/StyleBuilderConverter.h:
2904 * css/StyleBuilderCustom.h:
2905 (WebCore::StyleBuilderFunctions::applyInheritTextIndent):
2906 (WebCore::StyleBuilderFunctions::applyInitialTextIndent):
2907 (WebCore::StyleBuilderFunctions::applyValueTextIndent):
2909 2014-11-10 Beth Dakin <bdakin@apple.com>
2911 WK1: Support default actions for read-only text
2912 https://bugs.webkit.org/show_bug.cgi?id=138552
2914 rdar://problem/18877483
2916 Reviewed by Tim Horton.
2918 WK1 now needs to do a lot of dictionary lookup operations that it did not
2919 previously have to handle. So this patch takes a lot of that functionality, which
2920 was implemented as static functions in WebPageMac for WK2 and moves it into
2924 * WebCore.xcodeproj/project.pbxproj:
2925 * editing/DictionaryLookup.h: Added.
2926 * editing/DictionaryLookup.mm: Added.
2927 (WebCore::isPositionInRange):
2928 (WebCore::shouldUseSelection):
2929 (WebCore::rangeExpandedAroundPositionByCharacters):
2930 (WebCore::rangeForDictionaryLookupForSelection):
2931 (WebCore::rangeForDictionaryLookupAtHitTestResult):
2932 * platform/mac/WebCoreSystemInterface.h:
2933 * platform/mac/WebCoreSystemInterface.mm:
2935 2014-11-10 Myles C. Maxfield <mmaxfield@apple.com>
2937 [OSX] Some words are placed on top of each other in complex text layout
2938 https://bugs.webkit.org/show_bug.cgi?id=138348
2940 Reviewed by Simon Fraser.
2942 Some complex text layouts have lots of diacritics being placed all over the place.
2943 CoreText sometimes compensates for this by adjusting the advances of the glyphs
2944 throughout the string to make glyphs appear in the correct place. This means that
2945 we can't naively cache the width of a space character; instead, we must obey
2946 CoreText when it gives us an advance for a space.
2948 Test: fast/text/large-space-width-complex.html
2950 * platform/graphics/mac/ComplexTextController.cpp:
2951 (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2953 2014-11-10 Eric Carlson <eric.carlson@apple.com>
2955 [iOS] wireless playback placeholder UI doesn't always draw
2956 https://bugs.webkit.org/show_bug.cgi?id=138548
2958 While it is important to only listen for the 'webkitplaybacktargetavailabilitychanged' event
2959 when we are displaying inline controls because listening for it increases power consumption,
2960 we should always listen for the 'webkitcurrentplaybacktargetiswirelesschanged' event because
2961 it controls whether or not we draw the placeholder UI which is always visible during wireless
2964 Reviewed by Brent Fulgham.
2966 * Modules/mediacontrols/mediaControlsiOS.js:
2967 (ControllerIOS.prototype.addVideoListeners): Always listen for the
2968 'webkitcurrentplaybacktargetiswirelesschanged' event.
2969 (ControllerIOS.prototype.removeVideoListeners): Always stop listening for the
2970 'webkitcurrentplaybacktargetiswirelesschanged' event.
2971 (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Call updateControls so we update
2972 the type of controls rendered and start listening for wireless target changes immediately.
2973 (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent): Don't start and stop
2974 listening for 'webkitcurrentplaybacktargetiswirelesschanged', we should always listen for it.
2976 2014-11-10 Csaba Osztrogonác <ossy@webkit.org>
2978 Crash in WebCore::Node::getFlag
2979 https://bugs.webkit.org/show_bug.cgi?id=137961
2981 Reviewed by Antti Koivisto.
2983 * editing/ApplyStyleCommand.cpp:
2984 (WebCore::ApplyStyleCommand::applyBlockStyle): Null pointer check added.
2986 2014-11-10 Mihnea Ovidenie <mihnea@adobe.com>
2988 ASSERTION FAILED: !object || !object->parent()->isRuby() || is<RenderRubyRun>(*object) || (object->isInline() && (object->isBeforeContent() || object->isAfterContent())) || (object->isAnonymous() && ... ) in WebCore::isAnonymousRubyInlineBlock
2989 https://bugs.webkit.org/show_bug.cgi?id=137958
2991 Reviewed by Chris Dumez.
2993 When a ruby element, with block behavior, dynamically changes its style
2994 from multicol to without multicol, we have to remove its special children,
2995 RenderMultiColumnFlowThread and RenderMultiColumnSet, the normal way using
2996 the method in RenderBlockFlow base class. This patch adds both
2997 RenderMultiColumnFlowThread and RenderMultiColumnSet to the list of RenderRuby
2998 children removed normally and adds a new function - isRubyChildForNormalRemove -
2999 to test the condition and use it in the assertion in RenderRuby*::removeChild
3002 Test: fast/multicol/newmulticol/ruby-from-multicol-to-auto.html
3004 * rendering/RenderRuby.cpp:
3005 (WebCore::isRubyChildForNormalRemove):
3006 (WebCore::RenderRubyAsInline::removeChild):
3007 (WebCore::RenderRubyAsBlock::removeChild):
3009 2014-11-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3011 [EFL] Remove GamepadDeviceEfl::create()
3012 https://bugs.webkit.org/show_bug.cgi?id=138553
3014 Reviewed by Darin Adler.
3016 As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes GamepadDeviceEfl::create().
3017 Instead we use std::make_unique<>.
3019 No new tests, no behavior changes.
3021 * platform/efl/GamepadsEfl.cpp:
3022 (WebCore::GamepadsEfl::registerDevice):
3023 (WebCore::GamepadDeviceEfl::create): Deleted.
3024 (WebCore::GamepadsEfl::unregisterDevice): Deleted.
3026 2014-11-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3028 Remove create() factory function in FooAnimationValue classes
3029 https://bugs.webkit.org/show_bug.cgi?id=138206
3031 Reviewed by Darin Adler.
3033 As a step to use std::unique_ptr and std::make_unique, this patch removes create()
3034 factory function in FooAnimationValue classes. As this changes, FooAnimationValue::create()
3035 are changed to std::make_unique<>.
3037 No new tests, no behavior changes.
3039 * platform/graphics/GraphicsLayer.cpp:
3040 (WebCore::KeyframeValueList::insert):
3041 * platform/graphics/GraphicsLayer.h:
3042 (WebCore::FloatAnimationValue::FloatAnimationValue):
3043 (WebCore::TransformAnimationValue::TransformAnimationValue):
3044 (WebCore::FilterAnimationValue::FilterAnimationValue):
3045 (WebCore::FloatAnimationValue::create): Deleted.
3046 (WebCore::TransformAnimationValue::create): Deleted.
3047 (WebCore::FilterAnimationValue::create): Deleted.
3048 * rendering/RenderLayerBacking.cpp:
3049 (WebCore::RenderLayerBacking::startAnimation):
3050 (WebCore::RenderLayerBacking::startTransition):
3052 2014-11-09 Chris Dumez <cdumez@apple.com>
3054 Add a more correct way to compare floating point numbers and use it
3055 https://bugs.webkit.org/show_bug.cgi?id=138527
3057 Reviewed by Darin Adler.
3059 Use the new WTF::areEssentuallyEqual() utility function from MathExtras.h
3060 to compare floating-point numbers.
3062 No new tests, no behavior change.
3064 * page/DOMTimer.cpp:
3065 (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
3066 * platform/graphics/FloatQuad.cpp:
3067 (WebCore::FloatQuad::isRectilinear):
3068 * platform/graphics/FloatRoundedRect.cpp:
3069 (WebCore::FloatRoundedRect::Radii::isUniformCornerRadius):
3070 * platform/graphics/FloatSize.h:
3071 (WebCore::areEssentiallyEqual):
3072 (WebCore::withinEpsilon): Deleted.
3074 2014-11-08 Simon Fraser <simon.fraser@apple.com>
3076 Implement round-rect clipping on video elements
3077 https://bugs.webkit.org/show_bug.cgi?id=138537
3078 rdar://problem/9534399
3080 Reviewed by Darin Adler.
3082 Support border-radius on video and other layers with composited contents,
3083 by pushing a FloatRoundedRect onto the GraphicsLayer as the contentsClippingRect,
3084 and, on Mac, using layer corner-radius or a CAShapeLayer mask.
3086 Test: compositing/video/video-border-radius.html
3089 * platform/graphics/FloatRoundedRect.cpp:
3090 (WebCore::FloatRoundedRect::Radii::isUniformCornerRadius): Returns true if all
3091 corner radii are the same, and have equal widths and heights.
3092 * platform/graphics/FloatRoundedRect.h: Allow construction without an explicit
3094 * platform/graphics/GraphicsLayer.cpp:
3095 (WebCore::GraphicsLayer::GraphicsLayer): nullptr goodness.
3096 (showGraphicsLayerTree): Print contents layers when debugging.
3097 * platform/graphics/GraphicsLayer.h:
3098 (WebCore::GraphicsLayer::contentsClippingRect): Make this take a FloatRoundedRect.
3099 (WebCore::GraphicsLayer::setContentsClippingRect):
3100 * platform/graphics/ca/GraphicsLayerCA.cpp:
3101 (WebCore::GraphicsLayerCA::setContentsClippingRect):
3102 (WebCore::GraphicsLayerCA::setContentsToSolidColor):
3103 (WebCore::GraphicsLayerCA::setContentsToImage):
3104 (WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
3105 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3106 (WebCore::GraphicsLayerCA::updateClippingStrategy): Determines whether we can simply
3107 use corner-radius on the existing contentsClippingLayer, or whether we have to
3108 create a shape layer to use as a mask.
3109 (WebCore::GraphicsLayerCA::updateContentsRects): We have to add/remove the shape layer
3110 based on the rounded rect radii. Calls updateClippingStrategy() on the clipping layer,
3111 and also updates clones accordingly.
3112 (WebCore::dumpInnerLayer):
3113 (WebCore::GraphicsLayerCA::dumpAdditionalProperties): Dump all the inner layers
3114 (requiring on test rebaseline), including the new shape and backdrop layers.
3115 * platform/graphics/ca/GraphicsLayerCA.h:
3116 * platform/graphics/ca/PlatformCALayer.h: Add a new shape layer type.
3117 * platform/graphics/ca/mac/PlatformCALayerMac.h: Support for corner radius and
3118 a rounded rect shape mask.
3119 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3120 (PlatformCALayerMac::PlatformCALayerMac):
3121 (PlatformCALayerMac::clone):
3122 (PlatformCALayerMac::setMask):
3123 (PlatformCALayerMac::cornerRadius):
3124 (PlatformCALayerMac::setCornerRadius):
3125 (PlatformCALayerMac::shapeRoundedRect):
3126 (PlatformCALayerMac::setShapeRoundedRect):
3127 * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3128 (PlatformCALayerWin::cornerRadius):
3129 (PlatformCALayerWin::setCornerRadius):
3130 (PlatformCALayerWin::shapeRoundedRect):
3131 (PlatformCALayerWin::setShapeRoundedRect):
3132 * platform/graphics/ca/win/PlatformCALayerWin.h:
3133 * rendering/RenderLayerBacking.cpp:
3134 (WebCore::RenderLayerBacking::resetContentsRect): Use getRoundedInnerBorderFor() to get
3135 the rounded rect used to clip contents.
3136 (WebCore::RenderLayerBacking::positionOverflowControlsLayers): Push a FloatRoundedRect for the contents clip,
3137 (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor): Ditto.
3138 (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): Ditto.
3139 (WebCore::RenderLayerBacking::updateImageContents): Get the rounded rect clip.
3140 * rendering/RenderLayerBacking.h: nullptr.
3142 2014-11-09 Darin Adler <darin@apple.com>
3144 Fix various cases of incorrect cross-thread capture of non-thread-safe RefCounted
3145 https://bugs.webkit.org/show_bug.cgi?id=138539
3147 Reviewed by Alexey Proskuryakov.
3149 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3150 (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect): Use StringCapture
3151 instead of isolatedCopy, to avoid a problem where the original thread does its deref
3152 after passing the string to the other thread.
3153 (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage): Ditto.
3154 (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): Ditto.
3155 (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize): Ditto.
3156 (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect): Ditto.
3157 (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): Ditto.
3158 (WebCore::WorkerThreadableWebSocketChannel::Bridge::close): Ditto.
3159 (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail): Ditto.
3162 (WebCore::Document::addConsoleMessage): Pass a StringCapture when creating
3163 AddConsoleMessageTask. Same reason as above, but in a different context.
3164 (WebCore::Document::addMessage): Ditto.
3166 * dom/ScriptExecutionContext.h: Changed AddConsoleMessageTask to take and
3167 capture a StringCapture rather than a String, for the same reason as above.
3169 * fileapi/AsyncFileStream.cpp:
3170 (WebCore::AsyncFileStream::write): Use URLCapture instead of trying to use
3171 StringCapture on a URL, since that doesn't preserve the validity flag.
3173 * loader/WorkerThreadableLoader.cpp:
3174 (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Use StringCapture.
3175 (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail): Ditto.
3176 (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck): Ditto.
3178 * platform/URL.h: Added URLCapture.
3180 * platform/network/FormData.cpp:
3181 (WebCore::appendBlobResolved): Remove incorrect pointless code that creates a new URL
3182 from an existing URL with the ParsedURLString constructor.
3184 * workers/DefaultSharedWorkerRepository.cpp: Fixed code that was trying to copy a URL
3185 by copying a string to instead just use URL::copy. The comment claimed that URL::copy
3186 is not thread safe, but that claim is incorrect.
3187 (WebCore::SharedWorkerProxy::postExceptionToWorkerObject): Use StringCapture.
3188 (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject): Ditto.
3189 (WebCore::DefaultSharedWorkerRepository::getProxy): Use URL::copy.
3191 * workers/WorkerGlobalScope.cpp:
3192 (WebCore::WorkerGlobalScope::addConsoleMessage): Use StringCapture.
3193 (WebCore::WorkerGlobalScope::addMessage): Ditto.
3194 * workers/WorkerMessagingProxy.cpp:
3195 (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject): Ditto.
3196 (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject): Ditto.
3197 (WebCore::WorkerMessagingProxy::sendMessageToInspector): Ditto.
3198 (WebCore::WorkerMessagingProxy::postMessageToPageInspector): Ditto.
3200 * workers/WorkerRunLoop.cpp:
3201 (WebCore::WorkerRunLoop::postTaskAndTerminate): Make a Task with make_unique
3202 rather than with Task::create. Removed an extra isolatedCopy, unneeded because
3203 the Task constructor already does an isolatedCopy.
3204 (WebCore::WorkerRunLoop::postTaskForMode): Ditto.
3205 (WebCore::WorkerRunLoop::Task::create): Deleted.
3207 * workers/WorkerRunLoop.h: Removed unneeded create function and explicit
3208 public empty destructor.
3210 2014-11-09 Chris Dumez <cdumez@apple.com>
3212 Use is<>() / downcast<>() for HTMLCollection subclasses
3213 https://bugs.webkit.org/show_bug.cgi?id=138541
3215 Reviewed by Sam Weinig.
3217 Use is<>() / downcast<>() for HTMLCollection subclasses for
3218 safety and consistency with the rest of the code base.
3220 No new tests, no behavior change.
3222 * bindings/gobject/WebKitDOMPrivate.cpp:
3224 * html/HTMLAllCollection.h:
3225 * html/HTMLCollection.cpp:
3226 (WebCore::isMatchingHTMLElement):
3227 (WebCore::isMatchingElement):
3228 * html/HTMLCollection.h:
3229 * html/HTMLFormControlsCollection.h:
3230 * html/HTMLNameCollection.h:
3231 * html/HTMLOptionsCollection.h:
3232 * html/HTMLSelectElement.cpp:
3233 (WebCore::HTMLSelectElement::options):
3234 * html/HTMLTableRowsCollection.h:
3236 2014-11-08 Chris Dumez <cdumez@apple.com>
3238 Call faster HTMLElement::hasTagName() in HTMLCollection
3239 https://bugs.webkit.org/show_bug.cgi?id=138529
3241 Reviewed by Darin Adler.
3243 Call faster HTMLElement::hasTagName() in HTMLCollection instead of
3244 slower Node::hasTagName() by restructuring the code a bit to
3245 distinguish collection that deal only with HTMLElements from others.
3247 No new tests, no behavior change.
3249 * html/HTMLCollection.cpp:
3250 (WebCore::isMatchingHTMLElement):
3251 (WebCore::isMatchingElement):
3253 2014-11-08 Chris Dumez <cdumez@apple.com>
3255 Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType
3256 https://bugs.webkit.org/show_bug.cgi?id=138538
3258 Reviewed by Darin Adler.
3260 Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType
3261 as this only makes sense for text field input types.
3263 No new tests, no behavior change.
3265 * html/HTMLInputElement.cpp:
3266 (WebCore::HTMLInputElement::isEmptyValue):
3267 * html/InputType.cpp:
3268 (WebCore::InputType::isEmptyValue):
3270 * html/TextFieldInputType.cpp:
3271 (WebCore::TextFieldInputType::isEmptyValue):
3272 * html/TextFieldInputType.h:
3274 2014-11-08 Darin Adler <darin@apple.com>
3276 Replace FileThread class with a single function
3277 https://bugs.webkit.org/show_bug.cgi?id=138282
3279 Reviewed by Alexey Proskuryakov.
3281 * CMakeLists.txt: Removed FileThread.cpp.
3283 * WebCore.vcxproj/WebCore.vcxproj: Removed FileThread.cpp/.h.
3284 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3285 * WebCore.xcodeproj/project.pbxproj: Ditto.
3287 * bindings/generic/ActiveDOMCallback.cpp: Removed unneeded includes.
3288 * dom/ActiveDOMObject.cpp: Ditto.
3290 * fileapi/AsyncFileStream.cpp:
3291 (WebCore::callOnFileThread): Added. Implements the file thread.
3292 (WebCore::AsyncFileStream::AsyncFileStream): Take a reference to the client.
3293 Make m_internals. Use the destroyed flag instead of trickier techniques to
3294 handle stopping. Once the stream is destroyed, there will be no further callbacks.
3295 (WebCore::AsyncFileStream::~AsyncFileStream): Added assertions and merged in the
3296 stop behavior here. This class no longer requires an explicit stop function.
3297 (WebCore::AsyncFileStream::perform): Added. Helper used for all the operations
3298 below. Takes a function that performs an operation and then returns a client
3299 callback function. Respects the m_stopped boolean on the file thread (so we
3300 don't do extra operations) and on the client thread (so we are guaranteed not
3301 to get any client callbacks even if the file thread was partway through an
3303 (WebCore::AsyncFileStream::getSize): Changed to use the perform function.
3304 (WebCore::AsyncFileStream::openForRead): Ditto. Also fixed reference count
3305 thread safety issue by capturing a StringCapture rather than a String.
3306 (WebCore::AsyncFileStream::openForWrite): Ditto.
3307 (WebCore::AsyncFileStream::close): Changed to use callOnFileThread.
3308 (WebCore::AsyncFileStream::read): Changed to use the perform function.
3309 (WebCore::AsyncFileStream::write): Ditto. Also fixed reference count
3310 thread safety issue by capturing a StringCapture rather than a URL.
3311 (WebCore::AsyncFileStream::truncate): Ditto.
3313 * fileapi/AsyncFileStream.h: Removed use of RefCounted since we only need
3314 single ownership. Removed the stop function, since we can now stop when
3315 the stream is destroyed since we have single ownership. Made a new Internals
3316 object to handle destruction while operations are still going on the file thread.
3318 * fileapi/FileThread.cpp: Removed.
3319 * fileapi/FileThread.h: Removed.
3321 * loader/ResourceLoader.cpp: Removed unneeded include.
3323 * platform/FileStream.cpp:
3324 (WebCore::FileStream::~FileStream): Merged the stop function in here.
3326 * platform/FileStream.h: Removed use of RefCounted since we only need
3327 single ownership. Removed the empty start function. Removed the stop function,
3328 since we can now stop when the stream is destroyed since we have single ownership.
3330 * platform/FileStreamClient.h: Removed unneeded didStart and didStop.
3332 * platform/network/BlobResourceHandle.cpp:
3333 (WebCore::BlobResourceHandle::BlobResourceHandle): Use make_unique to make the
3334 stream objects instead of custom create functions.
3335 (WebCore::BlobResourceHandle::~BlobResourceHandle): Removed now-unneeded code
3336 to call stop functions. Destroying the objects now takes care of the this, and
3337 that's done by the unique_ptrs.
3338 (WebCore::BlobResourceHandle::cancel): Removed the rest of the code to stop the
3339 m_asyncStream, keeping only the code that sets it to null. That now stops the
3340 stream by destroying it.
3342 * platform/network/BlobResourceHandle.h: Use std::unique_ptr rather than
3343 RefPtr for the file stream objects.
3345 * storage/StorageThread.h: Tweaked formatting of std::function<void()> to
3346 match the format used elsewhere in WebKit.
3348 2014-11-08 Simon Fraser <simon.fraser@apple.com>
3350 Don't try to schedule a GraphicsLayer flush when propagating changes to replicas inside a flush
3351 https://bugs.webkit.org/show_bug.cgi?id=138532
3353 Reviewed by Dan Bernstein.
3355 When changing masks on replica layers with certain layer configurations,
3356 it was possible to hit an assertion that a flush was being scheduled when already
3357 flushing, via propagateLayerChangeToReplicas(). Fix by passing the scheduleFlush
3360 Not testable with current GraphicsLayer configurations.
3362 * platform/graphics/ca/GraphicsLayerCA.cpp:
3363 * platform/graphics/ca/GraphicsLayerCA.h:
3365 2014-11-08 Beth Dakin <bdakin@apple.com>
3367 Implement action menu support for videos
3368 https://bugs.webkit.org/show_bug.cgi?id=138534
3370 rdar://problem/18742164
3372 Reviewed by Tim Horton.
3374 Export needed symbols and added not-yet-implemented
3375 HitTestResult::isMediaThatCanBeDownloaded() so that action menus will work as
3376 expected once it is implemented.
3378 * rendering/HitTestResult.cpp:
3379 (WebCore::HitTestResult::isMediaThatCanBeDownloaded):
3380 * rendering/HitTestResult.h:
3382 2014-11-08 Chris Dumez <cdumez@apple.com>
3384 Speed up HTMLInputElement::isEmptyValue()
3385 https://bugs.webkit.org/show_bug.cgi?id=138515
3387 Reviewed by Geoffrey Garen.
3389 HTMLInputElement::isEmptyValue() was calling
3390 HTMLTextFormControlElement::innerTextValue() which causes a full
3391 subtree traversal to construct a string representation of that subtree
3392 using a StringBuilder. In the case of HTMLInputElement::isEmptyValue(),
3393 we don't have to do all this: We don't need to construct a String
3394 and we can return false as soon as we find a non-empty descendant.
3396 No new tests, no behavior change.
3398 * html/HTMLInputElement.cpp:
3399 (WebCore::HTMLInputElement::isEmptyValue):
3400 * html/HTMLInputElement.h:
3402 2014-11-07 Eric Carlson <eric.carlson@apple.com>
3404 [iOS] video is sometimes allowed to play from the background
3405 https://bugs.webkit.org/show_bug.cgi?id=138522
3407 Reviewed by Jer Noble.
3409 * html/HTMLMediaElement.cpp:
3410 (WebCore::HTMLMediaElement::displayType): New.
3411 * html/HTMLMediaElement.h:
3413 * platform/audio/MediaSession.cpp:
3414 (WebCore::MediaSession::isHidden): New, client passthrough.
3415 (WebCore::MediaSession::displayType): Ditto.
3416 * platform/audio/MediaSession.h:
3417 (WebCore::MediaSessionClient::displayType):
3419 * platform/audio/MediaSessionManager.cpp:
3420 (WebCore::MediaSessionManager::sessionCanLoadMedia): New, default implementation returns
3421 true if client is visible or playing.
3422 * platform/audio/MediaSessionManager.h:
3424 * platform/audio/ios/MediaSessionManagerIOS.h:
3425 * platform/audio/ios/MediaSessionManagerIOS.mm:
3426 (WebCore::MediaSessionManageriOS::sessionCanLoadMedia): iOS override, also allows buffering
3427 when displaying optimized fullscreen.
3429 2014-11-07 Benjamin Poulain <bpoulain@apple.com>
3431 Fix the build after r175772
3433 * inspector/InspectorCSSAgent.cpp:
3434 (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
3436 2014-11-07 Benjamin Poulain <benjamin@webkit.org>
3438 Make the Selector's specificity part of Selector matching
3439 https://bugs.webkit.org/show_bug.cgi?id=138486
3441 Reviewed by Andreas Kling.
3443 In CSS Selectors Level 4, the specificity of selectors is computed dynamically
3444 based on which element is being matched.
3446 For example, a selector:
3447 :matches(#foo, .bar, baz)
3448 has a specificity of
3449 (1, 0, 0) on <baz id=foo class=bar>
3450 (0, 1, 0) on <baz class=bar>
3453 Previously, the specificity of each selector was computed statically when populating
3454 RuleSet. With more recent CSS, this gives us the wrong specificity because we do not know
3455 how the selectors applies to the target.
3457 This patch moves one tiny step in the direction of dynamic specificity. The specificity
3458 is removed from RuleSet and is moved inside Selector Matching.
3460 There is one bit worth keeping static: matching based on rule hash. This path is important
3461 to avoid spending time compiling trivial selectors.
3462 In order to keep rule hash matching working, the RuleData store which specificity class
3463 the rule has in addition to the information about matching/not-matching. When going through
3464 the fast path in ElementCollector, we compute the right specificity based on the type
3465 of rule-hash matching.
3467 * css/CSSSelector.cpp:
3468 (WebCore::CSSSelector::specificityForOneSelector):
3469 * css/CSSSelector.h:
3470 * css/ElementRuleCollector.cpp:
3471 (WebCore::ElementRuleCollector::addMatchedRule):
3472 (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
3473 (WebCore::ElementRuleCollector::ruleMatches):
3474 (WebCore::ElementRuleCollector::collectMatchingRulesForList):
3475 (WebCore::compareRules):
3476 * css/ElementRuleCollector.h:
3478 (WebCore::computeMatchBasedOnRuleHash):
3479 (WebCore::RuleData::RuleData):
3480 (WebCore::isSelectorMatchingHTMLBasedOnRuleHash): Deleted.
3482 (WebCore::RuleData::matchBasedOnRuleHash):
3483 (WebCore::RuleData::hasRightmostSelectorMatchingHTMLBasedOnRuleHash): Deleted.
3484 (WebCore::RuleData::specificity): Deleted.
3485 * css/SelectorChecker.cpp:
3486 (WebCore::SelectorChecker::match):
3487 * css/SelectorChecker.h:
3488 * css/StyleResolver.h:
3489 (WebCore::checkRegionSelector):
3490 * cssjit/SelectorCompiler.cpp:
3491 (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
3492 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
3493 * cssjit/SelectorCompiler.h:
3494 (WebCore::SelectorCompiler::ruleCollectorSimpleSelectorCheckerFunction):
3495 (WebCore::SelectorCompiler::querySelectorSimpleSelectorCheckerFunction):
3496 (WebCore::SelectorCompiler::ruleCollectorSelectorCheckerFunctionWithCheckingContext):
3497 (WebCore::SelectorCompiler::querySelectorSelectorCheckerFunctionWithCheckingContext):
3498 (WebCore::SelectorCompiler::simpleSelectorCheckerFunction): Deleted.
3499 (WebCore::SelectorCompiler::selectorCheckerFunctionWithCheckingContext): Deleted.
3500 * dom/SelectorQuery.cpp:
3501 (WebCore::SelectorDataList::selectorMatches):
3502 (WebCore::SelectorDataList::selectorClosest):
3503 (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
3504 (WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext):
3505 (WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData):
3506 (WebCore::SelectorDataList::execute):
3507 * dom/SelectorQuery.h:
3509 2014-11-07 Alexey Proskuryakov <ap@apple.com>
3511 CSP is enforced for eval in report-only mode on first page load
3512 https://bugs.webkit.org/show_bug.cgi?id=138492
3513 rdar://problem/15782525
3515 Reviewed by Daniel Bates.
3517 This is covered by existing tests when running as one test per process invocation.
3519 * page/ContentSecurityPolicy.cpp:
3520 (WebCore::CSPDirectiveList::allowEval): Allow when in report only mode. The allowEval
3521 function itself needs to return false, because it's used in checkEvalAndReportViolation().
3522 (WebCore::CSPDirectiveList::allowJavaScriptURLs): Apply the same fix, although it's
3523 not changing the behavior - this function is never called with ContentSecurityPolicy::SuppressReport.
3524 (WebCore::CSPDirectiveList::allowInlineEventHandlers): Ditto.
3525 (WebCore::CSPDirectiveList::allowInlineScript): Ditto.
3526 (WebCore::CSPDirectiveList::allowInlineStyle): Ditto.
3527 (WebCore::CSPDirectiveList::allowPluginType): Ditto.
3528 (WebCore::CSPDirectiveList::allowScriptFromSource): Ditto.
3529 (WebCore::CSPDirectiveList::allowObjectFromSource): Ditto.
3530 (WebCore::CSPDirectiveList::allowChildFrameFromSource): Ditto.
3531 (WebCore::CSPDirectiveList::allowImageFromSource): Ditto.
3532 (WebCore::CSPDirectiveList::allowStyleFromSource): Ditto.
3533 (WebCore::CSPDirectiveList::allowFontFromSource): Ditto.
3534 (WebCore::CSPDirectiveList::allowMediaFromSource): Ditto.
3535 (WebCore::CSPDirectiveList::allowConnectToSource): Ditto.
3536 (WebCore::CSPDirectiveList::allowFormAction): Ditto.
3537 (WebCore::CSPDirectiveList::allowBaseURI): Ditto.
3538 (WebCore::ContentSecurityPolicy::didReceiveHeader): Remove isReportOnly() check,
3539 which is now inside allowEval().
3541 2014-11-07 Andreas Kling <akling@apple.com>
3543 [Mac] Avoid repainting scrollbar track when the scrollbar track is transparent.
3544 <https://webkit.org/b/138521>
3545 <rdar://problem/18892090>
3547 Reviewed by Simon Fraser.
3549 Don't bother invalidating the entire WebCore scrollbar when we've opted into
3550 AppKit's special mode to use individual layers for scrollbar components.
3551 NSScrollerImp will invalidate what's necessary below e.g setKnobAlpha.
3553 * platform/mac/ScrollAnimatorMac.mm:
3554 (-[WebScrollbarPartAnimation setCurrentProgress:]):
3556 2014-11-07 Chris Dumez <cdumez@apple.com>
3558 Rename HTMLInputElement::imageLoader() to ensureImageLoader()
3559 https://bugs.webkit.org/show_bug.cgi?id=138508
3561 Reviewed by Andreas Kling.
3563 Rename HTMLInputElement::imageLoader() to ensureImageLoader() and have
3564 it return a reference to make it clear that it constructs an
3565 ImageLoader if missing.
3566 Also introduce a lightweight imageLoader() getter which just returns
3567 the imageLoader or null if missing.
3569 No new tests, no behavior change.
3571 * html/HTMLInputElement.cpp:
3572 (WebCore::HTMLInputElement::ensureImageLoader):
3573 (WebCore::HTMLInputElement::didMoveToNewDocument):
3574 (WebCore::HTMLInputElement::imageLoader): Deleted.
3575 * html/HTMLInputElement.h:
3576 (WebCore::HTMLInputElement::imageLoader):
3577 (WebCore::HTMLInputElement::hasImageLoader): Deleted.
3578 * html/ImageInputType.cpp:
3579 (WebCore::ImageInputType::srcAttributeChanged):
3580 (WebCore::ImageInputType::attach):
3581 (WebCore::ImageInputType::height):
3582 (WebCore::ImageInputType::width):
3584 2014-11-07 Chris Dumez <cdumez@apple.com>
3586 Move 'webkit-clip-path' CSS property to the new StyleBuilder
3587 https://bugs.webkit.org/show_bug.cgi?id=138452
3589 Reviewed by Andreas Kling.
3591 Move 'webkit-clip-path' CSS property from DeprecatedStyleBuilder to the
3592 new StyleBuilder so that it is now generated from CSSPropertyNames.in.
3594 A ClipPath converter was added to support this. Custom code was avoided
3595 by replacing if checks by assertions, relying on the CSSParser to make
3596 sure the input is valid.
3598 Test: fast/masking/clip-path-bad-value.html
3600 * css/CSSPropertyNames.in:
3601 * css/DeprecatedStyleBuilder.cpp:
3602 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3603 (WebCore::ApplyPropertyClipPath::setValue): Deleted.
3604 (WebCore::ApplyPropertyClipPath::applyValue): Deleted.
3605 (WebCore::ApplyPropertyClipPath::createHandler): Deleted.
3606 * css/StyleBuilderConverter.h:
3607 (WebCore::StyleBuilderConverter::convertClipPath):
3609 2014-11-07 Joseph Pecoraro <pecoraro@apple.com>
3611 Web Inspector: Pseudo element matchedCSSRules do not include matching selector info
3612 https://bugs.webkit.org/show_bug.cgi?id=138438
3614 Reviewed by Benjamin Poulain.
3616 Test: inspector/css/psuedo-element-matches.html
3618 Element::matches is not the correct API to use to check selectors with pseudo-elements.
3619 Instead we should use the CSS Selector checking machinary which understands them.
3621 * inspector/InspectorCSSAgent.cpp:
3622 (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
3623 (WebCore::InspectorCSSAgent::buildArrayForRuleList):
3624 (WebCore::InspectorCSSAgent::buildArrayForRegions):
3625 (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
3626 Some RefPtr release improvements.
3628 (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
3629 Use a SelectorChecker to check each Selector against the element.
3630 This matches the SelectorChecker used when we collected the rules
3633 2014-11-07 Chris Dumez <cdumez@apple.com>
3635 Drop useless HTMLElement::isURLAttribute() override
3636 https://bugs.webkit.org/show_bug.cgi?id=138479
3638 Reviewed by Mark Lam.
3640 Drop useless HTMLElement::isURLAttribute() override as it is doing
3641 nothing but calling the parent class' isURLAttribute().
3643 No new tests, no behavior change.
3645 * html/HTMLElement.cpp:
3646 (WebCore::HTMLElement::isURLAttribute): Deleted.
3647 * html/HTMLElement.h:
3649 2014-11-07 Eric Carlson <eric.carlson@apple.com>
3651 [iOS] Update optimized fullscreen media controls
3652 https://bugs.webkit.org/show_bug.cgi?id=138493
3654 Reviewed by Brent Fulgham.
3656 * Modules/mediacontrols/MediaControlsHost.cpp:
3657 (WebCore::MediaControlsHost::fullscreenMode): New.
3658 (WebCore::MediaControlsHost::mediaUIImageData): New.
3659 * Modules/mediacontrols/MediaControlsHost.h:
3660 * Modules/mediacontrols/MediaControlsHost.idl:
3662 * Modules/mediacontrols/mediaControlsiOS.css:
3663 Renamed -webkit-media-controls-wireless-playback-status to -webkit-media-controls-inline-playback-placeholder
3664 because it is now used for other inline playback status display. Add z-index:0 so the placeholder
3665 renders above captions. Remove the background-image, it is now set from script.
3666 (audio::-webkit-media-controls-inline-playback-placeholder):
3667 (audio::-webkit-media-controls-inline-playback-placeholder.hidden):
3668 (video::-webkit-media-controls-optimized-fullscreen-button):
3669 (audio::-webkit-media-controls-wireless-playback-status): Deleted.
3670 (audio::-webkit-media-controls-wireless-playback-status.hidden): Deleted.
3671 (video::-webkit-media-controls-optimized-fullscreen-button:active): Deleted.
3673 * Modules/mediacontrols/mediaControlsiOS.js:
3674 (ControllerIOS): Set doingSetup to true around setup so we don't draw the inline controls
3675 briefly when an element is created as a result of a user gesture.
3676 (ControllerIOS.prototype.shouldHaveStartPlaybackButton): Don't allow inline controls during
3677 initial setup to prevent inline controls from begin drawn briefly when a media element
3678 is created and inserted by a script called from a user gesture.
3679 (ControllerIOS.prototype.updateWirelessPlaybackStatus): wirelessPlaybackStatus -> inlinePlaybackPlaceholder.
3680 (ControllerIOS.prototype.createControls): Ditto. Add style rules for optimized fullscreen button.
3681 (ControllerIOS.prototype.configureInlineControls): Add the inlinePlaybackPlaceholder as a peer of
3682 the inline controls compositing child instead of as a child so it renders correctly.
3683 (ControllerIOS.prototype.addControls):
3684 (ControllerIOS.prototype.updateControls): wirelessPlaybackStatus -> inlinePlaybackPlaceholder.
3685 (ControllerIOS.prototype.handleWrapperTouchStart):
3686 (ControllerIOS.prototype.get pageScaleFactor): Cleanup.
3687 (ControllerIOS.prototype.set pageScaleFactor): Ditto.
3688 (ControllerIOS.prototype.handleFullscreenChange): Show the placeholder.
3690 * WebCore.exp.in: Export _wkGetMediaUIImageData.
3692 * html/HTMLMediaElement.h:
3693 (WebCore::HTMLMediaElement::fullscreenMode): Expose fullscreen mode.
3695 * platform/ios/WebCoreSystemInterfaceIOS.h:
3696 * platform/ios/WebCoreSystemInterfaceIOS.mm:
3698 2014-11-06 Carlos Garcia Campos <cgarcia@igalia.com>
3700 Unreviewed. Try to fix GTK build after r175719.
3702 Rename the Timer fired function as requestAnimationTimerFired() to
3705 * platform/ScrollAnimatorNone.cpp:
3706 (WebCore::ScrollAnimatorNone::ScrollAnimatorNone):
3707 (WebCore::ScrollAnimatorNone::requestAnimationTimerFired):
3708 (WebCore::ScrollAnimatorNone::animationTimerFired): Deleted.
3709 * platform/ScrollAnimatorNone.h:
3711 2014-11-06 Chris Dumez <cdumez@apple.com>
3713 Remove useless if check in HTMLInputElement::setValue()
3714 https://bugs.webkit.org/show_bug.cgi?id=138485
3716 Reviewed by Daniel Bates.
3718 Remove useless if check in HTMLInputElement::setValue(). It was
3719 inadvertently left in as part of r94836.
3721 * html/HTMLInputElement.cpp:
3722 (WebCore::HTMLInputElement::setValue):
3724 2014-11-06 Simon Fraser <simon.fraser@apple.com>
3726 Put names on a couple of video-related CALayers
3727 https://bugs.webkit.org/show_bug.cgi?id=138491
3729 Reviewed by Eric Carlson.
3731 In debug, set layer names on a couple of video-related layers to make
3734 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3735 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
3736 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3737 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
3739 2014-11-06 Darin Adler <darin@apple.com>
3741 REGRESSION (r175549): http/tests/multipart/stop-crash.html failing (assertion failure in CachedResource::setEncodedSize)
3742 https://bugs.webkit.org/show_bug.cgi?id=138358
3744 Reviewed by Alexey Proskuryakov.
3746 * loader/cache/CachedResource.cpp:
3747 (WebCore::CachedResource::setEncodedSize): Removed the incorrect assertion here.
3748 The code asserts that resources only get bigger, never smaller. This is incorrect
3749 for a multipart/mixed-replace image, where a later image that is smaller can replace
3750 an earlier one. I don't fully understand why this assertion was not firing before,
3751 but the relevant websites are working fine and the test otherwise passes.
3753 * loader/DocumentLoader.cpp:
3754 (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart): Fix another
3755 incorrect assertion that can fire for any parts after the first one. I ran into
3756 this while testing various websites that use multipart/mixed-replace.
3758 2014-11-06 Jeremy Jones <jeremyj@apple.com>
3760 Fix typo in optimized fullscreen activation.
3761 https://bugs.webkit.org/show_bug.cgi?id=138480
3763 Reviewed by Jer Noble.
3765 * Modules/mediacontrols/mediaControlsiOS.js:
3766 (ControllerIOS.prototype.handleWrapperTouchStart): fix typo doubleTouchIntervalThresholdms
3767 (ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): fix typo isFullScreen
3769 2014-11-06 Chris Dumez <cdumez@apple.com>
3771 Stop special-casing wbr elements in HTMLElement::createElementRenderer()
3772 https://bugs.webkit.org/show_bug.cgi?id=138474
3774 Reviewed by Ryosuke Niwa.
3776 Stop special-casing wbr elements in HTMLElement::createElementRenderer()
3777 and move the code to a HTMLWBRElement subclass instead, that is
3778 overriding createElementRenderer(). This function is already virtual.
3780 No new tests, no behavior change.
3783 * WebCore.vcxproj/WebCore.vcxproj:
3784 * WebCore.xcodeproj/project.pbxproj:
3785 * html/HTMLElement.cpp:
3786 (WebCore::HTMLElement::createElementRenderer):
3787 * html/HTMLElementsAllInOne.cpp:
3788 * html/HTMLTagNames.in:
3789 * html/HTMLWBRElement.cpp: Added.
3790 (WebCore::HTMLWBRElement::create):
3791 (WebCore::HTMLWBRElement::HTMLWBRElement):
3792 (WebCore::HTMLWBRElement::createElementRenderer):
3793 * html/HTMLWBRElement.h: Added.
3794 * rendering/RenderLineBreak.cpp:
3795 (WebCore::RenderLineBreak::RenderLineBreak):
3797 2014-11-05 Jer Noble <jer.noble@apple.com>
3800 https://bugs.webkit.org/show_bug.cgi?id=138450
3802 Reviewed by Anders Carlsson.
3804 Timer does not need to be a templated class; only it's constructors need to be templated.
3805 Remove the template specifier from Timer and add same to its two class method
3806 constructors. Replace the function pointer typedefs with using statements. Add a
3807 helper typedef which allows invalid combinations of TimerFiredClass and
3808 TimerFiredFunction to be caught early by the compiler, while still allowing
3809 valid combinations (such as when the caller specifies a function on a subclass of
3812 * Modules/encryptedmedia/MediaKeySession.cpp:
3813 (WebCore::MediaKeySession::keyRequestTimerFired):
3814 (WebCore::MediaKeySession::addKeyTimerFired):
3815 * Modules/encryptedmedia/MediaKeySession.h:
3816 * Modules/geolocation/Geolocation.cpp:
3817 (WebCore::Geolocation::GeoNotifier::timerFired):
3818 (WebCore::Geolocation::resumeTimerFired):
3819 * Modules/geolocation/Geolocation.h:
3820 * Modules/indexeddb/IDBTransactionBackend.cpp:
3821 (WebCore::IDBTransactionBackend::taskTimerFired):
3822 * Modules/indexeddb/IDBTransactionBackend.h:
3823 * Modules/mediasource/SourceBuffer.cpp:
3824 (WebCore::SourceBuffer::appendBufferTimerFired):
3825 (WebCore::SourceBuffer::removeTimerFired):
3826 * Modules/mediasource/SourceBuffer.h:
3827 * Modules/mediastream/MediaStream.cpp:
3828 (WebCore::MediaStream::scheduledEventTimerFired):
3829 * Modules/mediastream/MediaStream.h:
3830 * Modules/mediastream/RTCDTMFSender.cpp:
3831 (WebCore::RTCDTMFSender::scheduledEventTimerFired):
3832 * Modules/mediastream/RTCDTMFSender.h:
3833 * Modules/mediastream/RTCDataChannel.cpp:
3834 (WebCore::RTCDataChannel::scheduledEventTimerFired):
3835 * Modules/mediastream/RTCDataChannel.h:
3836 * Modules/mediastream/RTCPeerConnection.cpp:
3837 (WebCore::RTCPeerConnection::scheduledEventTimerFired):
3838 * Modules/mediastream/RTCPeerConnection.h:
3839 * Modules/notifications/Notification.cpp:
3840 (WebCore::Notification::Notification):
3841 (WebCore::Notification::taskTimerFired):
3842 * Modules/notifications/Notification.h:
3843 * Modules/notifications/NotificationCenter.cpp:
3844 (WebCore::NotificationCenter::NotificationRequestCallback::timerFired):
3845 * Modules/notifications/NotificationCenter.h:
3846 * Modules/vibration/Vibration.cpp:
3847 (WebCore::Vibration::timerFired):
3848 * Modules/vibration/Vibration.h:
3849 * Modules/websockets/WebSocketChannel.cpp:
3850 (WebCore::WebSocketChannel::resumeTimerFired):
3851 (WebCore::WebSocketChannel::closingTimerFired):
3852 * Modules/websockets/WebSocketChannel.h:
3853 * accessibility/AXObjectCache.cpp:
3854 (WebCore::AXObjectCache::notificationPostTimerFired):
3855 * accessibility/AXObjectCache.h:
3856 (WebCore::AXObjectCache::AXObjectCache):
3857 * bindings/js/GCController.cpp:
3858 (WebCore::GCController::gcTimerFired):
3859 * bindings/js/GCController.h:
3860 * css/CSSFontFaceSource.h:
3861 * css/CSSFontSelector.cpp:
3862 (WebCore::CSSFontSelector::beginLoadTimerFired):
3863 * css/CSSFontSelector.h:
3864 * css/StyleResolver.cpp:
3865 (WebCore::StyleResolver::sweepMatchedPropertiesCache):
3866 * css/StyleResolver.h:
3868 (WebCore::Document::visualUpdatesSuppressionTimerFired):
3869 (WebCore::Document::styleRecalcTimerFired):
3870 (WebCore::Document::optimizedStyleSheetUpdateTimerFired):
3871 (WebCore::Document::sharedObjectPoolClearTimerFired):
3872 (WebCore::Document::updateFocusAppearanceTimerFired):
3873 (WebCore::Document::pendingTasksTimerFired):
3874 (WebCore::Document::fullScreenChangeDelayTimerFired):
3875 (WebCore::Document::loadEventDelayTimerFired):
3876 (WebCore::Document::didAssociateFormControlsTimerFired):
3877 (WebCore::Document::domCookieCacheExpiryTimerFired):
3879 * dom/EventSender.h:
3880 (WebCore::EventSender::timerFired):
3881 * dom/GenericEventQueue.cpp:
3882 (WebCore::GenericEventQueue::timerFired):
3883 * dom/GenericEventQueue.h:
3884 * dom/ScriptRunner.cpp:
3885 (WebCore::ScriptRunner::timerFired):
3886 * dom/ScriptRunner.h:
3887 * dom/ScriptedAnimationController.cpp:
3888 (WebCore::ScriptedAnimationController::animationTimerFired):
3889 * dom/ScriptedAnimationController.h:
3890 * dom/StyledElement.cpp:
3891 (WebCore::PresentationAttributeCacheCleaner::cleanCache):
3892 * editing/AlternativeTextController.cpp:
3893 (WebCore::AlternativeTextController::timerFired):
3894 * editing/AlternativeTextController.h:
3895 * editing/Editor.cpp:
3896 (WebCore::Editor::scanSelectionForTelephoneNumbers):
3897 (WebCore::Editor::editorUIUpdateTimerFired):
3899 * editing/FrameSelection.cpp:
3900 (WebCore::FrameSelection::caretBlinkTimerFired):
3901 * editing/FrameSelection.h:
3902 * editing/SpellChecker.cpp:
3903 (WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
3904 * editing/SpellChecker.h:
3905 * html/HTMLFormElement.cpp:
3906 (WebCore::HTMLFormElement::requestAutocompleteTimerFired):
3907 * html/HTMLFormElement.h:
3908 * html/HTMLMediaElement.cpp:
3909 (WebCore::HTMLMediaElement::parseAttribute):
3910 * html/HTMLMediaElement.h:
3911 * html/HTMLPlugInElement.cpp:
3912 (WebCore::HTMLPlugInElement::swapRendererTimerFired):
3913 * html/HTMLPlugInElement.h:
3914 * html/HTMLPlugInImageElement.cpp:
3915 (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
3916 * html/HTMLPlugInImageElement.h:
3917 * html/HTMLSourceElement.cpp:
3918 (WebCore::HTMLSourceElement::errorEventTimerFired):
3919 * html/HTMLSourceElement.h:
3920 * html/HTMLTrackElement.cpp:
3921 (WebCore::HTMLTrackElement::loadTimerFired):
3922 * html/HTMLTrackElement.h:
3923 * html/MediaController.cpp:
3924 (MediaController::asyncEventTimerFired):
3925 (MediaController::clearPositionTimerFired):
3926 (MediaController::timeupdateTimerFired):
3927 * html/MediaController.h:
3928 * html/MediaDocument.cpp:
3929 (WebCore::MediaDocument::replaceMediaElementTimerFired):
3930 * html/MediaDocument.h:
3931 * html/SearchInputType.cpp:
3932 (WebCore::SearchInputType::searchEventTimerFired):
3933 * html/SearchInputType.h:
3934 * html/ValidationMessage.cpp:
3935 (WebCore::ValidationMessage::setMessage):
3936 (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
3937 (WebCore::ValidationMessage::buildBubbleTree):
3938 (WebCore::ValidationMessage::requestToHideMessage):
3939 (WebCore::ValidationMessage::deleteBubbleTree):
3940 * html/ValidationMessage.h:
3941 * html/canvas/WebGLRenderingContext.cpp:
3942 (WebCore::WebGLRenderingContext::dispatchContextLostEvent):
3943 (WebCore::WebGLRenderingContext::maybeRestoreContext):
3944 * html/canvas/WebGLRenderingContext.h:
3945 * html/parser/HTMLParserScheduler.cpp:
3946 (WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
3947 * html/parser/HTMLParserScheduler.h:
3948 * html/shadow/MediaControlElements.cpp:
3949 (WebCore::MediaControlPanelElement::transitionTimerFired):
3950 (WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
3951 * html/shadow/MediaControlElements.h:
3952 * html/shadow/MediaControls.cpp:
3953 (WebCore::MediaControls::hideFullscreenControlsTimerFired):
3954 * html/shadow/MediaControls.h:
3955 * html/shadow/SpinButtonElement.cpp:
3956 (WebCore::SpinButtonElement::repeatingTimerFired):
3957 * html/shadow/SpinButtonElement.h:
3958 * html/track/LoadableTextTrack.cpp:
3959 (WebCore::LoadableTextTrack::loadTimerFired):
3960 * html/track/LoadableTextTrack.h:
3961 * html/track/VTTRegion.cpp:
3962 (WebCore::VTTRegion::scrollTimerFired):
3963 * html/track/VTTRegion.h:
3964 * inspector/InspectorCSSAgent.cpp:
3965 (WebCore::ChangeRegionOversetTask::timerFired):
3966 * inspector/InspectorDOMAgent.cpp:
3967 (WebCore::RevalidateStyleAttributeTask::timerFired):
3968 * inspector/InspectorFrontendClientLocal.cpp:
3969 (WebCore::InspectorBackendDispatchTask::timerFired):
3970 * inspector/InspectorOverlay.cpp:
3971 (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
3972 * inspector/InspectorOverlay.h:
3973 * loader/DocumentLoader.cpp:
3974 (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
3975 * loader/DocumentLoader.h:
3976 * loader/FrameLoader.cpp:
3977 (WebCore::FrameLoader::checkTimerFired):
3978 * loader/FrameLoader.h:
3979 * loader/ImageLoader.cpp:
3980 (WebCore::ImageLoader::timerFired):
3981 * loader/ImageLoader.h:
3982 * loader/LinkLoader.cpp:
3983 (WebCore::LinkLoader::linkLoadTimerFired):
3984 (WebCore::LinkLoader::linkLoadingErrorTimerFired):
3985 * loader/LinkLoader.h:
3986 * loader/NavigationScheduler.cpp:
3987 (WebCore::ScheduledNavigation::didStartTimer):
3988 (WebCore::NavigationScheduler::timerFired):
3989 * loader/NavigationScheduler.h:
3990 * loader/PingLoader.h:
3991 (WebCore::PingLoader::timeoutTimerFired):
3992 * loader/ProgressTracker.cpp:
3993 (WebCore::ProgressTracker::progressHeartbeatTimerFired):
3994 * loader/ProgressTracker.h:
3995 * loader/ResourceLoadScheduler.cpp:
3996 (WebCore::ResourceLoadScheduler::requestTimerFired):
3997 * loader/ResourceLoadScheduler.h:
3998 * loader/TextTrackLoader.cpp:
3999 (WebCore::TextTrackLoader::cueLoadTimerFired):
4000 * loader/TextTrackLoader.h:
4001 * loader/cache/CachedResource.cpp:
4002 (WebCore::CachedResource::Callback::timerFired):
4003 * loader/cache/CachedResource.h:
4004 * loader/cache/CachedResourceLoader.cpp:
4005 (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
4006 * loader/cache/CachedResourceLoader.h:
4007 * loader/icon/IconDatabase.cpp:
4008 (WebCore::IconDatabase::syncTimerFired):
4009 * loader/icon/IconDatabase.h:
4010 * page/AutoscrollController.cpp:
4011 (WebCore::AutoscrollController::autoscrollTimerFired):