1 2014-10-30 Myles C. Maxfield <mmaxfield@apple.com>
3 Use references in calculateMinimumPageHeight() for non-optional arguments
4 https://bugs.webkit.org/show_bug.cgi?id=138231
6 Reviewed by Dean Jackson.
8 No new tests because there is no behavior change.
10 * rendering/RenderBlockFlow.cpp:
11 (WebCore::calculateMinimumPageHeight):
12 (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
14 2014-10-30 Chris Dumez <cdumez@apple.com>
16 Move -webkit-border-image / -webkit-mask-box-image to the new StyleBuilder
17 https://bugs.webkit.org/show_bug.cgi?id=138207
19 Reviewed by Andreas Kling.
21 Move -webkit-border-image / -webkit-mask-box-image CSS properties to
22 the new StyleBuilder so that they are now generated from
25 No new tests, no behavior change.
27 * css/CSSPropertyNames.in:
28 * css/DeprecatedStyleBuilder.cpp:
29 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
30 (WebCore::ApplyPropertyBorderImage::applyValue): Deleted.
31 (WebCore::ApplyPropertyBorderImage::createHandler): Deleted.
32 * css/StyleBuilderConverter.h:
33 (WebCore::StyleBuilderConverter::convertBorderImage):
34 (WebCore::StyleBuilderConverter::convertBorderMask):
36 2014-10-30 Chris Dumez <cdumez@apple.com>
38 Optimize HTMLVideoElement / HTMLAudioElement type checks a bit
39 https://bugs.webkit.org/show_bug.cgi?id=138202
41 Reviewed by Benjamin Poulain.
43 Optimize HTMLVideoElement / HTMLAudioElement type checks a bit by:
44 1. Using is<HTMLMediaElement>() instead of
45 (is<HTMLVideoElement>() || is<HTMLAudioElement>()) if the caller is
46 interested in both video and audio elements. This is faster because
48 - virtual call to Element::isMediaElement()
50 - Node::isHTMLElement() +
51 virtual call to HTMLElement::isHTMLUnknownElement() +
52 2 * HTMLElement::hasTagName()
53 2. Updating HTMLVideoElement / HTMLAudioElement type traits
55 - Avoid doing any virtual function call if the input type is an
56 HTMLMediaElement (which is common in the code base).
57 - Speed up check if the input is an Element by doing:
58 - virtual call to Element::isMediaElement() +
59 HTMLElement::hasTagName()
61 - Node::isHTMLElement() +
62 virtual call to !HTMLElement::isHTMLUnknownElement() +
63 HTMLElement::hasTagName()
64 The speed stays the same if the input is a Node or an HTMLElement.
66 No new tests, no behavior change.
68 * css/CSSDefaultStyleSheets.cpp:
69 (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
71 (defaultTagPropertyHash):
73 * html/HTMLAudioElement.h:
75 * html/HTMLImageLoader.cpp:
76 * html/HTMLTagNames.in:
77 * html/HTMLVideoElement.h:
79 * page/ChromeClient.h:
81 2014-10-30 Myles C. Maxfield <mmaxfield@apple.com>
83 Migrate ComplexTextControllerCoreText to use SPI instead of WKSI
84 https://bugs.webkit.org/show_bug.cgi?id=138228
86 Reviewed by Simon Fraser.
88 No new tests because there is no behavior change.
90 * WebCore.xcodeproj/project.pbxproj:
91 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
92 (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
93 (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
94 * platform/spi/cocoa/CoreTextSPI.h: Added.
96 2014-10-30 Eric Carlson <eric.carlson@apple.com>
98 Add diagnostic logging to track page loads.
99 https://bugs.webkit.org/show_bug.cgi?id=138205
100 <rdar://problem/18173017>
102 Reviewed by Jer Noble.
104 * loader/FrameLoader.cpp:
105 (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Log page load success or failure.
107 * page/DiagnosticLoggingKeys.cpp:
108 (WebCore::DiagnosticLoggingKeys::pageLoadedKey): New.
109 * page/DiagnosticLoggingKeys.h:
111 2014-10-24 Philippe Normand <pnormand@igalia.com>
113 [GStreamer] Video resolution changes trigger a crash in the TextureMapper
114 https://bugs.webkit.org/show_bug.cgi?id=137065
116 Reviewed by Gustavo Noronha Silva.
118 Switch to GstSample for buffer+caps communication between the
119 video sink and the player. Using a single object type for this
120 avoid issues where the caps might not correctly describe the
121 buffer contents anymore, for example when the video resolution is
124 * platform/graphics/gstreamer/ImageGStreamer.h: Use GstSample
125 instead of GstBuffer+GstCaps.
126 (WebCore::ImageGStreamer::createImage):
127 * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: Ditto.
128 (ImageGStreamer::ImageGStreamer):
129 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
130 (WebCore::mediaPlayerPrivateRepaintCallback): The repaint signal
131 now uses a GstSample instead of a GstBuffer.
132 (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
133 Store the current sample instead of a buffer. Also renamed the
134 mutex protecting access to the sample.
135 (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Ditto.
136 (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize): Return
137 early if no sample is available. The caps used to get the video
138 size are store in the sample.
139 (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Use
140 GstSample instead of GstBuffer.
141 (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): Ditto.
142 (WebCore::MediaPlayerPrivateGStreamerBase::paint): Ditto.
143 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
144 * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: Now store a
145 GstSample internally. Also removed the now useless current-caps property.
146 (_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Renamed the
147 mutex protecting access to the sample.
148 (_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Ditto.
149 (webkit_video_sink_init): Disable last-sample in basesink since we
150 already store one in our sink anyway.
151 (webkitVideoSinkTimeoutCallback): Switch to GstSample.
152 (webkitVideoSinkRender): Ditto.
153 (unlockSampleMutex): Ditto.
154 (webkitVideoSinkUnlock): Ditto.
155 (webkitVideoSinkUnlockStop): Ditto.
156 (webkitVideoSinkStop): Ditto!
157 (webkitVideoSinkStart): Ditto.
158 (webkit_video_sink_class_init): Drop current-caps property.
159 (webkitVideoSinkGetProperty): Deleted.
160 (unlockBufferMutex): Deleted.
162 2014-10-30 Carlos Garcia Campos <cgarcia@igalia.com>
164 FormDataBuilder should not use Document
165 https://bugs.webkit.org/show_bug.cgi?id=138172
167 Reviewed by Alexey Proskuryakov.
169 It's only used by encodingFromAcceptCharset() to fallback to
170 document input encoding. That method is only used by
171 FormSubmission::create(), so it could be moved as a static
172 function to FormSubmission.cpp.
174 * loader/FormSubmission.cpp:
175 (WebCore::encodingFromAcceptCharset):
176 (WebCore::FormSubmission::create):
177 * platform/network/FormDataBuilder.cpp:
178 (WebCore::FormDataBuilder::encodingFromAcceptCharset): Deleted.
179 * platform/network/FormDataBuilder.h:
181 2014-10-29 Said Abou-Hallawa <sabouhallawa@apple.com>
183 ASSERTION NOT REACHED because RenderStyle::setWordSpacing() does not handle a Length value of type 'Calculated'.
184 https://bugs.webkit.org/show_bug.cgi?id=138054.
186 Reviewed by Zalan Bujtas.
188 A Length of type 'Calculated' can be generated from blending two lengths of
189 different types. Setting the wordSpacing of the render style should be handled
190 correctly when the type of the new value is 'Calculated'.
192 Tests: css3/calculated-word-spacing.html.
194 Add a case for setting the render style wordSpacing to a <length> of type 'Calculated'.
195 * rendering/style/RenderStyle.cpp:
196 (WebCore::RenderStyle::setWordSpacing):
198 2014-10-29 Hunseop Jeong <hs85.jeong@samsung.com>
200 [CoordinatedGraphics] Use modern for-loops
201 https://bugs.webkit.org/show_bug.cgi?id=138168
203 Reviewed by Andreas Kling.
205 No new tests as there is no change in functionality.
207 * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Use a modern for loop.
208 (WebCore::CompositingCoordinator::renderNextFrame):
209 (WebCore::CompositingCoordinator::paintToSurface):
210 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: Use a modern for loop.
211 (WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
212 (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
213 (WebCore::CoordinatedGraphicsLayer::syncChildren):
214 (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
215 (WebCore::CoordinatedGraphicsLayer::findFirstDescendantWithContentsRecursively):
216 (WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
217 * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp: Use a modern for loop.
218 (WebCore::CoordinatedImageBacking::updateVisibilityIfNeeded):
220 2014-10-29 Chris Dumez <cdumez@apple.com>
222 Final-ize more of TextFieldInputType's virtual functions
223 https://bugs.webkit.org/show_bug.cgi?id=138194
225 Reviewed by Andreas Kling.
227 Final-ize more of TextFieldInputType's virtual functions for
230 No new tests, no behavior change.
232 * html/TextFieldInputType.h:
234 2014-10-29 Chris Dumez <cdumez@apple.com>
236 Clean up virtual functions in inspector/
237 https://bugs.webkit.org/show_bug.cgi?id=138190
239 Reviewed by Andreas Kling.
241 Clean up virtual functions in inspector/ by:
242 - Making virtual functions final when possible
243 - Making classes final when possible
244 - Explicitly marking functions / destructors as virtual when they are
246 - Making isXXX() virtual functions private on XXX classes to avoid
247 unnecessary type checks
249 No new tests, no behavior change.
251 * inspector/InspectorApplicationCacheAgent.h:
252 (WebCore::InspectorApplicationCacheAgent::~InspectorApplicationCacheAgent): Deleted.
253 * inspector/InspectorCSSAgent.h:
254 * inspector/InspectorDOMAgent.h:
255 * inspector/InspectorDOMDebuggerAgent.h:
256 * inspector/InspectorDOMStorageAgent.h:
257 * inspector/InspectorDatabaseAgent.h:
258 * inspector/InspectorFrontendClientLocal.h:
259 * inspector/InspectorIndexedDBAgent.h:
260 * inspector/InspectorLayerTreeAgent.h:
261 * inspector/InspectorPageAgent.h:
262 * inspector/InspectorReplayAgent.h:
263 * inspector/InspectorResourceAgent.h:
264 * inspector/InspectorStyleSheet.h:
265 * inspector/InspectorTimelineAgent.h:
266 * inspector/InspectorWorkerAgent.h:
267 * inspector/PageConsoleAgent.h:
268 * inspector/WorkerInspectorController.h:
270 2014-10-29 Andreas Kling <akling@apple.com>
272 Generalize dirtying of parent's line boxes when taking a renderer out of tree.
273 <https://webkit.org/b/138152>
275 Reviewed by Antti Koivisto.
277 Instead of calling dirtyLinesFromChangedChild() when certain types of renderers
278 are about to be destroyed, always do this in RenderElement::willBeRemovedFromTree().
280 This is part of an effort to make render tree teardown less incomprehensible.
282 We still don't bother at all if we're in the process of tearing down the entire
283 render tree, since that would be a waste of time.
285 * rendering/RenderBlock.cpp:
286 (WebCore::RenderBlock::willBeDestroyed):
287 * rendering/RenderBlockFlow.cpp:
288 (WebCore::RenderBlockFlow::willBeDestroyed):
289 * rendering/RenderElement.cpp:
290 (WebCore::RenderElement::willBeRemovedFromTree):
291 * rendering/RenderInline.cpp:
292 (WebCore::RenderInline::willBeDestroyed):
293 * rendering/RenderReplaced.cpp:
294 (WebCore::RenderReplaced::willBeDestroyed): Deleted.
295 * rendering/RenderReplaced.h:
297 2014-10-28 Ada Chan <adachan@apple.com>
299 Implement WKPageSetMuted(bool).
300 https://bugs.webkit.org/show_bug.cgi?id=138158
302 Reviewed by Anders Carlsson.
307 2014-10-29 Alexey Proskuryakov <ap@apple.com>
309 Notify Settings object when its Page object goes away.
310 https://bugs.webkit.org/show_bug.cgi?id=138183
311 rdar://problem/18786900
313 Reviewed by Andreas Kling.
315 I could not make a test for this issue.
318 (WebCore::Page::~Page):
320 (WebCore::setImageLoadingSettings):
321 (WebCore::Settings::Settings):
322 (WebCore::Settings::setTextAutosizingEnabled):
323 (WebCore::Settings::setTextAutosizingWindowSizeOverride):
324 (WebCore::Settings::setTextAutosizingFontScaleFactor):
325 (WebCore::Settings::setMediaTypeOverride):
326 (WebCore::Settings::setScriptEnabled):
327 (WebCore::Settings::setUserStyleSheetLocation):
328 (WebCore::Settings::setMinDOMTimerInterval):
329 (WebCore::Settings::minDOMTimerInterval):
330 (WebCore::Settings::domTimerAlignmentInterval):
331 (WebCore::Settings::setUsesPageCache):
332 (WebCore::Settings::setScreenFontSubstitutionEnabled):
333 (WebCore::Settings::setFontRenderingMode):
334 (WebCore::Settings::setDNSPrefetchingEnabled):
335 (WebCore::Settings::setStorageBlockingPolicy):
336 (WebCore::Settings::setBackgroundShouldExtendBeyondPage):
337 (WebCore::Settings::setScrollingPerformanceLoggingEnabled):
338 (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):
339 (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled):
340 (WebCore::Settings::setFontFallbackPrefersPictographs):
342 (WebCore::Settings::pageDestroyed):
344 2014-10-29 Zalan Bujtas <zalan@apple.com>
346 Remove invalid float from RootInlineBox.
347 https://bugs.webkit.org/show_bug.cgi?id=137707
349 Reviewed by Antti Koivisto.
351 In certain cases, floating boxes get attached to the last (root) inline box.
352 When this particular floating box gets destroyed, it also needs to be detached
353 from the last inline box.
354 1. Introduce RootInlineBox::removeFloat() (vs. RootInlineBox::appendFloat())
355 2. Ensure that it is called when the floating box is being destroyed.
357 Test: fast/inline/crash-when-inline-box-has-invalid-float.html
359 * rendering/RenderBlockFlow.cpp:
360 (WebCore::RenderBlockFlow::removeFloatingObject):
361 (WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout): During style recalc, while
362 tearing down the render tree, we can get to a state where a block element has both inline and block children.
363 It happens when the style change on an element makes sibling anonymous block wrappers detached.
364 In that case the markAllDescendantsWithFloatsForLayout() call does not get propagated down on the
365 block child elements as we return early at the childrenInline() check.
366 * rendering/RootInlineBox.h:
367 (WebCore::RootInlineBox::removeFloat):
369 2014-10-29 Antti Koivisto <antti@apple.com>
371 Factor cache validity computation functions out of CachedResource
372 https://bugs.webkit.org/show_bug.cgi?id=138156
374 Reviewed by Andreas Kling.
376 These can be used to implement cache logic on WebKit level.
380 * WebCore.vcxproj/WebCore.vcxproj:
381 * WebCore.xcodeproj/project.pbxproj:
382 * loader/CacheValidation.cpp: Added.
383 (WebCore::computeCurrentAge):
384 (WebCore::computeFreshnessLifetimeForHTTPFamily):
385 (WebCore::updateRedirectChainStatus):
386 (WebCore::redirectChainAllowsReuse):
387 * loader/CacheValidation.h: Added.
388 (WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):
389 * loader/cache/CachedResource.cpp:
390 (WebCore::updateResponseHeadersAfterRevalidation):
391 (WebCore::CachedResource::CachedResource):
392 (WebCore::CachedResource::isExpired):
393 (WebCore::CachedResource::freshnessLifetime):
394 (WebCore::CachedResource::willSendRequest):
395 (WebCore::CachedResource::updateResponseAfterRevalidation):
396 (WebCore::CachedResource::redirectChainAllowsReuse):
397 (WebCore::currentAge): Deleted.
398 * loader/cache/CachedResource.h:
400 2014-10-29 Antti Koivisto <antti@apple.com>
402 Unreviewed, rolling out r175342.
404 a file ended up in a wrong directory
408 "Factor cache validity computation functions out of
410 https://bugs.webkit.org/show_bug.cgi?id=138156
411 http://trac.webkit.org/changeset/175342
413 2014-10-29 Antti Koivisto <antti@apple.com>
415 Factor cache validity computation functions out of CachedResource
416 https://bugs.webkit.org/show_bug.cgi?id=138156
418 Reviewed by Andreas Kling.
420 These can be used to implement cache logic on WebKit level.
424 * WebCore.vcxproj/WebCore.vcxproj:
425 * WebCore.xcodeproj/project.pbxproj:
426 * loader/CacheValidation.cpp: Added.
427 (WebCore::computeCurrentAge):
428 (WebCore::computeFreshnessLifetimeForHTTPFamily):
429 (WebCore::updateRedirectChainStatus):
430 (WebCore::redirectChainAllowsReuse):
431 * loader/CacheValidation.h: Added.
432 (WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):
433 * loader/cache/CachedResource.cpp:
434 (WebCore::updateResponseHeadersAfterRevalidation):
435 (WebCore::CachedResource::CachedResource):
436 (WebCore::CachedResource::isExpired):
437 (WebCore::CachedResource::freshnessLifetime):
438 (WebCore::CachedResource::willSendRequest):
439 (WebCore::CachedResource::updateResponseAfterRevalidation):
440 (WebCore::CachedResource::redirectChainAllowsReuse):
441 (WebCore::currentAge): Deleted.
442 * loader/cache/CachedResource.h:
444 2014-10-28 Ada Chan <adachan@apple.com>
446 Add API to mute/unmute a page.
447 https://bugs.webkit.org/show_bug.cgi?id=138150
449 Reviewed by Eric Carlson.
451 No new tests, since it's difficult to test whether the Page has indeed been muted.
454 (WebCore::Document::setMuted):
455 Go through each AudioProducer and call setMuted() on it.
457 * page/AudioProducer.h:
458 Add setMuted(bool). HTMLMediaElement, the only derived class of AudioProducer so far,
459 has already implemented setMuted().
461 (WebCore::Page::setMuted):
462 Go through all its frames and call setMuted() on each frame's Document.
465 2014-10-29 Tim Horton <timothy_horton@apple.com>
467 Implement action menus for data detected items
468 https://bugs.webkit.org/show_bug.cgi?id=138178
469 <rdar://problem/18709436>
471 Reviewed by Anders Carlsson.
474 Export a symbol from Position that we need.
476 * WebCore.xcodeproj/project.pbxproj:
477 * platform/spi/mac/DataDetectorsSPI.h:
478 Add a combined SPI header for all of the random bits of DataDetectors that we use.
480 2014-10-29 Jer Noble <jer.noble@apple.com>
482 [EME] NULL-dereference crash in MediaKeys::setMediaElement().
483 https://bugs.webkit.org/show_bug.cgi?id=138177
485 Reviewed by Eric Carlson.
487 NULL-check m_mediaElement->player() before using. It may have been cleared if the HTMLMediaElement
488 has previously had stop() called.
490 * Modules/encryptedmedia/MediaKeys.cpp:
491 (WebCore::MediaKeys::setMediaElement):
493 2014-10-29 Jer Noble <jer.noble@apple.com>
495 [EME] MediaKeySession resources persist across page reloads
496 https://bugs.webkit.org/show_bug.cgi?id=138176
498 Reviewed by Eric Carlson.
500 MediaKeySession is an ActiveDOMObject, so when told to stop() by our execution context,
501 close() the session, releasing all our resources.
503 * Modules/encryptedmedia/MediaKeySession.h:
505 2014-10-29 Jer Noble <jer.noble@apple.com>
507 [EME][Mac] MediaKeySession type "keyrelease" is ignored.
508 https://bugs.webkit.org/show_bug.cgi?id=138175
510 Reviewed by Eric Carlson.
512 To indicate that they would like to recevie expired session confirmation messages, clients
513 will create a MediaKeySession with a type parameter of "keyrelease". The code which validates
514 this type needs to be updated to recognize "keyrelease" as a valid type.
516 Also, the code which validates update() requests needs to allow updates containing the string
517 "acknowledged", so that clients can request the confirmation messages be discarded.
519 * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
520 (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType):
521 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
522 (WebCore::CDMSessionMediaSourceAVFObjC::update):
524 2014-10-28 Ada Chan <adachan@apple.com>
526 Remove MediaSessionClient::hasMediaCharacteristics() and MediaSessionClient::mediaStateDidChange().
527 https://bugs.webkit.org/show_bug.cgi?id=138153
529 Reviewed by Jer Noble.
531 After http://trac.webkit.org/changeset/175273, Document no longer keeps a set of MediaSessions
532 and it doesn't need to query each MediaSession for its characteristics and play state.
533 MediaSessionClient::hasMediaCharacteristics() is no longer needed and MediaSessionClient::mediaStateDidChange()
534 can be removed if HTMLMediaElement calls Document::updateIsPlayingAudio() after m_playing has changed.
536 No new tests, no behavior change.
538 * html/HTMLMediaElement.cpp:
539 (WebCore::HTMLMediaElement::updatePlayState):
540 Call setPlaying() rather than setting m_playing directly.
541 (WebCore::HTMLMediaElement::setPlaying):
542 Update m_playing. If it has changed, call Document::updateIsPlayingAudio().
543 (WebCore::HTMLMediaElement::setPausedInternal):
544 Call setPlaying() rather than setting m_playing directly.
545 (WebCore::HTMLMediaElement::isPlayingAudio):
546 Call isPlaying() directly rather than checking the MediaSession's state.
547 * html/HTMLMediaElement.h:
548 * platform/audio/MediaSession.cpp:
549 (WebCore::MediaSession::setState):
550 MediaSessionClient::mediaStateDidChange() has been removed.
551 (WebCore::MediaSession::hasMediaCharacteristics): Deleted.
552 * platform/audio/MediaSession.h:
553 (WebCore::MediaSessionClient::mediaStateDidChange): Deleted.
554 * platform/audio/ios/AudioDestinationIOS.h:
555 * platform/audio/mac/AudioDestinationMac.h:
557 2014-10-29 Chris Dumez <cdumez@apple.com>
559 Clean up virtual functions in html/
560 https://bugs.webkit.org/show_bug.cgi?id=138166
562 Reviewed by Andreas Kling.
564 Clean up virtual functions in html/ by:
565 - Making virtual functions final when possible
566 - Making classes final when possible
567 - Using 'override' when appropriate
568 - Explicitly marking functions / destructors as virtual when they are
570 - Dropping virtual destructors when the class does not have subclasses
571 and mark the class as final, to get rid of unnecessary vtables
572 - Making isXXX() virtual functions private on XXX classes to avoid
573 unnecessary type checks
574 - De-virtualizing some functions that do not need to be virtual
575 - Dropping final for virtual functions in classes already marked as
578 No new tests, no behavior change.
580 * html/ButtonInputType.h:
581 * html/CheckboxInputType.h:
582 * html/ColorInputType.h:
583 * html/DOMSettableTokenList.h:
584 * html/DateInputType.h:
585 * html/DateTimeInputType.h:
586 * html/DateTimeLocalInputType.h:
587 * html/EmailInputType.h:
588 * html/FTPDirectoryDocument.h:
589 * html/HTMLAnchorElement.h:
590 * html/HTMLDetailsElement.cpp:
591 * html/HTMLFormControlElement.h:
592 * html/HTMLFormControlsCollection.h:
593 * html/HTMLFrameElement.h:
594 * html/HTMLFrameElementBase.h:
595 * html/HTMLFrameOwnerElement.h:
596 * html/HTMLInputElement.h:
597 * html/HTMLMarqueeElement.h:
598 * html/HTMLMediaElement.h:
599 * html/HTMLMediaSession.h:
600 (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Deleted.
601 * html/HTMLMeterElement.h:
602 * html/HTMLNameCollection.h:
603 * html/HTMLObjectElement.h:
604 * html/HTMLOptGroupElement.h:
605 * html/HTMLOptionElement.h:
606 * html/HTMLSpanElement.h:
607 * html/HTMLStyleElement.h:
608 * html/HTMLSummaryElement.cpp:
609 * html/HTMLSummaryElement.h:
610 * html/HTMLUnknownElement.h:
611 * html/HTMLVideoElement.h:
612 * html/HiddenInputType.h:
613 * html/ImageInputType.h:
614 * html/MediaKeyEvent.h:
615 * html/MonthInputType.h:
616 * html/NumberInputType.h:
617 * html/PasswordInputType.h:
618 * html/PublicURLManager.h:
619 * html/RadioInputType.h:
620 * html/ResetInputType.h:
621 * html/SubmitInputType.h:
622 * html/TelephoneInputType.h:
623 * html/TextInputType.h:
624 * html/TimeInputType.h:
625 * html/URLInputType.h:
626 * html/WeekInputType.h:
627 * html/canvas/ANGLEInstancedArrays.h:
628 * html/canvas/CanvasRenderingContext2D.h:
629 * html/canvas/DOMPath.h:
630 * html/canvas/EXTShaderTextureLOD.h:
631 * html/canvas/EXTTextureFilterAnisotropic.h:
632 * html/canvas/OESElementIndexUint.h:
633 * html/canvas/OESStandardDerivatives.h:
634 * html/canvas/OESTextureFloat.h:
635 * html/canvas/OESTextureFloatLinear.h:
636 * html/canvas/OESTextureHalfFloat.h:
637 * html/canvas/OESTextureHalfFloatLinear.h:
638 * html/canvas/OESVertexArrayObject.h:
639 * html/canvas/WebGLBuffer.h:
640 * html/canvas/WebGLCompressedTextureATC.h:
641 * html/canvas/WebGLCompressedTexturePVRTC.h:
642 * html/canvas/WebGLCompressedTextureS3TC.h:
643 * html/canvas/WebGLContextAttributes.h:
644 * html/canvas/WebGLContextEvent.h:
645 * html/canvas/WebGLDebugRendererInfo.h:
646 * html/canvas/WebGLDebugShaders.h:
647 * html/canvas/WebGLDepthTexture.h:
648 * html/canvas/WebGLDrawBuffers.h:
649 * html/canvas/WebGLFramebuffer.h:
650 (WebCore::WebGLFramebuffer::isFramebuffer): Deleted.
651 * html/canvas/WebGLLoseContext.h:
652 * html/canvas/WebGLProgram.h:
653 * html/canvas/WebGLRenderbuffer.h:
654 * html/canvas/WebGLRenderingContext.h:
655 * html/canvas/WebGLShader.h:
656 * html/canvas/WebGLSharedObject.h:
657 (WebCore::WebGLSharedObject::isFramebuffer): Deleted.
658 * html/canvas/WebGLTexture.h:
659 * html/canvas/WebGLVertexArrayObjectOES.h:
660 (WebCore::WebGLVertexArrayObjectOES::isVertexArray): Deleted.
661 * html/shadow/ImageControlsRootElement.h:
662 * html/shadow/InsertionPoint.h:
663 * html/shadow/MediaControlElementTypes.h:
664 * html/shadow/MediaControlElements.h:
665 * html/shadow/MediaControls.h:
666 * html/shadow/MediaControlsApple.h:
667 * html/shadow/SpinButtonElement.h:
668 * html/track/AudioTrack.h:
669 * html/track/AudioTrackList.h:
670 * html/track/DataCue.h:
671 (WebCore::DataCue::cueType): Deleted.
672 * html/track/InbandDataTextTrack.h:
673 * html/track/InbandGenericTextTrack.h:
674 * html/track/InbandTextTrack.h:
675 * html/track/InbandWebVTTTextTrack.h:
676 * html/track/LoadableTextTrack.h:
677 * html/track/TextTrackList.h:
678 * html/track/TrackEvent.h:
679 * html/track/VTTCue.h:
680 (WebCore::VTTCueBox::setFontSizeFromCaptionUserPrefs):
681 * html/track/VTTRegion.h:
682 * html/track/VideoTrack.h:
683 * html/track/VideoTrackList.h:
684 * html/track/WebVTTParser.h:
685 (WebCore::WebVTTCueData::~WebVTTCueData): Deleted.
687 2014-10-17 Sergio Villar Senin <svillar@igalia.com>
689 ASSERTION FAILED: growthShare > 0 in WebCore::RenderGrid::distributeSpaceToTracks
690 https://bugs.webkit.org/show_bug.cgi?id=137772
692 Reviewed by Andreas Kling.
694 We're hitting the ASSERTION because if the number of tracks an
695 item spans does greatly exceed the available logical space, then
696 the result of the division availableLogicalSpace/numberOfTracks is
697 truncated to 0. So the ASSERTION was theoretically right because
698 the result has to be always >0 (as the dividend > 0) but the fact
699 that the result is a LayoutUnit forces us to accept 0 as a valid
700 outcome of the operation.
702 Test: fast/css-grid-layout/tracks-number-greatly-exceeding-available-size-crash.html
704 * rendering/RenderGrid.cpp:
705 (WebCore::RenderGrid::distributeSpaceToTracks):
707 2014-10-29 Chris Dumez <cdumez@apple.com>
709 Crash in CachedRawResource::canReuse() when reloading http://dnd.wizards.com/dungeons-and-dragons/story
710 https://bugs.webkit.org/show_bug.cgi?id=138164
712 Reviewed by Andreas Kling.
714 This patch fixes a crash when reloading the following URL:
715 http://dnd.wizards.com/dungeons-and-dragons/story
717 We were crashing in CachedRawResource::canReuse() because header.key
718 would sometimes be a null String and we would call
719 HashMap::get(nullString).
721 The real issue was that header.key was null in the first place, which
722 means that even though the HTTPHeaderMap iterator is valid, it->key
723 is a null String, which should never happen. There was a bug in the
724 HTTPHeaderMapConstIterator() constructor that would cause the
725 iterator key/value pair to not get initialized if the HTTPHeaderMap
726 contained *only* uncommon HTTP headers. This patch updates the
727 constructor so that we fall back to updating the key/value from the
728 uncommon header map, if we failed to initialized from the common
729 header map (because it was empty).
731 Test: http/tests/cache/xhr-uncommon-header.html
733 * platform/network/HTTPHeaderMap.h:
734 (WebCore::HTTPHeaderMap::HTTPHeaderMapConstIterator::HTTPHeaderMapConstIterator):
736 2014-10-28 Benjamin Poulain <benjamin@webkit.org>
738 CSS4 Selectors: Add the pseudo class :any-link
739 https://bugs.webkit.org/show_bug.cgi?id=138128
741 Reviewed by Andreas Kling.
743 Defined here: http://dev.w3.org/csswg/selectors4/#the-any-link-pseudo
745 After :link and :-webkit-any-link were fixed, :any-link behaves
746 exactly like :-webkit-any-link. All I had left to do here was
747 make them synonyms when evaluating selectors.
749 Defined here: http://dev.w3.org/csswg/selectors4/#the-any-link-pseudo
751 After :link and :-webkit-any-link were fixed, :any-link behaves
752 exactly like :-webkit-any-link. All I had left to do here was
753 make them synonyms when evaluating selectors.
755 Tests: fast/selectors/any-link-basics-2.html
756 fast/selectors/any-link-basics.html
757 fast/selectors/any-link-styling.html
759 * css/CSSSelector.cpp:
760 (WebCore::CSSSelector::selectorText):
763 (WebCore::RuleSet::addRule):
764 * css/SelectorChecker.cpp:
765 (WebCore::SelectorChecker::checkOne):
766 * css/SelectorChecker.h:
767 (WebCore::SelectorChecker::isCommonPseudoClassSelector):
768 * css/SelectorPseudoClassAndCompatibilityElementMap.in:
769 * cssjit/SelectorCompiler.cpp:
770 (WebCore::SelectorCompiler::addPseudoClassType):
771 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
773 2014-10-28 Jer Noble <jer.noble@apple.com>
775 [EME][Mac] Adopt new AVStreamSession API: pass storageDirectoryAtURL at creation-time
776 https://bugs.webkit.org/show_bug.cgi?id=138149
778 Reviewed by Brent Fulgham.
780 AVStreamSession now requires its storage location at creation-time, rather than post-creation. This requires
781 us to move storage location code from CDMSessionMediaSourceAVFObjC to MediaPlayerPrivateMediaSourceAVFObjC.
783 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
784 (-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Renamed.
785 (WebCore::CDMSessionMediaSourceAVFObjC::update):
786 (WebCore::sessionStorageDirectory): Deleted.
787 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
788 (WebCore::sessionStorageDirectory):
789 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
791 2014-10-28 Geoffrey Garen <ggaren@apple.com>
793 All networking crashes on Mac 32bit
794 https://bugs.webkit.org/show_bug.cgi?id=138157
796 Reviewed by Andy Estes.
798 NEFilterSource content filtering is not available on 32bit, so
799 soft-linking fails at runtime. The simplest solution is just to disable
802 * platform/ContentFilter.h:
804 2014-10-28 Jeremy Jones <jeremyj@apple.com>
806 Add optimized fullscreen mode.
807 https://bugs.webkit.org/show_bug.cgi?id=138044
809 Reviewed by Jer Noble.
811 Enable different types of fullscreen video behavior.
812 Add an enum parameter to enterVideoFullscreenForVideoElement for alternate types of fullscreen.
813 Add gesture for alternate fullscreen.
815 * Modules/mediacontrols/MediaControlsHost.cpp:
816 (WebCore::MediaControlsHost::enterFullscreenOptimized): added
817 * Modules/mediacontrols/MediaControlsHost.h: added enterFullscreenOptimized
818 * Modules/mediacontrols/MediaControlsHost.idl: added enterFullscreenOptimized
819 * Modules/mediacontrols/mediaControlsiOS.js:
820 (ControllerIOS.prototype.handleBaseGestureChange): recognize alternate gesture
821 * WebCore.exp.in: added parameter to setupFullscreen
822 * html/HTMLMediaElement.cpp:
823 (WebCore::HTMLMediaElement::removedFrom) : replace m_isInVideoFullscreen with m_videoFullscreenType
824 (WebCore::HTMLMediaElement::stop) : ditto
825 (WebCore::HTMLMediaElement::isFullscreen) : ditto
826 (WebCore::HTMLMediaElement::enterFullscreen): add parameter to enterVideoFullscreenForVideoElement
827 (WebCore::HTMLMediaElement::exitFullscreen): replace m_isInVideoFullscreen with m_videoFullscreenType
828 (WebCore::HTMLMediaElement::enterFullscreenOptimized): added
829 * html/HTMLMediaElement.h: added enterFullscreenOptimized
830 * page/ChromeClient.h:
831 (WebCore::ChromeClient::enterVideoFullscreenForVideoElement): added parameter
832 * platform/ios/WebVideoFullscreenControllerAVKit.h: add parameter
833 * platform/ios/WebVideoFullscreenControllerAVKit.mm:
834 (-[WebVideoFullscreenController enterFullscreen:type:]): add parameter
835 (-[WebVideoFullscreenController enterFullscreen:]): Deleted.
836 * platform/ios/WebVideoFullscreenInterfaceAVKit.h: reorder protected to after public
837 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
838 (-[WebAVPlayerController player]): this stub is now required
839 (-[WebAVPlayerController layoutSublayersOfLayer:]): this is a better way to update video frames
840 (WebVideoFullscreenInterfaceAVKit::setupFullscreen): implement optimized fullscreen interface
841 (WebVideoFullscreenInterfaceAVKit::enterFullscreen): ditto
842 (WebVideoFullscreenInterfaceAVKit::exitFullscreen): ditto
843 (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
845 2014-10-28 Chris Dumez <cdumez@apple.com>
847 Clean up virtual functions in accessibility/
848 https://bugs.webkit.org/show_bug.cgi?id=138148
850 Reviewed by Chris Fleizach.
852 Clean up virtual functions in accessibility/ by:
853 - Marking classes as final when suitable
854 - Marking virtual functions as final when suitable
855 - Dropping final on virtual functions in classes that are already final
856 - Make isXXX() virtual type checking functions in XXX classes to avoid
859 No new tests, no behavior change.
861 * accessibility/AccessibilityARIAGrid.h:
862 * accessibility/AccessibilityARIAGridCell.h:
863 * accessibility/AccessibilityARIAGridRow.h:
864 * accessibility/AccessibilityImageMapLink.h:
865 * accessibility/AccessibilityList.h:
866 * accessibility/AccessibilityListBox.h:
867 * accessibility/AccessibilityListBoxOption.h:
868 * accessibility/AccessibilityMediaControls.h:
869 * accessibility/AccessibilityMenuList.h:
870 * accessibility/AccessibilityMenuListOption.h:
871 * accessibility/AccessibilityMenuListPopup.h:
872 * accessibility/AccessibilityMockObject.h:
873 (WebCore::AccessibilityMockObject::setParent):
874 * accessibility/AccessibilityNodeObject.h:
875 * accessibility/AccessibilityProgressIndicator.h:
876 * accessibility/AccessibilityRenderObject.h:
877 * accessibility/AccessibilitySVGRoot.h:
878 * accessibility/AccessibilityScrollView.h:
879 * accessibility/AccessibilityScrollbar.h:
880 * accessibility/AccessibilitySearchFieldButtons.h:
881 * accessibility/AccessibilitySlider.h:
882 * accessibility/AccessibilitySpinButton.h:
883 * accessibility/AccessibilityTable.h:
884 * accessibility/AccessibilityTableCell.h:
885 * accessibility/AccessibilityTableColumn.h:
886 * accessibility/AccessibilityTableHeaderContainer.h:
887 * accessibility/AccessibilityTableRow.h:
889 2014-10-24 Jeffrey Pfau <jpfau@apple.com>
891 FrameProgressTracker expects Page to not have detached
892 https://bugs.webkit.org/show_bug.cgi?id=138061
894 Reviewed by Alexey Proskuryakov.
896 In some cases, a Page may be detached from a Frame before its
897 FrameLoader is torn down, causing FrameProgressTracker's destructor
898 to hit a null pointer.
900 No new tests; it is impossible to reliably simulate the null pointer
901 case without intrusive code changes.
903 * loader/FrameLoader.cpp:
904 (WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker):
906 2014-10-27 Ada Chan <adachan@apple.com>
908 Introduce a new abstract class called AudioProducer and keep a set of AudioProducers
909 rather than the active MediaSessions in Document
910 https://bugs.webkit.org/show_bug.cgi?id=138107
912 Reviewed by Eric Carlson.
914 No new tests, no behavior change.
916 * WebCore.xcodeproj/project.pbxproj:
917 Add AudioProducer.h to the project.
919 (WebCore::Document::addAudioProducer):
920 (WebCore::Document::removeAudioProducer):
921 (WebCore::Document::updateIsPlayingAudio):
922 Go through the set of AudioProducers and see if any is playing audio.
923 Now that this method no longer refers to MediaSessions directly, this code
924 does not need to be guarded by #if ENABLE(VIDEO).
925 (WebCore::Document::registerMediaSession): Deleted.
926 (WebCore::Document::unregisterMediaSession): Deleted.
928 * html/HTMLMediaElement.cpp:
929 (WebCore::HTMLMediaElement::registerWithDocument):
930 (WebCore::HTMLMediaElement::unregisterWithDocument):
931 (WebCore::HTMLMediaElement::isPlayingAudio):
932 Return whether this element is playing audio.
933 * html/HTMLMediaElement.h:
934 * page/AudioProducer.h: Added.
935 (WebCore::AudioProducer::~AudioProducer):
937 (WebCore::Page::updateIsPlayingAudio):
938 This is no longer guarded with #if ENABLE(VIDEO) since the Document methods it calls
939 are no longer guarded.
942 2014-10-28 Chris Dumez <cdumez@apple.com>
944 Unreviewed comment fix from r175267.
946 Fix namespace name in comment.
948 * css/StyleBuilderCustom.h:
950 2014-10-28 Jer Noble <jer.noble@apple.com>
952 REGRESSION(r171593) [Mac] Media controls create a large (and unnecessary) backing store
953 https://bugs.webkit.org/show_bug.cgi?id=137757
955 Reviewed by Eric Carlson.
957 In r171593, a <div> was added to the media controls which is only ever used on iOS. Instead
958 of creating and adding this <div> in mediaControlsApple.js (which is used on OS X), this
959 <div> should be created and added in mediaControlsiOS.js, which requires overloading
960 Controller.addControls.
962 * Modules/mediacontrols/mediaControlsApple.css:
963 (audio::-webkit-media-controls-panel.hidden): Drive-by fix: allow the panel itself to be hidden.
964 (video::-webkit-media-controls-panel-composited-parent): Deleted.
965 * Modules/mediacontrols/mediaControlsApple.js:
966 (Controller.prototype.createControls): Remove the composited parent.
967 (Controller.prototype.addControls): Ditto.
968 * Modules/mediacontrols/mediaControlsiOS.js:
969 (ControllerIOS.prototype.createControls): Create the composited parent.
970 (ControllerIOS.prototype.addControls): Copied from (previous) apple.js.
972 2014-10-28 Chris Dumez <cdumez@apple.com>
974 Move "Number" CSS properties to the new StyleBuilder
975 https://bugs.webkit.org/show_bug.cgi?id=138125
977 Reviewed by Antti Koivisto.
979 Move "Number" CSS properties from DeprecatedStyleBuilder to the new
981 -webkit-hyphenate-limit-after
982 -webkit-hyphenate-limit-before
983 -webkit-shape-image-threshold
984 -webkit-hyphenate-limit-lines
986 They are now generated from CSSPropertyNames.in
988 For -webkit-hyphenate-limit-lines, I used custom code instead of
989 the Number converter as it required special handling for the id
990 value. This patch thus adds support for [Custom=Value] to
991 CSSPropertyNames.in and the custom code goes into
992 css/StyleBuilderCustom.h.
994 No new tests, no behavior change.
996 * WebCore.xcodeproj/project.pbxproj:
997 * css/CSSPropertyNames.in:
998 * css/DeprecatedStyleBuilder.cpp:
999 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1000 (WebCore::ApplyPropertyNumber::setValue): Deleted.
1001 (WebCore::ApplyPropertyNumber::applyValue): Deleted.
1002 (WebCore::ApplyPropertyNumber::createHandler): Deleted.
1003 * css/StyleBuilderConverter.h:
1004 (WebCore::StyleBuilderConverter::convertNumber):
1005 * css/StyleBuilderCustom.h: Added.
1006 (WebCore::StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines):
1009 2014-10-28 Zan Dobersek <zdobersek@igalia.com>
1011 [WebCore] Remove uses of WTF::bind() in the Media Stream module
1012 https://bugs.webkit.org/show_bug.cgi?id=138016
1014 Reviewed by Eric Carlson.
1016 Replace uses of WTF::bind() in the Media Stream module with C++11 lambdas.
1017 Internal helper methods are removed in favor of inlining the code directly
1018 into the lambdas. Range-based for-loops are deployed where appropriate.
1020 * Modules/mediastream/MediaStreamTrack.cpp:
1021 (WebCore::MediaStreamTrack::scheduleEventDispatch):
1022 (WebCore::MediaStreamTrack::dispatchQueuedEvents): Deleted.
1023 * Modules/mediastream/MediaStreamTrack.h:
1024 * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
1025 (WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):
1026 (WebCore::MediaStreamTrackSourcesRequest::callCompletionHandler): Deleted.
1027 * Modules/mediastream/MediaStreamTrackSourcesRequest.h:
1028 * Modules/mediastream/UserMediaRequest.cpp:
1029 (WebCore::UserMediaRequest::constraintsValidated):
1030 (WebCore::UserMediaRequest::userMediaAccessGranted):
1031 (WebCore::UserMediaRequest::didCreateStream):
1032 (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
1033 (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
1034 (WebCore::UserMediaRequest::requestPermission): Deleted.
1035 (WebCore::UserMediaRequest::createMediaStream): Deleted.
1036 (WebCore::UserMediaRequest::callSuccessHandler): Deleted.
1037 (WebCore::UserMediaRequest::callErrorHandler): Deleted.
1038 * Modules/mediastream/UserMediaRequest.h:
1040 2014-10-28 Pascal Jacquemart <p.jacquemart@samsung.com>
1042 Abandoned select option is reselected when shift selecting new options
1043 https://bugs.webkit.org/show_bug.cgi?id=137553
1045 Reviewed by Ryosuke Niwa.
1047 Previous active selection is wrongly recorded by HTMLSelectElement after selecting a new item using
1048 typeAhead. Fixed by clearing previously selected options before starting a new active selection.
1050 Test: fast/forms/listbox-selection-after-typeahead.html
1052 * html/HTMLSelectElement.cpp:
1053 (WebCore::HTMLSelectElement::selectOption): Code re-ordering
1055 2014-10-28 Milan Crha <mcrha@redhat.com>
1057 Use constants from wtf/MathExtras.h
1058 https://bugs.webkit.org/show_bug.cgi?id=137967
1060 Reviewed by Darin Adler.
1062 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1063 (WebCore::rotateCairoMatrixForVerticalOrientation):
1064 * rendering/mathml/RenderMathMLMenclose.cpp:
1065 (WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
1066 (WebCore::RenderMathMLMenclose::updateLogicalHeight):
1067 * rendering/mathml/RenderMathMLOperator.cpp:
1068 (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):
1070 2014-10-28 David Hyatt <hyatt@apple.com>
1072 Selection gap painting is ugly for ruby bases.
1073 https://bugs.webkit.org/show_bug.cgi?id=138136
1075 Reviewed by Dean Jackson.
1077 * rendering/RenderBlock.cpp:
1078 (WebCore::RenderBlock::selectionGaps):
1079 For ruby bases don't fill to the end of the block (in the block direction),
1080 since ideographic baselines push that end below the text baseline.
1082 (WebCore::RenderBlock::blockSelectionGaps):
1083 * rendering/RenderBlockFlow.cpp:
1084 Skip ruby bases for block selection gap filling.
1086 2014-10-28 Zalan Bujtas <zalan@apple.com>
1088 Speed up line parsing for simple line layout.
1089 https://bugs.webkit.org/show_bug.cgi?id=137275
1091 Reviewed by Antti Koivisto.
1093 This patch speeds up the line parsing for simple line layout by
1094 reducing the number of text measurement calls.
1095 The parsing logic hasn't changed. We simply walk over
1096 the whitespace/non-whitespace fragments and measure them to
1097 figure out whether they fit.
1098 The performance gain mainly comes from the more efficient line wrapping
1099 so that we don't re-measure the fragment when it is pushed to
1102 No change in behaviour. (except the empty line-break run removal.)
1104 * rendering/SimpleLineLayout.cpp:
1105 (WebCore::SimpleLineLayout::skipWhitespace):
1106 (WebCore::SimpleLineLayout::computeLineLeft):
1107 (WebCore::SimpleLineLayout::TextFragment::TextFragment):
1108 (WebCore::SimpleLineLayout::TextFragment::isEmpty):
1109 (WebCore::SimpleLineLayout::LineState::LineState):
1110 (WebCore::SimpleLineLayout::LineState::commitAndCreateRun): adds uncommitted text to the line and creates a run out of it.
1111 (WebCore::SimpleLineLayout::LineState::addUncommitted): appends fragment to the uncommitted text.
1112 (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): appends whitespace to the uncommitted text.
1113 (WebCore::SimpleLineLayout::LineState::jumpTo): moves line's current position without committing text.
1114 (WebCore::SimpleLineLayout::LineState::width): current width of the line including committed and uncommitted text.
1115 (WebCore::SimpleLineLayout::LineState::fits): checks if committed + uncommitted text fits the line.
1116 (WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace):
1117 (WebCore::SimpleLineLayout::removeTrailingWhitespace): post processing the trailing whitespace.
1118 (WebCore::SimpleLineLayout::initializeLine):
1119 (WebCore::SimpleLineLayout::splitFragmentToFitLine): breaks the fragments into 2 so that the first (sub)fragment fits the line.
1120 (WebCore::SimpleLineLayout::nextFragment): returns the next valid fragment of the text.
1121 (WebCore::SimpleLineLayout::createLineRuns): creates runs for the current line and returns when we can't fit more text on the line.
1122 (WebCore::SimpleLineLayout::updateLineConstrains): updates left/right constrains for the current line.
1123 (WebCore::SimpleLineLayout::createTextRuns): creates runs for the whole text.
1124 (WebCore::SimpleLineLayout::isWhitespace): Deleted.
1125 (WebCore::SimpleLineLayout::skipWhitespaces): Deleted.
1126 (WebCore::SimpleLineLayout::measureWord): Deleted.
1127 (WebCore::SimpleLineLayout::adjustRunOffsets): Deleted.
1128 * rendering/SimpleLineLayout.h:
1129 (WebCore::SimpleLineLayout::Run::Run):
1131 2014-10-28 Alexey Proskuryakov <ap@apple.com>
1135 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1136 (WebCore::NetworkStorageSession::switchToNewTestingSession): Use a WTF function
1137 for getting current process ID instead of getpid().
1139 2014-10-28 Mihnea Ovidenie <mihnea@adobe.com>
1141 Clean up subtrees selection code
1142 https://bugs.webkit.org/show_bug.cgi?id=137740
1144 Reviewed by David Hyatt.
1146 Clean up subtrees selection code. Add a new class SelectionSubtreeData
1147 that keeps only the selection data. Have SelectionSubtreeRoot class embed
1148 a SelectionSubtreeData member and keep the business logic methods.
1149 No functionality changed therefore no new layout tests.
1151 * rendering/RenderObject.cpp:
1152 (WebCore::RenderObject::selectionStartEnd):
1153 * rendering/RenderView.cpp:
1154 (WebCore::RenderView::subtreeSelectionBounds):
1155 (WebCore::RenderView::repaintSubtreeSelection):
1156 (WebCore::RenderView::setSelection):
1157 (WebCore::RenderView::splitSelectionBetweenSubtrees):
1158 (WebCore::RenderView::updateSelectionForSubtrees):
1159 (WebCore::RenderView::clearSubtreeSelection):
1160 (WebCore::RenderView::applySubtreeSelection):
1161 * rendering/RenderView.h:
1162 * rendering/SelectionSubtreeRoot.cpp:
1163 (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
1164 (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
1165 * rendering/SelectionSubtreeRoot.h:
1166 (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData):
1167 (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStart):
1168 (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartPos):
1169 (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEnd):
1170 (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos):
1171 (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionClear):
1172 (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartEndPositions):
1173 (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStart):
1174 (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStartPos):
1175 (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEnd):
1176 (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEndPos):
1177 (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::clearSelection):
1178 (WebCore::SelectionSubtreeRoot::selectionData):
1179 (WebCore::SelectionSubtreeRoot::setSelectionData):
1180 (WebCore::SelectionSubtreeRoot::selectionStart): Deleted.
1181 (WebCore::SelectionSubtreeRoot::selectionStartPos): Deleted.
1182 (WebCore::SelectionSubtreeRoot::selectionEnd): Deleted.
1183 (WebCore::SelectionSubtreeRoot::selectionEndPos): Deleted.
1184 (WebCore::SelectionSubtreeRoot::selectionStartEndPositions): Deleted.
1185 (WebCore::SelectionSubtreeRoot::selectionClear): Deleted.
1186 (WebCore::SelectionSubtreeRoot::setSelectionStart): Deleted.
1187 (WebCore::SelectionSubtreeRoot::setSelectionStartPos): Deleted.
1188 (WebCore::SelectionSubtreeRoot::setSelectionEnd): Deleted.
1189 (WebCore::SelectionSubtreeRoot::setSelectionEndPos): Deleted.
1191 2014-10-28 Jer Noble <jer.noble@apple.com>
1193 [Mac] The first software paint of a <video> element takes up to 2.5s.
1194 https://bugs.webkit.org/show_bug.cgi?id=137754
1196 Reviewed by Brent Fulgham.
1198 It turns out that, if you pass nil to -[AVPlayerItemVideoOutput initWithPixelBufferAttributes:]
1199 the video output will not attempt to conform the resulting pixel buffers into a particular format.
1200 This means that adding such a video output to a AVPlayerItem should have almost no performance
1201 penalty, since the video output does not even copy the resulting buffers, but rather just retains
1202 and returns the ones from the AVPlayerLayer.
1204 Create and attach an AVPlayerItemVideoOutput after creating the AVPlayerItem, but before attaching
1205 the player item to the AVPlayer. This eliminates the reconfigure step which occurs after attaching
1206 a video output to an already attached AVPlayerItem.
1208 When creating the AVPlayerItemVideoOutput, pass in `nil` for the pixelBufferAttributes parameter.
1210 Instead of blocking waiting for output from the AVPlayerItemVideoOutput during creating, block and
1211 whait when asked to paint with the video output.
1213 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1214 (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
1215 (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
1216 (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
1218 2014-10-28 Chris Dumez <cdumez@apple.com>
1220 Move text decoration CSS properties to the new StyleBuilder
1221 https://bugs.webkit.org/show_bug.cgi?id=138121
1223 Reviewed by Antti Koivisto.
1225 Move text decoration CSS properties from DeprecatedStyleBuilder to the
1226 new StyleBuilder so that they are generated from CSSPropertyNames.in.
1228 No new tests, no behavior change.
1230 * css/CSSPropertyNames.in:
1231 * css/DeprecatedStyleBuilder.cpp:
1232 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1233 (WebCore::ApplyPropertyTextDecoration::applyValue): Deleted.
1234 (WebCore::ApplyPropertyTextDecoration::createHandler): Deleted.
1235 * css/StyleBuilderConverter.h:
1236 (WebCore::StyleBuilderConverter::convertTextDecoration):
1238 2014-10-28 Carlos Garcia Campos <cgarcia@igalia.com>
1240 [GTK] Remove GDK dependency from SharedTimerGtk
1241 https://bugs.webkit.org/show_bug.cgi?id=138092
1243 Reviewed by Martin Robinson.
1245 It depends on GDK just to use GDK_PRIORITY_REDRAW constant, we can
1246 use its value directly instead.
1248 * PlatformGTK.cmake:
1249 * platform/gtk/SharedTimerGtk.cpp:
1250 (WebCore::setSharedTimerFireInterval):
1252 2014-10-27 Andreas Kling <akling@apple.com>
1254 Move RenderBlock::beingDestroyed() to RenderObject.
1255 <https://webkit.org/b/138116>
1257 Reviewed by Antti Koivisto.
1259 Make "is being destroyed" a RenderObject concept instead of restricting
1260 it to RenderBlocks. I'm guessing that this was specific to blocks due to
1261 lack of bitfield space in RenderObject, and that's no longer an issue.
1263 * rendering/RenderBlock.cpp:
1264 (WebCore::RenderBlock::RenderBlock):
1265 (WebCore::RenderBlock::willBeDestroyed):
1266 * rendering/RenderBlock.h:
1267 (WebCore::RenderBlock::beingDestroyed): Deleted.
1268 * rendering/RenderBlockFlow.cpp:
1269 (WebCore::RenderBlockFlow::willBeDestroyed):
1270 * rendering/RenderObject.cpp:
1271 (WebCore::RenderObject::destroy):
1272 * rendering/RenderObject.h:
1273 (WebCore::RenderObject::beingDestroyed):
1274 (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
1276 2014-10-27 Chris Fleizach <cfleizach@apple.com>
1278 AX: input type=hidden is being exposed when aria-hidden=false
1279 https://bugs.webkit.org/show_bug.cgi?id=138106
1281 Reviewed by Benjamin Poulain.
1283 If an input type=hidden was inside an aria-hidden=false, it would appear because
1284 the lack of a RenderObject behind that object was not blocking its adoption into the AX tree.
1285 We should explicity check for whether the type is hidden and then return an appropriate role.
1287 Test: accessibility/input-type-hidden-in-aria-hidden-false.html
1289 * accessibility/AccessibilityNodeObject.cpp:
1290 (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
1291 (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):
1293 2014-10-27 Alexey Proskuryakov <ap@apple.com>
1295 https://trac.webkit.org/changeset/175233 broke many tests, fixing an incorrect '!'.
1297 * accessibility/AccessibilityRenderObject.cpp:
1298 (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1300 2014-10-24 David Hyatt <hyatt@apple.com>
1302 text-combine needs to center text within the vertical space using glyph bounds
1303 https://bugs.webkit.org/show_bug.cgi?id=138056
1304 <rdar://problem/15403667>
1306 Reviewed by Dean Jackson.
1308 Added fast/text/tatechuyoko.html
1310 * rendering/RenderCombineText.cpp:
1311 (WebCore::RenderCombineText::RenderCombineText):
1312 (WebCore::RenderCombineText::adjustTextOrigin):
1313 (WebCore::RenderCombineText::combineText):
1314 * rendering/RenderCombineText.h:
1316 2014-10-27 Benjamin Poulain <benjamin@webkit.org>
1318 Cleanup after r175213: fastGetAttribute().isNull() should be fastHasAttribute()
1320 * accessibility/AccessibilityRenderObject.cpp:
1321 (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1322 Darin spotted this mistake.
1324 2014-10-27 Alexey Proskuryakov <ap@apple.com>
1326 http/tests/cookies/third-party-cookie-relaxing.html is flaky on bots
1327 https://bugs.webkit.org/show_bug.cgi?id=138098
1329 Reviewed by Anders Carlsson.
1331 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1332 (WebCore::NetworkStorageSession::switchToNewTestingSession):
1333 Create a separate session for each WKTR/DRT process when testing.
1335 2014-10-27 Chris Dumez <cdumez@apple.com>
1337 Use separate HashMaps for common and uncommon headers in HTTPHeaderMap
1338 https://bugs.webkit.org/show_bug.cgi?id=138079
1340 Reviewed by Anders Carlsson.
1342 Use separate HashMaps for common and uncommon headers in HTTPHeaderMap:
1343 - a (faster) HashMap<HTTPHeaderMap, String> for common HTTP headers
1344 - a HashMap<String, String, CaseFoldingHash> for uncommon ones
1346 This avoids having to construct Strings from HTTPHeaderMap values for
1347 storing. This also means we have less isolated String copies to do when
1348 creating cross-thread data. The common headers HashMap should also be
1349 a bit more efficient due to faster hashing and faster key comparison in
1352 Some calls sites can also benefit from having direct access to common
1353 headers of the request in HTTPHeaderName type.
1355 This patch adds a new HTTPHeaderMapConstIterator iterator type for
1356 HTTPHeaderMap so that call sites that do not need / want to distinguish
1357 common / uncommon headers still do not need to. They can keep using
1358 modern C++ loops over HTTPHeaderMap objects and get <String, String>
1361 No new tests, no behavior change.
1363 * loader/CrossOriginAccessControl.cpp:
1364 (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
1365 Have isOnAccessControlSimpleRequestHeaderWhitelist() take a
1366 HTTPHeaderName in argument instead of a String as only common headers
1367 are in the whitelist.
1369 (WebCore::isSimpleCrossOriginAccessRequest):
1370 Call isOnAccessControlSimpleRequestHeaderWhitelist() only for common
1373 * loader/CrossOriginAccessControl.h:
1374 Have isOnAccessControlSimpleRequestHeaderWhitelist() take a
1375 HTTPHeaderName in argument instead of a String as only common headers
1376 are in the whitelist.
1378 * loader/CrossOriginPreflightResultCache.cpp:
1379 (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
1380 Call isOnAccessControlSimpleRequestHeaderWhitelist() only for common
1383 * loader/DocumentLoader.cpp:
1384 (WebCore::DocumentLoader::responseReceived):
1385 Call httpHeaderFields().commonHeaders().find() instead of
1386 httpHeaderFields().find() as we are looking for a common header.
1387 HTTPHeaderMap::find(HTTPHeaderName) was removed now that we have a
1388 HashMap dedicated to common headers.
1390 * loader/cache/CachedRawResource.cpp:
1391 (WebCore::shouldIgnoreHeaderForCacheReuse):
1392 Update argument type to be a HTTPHeaderName instead of a String as
1393 only common HTTP headers can be ignored for cache reuse. The
1394 implementation already dealt with HTTPHeaderName type and had to
1395 call findHTTPHeaderName(). This is no longer needed now that the
1396 call site now has direct access to common headers in HTTPHeaderName
1399 (WebCore::CachedRawResource::canReuse):
1400 - Only call shouldIgnoreHeaderForCacheReuse() for common HTTP headers.
1401 - Slightly optimize the second loop (the one over oldHeaderMap) to only
1402 check that the key is present in newHeaderMap, without actually
1403 comparing the String values. If the String values were different, the
1404 first loop would have seen it already and we would have returned
1407 2014-10-27 Andreas Kling <akling@apple.com>
1409 Devirtualize RenderDeprecatedFlexibleBox::isStretchingChildren().
1410 <https://webkit.org/b/138096>
1412 Reviewed by Chris Dumez.
1414 This function is only ever called on a renderer after we've checked
1415 that it's a RenderDeprecatedFlexibleBox, so make it non-virtual.
1417 * rendering/RenderBox.cpp:
1418 (WebCore::RenderBox::computeLogicalHeight):
1419 * rendering/RenderDeprecatedFlexibleBox.h:
1420 * rendering/RenderObject.h:
1422 2014-10-27 Chris Dumez <cdumez@apple.com>
1424 Reintroduce null check removed in r175222
1425 https://bugs.webkit.org/show_bug.cgi?id=138087
1427 Reviewed by Andreas Kling.
1429 Reintroduce null check removed in r175222 as several layout tests are
1430 crashing on the bots without them. At least the Pair pointer can be
1431 null according to the assertion hits on the bots.
1433 * css/StyleBuilderConverter.h:
1434 (WebCore::StyleBuilderConverter::convertRadius):
1436 2014-10-27 Chris Dumez <cdumez@apple.com>
1438 Move radius CSS properties to the new StyleBuilder
1439 https://bugs.webkit.org/show_bug.cgi?id=138087
1441 Reviewed by Andreas Kling.
1443 Move radius CSS properties from DeprecatedStyleBuilder to the new
1444 StyleBuilder so that they are now generated from CSSPropertyNames.in.
1446 No new tests, no behavior change.
1448 * css/CSSPropertyNames.in:
1449 * css/DeprecatedStyleBuilder.cpp:
1450 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1451 (WebCore::ApplyPropertyBorderRadius::setValue): Deleted.
1452 (WebCore::ApplyPropertyBorderRadius::applyValue): Deleted.
1453 (WebCore::ApplyPropertyBorderRadius::createHandler): Deleted.
1454 * css/StyleBuilderConverter.h:
1455 (WebCore::StyleBuilderConverter::convertRadius):
1457 2014-10-27 Zan Dobersek <zdobersek@igalia.com>
1459 Shrink MathMLOperatorDictionary::dictionary table
1460 https://bugs.webkit.org/show_bug.cgi?id=137914
1462 Reviewed by Darin Adler.
1464 Improve packing of the Entry structure that's used for elements
1465 of the MathMLOperatorDictionary::dictionary table. This drops the
1466 size of the struct from 16 bytes to just 4 bytes, and shrinks the
1467 size of the dictionary table from rougly 16 kB down to 4 kB.
1469 * rendering/mathml/RenderMathMLOperator.cpp:
1470 (WebCore::MathMLOperatorDictionary::ExtractKey):
1471 (WebCore::RenderMathMLOperator::setOperatorProperties):
1472 * rendering/mathml/RenderMathMLOperator.h:
1474 2014-10-27 Andreas Kling <akling@apple.com>
1476 Move canContainFixedPositionObjects() to RenderElement.
1477 <https://webkit.org/b/138088>
1479 Reviewed by Mihnea Ovidenie.
1481 Only RenderElement can contain other renderers, so it's not really
1482 natural to answer this question on RenderObject anyway.
1484 Moving it to RenderElement lets it access more efficient getters
1485 that don't have to handle the RenderText case.
1487 * rendering/RenderElement.h:
1488 (WebCore::RenderElement::canContainFixedPositionObjects):
1489 * rendering/RenderObject.h:
1490 (WebCore::RenderObject::canContainFixedPositionObjects): Deleted.
1492 2014-10-26 Benjamin Poulain <benjamin@webkit.org>
1494 Images with usemap should not have a link state
1495 https://bugs.webkit.org/show_bug.cgi?id=138071
1497 Reviewed by Andreas Kling.
1499 Image tags were incorrectly getting a link state if a usemap is defined.
1500 The <area> of the usemap is supposed to get the link state, but never the image.
1502 Unfortunately, the Accessibility code was relying on the wrong behavior
1503 to set the ImageMapRole, most of the patch is updating that code to get
1504 the correct role without the link state.
1506 Test: fast/selectors/images-with-usemap-should-not-match-link.html
1508 The accessibility code is covered by a few tests in accessibility/.
1509 The test accessibility/aria-used-on-image-maps.html ensure the <area>
1510 elements also get the correct role.
1513 (WebCore::Node::setIsLink):
1514 (WebCore::Node::clearIsLink): Deleted.
1517 (WebCore::Node::isLink):
1518 Move with its setter for clarity.
1520 * html/HTMLImageElement.cpp:
1521 (WebCore::HTMLImageElement::parseAttribute):
1524 * accessibility/AccessibilityRenderObject.cpp:
1525 (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1526 Here the branches for the role ImageMap where behind isLink() which would
1527 never be valid after the fix.
1529 My fix here was to use the same definition previously set by HTMLImageElement::parseAttribute(),
1530 any usemap attribute qualifies the node for ImageMapRole.
1532 (WebCore::AccessibilityRenderObject::anchorElement):
1533 (WebCore::AccessibilityRenderObject::linkedUIElements):
1534 (WebCore::AccessibilityRenderObject::url):
1536 * accessibility/AccessibilityObject.h:
1537 (WebCore::AccessibilityObject::isAnchor): Deleted.
1538 Something funny I discovered is the Accessibility code worked around the bug
1539 by defining isAnchor() that exclude images from isLink().
1541 Since isLink() will no longer be true for images, the hack can be removed.
1543 * accessibility/AccessibilityNodeObject.cpp:
1544 (WebCore::AccessibilityNodeObject::anchorElement):
1545 (WebCore::AccessibilityNodeObject::isAnchor): Deleted.
1546 * accessibility/AccessibilityNodeObject.h:
1547 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1548 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1550 2014-10-26 Benjamin Poulain <benjamin@webkit.org>
1552 Replace Element::didAffectSelector() by setNeedsStyleRecalc()
1553 https://bugs.webkit.org/show_bug.cgi?id=138080
1555 Reviewed by Andreas Kling.
1557 Element::didAffectSelector() was probably an optimization at some point,
1558 with the current code is does nothing more than setNeedsStyleRecalc().
1561 (WebCore::Document::setCSSTarget):
1563 (WebCore::Element::didAffectSelector): Deleted.
1565 * html/HTMLAnchorElement.cpp:
1566 (WebCore::HTMLAnchorElement::parseAttribute):
1567 * html/HTMLFormControlElement.cpp:
1568 (WebCore::HTMLFormControlElement::disabledStateChanged):
1569 * html/HTMLInputElement.cpp:
1570 (WebCore::HTMLInputElement::setChecked):
1571 (WebCore::HTMLInputElement::setIndeterminate):
1572 * html/HTMLLinkElement.cpp:
1573 (WebCore::HTMLLinkElement::parseAttribute):
1574 * html/HTMLOptGroupElement.cpp:
1575 (WebCore::HTMLOptGroupElement::parseAttribute):
1576 * html/HTMLOptionElement.cpp:
1577 (WebCore::HTMLOptionElement::parseAttribute):
1578 (WebCore::HTMLOptionElement::setSelectedState):
1579 * html/HTMLProgressElement.cpp:
1580 (WebCore::HTMLProgressElement::didElementStateChange):
1582 2014-10-26 Andreas Kling <akling@apple.com>
1584 Move some RenderObject member functions to RenderElement.
1585 <https://webkit.org/b/138085>
1587 Reviewed by Chris Dumez.
1589 Move these two functions to RenderElement:
1591 - handleDynamicFloatPositionChange()
1592 - removeAnonymousWrappersForInlinesIfNecessary()
1594 Also make childBecameNonInline() take a RenderElement& since
1595 that's all we ever pass to it.
1597 * rendering/RenderBlock.cpp:
1598 (WebCore::RenderBlock::childBecameNonInline):
1599 * rendering/RenderBlock.h:
1600 * rendering/RenderBoxModelObject.h:
1601 (WebCore::RenderBoxModelObject::childBecameNonInline):
1602 * rendering/RenderElement.cpp:
1603 (WebCore::RenderElement::handleDynamicFloatPositionChange):
1604 (WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary):
1605 * rendering/RenderElement.h:
1606 * rendering/RenderInline.cpp:
1607 (WebCore::RenderInline::childBecameNonInline):
1608 * rendering/RenderInline.h:
1609 * rendering/RenderObject.cpp:
1610 (WebCore::RenderObject::handleDynamicFloatPositionChange): Deleted.
1611 (WebCore::RenderObject::removeAnonymousWrappersForInlinesIfNecessary): Deleted.
1612 * rendering/RenderObject.h:
1614 2014-10-26 Andreas Kling <akling@apple.com>
1616 Move continuation teardown from subclasses to RenderBoxModelObject.
1617 <https://webkit.org/b/138081>
1619 Reviewed by Antti Koivisto.
1621 Let RenderBoxModelObject::willBeDestroyed() tear down any continuation
1622 instead of having every subclass do this themselves.
1624 Also added a RenderElement bit tracking whether the renderer has a
1625 continuation. This avoids a hash lookup every time we destroy a
1626 RenderBoxModelObject that didn't have a continuation.
1628 * rendering/RenderBlock.cpp:
1629 (WebCore::RenderBlock::willBeDestroyed):
1630 * rendering/RenderBlockFlow.cpp:
1631 (WebCore::RenderBlockFlow::willBeDestroyed):
1632 * rendering/RenderBoxModelObject.cpp:
1633 (WebCore::continuationMap):
1634 (WebCore::RenderBoxModelObject::willBeDestroyed):
1635 (WebCore::RenderBoxModelObject::continuation):
1636 (WebCore::RenderBoxModelObject::setContinuation):
1637 * rendering/RenderElement.cpp:
1638 (WebCore::RenderElement::RenderElement):
1639 * rendering/RenderElement.h:
1640 (WebCore::RenderElement::setHasContinuation):
1641 (WebCore::RenderElement::hasContinuation):
1642 * rendering/RenderInline.cpp:
1643 (WebCore::RenderInline::willBeDestroyed):
1645 2014-10-25 Benjamin Poulain <benjamin@webkit.org>
1647 Remove a useless variable from SelectorCodeGenerator::generateElementMatchesSelectorList()
1648 https://bugs.webkit.org/show_bug.cgi?id=138076
1650 Reviewed by Alexey Proskuryakov.
1652 * cssjit/SelectorCompiler.cpp:
1653 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
1654 The variable elementAddressRegisterIndex was just needed for debugging, it is useless now.
1656 2014-10-18 Brian J. Burg <burg@cs.washington.edu>
1658 Web Inspector: timelines should not count time elapsed while paused in the debugger
1659 https://bugs.webkit.org/show_bug.cgi?id=136351
1661 Reviewed by Timothy Hatcher.
1663 To avoid counting time elapsed while the debugger is paused, timeline records should
1664 keep track of time elapsed since the start of timeline capturing, rather than wall clock
1665 timestamps. We can easily compute elapsed time by sharing a Stopwatch instance through the
1666 inspector environment. The stopwatch runs with timelines and is paused with the debugger,
1667 so subsequent time measurements will not include time elapsed while the debugger is paused.
1669 This refactoring is safe because start and end times are only used to graph records; the
1670 timestamp's actual value is irrelevant and is not displayed in the user interface. Date
1671 timestamps are still included with network-related records as part of their header data.
1673 No new tests, because we cannot reliably test timing changes induced by debugger pauses.
1674 It is possible for records to accrue time before the debugger pauses or after it resumes.
1676 * inspector/InspectorCSSAgent.cpp: Remove unnecessary include.
1677 * inspector/InspectorController.cpp:
1678 (WebCore::InspectorController::InspectorController):
1679 (WebCore::InspectorController::executionStopwatch): Add a shared stopwatch.
1680 * inspector/InspectorController.h:
1681 * inspector/InspectorPageAgent.cpp:
1682 (WebCore::InspectorPageAgent::timestamp): Redirect to the shared stopwatch.
1683 (WebCore::InspectorPageAgent::domContentEventFired):
1684 (WebCore::InspectorPageAgent::loadEventFired):
1685 * inspector/InspectorPageAgent.h:
1686 * inspector/InspectorResourceAgent.cpp:
1687 (WebCore::InspectorResourceAgent::timestamp): Redirect to the shared stopwatch.
1688 (WebCore::InspectorResourceAgent::willSendRequest):
1689 (WebCore::InspectorResourceAgent::didReceiveResponse):
1690 (WebCore::InspectorResourceAgent::didReceiveData):
1691 (WebCore::InspectorResourceAgent::didFinishLoading):
1692 (WebCore::InspectorResourceAgent::didFailLoading):
1693 (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
1694 (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
1695 (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
1696 (WebCore::InspectorResourceAgent::didCloseWebSocket):
1697 (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
1698 (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
1699 (WebCore::InspectorResourceAgent::didReceiveWebSocketFrameError):
1700 * inspector/InspectorResourceAgent.h:
1701 * inspector/InspectorTimelineAgent.cpp:
1702 (WebCore::InspectorTimelineAgent::internalStart): Start and stop the stopwatch with timelines.
1703 (WebCore::InspectorTimelineAgent::internalStop):
1704 (WebCore::InspectorTimelineAgent::timestamp): Redirect to the shared stopwatch.
1705 (WebCore::startProfiling):
1706 (WebCore::InspectorTimelineAgent::startFromConsole):
1707 (WebCore::InspectorTimelineAgent::willCallFunction):
1708 (WebCore::InspectorTimelineAgent::willEvaluateScript):
1709 (WebCore::TimelineTimeConverter::reset): Deleted.
1710 * inspector/InspectorTimelineAgent.h:
1711 (WebCore::TimelineTimeConverter::TimelineTimeConverter): Deleted.
1712 (WebCore::TimelineTimeConverter::fromMonotonicallyIncreasingTime): Deleted.
1713 (WebCore::InspectorTimelineAgent::timeConverter): Deleted.
1714 * inspector/TimelineRecordFactory.cpp:
1715 * inspector/WorkerInspectorController.cpp:
1716 (WebCore::WorkerInspectorController::WorkerInspectorController):
1717 (WebCore::WorkerInspectorController::executionStopwatch): Add a shared stopwatch.
1718 * inspector/WorkerInspectorController.h:
1720 2014-10-25 Dan Bernstein <mitz@apple.com>
1722 Fix builds using the public SDK.
1724 * platform/spi/cocoa/NSExtensionSPI.h:
1726 2014-10-24 Said Abou-Hallawa <sabouhallawa@apple.com>
1728 Clamp wordSpacing percentage value.
1729 https://bugs.webkit.org/show_bug.cgi?id=129350.
1731 Reviewed by Zalan Bujtas.
1733 When the CSS wordSpacing property is percentage, its value has to be within the
1734 pre-defined min/max values for the CSS length type. This is done the same way
1735 the wordSpacing of type <length> is handled.
1737 Tests: css3/infinite-word-spacing.html.
1739 Move the definitions of minValueForCssLength and maxValueForCssLength from the
1740 .cpp file to the .h file.
1741 * css/CSSPrimitiveValue.cpp:
1742 * css/CSSPrimitiveValue.h:
1744 Clamp the wordSpacing value to minValueForCssLength and maxValueForCssLength when
1745 its type is percentage.
1746 * css/DeprecatedStyleBuilder.cpp:
1747 (WebCore::ApplyPropertyWordSpacing::applyValue):
1749 2014-10-24 Chris Dumez <cdumez@apple.com>
1751 [Mac] Use modern loops in ResourceRequestCocoa.mm
1752 https://bugs.webkit.org/show_bug.cgi?id=138052
1754 Reviewed by Darin Adler.
1756 Use modern loops in ResourceRequestCocoa.mm and leverage Objective-C's
1759 No new tests, no behavior change.
1761 * platform/network/cocoa/ResourceRequestCocoa.mm:
1762 (WebCore::ResourceRequest::doUpdateResourceRequest):
1763 - Use NSDictionary's block-based enumeration as we enumerate both keys
1764 and values and this is faster than using fast enumeration of the keys
1765 then calling [NSDictionary objectForKey:]
1766 - Use Objective C's fast enumeration for
1767 contentDispositionEncodingFallbackArray as this is faster and shorter
1768 than index based access. Also use reserveCapacity() /
1769 uncheckedAppend() for m_responseContentDispositionEncodingFallbackArray
1770 as we know how many elements were are going to append in the common
1773 (WebCore::ResourceRequest::doUpdatePlatformRequest):
1774 - Use fast enumeration for [nsRequest allHTTPHeaderFields] dictionary
1775 keys instead of calling [NSDictionary allKeys] and then doing
1776 index-based iteration, to avoid copying the keys to a new array.
1777 Also do a forward enumeration instead of a reverse one. I don't see
1778 why a backward enumeration would be necessary here. We are not
1779 modifying the NSDictionary we are iterating over as
1780 [nsRequest allHTTPHeaderFields] makes a copy.
1781 - Use a modern C++ loop for
1782 m_responseContentDispositionEncodingFallbackArray.
1784 2014-10-24 Zalan Bujtas <zalan@apple.com>
1786 Replace INT_MIN/MAX / kFixedPointDenominator with intMin/MaxForLayoutUnit.
1787 https://bugs.webkit.org/show_bug.cgi?id=138047
1789 Reviewed by Andreas Kling.
1791 No change in functionality.
1793 * css/CSSPrimitiveValue.cpp:
1795 2014-10-24 Alexey Proskuryakov <ap@apple.com>
1797 REGRESSION(r174877): WebProcess sends an empty Cookies HTTP header
1798 https://bugs.webkit.org/show_bug.cgi?id=138053
1800 Reviewed by Chris Dumez.
1802 Fixes existing tests.
1804 * platform/network/mac/CookieJarMac.mm: (WebCore::cookiesForSession): Restore the
1805 behavior of returning a null string when there are no cookies.
1807 2014-10-24 Chris Dumez <cdumez@apple.com>
1809 [Mac] Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
1810 https://bugs.webkit.org/show_bug.cgi?id=138039
1812 Reviewed by Darin Adler.
1814 Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
1815 for case-insensitive string comparison instead of converting to UTF-8 and then
1818 No new tests, no behavior change.
1820 * platform/mac/QuickLookMac.mm:
1821 (WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
1823 2014-10-24 Chris Dumez <cdumez@apple.com>
1825 Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest() / doUpdatePlatformHTTPBody()
1826 https://bugs.webkit.org/show_bug.cgi?id=138049
1828 Reviewed by Alexey Proskuryakov.
1830 Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest()
1831 / doUpdatePlatformHTTPBody(). It turns out that about half the time, the
1832 m_nsRequest member is already mutable so it is unnecessary to call
1833 [NSURLRequest mutableCopy], we can just cast it to an NSMutableURLRequest* and
1836 This patch also moves the code to a new ensureMutableNSURLRequest() method to
1837 avoid duplicating the logic.
1839 I see that we spend ~21% less time in these 2 functions when loading
1840 http://flickr.com/explore/ (39.6ms -> 31.2ms).
1842 No new tests, no behavior change.
1844 * platform/network/cf/ResourceRequest.h:
1845 * platform/network/cocoa/ResourceRequestCocoa.mm:
1846 (WebCore::ResourceRequest::ensureMutableNSURLRequest):
1847 (WebCore::ResourceRequest::doUpdatePlatformRequest):
1848 (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
1850 2014-10-24 Chris Dumez <cdumez@apple.com>
1852 Move ComputeLength CSS properties to the new StyleBuilder
1853 https://bugs.webkit.org/show_bug.cgi?id=138036
1855 Reviewed by Andreas Kling.
1857 Move ComputeLength CSS properties from DeprecatedStyleBuilder to the
1858 new StyleBuilder so that they are now generated. 3 Converters are
1859 provided for these properties: ComputedLength / LineWidth / Spacing.
1861 This is inspired by the following Blink revision by
1862 <timloh@chromium.org>:
1863 https://src.chromium.org/viewvc/blink?view=rev&revision=154012
1865 No new tests, no behavior change.
1867 * css/CSSPropertyNames.in:
1868 * css/DeprecatedStyleBuilder.cpp:
1869 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1870 (WebCore::ApplyPropertyComputeLength::setValue): Deleted.
1871 (WebCore::ApplyPropertyComputeLength::applyValue): Deleted.
1872 (WebCore::ApplyPropertyComputeLength::createHandler): Deleted.
1873 * css/StyleBuilderConverter.h:
1874 (WebCore::StyleBuilderConverter::convertComputedLength):
1875 (WebCore::StyleBuilderConverter::convertLineWidth):
1876 (WebCore::StyleBuilderConverter::convertSpacing):
1878 2014-10-24 Chris Dumez <cdumez@apple.com>
1880 Make ScriptWrappable's destructor protected instead of public
1881 https://bugs.webkit.org/show_bug.cgi?id=138037
1883 Reviewed by Andreas Kling.
1885 Make ScriptWrappable's destructor protected instead of public as it is
1886 not virtual and this class is subclassed a lot.
1888 No new tests, no behavior change.
1890 * bindings/js/ScriptWrappable.h:
1891 (WebCore::ScriptWrappable::~ScriptWrappable):
1893 2014-10-23 Carlos Garcia Campos <cgarcia@igalia.com>
1895 [GTK][Cairo] Remove GTK dependency of WidgetBackingStoreGtkX11
1896 https://bugs.webkit.org/show_bug.cgi?id=138004
1898 Reviewed by Gustavo Noronha Silva.
1900 Rename all WidgetBackingStore* classes as
1901 BackingStoreBackendCairo* since all of them are actually
1902 BackingStore backends based on cairo, and move them from
1903 platform/cairo and platform/gtk to platform/graphics/cairo.
1904 BackingStoreBackendCairo is the base class that contains common
1905 members like the surface and size. BackingStoreBackendCairoImpl is
1906 the implementation using only cairo, and BackingStoreBackendCairoX11
1907 using xlib. BackingStoreBackendCairoX11 receives all the X11
1908 information it needs as constructor parameters, instead of using a
1909 GtkWidget and GTK+ X11 API. BackingStoreBackendCairoImpl receives
1910 the surface already created as constructor parameter, so that it
1911 doesn't have any platform specific code now.
1913 * PlatformEfl.cmake: Update compilation files.
1914 * PlatformGTK.cmake: Ditto.
1915 * platform/cairo/WidgetBackingStoreCairo.cpp: Removed.
1916 * platform/graphics/cairo/BackingStoreBackendCairo.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStore.h.
1917 (WebCore::BackingStoreBackendCairo::~BackingStoreBackendCairo):
1918 (WebCore::BackingStoreBackendCairo::surface):
1919 (WebCore::BackingStoreBackendCairo::size):
1920 (WebCore::BackingStoreBackendCairo::BackingStoreBackendCairo):
1921 * platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp: Added.
1922 (WebCore::BackingStoreBackendCairoImpl::BackingStoreBackendCairoImpl):
1923 (WebCore::BackingStoreBackendCairoImpl::~BackingStoreBackendCairoImpl):
1924 (WebCore::BackingStoreBackendCairoImpl::scroll):
1925 * platform/graphics/cairo/BackingStoreBackendCairoImpl.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStoreCairo.h.
1926 * platform/graphics/cairo/BackingStoreBackendCairoX11.cpp: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.cpp.
1927 (WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11):
1928 (WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11):
1929 (WebCore::BackingStoreBackendCairoX11::scroll):
1930 * platform/graphics/cairo/BackingStoreBackendCairoX11.h: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.h.
1931 * platform/graphics/cairo/CairoUtilities.cpp:
1932 (WebCore::cairoSurfaceGetDeviceScale):
1933 * platform/graphics/cairo/CairoUtilities.h:
1935 2014-10-23 Zalan Bujtas <zalan@apple.com>
1937 WebContent crash at WebCore::RenderTextControl::textFormControlElement const.
1938 https://bugs.webkit.org/show_bug.cgi?id=138035
1940 Reviewed by Antti Koivisto.
1942 NULL-check element().renderer() before using it.
1944 * html/SearchInputType.cpp:
1945 (WebCore::SearchInputType::didSetValueByUserEdit):
1947 2014-10-23 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1949 Remove HarfBuzzRun::create() factory function
1950 https://bugs.webkit.org/show_bug.cgi?id=137945
1952 Reviewed by Ryosuke Niwa.
1954 As a step to use std::unique_ptr<>, this patch applies std::unique_ptr<> and std::make_unique<>.
1955 Thus HarfBuzzRun::create() is needed no longer.
1957 No new tests, no behavior changes.
1959 * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1960 (WebCore::HarfBuzzShaper::collectHarfBuzzRuns):
1961 * platform/graphics/harfbuzz/HarfBuzzShaper.h:
1962 (WebCore::HarfBuzzShaper::HarfBuzzRun::create): Deleted.
1964 2014-10-23 Myles C. Maxfield <mmaxfield@apple.com>
1966 Unreviewed iOS build fix
1968 * editing/FrameSelection.cpp:
1970 2014-10-23 Chris Dumez <cdumez@apple.com>
1972 [Mac] Optimize URL::createCFURL() for the common case
1973 https://bugs.webkit.org/show_bug.cgi?id=138030
1975 Reviewed by Alexey Proskuryakov.
1977 Optimize URL::createCFURL() for the common case by adding a fast path
1978 for when the URL String is already 8-bit (common case).
1979 When the string is 8-bit, we don't need to copy the bytes into a
1980 temporary buffer and we can construct the CFURLRef directly from it.
1982 This makes URL::createCFURL() ~34% faster on my machine.
1984 No new tests, no behavior change.
1986 * platform/mac/URLMac.mm:
1987 (WebCore::URL::createCFURL):
1989 2014-10-23 Myles C. Maxfield <mmaxfield@apple.com>
1991 Carets in GMail and iCloud compositions are the foreground text color
1992 https://bugs.webkit.org/show_bug.cgi?id=138029
1994 Reviewed by Simon Fraser.
1996 Previously, we were only checking whether the background colors of the foreground and background
1997 elements were the same, rather than taking validity and opacity into consideration.
1999 Test: editing/caret/color-span-inside-editable-background.html
2001 * editing/FrameSelection.cpp:
2002 (WebCore::disappearsIntoBackground):
2003 (WebCore::CaretBase::paintCaret):
2005 2014-10-23 Joseph Pecoraro <pecoraro@apple.com>
2007 Web Inspector: Provide a way to have alternate inspector agents
2008 https://bugs.webkit.org/show_bug.cgi?id=137901
2010 Reviewed by Brian Burg.
2012 * Configurations/FeatureDefines.xcconfig:
2014 2014-10-23 Simon Fraser <simon.fraser@apple.com>
2016 Don't assume that style.overflowX() == style.overflowY()
2017 https://bugs.webkit.org/show_bug.cgi?id=138028
2019 Reviewed by Zalan Bujtas.
2021 WebKit doesn't support independent overflow scroll/hidden on different axes,
2022 but the RenderStyle does report the correct values. So check both overflowX()
2023 and overflowY() in a couple of places where we need to.
2025 * rendering/RenderLayerCompositor.cpp:
2026 (WebCore::styleHasTouchScrolling):
2027 (WebCore::styleChangeRequiresLayerRebuild):
2029 2014-10-23 Chris Dumez <cdumez@apple.com>
2031 Get rid of unnecessary vtables in WebKit
2032 https://bugs.webkit.org/show_bug.cgi?id=138024
2034 Reviewed by Benjamin Poulain.
2036 Get rid of unnecessary vtables in WebKit by de-virtualizing destructors
2037 when possible and marking the class as final to make sure people don't
2040 No new tests, no behavior change.
2043 * css/WebKitCSSMatrix.h:
2044 * css/WebKitCSSMatrix.idl:
2045 * html/canvas/WebGLContextGroup.h:
2046 * html/canvas/WebGLGetInfo.h:
2047 * html/canvas/WebGLUniformLocation.h:
2048 (WebCore::WebGLUniformLocation::~WebGLUniformLocation): Deleted.
2049 * html/canvas/WebGLUniformLocation.idl:
2050 * inspector/DOMPatchSupport.h:
2051 * inspector/InspectorHistory.h:
2052 * inspector/InspectorStyleSheet.h:
2053 * page/WheelEventDeltaTracker.h:
2054 * page/scrolling/ScrollLatchingState.h:
2055 * platform/audio/Biquad.h:
2056 * platform/graphics/Pattern.h:
2058 2014-10-23 Chris Dumez <cdumez@apple.com>
2060 Clean up virtual functions in dom/
2061 https://bugs.webkit.org/show_bug.cgi?id=138019
2063 Reviewed by Benjamin Poulain.
2065 Clean up virtual functions in dom/ by:
2066 - Making virtual functions final when possible
2067 - Making classes final when possible
2068 - Using 'override' when appropriate
2069 - Explicitly marking functions / destructors as virtual when they are
2071 - Making isXXX() virtual functions private on XXX classes to avoid
2072 unnecessary type checks
2073 - Dropping final for virtual functions in classes already marked as
2076 No new tests, no behavior change.
2079 * dom/AutocompleteErrorEvent.h:
2080 * dom/BeforeLoadEvent.h:
2081 (WebCore::BeforeLoadEventInit::BeforeLoadEventInit):
2082 * dom/BeforeTextInsertedEvent.h:
2083 * dom/ClipboardEvent.h:
2084 * dom/CompositionEvent.h:
2085 * dom/CustomEvent.h:
2086 * dom/DeviceMotionController.h:
2087 (WebCore::DeviceMotionController::~DeviceMotionController): Deleted.
2088 * dom/DeviceMotionEvent.h:
2089 * dom/DeviceOrientationController.h:
2090 (WebCore::DeviceOrientationController::~DeviceOrientationController): Deleted.
2091 * dom/DeviceOrientationEvent.h:
2093 * dom/DocumentFragment.h:
2096 * dom/HashChangeEvent.h:
2097 * dom/KeyboardEvent.h:
2098 * dom/LiveNodeList.h:
2099 * dom/MessageEvent.h:
2100 * dom/MessagePort.h:
2102 * dom/MouseRelatedEvent.h:
2103 * dom/MutationEvent.h:
2104 * dom/NamedFlowCollection.h:
2105 * dom/OverflowEvent.h:
2106 * dom/PageTransitionEvent.h:
2107 * dom/PendingScript.h:
2108 * dom/PopStateEvent.h:
2109 * dom/RawDataDocumentParser.h:
2110 (WebCore::RawDataDocumentParser::finish): Deleted.
2111 (WebCore::RawDataDocumentParser::flush): Deleted.
2112 (WebCore::RawDataDocumentParser::insert): Deleted.
2113 (WebCore::RawDataDocumentParser::append): Deleted.
2114 * dom/ScriptableDocumentParser.h:
2115 * dom/SecurityPolicyViolationEvent.h:
2118 * dom/TransitionEvent.h:
2120 * dom/WebKitAnimationEvent.h:
2121 * dom/WebKitTransitionEvent.h:
2123 * page/DeviceController.h:
2124 (WebCore::DeviceController::~DeviceController):
2126 2014-10-23 Tim Horton <timothy_horton@apple.com>
2128 Add some SPI headers for NSExtension and NSSharingService{Picker}
2129 https://bugs.webkit.org/show_bug.cgi?id=138027
2131 Reviewed by Anders Carlsson.
2133 * WebCore.xcodeproj/project.pbxproj:
2134 * platform/spi/cocoa/NSExtensionSPI.h: Added.
2135 * platform/spi/mac/NSSharingServicePickerSPI.h: Added.
2136 * platform/spi/mac/NSSharingServiceSPI.h: Added.
2137 Add modern SPI headers for NSExtension, and NSSharingService{Picker}.
2139 * rendering/RenderThemeMac.mm:
2140 Replace redefinitions with an SPI header #import.
2142 2014-10-23 Eric Carlson <eric.carlson@apple.com>
2144 [Mac] don't update caption user style sheet during parsing
2145 https://bugs.webkit.org/show_bug.cgi?id=137983
2146 rdar://problem/18735366
2148 Reviewed by Jer Noble.
2150 No new tests, existing tests cover the changes.
2152 * page/CaptionUserPreferencesMediaAF.cpp:
2153 (WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF): Initialize m_updateStyleSheetTimer.
2154 (WebCore::CaptionUserPreferencesMediaAF::updateTimerFired): Call updateCaptionStyleSheetOveride.
2155 (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges): Prime a timer to update
2156 the captions style sheet after a slight delay.
2158 2014-10-23 Chris Dumez <cdumez@apple.com>
2160 Move remaining Length-type properties to the new StyleBuilder
2161 https://bugs.webkit.org/show_bug.cgi?id=138012
2163 Reviewed by Antti Koivisto.
2165 Move remaining Length-type properties from DeprecatedStyleBuilder to
2166 the new StyleBuilder so that they are now generated from
2167 CSSPropertyNames.in as well. The patch introduces a couple of type
2168 converters for those: "LengthSizing / LengthMaxSizing".
2170 No new tests, no behavior change.
2172 * css/CSSPropertyNames.in:
2173 * css/DeprecatedStyleBuilder.cpp:
2174 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2175 * css/StyleBuilderConverter.h:
2176 (WebCore::StyleBuilderConverter::convertLengthSizing):
2177 (WebCore::StyleBuilderConverter::convertLengthMaxSizing):
2179 2014-10-23 Jer Noble <jer.noble@apple.com>
2181 [Mac] Safari cannot play 'audio/amr' content.
2182 https://bugs.webkit.org/show_bug.cgi?id=137894
2184 Reviewed by Eric Carlson.
2186 Test: media/media-can-play-case-insensitive.html
2188 Sites are returning 'video/amr' for AMR audio content, but the IANA spec says 'audio/AMR', which is also what
2189 AVFoundation claims to support. However, MIME types are supposed to be case-insensitive. When creating our
2190 mime type cache, case-fold to lower all MIME types given to us by our media frameworks.
2192 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2193 (WebCore::mimeTypeCache):
2194 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2195 (WebCore::addFileTypesToCache):
2197 2014-10-23 Chris Dumez <cdumez@apple.com>
2199 Move Length-type CSS properties from DeprecatedStyleBuilder to the new Style Builder
2200 https://bugs.webkit.org/show_bug.cgi?id=138000
2202 Reviewed by Andreas Kling.
2204 Move most Length-type CSS properties from DeprecatedStyleBuilder to the
2205 new Style Builder so that they are now generated. This patch adds
2206 support for a "Converter" option in CSSPropertyNames.in that can be
2207 used to specify a type converter function in
2208 css/StyleBuilderConverter.h. This patch adds support for Length and
2209 LengthOrAuto converters so that most Length-type properties can now be
2212 Another converter (likely called "LengthSizing") will be needed to
2213 generate the remaining Length-type properties. This will be taken care
2214 of in a follow-up patch.
2216 This patch is inspired by the following Blink revision by
2217 <timloh@chromium.org>:
2218 https://src.chromium.org/viewvc/blink?view=rev&revision=150500
2220 No new tests, no behavior change.
2222 * WebCore.xcodeproj/project.pbxproj:
2223 * css/CSSPropertyNames.in:
2224 * css/DeprecatedStyleBuilder.cpp:
2225 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2226 * css/SVGCSSPropertyNames.in:
2227 * css/StyleBuilder.h:
2228 * css/StyleBuilderConverter.h: Added.
2229 (WebCore::StyleBuilderConverter::convertLength):
2230 (WebCore::StyleBuilderConverter::convertLengthOrAuto):
2231 * css/StyleResolver.cpp:
2232 (WebCore::StyleResolver::applyProperty):
2235 2014-10-23 Zan Dobersek <zdobersek@igalia.com>
2237 Const-ify static s_resourceType members in RenderSVGResource* classes
2238 https://bugs.webkit.org/show_bug.cgi?id=137911
2240 Reviewed by Andreas Kling.
2242 Make s_resourceType static members in RenderSVGResource* classes const.
2243 Also update the resourceType() methods, where necessary, so that they
2244 return the s_resourceType constant.
2246 * rendering/svg/RenderSVGResourceClipper.cpp:
2247 * rendering/svg/RenderSVGResourceClipper.h:
2248 * rendering/svg/RenderSVGResourceFilter.cpp:
2249 * rendering/svg/RenderSVGResourceFilter.h:
2250 * rendering/svg/RenderSVGResourceLinearGradient.cpp:
2251 * rendering/svg/RenderSVGResourceLinearGradient.h:
2252 * rendering/svg/RenderSVGResourceMarker.cpp:
2253 * rendering/svg/RenderSVGResourceMarker.h:
2254 * rendering/svg/RenderSVGResourceMasker.cpp:
2255 * rendering/svg/RenderSVGResourceMasker.h:
2256 * rendering/svg/RenderSVGResourcePattern.cpp:
2257 * rendering/svg/RenderSVGResourcePattern.h:
2258 * rendering/svg/RenderSVGResourceRadialGradient.cpp:
2259 * rendering/svg/RenderSVGResourceRadialGradient.h:
2260 * rendering/svg/RenderSVGResourceSolidColor.cpp:
2261 * rendering/svg/RenderSVGResourceSolidColor.h:
2263 2014-10-23 Zan Dobersek <zdobersek@igalia.com>
2265 [TexMap] Clean up virtual method declarations in GraphicsLayerTextureMapper
2266 https://bugs.webkit.org/show_bug.cgi?id=137957
2268 Reviewed by Martin Robinson.
2270 Added override notation to the GraphicsLayerTextureMapper methods that are
2271 overriding the base methods from the GraphicsLayer class and don't have it yet.
2272 Also reordered these methods to follow the order of declaration in the
2273 GraphicsLayer class.
2275 Removed ::setName() and ::willBeDestroyed() methods since they just called
2276 the base class' methods.
2278 Also removed the ::solidColor() and ::changeMask() methods. The first one was
2279 only called in one place which can reference the m_solidColor member directly,
2280 and the second one wasn't used at all.
2282 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2283 (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
2284 (WebCore::GraphicsLayerTextureMapper::setName): Deleted.
2285 (WebCore::GraphicsLayerTextureMapper::willBeDestroyed): Deleted.
2286 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2287 (WebCore::GraphicsLayerTextureMapper::solidColor): Deleted.
2288 (WebCore::GraphicsLayerTextureMapper::usesContentsLayer): Deleted.
2289 (WebCore::GraphicsLayerTextureMapper::platformLayer): Deleted.
2290 (WebCore::GraphicsLayerTextureMapper::changeMask): Deleted.
2292 2014-10-23 Krzysztof Czech <k.czech@samsung.com>
2294 AX: Do the early return when role is different than UnknownRole
2295 https://bugs.webkit.org/show_bug.cgi?id=137880
2297 Reviewed by Chris Fleizach.
2299 We do not need to call ariaRoleAttribute() to check whether m_ariaRole is different than UnknownRole.
2300 Just check m_ariaRole instead.
2302 No new tests, no behavior change, just some cleanup
2304 * accessibility/AccessibilityNodeObject.cpp:
2305 (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2306 * accessibility/AccessibilityRenderObject.cpp:
2307 (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2308 * accessibility/AccessibilityTableRow.cpp:
2309 (WebCore::AccessibilityTableRow::determineAccessibilityRole):
2311 2014-10-23 Yusuke Suzuki <utatane.tea@gmail.com>
2313 CSS JIT: Implement :matches
2314 https://bugs.webkit.org/show_bug.cgi?id=137947
2316 Reviewed by Benjamin Poulain.
2318 Initial patch for supporting :matches in CSS JIT.
2319 In this patch, we implement :matches
2320 by leveraging the generalized nested backtracking implementation.
2322 Tests: fast/selectors/matches-backtracking.html
2323 fast/selectors/matches-complex.html
2325 * cssjit/SelectorCompiler.cpp:
2326 (WebCore::SelectorCompiler::addPseudoClassType):
2327 (WebCore::SelectorCompiler::hasAnyCombinators):
2328 (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
2329 (WebCore::SelectorCompiler::computeBacktrackingInformation):
2330 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2331 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesMatchesPseudoClass):
2333 2014-10-23 Milan Crha <mcrha@redhat.com>
2335 RenderThemeGtk::mediaControlsScript() is not defined when VIDEO is disabled.
2336 <https://webkit.org/b/137970>.
2338 Reviewed by Carlos Garcia Campos.
2340 * rendering/RenderThemeGtk.cpp:
2342 2014-10-22 Milan Crha <mcrha@redhat.com>
2344 Do not include GraphicsContext3D.h when 3D_GRAPHICS is not used.
2345 <https://webkit.org/b/137969>.
2347 Reviewed by Carlos Garcia Campos.
2349 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2351 2014-10-22 Milan Crha <mcrha@redhat.com>
2353 Do not build WidgetBackingStoreGtkX11 when not used.
2354 <https://webkit.org/b/137972>.
2356 Reviewed by Carlos Garcia Campos.
2358 * platform/gtk/WidgetBackingStoreGtkX11.cpp:
2359 * platform/gtk/WidgetBackingStoreGtkX11.h:
2361 2014-10-22 Simon Fraser <simon.fraser@apple.com>
2363 [iOS] Toggling overflow:scroll to hidden on element with -webkit-overflow-scrolling:touch can cause children to disappear
2364 https://bugs.webkit.org/show_bug.cgi?id=137999
2365 rdar://problem/18425550
2367 Reviewed by Zalan Bujtas.
2369 When toggling overflow from scroll to hidden on an element with -webkit-overflow-scrolling:touch,
2370 we'd fail to do a compositing layer rebuild, which caused various issues like unparented
2371 descendants, and misplaced and unrepainted content.
2373 This happened because we'd get to RenderLayerBacking::updateConfiguration() via styleChanged
2374 with the view needing layout, so never hit the updateScrollingLayers() code, and the subsequent
2375 updateCompositingLayers() would be a no-op.
2377 Fix by explicitly triggering a layer rebuild when style changes such that the touch-scrollability
2378 of an element changes, as we do for changes in clip.
2380 Test: compositing/scrolling/touch-scroll-to-clip.html
2382 * rendering/RenderLayerCompositor.cpp:
2383 (WebCore::isScrollableOverflow):
2384 (WebCore::styleHasTouchScrolling):
2385 (WebCore::styleChangeRequiresLayerRebuild):
2387 2014-10-22 Chris Dumez <cdumez@apple.com>
2389 Clean up virtual functions in rendering/
2390 https://bugs.webkit.org/show_bug.cgi?id=137984
2392 Reviewed by Darin Adler.
2394 Clean up virtual functions in rendering/ by:
2395 - Making virtual functions final when possible
2396 - Making classes final when possible
2397 - Using 'override' when appropriate
2398 - Explicitly marking functions / destructors as virtual when they are
2400 - Dropping virtual destructors when the class does not have subclasses
2401 and mark the class as final, to get rid of unnecessary vtables
2402 - Making isXXX() virtual functions private on XXX classes to avoid
2403 unnecessary type checks
2404 - De-virtualizing some functions that do not need to be virtual
2405 - Dropping final for virtual functions in classes already marked as
2408 No new tests, no behavior change.
2410 * html/shadow/SliderThumbElement.cpp:
2411 * rendering/AutoTableLayout.h:
2412 * rendering/ClipPathOperation.h:
2413 (WebCore::ClipPathOperation::type):
2414 (WebCore::ClipPathOperation::isSameType):
2415 * rendering/EllipsisBox.h:
2416 * rendering/FixedTableLayout.h:
2417 * rendering/InlineElementBox.h:
2418 * rendering/RenderBlockFlow.h:
2419 * rendering/RenderCombineText.h:
2420 * rendering/RenderCounter.h:
2421 * rendering/RenderDeprecatedFlexibleBox.h:
2422 * rendering/RenderFlexibleBox.h:
2423 * rendering/RenderFullScreen.h:
2424 * rendering/RenderGrid.h:
2425 * rendering/RenderLayer.h:
2426 * rendering/RenderLayerBacking.h:
2427 * rendering/RenderLayerCompositor.h:
2428 * rendering/RenderLayerFilterInfo.h:
2429 * rendering/RenderLineBreak.h:
2430 * rendering/RenderMarquee.h:
2431 * rendering/RenderMediaControlElements.h:
2432 * rendering/RenderMultiColumnFlowThread.h:
2433 * rendering/RenderMultiColumnSet.h:
2434 * rendering/RenderMultiColumnSpannerPlaceholder.h:
2435 * rendering/RenderNamedFlowFragment.h:
2436 * rendering/RenderNamedFlowThread.h:
2437 * rendering/RenderQuote.h:
2438 * rendering/RenderRegion.h:
2439 (WebCore::RenderRegion::renderName): Deleted.
2440 * rendering/RenderReplica.h:
2441 * rendering/RenderRubyBase.h:
2442 * rendering/RenderRubyRun.h:
2443 * rendering/RenderScrollbar.h:
2444 * rendering/RenderScrollbarPart.h:
2445 * rendering/RenderScrollbarTheme.h:
2446 (WebCore::RenderScrollbarTheme::~RenderScrollbarTheme): Deleted.
2447 (WebCore::RenderScrollbarTheme::scrollbarThickness): Deleted.
2448 (WebCore::RenderScrollbarTheme::buttonsPlacement): Deleted.
2449 (WebCore::RenderScrollbarTheme::supportsControlTints): Deleted.
2450 (WebCore::RenderScrollbarTheme::shouldCenterOnThumb): Deleted.
2451 (WebCore::RenderScrollbarTheme::initialAutoscrollTimerDelay): Deleted.
2452 (WebCore::RenderScrollbarTheme::autoscrollTimerDelay): Deleted.
2453 (WebCore::RenderScrollbarTheme::registerScrollbar): Deleted.
2454 (WebCore::RenderScrollbarTheme::unregisterScrollbar): Deleted.
2455 * rendering/RenderSnapshottedPlugIn.h:
2456 * rendering/RenderTextControlMultiLine.h:
2457 * rendering/RenderTextFragment.h:
2458 * rendering/RenderThemeGtk.h:
2459 * rendering/RenderThemeIOS.h:
2460 * rendering/RenderThemeWin.h:
2461 * rendering/RenderVideo.h:
2462 * rendering/TextAutosizer.h:
2463 * rendering/TrailingFloatsRootInlineBox.h:
2464 * rendering/mathml/RenderMathMLBlock.h:
2465 * rendering/mathml/RenderMathMLMenclose.h:
2466 * rendering/mathml/RenderMathMLOperator.h:
2467 * rendering/mathml/RenderMathMLRadicalOperator.h:
2468 * rendering/mathml/RenderMathMLRoot.h:
2469 * rendering/mathml/RenderMathMLRow.h:
2470 * rendering/mathml/RenderMathMLScripts.h:
2471 * rendering/mathml/RenderMathMLToken.h:
2472 * rendering/mathml/RenderMathMLUnderOver.h:
2473 * rendering/shapes/BoxShape.h:
2474 * rendering/shapes/PolygonShape.h:
2475 * rendering/shapes/RasterShape.h:
2476 * rendering/shapes/RectangleShape.h:
2477 * rendering/style/BasicShapes.h:
2478 * rendering/style/StylePendingImage.h:
2479 (WebCore::StylePendingImage::computeIntrinsicDimensions): Deleted.
2480 * rendering/svg/RenderSVGBlock.h:
2481 * rendering/svg/RenderSVGContainer.h:
2482 * rendering/svg/RenderSVGEllipse.h:
2483 * rendering/svg/RenderSVGForeignObject.h:
2484 * rendering/svg/RenderSVGImage.h:
2485 * rendering/svg/RenderSVGPath.h:
2486 * rendering/svg/RenderSVGRect.h:
2487 * rendering/svg/RenderSVGResourceClipper.h:
2488 * rendering/svg/RenderSVGResourceFilter.h:
2489 * rendering/svg/RenderSVGResourceFilterPrimitive.h:
2490 * rendering/svg/RenderSVGResourceLinearGradient.h:
2491 * rendering/svg/RenderSVGResourceMarker.h:
2492 * rendering/svg/RenderSVGResourceMasker.h:
2493 * rendering/svg/RenderSVGResourcePattern.h:
2494 * rendering/svg/RenderSVGResourceRadialGradient.h:
2495 * rendering/svg/RenderSVGRoot.h:
2496 * rendering/svg/RenderSVGTSpan.h:
2497 * rendering/svg/RenderSVGText.h:
2498 * rendering/svg/RenderSVGTransformableContainer.h:
2499 * rendering/svg/RenderSVGViewportContainer.h:
2500 * rendering/svg/SVGInlineTextBox.h:
2501 * rendering/svg/SVGRootInlineBox.h:
2503 2014-10-22 Jer Noble <jer.noble@apple.com>
2505 REGRESSION(r175000): Crash in SourceBufferPrivateAVFObjC::destroyParser()
2506 https://bugs.webkit.org/show_bug.cgi?id=137990
2508 Reviewed by Alexey Proskuryakov.
2510 NULL-check m_mediaSource before using.
2512 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2513 (WebCore::SourceBufferPrivateAVFObjC::destroyParser):
2515 2014-10-22 Said Abou-Hallawa <sabouhallawa@apple.com>
2517 SVG loaded through html <img> can't request to load any external resources.
2518 https://bugs.webkit.org/show_bug.cgi?id=137762.
2520 Reviewed by Daniel Bates.
2522 SVG images have unique security rules that prevent them from loading any external
2523 resources. This patch enforces these rules in CachedResourceLoader::canRequest for
2524 all non-data-uri resources.
2526 The fix and the tests are ported but modified a little from the chromium fix:
2527 http://src.chromium.org/viewvc/blink?view=rev&rev=176084
2529 Test: http/tests/security/svg-image-with-cached-remote-image.html
2530 http/tests/security/svg-image-with-css-cross-domain.html
2532 For the SVG image, prevent loading any external sub-resource except for data urls.
2533 * loader/cache/CachedResourceLoader.cpp:
2534 (WebCore::CachedResourceLoader::canRequest):
2536 2014-10-21 Ada Chan <adachan@apple.com>
2538 MediaPlayerPrivateAVFoundation::hasAudio() returns false even when there is an audible AVMediaSelectionOption selected
2539 https://bugs.webkit.org/show_bug.cgi?id=137935
2541 Reviewed by Eric Carlson.
2543 Set hasAudio to true if there's a selected audible AVMediaSelectionOption
2544 after the call to updateAudioTracks(). Ditto for video.
2546 Test: http/tests/media/hls/hls-audio-tracks-has-audio.html
2548 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2549 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
2551 * testing/Internals.cpp:
2552 (WebCore::Internals::mediaElementHasCharacteristic):
2553 * testing/Internals.h:
2554 * testing/Internals.idl:
2555 Add internals.mediaElementHasCharacteristic for the new test.
2557 2014-10-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2559 Remove WidgetBackingStoreCairo::create() factory function
2560 https://bugs.webkit.org/show_bug.cgi?id=137943
2562 Reviewed by Darin Adler.
2564 WidgetBackingStoreCairo::create() can be replaced by std::make_unique<>.
2565 Thus this patch removes it, then use std::make_unique<>|std::unique_ptr<>.
2567 No new tests, no behavior changes.
2569 * platform/cairo/WidgetBackingStoreCairo.cpp:
2570 (WebCore::WidgetBackingStoreCairo::create): Deleted.
2571 * platform/cairo/WidgetBackingStoreCairo.h:
2572 * platform/gtk/WidgetBackingStoreGtkX11.cpp:
2573 (WebCore::WidgetBackingStoreGtkX11::create): Deleted.
2574 * platform/gtk/WidgetBackingStoreGtkX11.h:
2576 2014-10-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2578 Remove TextCheckerEnchant::create() factory function
2579 https://bugs.webkit.org/show_bug.cgi?id=137944
2581 Reviewed by Darin Adler.
2583 TextCheckerEnchant::create() can be replaced by std::make_unique<> and std::unique_ptr<>.
2585 No new tests, no behavior change.
2587 * platform/text/enchant/TextCheckerEnchant.h:
2588 (WebCore::TextCheckerEnchant::create): Deleted.
2590 2014-10-22 Chris Dumez <cdumez@apple.com>
2592 Avoid confusion between AccessibilityObject::isTable() / isAccessibilityTable()
2593 https://bugs.webkit.org/show_bug.cgi?id=137899
2595 Reviewed by Darin Adler.
2597 Avoid confusion between AccessibilityObject::isTable() and
2598 isAccessibilityTable(). isTable() is equivalent to
2599 is<AccessibilityTable>(), while isAccessibilityTable() is an
2600 AccessibilityTable that is exposed as an AccessibilityTable to the
2603 This patch is renaming isAccessibilityTable() to
2604 isExposableThroughAccessibility(), makes it non-virtual and defines it
2605 on AccessibilityTable only, for clarity.
2607 This patch also renames isTableExposableThroughAccessibility() to
2608 computeIisTableExposableThroughAccessibility() as it is called only
2609 once to initialize the m_isExposableThroughAccessibility data member.
2611 No new tests, no behavior change.
2613 * accessibility/AccessibilityARIAGrid.cpp:
2614 (WebCore::AccessibilityARIAGrid::addChildren):
2615 * accessibility/AccessibilityARIAGrid.h:
2616 * accessibility/AccessibilityARIAGridCell.cpp:
2617 (WebCore::AccessibilityARIAGridCell::parentTable):
2618 (WebCore::AccessibilityARIAGridCell::rowIndexRange):
2619 (WebCore::AccessibilityARIAGridCell::columnIndexRange):
2620 * accessibility/AccessibilityARIAGridRow.cpp:
2621 (WebCore::AccessibilityARIAGridRow::disclosedRows):
2622 (WebCore::AccessibilityARIAGridRow::disclosedByRow):
2623 (WebCore::AccessibilityARIAGridRow::parentTable):
2624 * accessibility/AccessibilityNodeObject.cpp:
2625 (WebCore::shouldUseAccessiblityObjectInnerText):
2626 * accessibility/AccessibilityObject.cpp:
2627 (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
2628 (WebCore::appendChildrenToArray):
2629 * accessibility/AccessibilityObject.h:
2630 (WebCore::AccessibilityObject::isAccessibilityTable): Deleted.
2631 * accessibility/AccessibilityRenderObject.cpp:
2632 (WebCore::AccessibilityRenderObject::ariaSelectedRows):
2633 * accessibility/AccessibilityTable.cpp:
2634 (WebCore::AccessibilityTable::AccessibilityTable):
2635 (WebCore::AccessibilityTable::init):
2636 (WebCore::AccessibilityTable::isExposableThroughAccessibility):
2637 (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
2638 (WebCore::AccessibilityTable::addChildren):
2639 (WebCore::AccessibilityTable::tableLevel):
2640 (WebCore::AccessibilityTable::roleValue):
2641 (WebCore::AccessibilityTable::computeAccessibilityIsIgnored):
2642 (WebCore::AccessibilityTable::title):
2643 (WebCore::AccessibilityTable::isAccessibilityTable): Deleted.
2644 (WebCore::AccessibilityTable::isTableExposableThroughAccessibility): Deleted.
2645 * accessibility/AccessibilityTable.h:
2646 * accessibility/AccessibilityTableCell.cpp:
2647 (WebCore::AccessibilityTableCell::isTableCell):
2648 * accessibility/AccessibilityTableColumn.cpp:
2649 (WebCore::AccessibilityTableColumn::headerObject):
2650 (WebCore::AccessibilityTableColumn::addChildren):
2651 * accessibility/AccessibilityTableHeaderContainer.cpp:
2652 (WebCore::AccessibilityTableHeaderContainer::addChildren):
2653 * accessibility/AccessibilityTableRow.cpp:
2654 (WebCore::AccessibilityTableRow::isTableRow):
2655 (WebCore::AccessibilityTableRow::parentTable):
2656 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2657 (webkitAccessibleGetNChildren):
2658 (webkitAccessibleRefChild):
2659 (webkitAccessibleGetAttributes):
2660 * accessibility/mac/AXObjectCacheMac.mm:
2661 (WebCore::AXObjectCache::postPlatformNotification):
2662 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2663 (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2664 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2665 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2666 (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
2667 (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
2668 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2670 2014-10-22 Chris Dumez <cdumez@apple.com>
2672 Avoid repeated is<MutableStyleProperties>() checks in StyleProperties
2673 https://bugs.webkit.org/show_bug.cgi?id=137978
2675 Reviewed by Andreas Kling.
2677 Reduce the amount of is<MutableStyleProperties>() checks in
2679 - Removing the checks in each method of StyleProperties::PropertyReference,
2680 and replace them by a single check in StyleProperties::propertyAt().
2681 - Providing faster propertyCount() / propertyAt() / isEmpty() methods on
2682 MutableStyleProperties / ImmutableStyleProperties as a lot of callers use
2684 - Using tighter typing at call sites whenever possible.
2686 Ideally, we could be able to use iterators instead of propertyCount() /
2687 propertyAt() but this is not trivial to do efficiently as the
2688 representation in memory is fundamentally different for MutableStyleProperties
2689 / ImmutableStyleProperties. We may be able to do better longer term, but
2690 this is already more efficient short term at least.
2692 No new tests, no behavior change.
2694 * css/StyleProperties.cpp:
2695 (WebCore::MutableStyleProperties::MutableStyleProperties):
2696 (WebCore::StyleProperties::PropertyReference::cssText):
2697 * css/StyleProperties.h:
2698 (WebCore::StyleProperties::PropertyReference::PropertyReference):
2699 (WebCore::StyleProperties::PropertyReference::id):
2700 (WebCore::StyleProperties::PropertyReference::shorthandID):
2701 (WebCore::StyleProperties::PropertyReference::isImportant):
2702 (WebCore::StyleProperties::PropertyReference::isInherited):
2703 (WebCore::StyleProperties::PropertyReference::isImplicit):
2704 (WebCore::StyleProperties::PropertyReference::value):
2705 (WebCore::StyleProperties::PropertyReference::toCSSProperty):
2706 (WebCore::StyleProperties::isEmpty):
2707 (WebCore::ImmutableStyleProperties::isEmpty):
2708 (WebCore::MutableStyleProperties::isEmpty):
2709 (WebCore::ImmutableStyleProperties::propertyAt):
2710 (WebCore::MutableStyleProperties::propertyAt):
2711 (WebCore::StyleProperties::propertyAt):
2712 (WebCore::StyleProperties::propertyCount):
2713 (WebCore::StyleProperties::PropertyReference::propertyMetadata): Deleted.
2714 (WebCore::StyleProperties::PropertyReference::propertyValue): Deleted.
2715 * editing/EditingStyle.cpp:
2716 (WebCore::removePropertiesInStyle):
2717 (WebCore::EditingStyle::removePropertiesInElementDefaultStyle):
2719 2014-10-22 Eric Carlson <eric.carlson@apple.com>
2721 [Mac][MediaStream] clean up bit rot
2722 https://bugs.webkit.org/show_bug.cgi?id=137976
2724 Reviewed by Jer Noble.
2726 No new tests, this just gets the Mac port compiling again.
2728 * Modules/mediastream/MediaStream.h: Add a virtual destructor to Observer since it has
2731 * WebCore.exp.in: Export RTCPeerConnectionHandler::create and RTCPeerConnectionHandlerMock::create(WebCore::RTCPeerConnectionHandlerClient*),
2732 they are both use by Internals for testing.
2734 * WebCore.xcodeproj/project.pbxproj: Add RTC and MediaStream files.
2736 * html/HTMLMediaElement.h: Forward declare MediaStream instead of including MediaStream.h.
2738 * platform/mediastream/RTCPeerConnectionHandler.h: EXPORT the create method.
2740 * platform/mock/MediaConstraintsMock.cpp:
2741 (WebCore::isSupported): Make static.
2742 (WebCore::isValid): Ditto.
2744 * platform/mock/RTCPeerConnectionHandlerMock.h: EXPORT the create method.
2746 2014-10-22 Chris Dumez <cdumez@apple.com>
2748 [Mac][WK2] Fix applicationIsSafari() detection
2749 https://bugs.webkit.org/show_bug.cgi?id=137893
2751 Reviewed by Alexey Proskuryakov.
2753 I noticed when profiling Safari on Mac that we were exercising a code
2754 path we shouldn't because it is meant for other applications that
2757 The detection relies on the applicationIsSafari() function in
2758 RuntimeApplicationChecks.cpp. This was in some cases returning false on
2759 my machine even though I was running Safari so I investigated a bit and
2760 noticed that the check relies on the main bundle identifier string and
2762 isSafari = mainBundleIsEqualTo("com.apple.Safari")
2763 || mainBundleIsEqualTo("com.apple.WebProcess");
2765 This WebProcess detection is very unreliable because:
2766 - It matches other apps than Safari's WebProcesses
2767 - The bundle name for the WebProcess is sometimes
2768 "com.apple.WebKit.WebContent" or
2769 "com.apple.WebKit.WebContent.Development".
2771 The solution used in this patch is to move the applicationIsSafari()
2772 check to the UIProcess so that the check actually succeeds reliably.
2773 The call site for applicationIsSafari() was in
2774 ResourceRequest::useQuickLookResourceCachingQuirks(). This match
2775 removes that logic from ResourceRequest and move it to
2776 FrameLoaderClient as only the FrameLoader is interested in this
2777 information. The logic to determine if we should use QuickLook
2778 resource caching quirks is moved to a new QuickLook class under
2779 platform/ as the code needs to be shared between WebKit and WebKit2.
2780 On WebKit2, we make use that code on the UIProcess side and pass
2781 the flag as a parameter when constructing the WebProcess. The flag
2782 is then stored on the WebProcess and queried by WebFrameLoaderClient.
2784 Previously, we would spend ~1% of the WebProcess cpu time (when loading
2785 apple.com) trying to detect if we should use QuickLook resource caching
2786 quirks even though that check was supposed to be disabled and return
2787 early when running Safari.
2789 No new tests, not easily testable.
2792 * WebCore.xcodeproj/project.pbxproj:
2793 * loader/EmptyClients.h:
2794 * loader/FrameLoader.cpp:
2795 (WebCore::FrameLoader::subresourceCachePolicy):
2796 * loader/FrameLoaderClient.h:
2797 * platform/RuntimeApplicationChecks.cpp:
2798 (WebCore::applicationIsSafari):
2799 Remove "com.apple.WebProcess" bundle name matching as this causes false
2800 positives (matches other applications than Safari's WebProcesses) and
2801 it is no longer needed now that applicationIsSafari() is always called
2804 * platform/mac/QuickLookMac.h: Added.
2805 * platform/mac/QuickLookMac.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
2806 (WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
2807 * platform/network/cf/ResourceRequest.h:
2808 * platform/network/ios/ResourceRequestIOS.mm:
2809 (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
2810 * platform/network/mac/ResourceRequestMac.mm:
2811 (WebCore::initQuickLookResourceCachingQuirks): Deleted.
2812 (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
2814 2014-10-22 Shivakumar JM <shiva.jm@samsung.com>
2816 XMLHttpRequest should support attribute responseURL as per latest XHR spec.
2817 https://bugs.webkit.org/show_bug.cgi?id=136938
2819 Reviewed by Alexey Proskuryakov.
2821 Tests: http/tests/xmlhttprequest/basic-auth-responseURL.html
2822 http/tests/xmlhttprequest/cross-origin-redirect-responseURL.html
2823 http/tests/xmlhttprequest/redirect-credentials-responseURL.html
2824 http/tests/xmlhttprequest/xmlhttprequest-responseURL.html
2826 XMLHttpRequest should support attribute responseURL
2828 * xml/XMLHttpRequest.cpp:
2829 (WebCore::XMLHttpRequest::responseURL):
2830 * xml/XMLHttpRequest.h:
2831 * xml/XMLHttpRequest.idl:
2833 2014-10-22 Chris Dumez <cdumez@apple.com>
2835 Add initial support for generating the StyleBuilder from CSSPropertyNames.in
2836 https://bugs.webkit.org/show_bug.cgi?id=137910
2838 Reviewed by Andreas Kling.
2840 Add initial support for generating the StyleBuilder from
2841 CSSPropertyNames.in. This is a first step towards getting rid of the
2842 legacy DeprecatedStyleBuilder class and having everything defined in one
2843 place (CSSPropertyNames.in).
2845 This patch updates makeprop.pl script to generate a StyleBuilder.cpp
2846 file that generate a the StyleBuilder::applyProperty() method
2847 implementation using a huge switch statement for all the CSS
2848 properties. With this patch, we are now generating the new StyleBuilder
2849 code for all the "simple" CSS properties (i.e. those that were using
2850 ApplyPropertyDefault<> in DeprecatedStyleBuilder.cpp). I am using a
2851 "NewStyleBuilder" option in CSSPropertyNames.in for properties that
2852 we generate to help with improving incrementally the generator. Once
2853 we are able to generate all properties, this transition option will
2854 do away and become the default.
2856 By default, the generator will make an educated guess for the type
2857 name, the getter, the setter and the initial function of each property.
2858 For example, for the border-collapse property, it will use:
2859 - TypeName: EBorderCollapse (i.e. 'E' + PropertyId)
2860 - Getter: borderCollapse() (i.e. PropertyId with first letter lowercased)
2861 - Setter: setBorderCollapse() (i.e. 'set' + PropertyId)
2862 - Initial: initialBorderCollapse() (i.e. 'initial' + PropertyId)
2864 This works for most properties. For properties that need
2865 special-casing, developers can use the following options in
2866 CSSPropertyNames.in:
2867 - TypeName: Overrides the type name
2868 - Getter: Overrides the getter name
2869 - Setter: Overrides the setter name
2870 - Initial: Overrides the initial function name
2871 - NameForMethods: Overrides the Getter / Setter / Initial function
2872 names. For e.g. "NameForMethods=OverflowWrap" will use
2873 "overflowWrap() / setOverflowWrap() / initialOverflowWrap()".
2875 The patch is inspired by the following Blink revision by
2876 <timloh@chromium.org>:
2877 https://src.chromium.org/viewvc/blink?view=rev&revision=150424
2879 No new tests, no behavior change.
2882 * DerivedSources.make:
2883 * WebCore.vcxproj/WebCore.vcxproj:
2884 * WebCore.vcxproj/WebCore.vcxproj.filters:
2885 * WebCore.xcodeproj/project.pbxproj:
2886 * css/CSSPropertyNames.in:
2887 * css/DeprecatedStyleBuilder.cpp:
2888 (WebCore::ApplyPropertyVerticalAlign::createHandler):
2889 (WebCore::ApplyPropertyDisplay::applyInitialValue):
2890 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2891 * css/StyleBuilder.h: Added.
2892 * css/StyleResolver.cpp:
2893 (WebCore::StyleResolver::adjustRenderStyle):
2894 (WebCore::StyleResolver::applyProperty):
2896 * rendering/style/RenderStyle.h:
2897 Move the initialXXX() methods that were in NonInheritedFlags to
2898 RenderStyle class, with the other initialXXX() methods to facilitate
2901 * rendering/style/StyleMultiColData.cpp:
2902 (WebCore::StyleMultiColData::StyleMultiColData):
2903 * rendering/style/StyleRareNonInheritedData.cpp:
2904 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2906 2014-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
2908 Unreviewed. Fix GStreamer debug build after r175050.
2910 Explicitly include wtf/MainThread.h.
2912 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2914 2014-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
2916 [GStreamer] Do not use CachedResourceLoader, SecurityOrigin, ResourceBuffer and other WebCore types
2917 https://bugs.webkit.org/show_bug.cgi?id=137064
2919 Reviewed by Philippe Normand.
2921 Move the media resource loader to a new class in WebCore/loader
2922 that inherits from a PlatformMediaResourceLoader class defined in
2923 the platform layer. The platform specific behaviour is implemented
2924 using a client also defined in the platform layer, implemented by
2925 every media backend, and used by the WebCore MediaResourceLoader.
2927 * CMakeLists.txt: Add new files to compilation.
2928 * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2929 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2930 * WebCore.xcodeproj/project.pbxproj: Ditto.
2931 * html/HTMLMediaElement.cpp:
2932 (WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):
2933 Create a MediaResourceLoader.
2934 (WebCore::HTMLMediaElement::mediaPlayerCORSMode): Deleted. This is
2936 * html/HTMLMediaElement.h:
2937 * loader/MediaResourceLoader.cpp: Added.
2938 (WebCore::MediaResourceLoader::MediaResourceLoader):
2939 (WebCore::MediaResourceLoader::~MediaResourceLoader):
2940 (WebCore::MediaResourceLoader::start): Start a new load for the
2941 given request and load options.
2942 (WebCore::MediaResourceLoader::stop): Stop the load if needed.
2943 (WebCore::MediaResourceLoader::setDefersLoading):
2944 (WebCore::MediaResourceLoader::responseReceived): Handle CORS
2945 access check and notify the client about the response.
2946 (WebCore::MediaResourceLoader::dataReceived): Notify the client.
2947 (WebCore::MediaResourceLoader::notifyFinished): Ditto.
2948 (WebCore::MediaResourceLoader::getOrCreateReadBuffer): Ask the
2949 client to create the read buffer.
2950 * loader/MediaResourceLoader.h: Added.
2951 * platform/graphics/MediaPlayer.cpp:
2952 (WebCore::MediaPlayer::createResourceLoader): Call
2953 mediaPlayerCreateResourceLoader() if there's a client.
2954 * platform/graphics/MediaPlayer.h:
2955 (WebCore::MediaPlayerClient::mediaPlayerCreateResourceLoader):
2956 (WebCore::MediaPlayerClient::mediaPlayerCORSMode): Deleted.
2957 * platform/graphics/PlatformMediaResourceLoader.h: Added.
2958 (WebCore::PlatformMediaResourceLoaderClient::responseReceived):
2959 (WebCore::PlatformMediaResourceLoaderClient::dataReceived):
2960 (WebCore::PlatformMediaResourceLoaderClient::bufferReceived):
2961 (WebCore::PlatformMediaResourceLoaderClient::accessControlCheckFailed):
2962 (WebCore::PlatformMediaResourceLoaderClient::loadFailed):
2963 (WebCore::PlatformMediaResourceLoaderClient::loadFinished):
2964 (WebCore::PlatformMediaResourceLoaderClient::getOrCreateReadBuffer):
2965 (WebCore::PlatformMediaResourceLoader::~PlatformMediaResourceLoader):
2966 (WebCore::PlatformMediaResourceLoader::stop):
2967 (WebCore::PlatformMediaResourceLoader::setDefersLoading):
2968 (WebCore::PlatformMediaResourceLoader::didPassAccessControlCheck):
2969 (WebCore::PlatformMediaResourceLoader::PlatformMediaResourceLoader):
2970 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2971 (webKitWebSrcStop): Also delete the PlatformMediaResourceLoader.
2972 (webKitWebSrcStart): Create a new resource loader using
2973 MediaPlayer::createResourceLoader() with a new
2974 CachedResourceStreamingClient as client.
2975 (webKitWebSrcNeedDataMainCb): Call setDefersLoading() for the
2976 resource loader if there's one.
2977 (webKitWebSrcEnoughDataMainCb): Ditto.
2978 (webKitSrcPassedCORSAccessCheck): Return didPassAccessControlCheck.
2979 (StreamingClient::handleResponseReceived): Remove the CORS check
2980 result parameter since that's now handled by MediaResourceLoader.
2981 (CachedResourceStreamingClient::CachedResourceStreamingClient):
2982 (CachedResourceStreamingClient::~CachedResourceStreamingClient):
2983 (CachedResourceStreamingClient::getOrCreateReadBuffer):
2984 (CachedResourceStreamingClient::responseReceived): Update didPassAccessControlCheck.
2985 (CachedResourceStreamingClient::dataReceived):
2986 (CachedResourceStreamingClient::accessControlCheckFailed): Log the
2987 error and stop the load.
2988 (CachedResourceStreamingClient::loadFailed): Log the error if it
2989 was not a cancellation.
2990 (CachedResourceStreamingClient::loadFinished):
2991 (ResourceHandleStreamingClient::didReceiveResponse):
2992 (CachedResourceStreamingClient::setDefersLoading): Deleted.
2993 (CachedResourceStreamingClient::notifyFinished): Deleted.
2995 2014-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
2997 [GTK] Move GtkInputMethodFilter from Platform to WebKit2
2998 https://bugs.webkit.org/show_bug.cgi?id=137884
3000 Reviewed by Gustavo Noronha Silva.
3002 Remove GtkInputMethodFilter.
3004 * PlatformGTK.cmake:
3005 * platform/gtk/GtkInputMethodFilter.cpp: Removed.
3006 * platform/gtk/GtkInputMethodFilter.h: Removed.
3008 2014-10-22 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
3010 Match spec for font-weight: bolder|lighter
3011 https://bugs.webkit.org/show_bug.cgi?id=137919
3013 Reviewed by Andreas Kling.
3015 This patch is a merge of Blink's
3016 https://chromiumcodereview.appspot.com/15994009
3018 Currently, bolder and lighter change font-weight in a non-compliant way.
3019 The spec (http://www.w3.org/TR/css3-fonts/#bolderlighter) defines
3020 exactly what the computed values should be given the inherited weight values,
3021 so we should match those.
3023 The removed FIXME's for selecting the next lightest/heaviest weight from
3024 the used font family seems to refer to behaviour from
3025 CSS1 (http://www.w3.org/TR/CSS1/#font-weight), while this is replaced
3026 with a simpler procedure for resolving bolder and lighter in font weights
3027 in CSS2 (http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight) and CSS3 (link above).
3029 and https://codereview.chromium.org/137813004
3031 According to http://dev.w3.org/csswg/css-fonts/#font-weight-prop, the computed
3032 weight of 'lighter' and 'bolder' are based on the inherited 'font-weight', so set
3033 that inherited weight before calculating 'lighter' and 'bolder'.
3035 Tests: css3/font-weight-multiple-selectors.html
3036 css3/font-weight.html
3038 * css/DeprecatedStyleBuilder.cpp:
3039 (WebCore::ApplyPropertyFontWeight::applyValue):
3040 * platform/graphics/FontDescription.cpp:
3041 (WebCore::FontDescription::lighterWeight):
3042 (WebCore::FontDescription::bolderWeight):
3044 2014-10-22 Rohit Kumar <kumar.rohit@samsung.com>
3046 [GTK]: Fix unused parameter build warnings in WebCore/platform module
3047 https://bugs.webkit.org/show_bug.cgi?id=137921
3049 Reviewed by Carlos Garcia Campos.
3051 * platform/ScrollAnimatorNone.cpp:
3052 (WebCore::ScrollAnimatorNone::PerAxisData::PerAxisData):
3053 (WebCore::ScrollAnimatorNone::animationTimerFired):
3055 2014-10-22 Dhi Aurrahman <diorahman@rockybars.com>
3057 Add relList to the anchor, area and link elements
3058 https://bugs.webkit.org/show_bug.cgi?id=137860
3060 Reviewed by Darin Adler and Chris Dumez.
3062 Add relList to reflect the rel content attribute for anchor[1],
3063 area[2] and link[3] elements.
3065 [1] https://html.spec.whatwg.org/multipage/semantics.html#dom-a-rellist
3066 [2] https://html.spec.whatwg.org/multipage/embedded-content.html#dom-area-rellist
3067 [3] https://html.spec.whatwg.org/multipage/semantics.html#dom-link-rellist
3069 Tests: fast/dom/rel-list-gc.html
3070 fast/dom/rel-list.html
3071 perf/rel-list-remove.html
3074 * WebCore.vcxproj/WebCore.vcxproj:
3075 * WebCore.vcxproj/WebCore.vcxproj.filters:
3076 * WebCore.xcodeproj/project.pbxproj:
3077 * dom/SpaceSplitString.cpp:
3078 (WebCore::SpaceSplitString::set):
3079 * html/HTMLAnchorElement.cpp:
3080 (WebCore::HTMLAnchorElement::parseAttribute):
3081 (WebCore::HTMLAnchorElement::relList):
3082 (WebCore::HTMLAnchorElement::setRel): Deleted.
3083 * html/HTMLAnchorElement.h:
3084 * html/HTMLAnchorElement.idl:
3085 * html/HTMLAreaElement.idl:
3086 * html/HTMLLinkElement.cpp:
3087 (WebCore::HTMLLinkElement::parseAttribute):
3088 (WebCore::HTMLLinkElement::relList):
3089 * html/HTMLLinkElement.h:
3090 * html/HTMLLinkElement.idl:
3091 * html/RelList.cpp: Added.
3092 (WebCore::RelList::RelList):
3093 (WebCore::RelList::ref):
3094 (WebCore::RelList::deref):
3095 (WebCore::RelList::length):
3096 (WebCore::RelList::item):
3097 (WebCore::RelList::element):
3098 (WebCore::RelList::updateRelAttribute):
3099 (WebCore::RelList::containsInternal):
3100 (WebCore::RelList::value):
3101 (WebCore::RelList::setValue):
3102 * html/RelList.h: Added.
3104 2014-10-21 Andy Estes <aestes@apple.com>
3106 One more iOS build fix after r175013.
3108 * platform/graphics/ios/FontCacheIOS.mm:
3109 (WebCore::FontCache::createFontPlatformData):
3111 2014-10-21 Benjamin Poulain <bpoulain@apple.com>
3113 CSS Rule features are ignored for nested CSS Selector lists
3114 https://bugs.webkit.org/show_bug.cgi?id=137908
3116 Reviewed by Andreas Kling.
3118 When Rule feature sets were collected, any selector list nested inside an other
3119 selector list was ignored when collecting properties of the CSS Selector.
3121 As a result, style was not invalidated properly when any property listed in
3122 the nested selectors.
3124 This patch fixes the issue by make RuleFeatureSet::collectFeaturesFromSelector()
3125 recursive, evaluating every chain of every selector lists.
3127 Tests: fast/css/class-style-invalidation-optimization.html
3128 fast/css/direct-adjacent-style-sharing-1.html
3129 fast/css/direct-adjacent-style-sharing-2.html
3130 fast/css/direct-adjacent-style-sharing-3.html
3131 fast/css/id-style-invalidation-optimization.html
3132 fast/selectors/class-style-update-with-not.html
3133 fast/selectors/class-style-update-with-nth-child-of.html
3134 fast/selectors/class-style-update.html
3136 * css/RuleFeature.cpp:
3137 (WebCore::recursivelyCollectFeaturesFromSelector):
3138 (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
3139 * css/RuleFeature.h:
3141 (WebCore::collectFeaturesFromRuleData):
3143 2014-10-21 Tim Horton <timothy_horton@apple.com>
3145 Try to fix the iOS build after r175013.
3147 * platform/graphics/ios/FontCacheIOS.mm:
3148 (WebCore::FontCache::createFontPlatformData):
3150 2014-10-21 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3152 Use std::unique_ptr | std::make_unique in FontCacheFoo
3153 https://bugs.webkit.org/show_bug.cgi?id=137905
3155 Reviewed by Darin Adler.
3157 Clean up PassOwnPtr|OwnPtr using std::unique_ptr|std::make_unique.
3159 No new tests, no behavior changes.
3161 * platform/graphics/FontCache.cpp:
3162 (WebCore::FontCache::getCachedFontPlatformData):
3163 * platform/graphics/FontCache.h:
3164 * platform/graphics/freetype/FontCacheFreeType.cpp:
3165 (WebCore::FontCache::createFontPlatformData):
3166 * platform/graphics/ios/FontCacheIOS.mm:
3167 (WebCore::FontCache::createFontPlatformData):
3168 * platform/graphics/mac/FontCacheMac.mm:
3169 (WebCore::FontCache::createFontPlatformData):
3170 * platform/graphics/win/FontCacheWin.cpp:
3171 (WebCore::FontCache::createFontPlatformData):
3173 2014-10-21 Ada Chan <adachan@apple.com>
3175 Calling WebCore::Page::setMediaVolume(0) does not mute videos as expected.
3176 https://bugs.webkit.org/show_bug.cgi?id=137305
3178 Reviewed by Darin Adler.
3180 This was broken in http://trac.webkit.org/changeset/154970. To fix this (but not break
3181 GStreamer), remove the "if (m_volumeInitialized)" check before updating the MediaPlayer's
3182 volume to the value multiplied with the Page's mediaVolume. This should not affect GStreamer's
3183 behavior because MediaPlayerPrivateGStreamerBase::setStreamVolumeElement does nothing unless
3184 m_volumeInitialized is true.
3186 * html/HTMLMediaElement.cpp:
3187 (WebCore::HTMLMediaElement::updateVolume):
3189 2014-10-21 Jer Noble <jer.noble@apple.com>
3191 [EME][Mac] Update to match new AVStreamSession API and requirements.
3192 https://bugs.webkit.org/show_bug.cgi?id=137923
3194 Reviewed by Eric Carlson.
3196 The session identifier has moved from AVStreamDataParser to -[AVStreamSession contentProtectionSessionIdentifier]
3197 and the property is no longer KVObservable. A new notification key has been added in place of KVO.
3199 Additionally, the requirements for using AVStreamDataParser with AVStreamSession have changed. It is now
3200 required that AVStreamDataParsers be added to an AVStreamSession before the
3201 -streamSession:didProvideContentKeyRequestInitializationData:forTrackID delegate method is called. A
3202 -streamParserWillProvideContentKeyRequestInitializationData:forTrackID delegate has been added, and
3203 an AVStreamSession must be created and the AVStreamDataParser added to it during the scope of that delegate
3206 To facilitate this, the MediaPlayerPrivateMediaSourceAVFObjC object will lazily create and own a AVStreamSession
3207 object when requested. The SourceBufferPrivateAVFObjC object will listen for the -willProvide delegate call
3208 and will add its AVStreamDataParser to that AVStreamSession when called.
3210 The CDMSessionMediaSourceAVFObjC object is no longer responsible for creating the AVStreamSession, and because
3211 the session identifier has moved from many AVStreamDataParsers to a single AVStreamSession, the
3212 CDMSessionMediaSourceAVFObjCObserver class can become much simpler, as it only has to observe a single object.
3214 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
3215 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3216 (-[CDMSessionMediaSourceAVFObjCObserver dealloc]): Deleted.
3217 (-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]): Deleted.
3218 (-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]): Deleted.
3219 (-[CDMSessionMediaSourceAVFObjCObserver invalidate]): Deleted.
3220 (-[CDMSessionMediaSourceAVFObjCObserver observeValueForKeyPath:ofObject:change:context:]): Deleted.
3221 (-[CDMSessionMediaSourceAVFObjCObserver contentProtectionSessionIdentifierChanged:]): Added.
3222 (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Call setStreamSession(nullptr).
3223 (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): The sessionId is now a value in the dictionary, not the key.
3224 (WebCore::CDMSessionMediaSourceAVFObjC::update): No longer create an AVStreamSession.
3225 (WebCore::CDMSessionMediaSourceAVFObjC::setStreamSession): Add and remove observers as appropriate.
3226 (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): No longer add or remove parsers from AVStreamSessions.
3227 (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Ditto.
3228 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3229 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3230 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasStreamSession): Simple getter.
3231 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Lazy initializing getter.
3232 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): Call setStreamSession().
3233 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
3234 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3235 (-[WebAVStreamDataParserListener streamParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Synchronously pass to SourceBufferPrivateAVFObjC.
3236 (WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID): Add the parser to an AVStreamSession.
3237 (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID): Check the trackId.
3238 * platform/mac/SoftLinking.h:
3240 2014-10-21 Jaehun Lim <ljaehun.lim@samsung.com>
3242 'true' isn't a valid value for justify-self
3243 https://bugs.webkit.org/show_bug.cgi?id=137913
3245 Reviewed by Andreas Kling.
3247 Merged from Blink (patch by dstockwell):
3248 <https://src.chromium.org/viewvc/blink?view=rev&revision=174638>
3250 CSS Box Alignment Module Level 3:
3251 http://dev.w3.org/csswg/css-align/#justify-self-property
3253 No new tests, modify existing test case.
3255 * css/CSSParser.cpp:
3256 (WebCore::CSSParser::parseJustifySelf):
3258 2014-10-21 Michael Saboff <msaboff@apple.com>
3260 Add operator==(PropertyName, const char*)
3261 https://bugs.webkit.org/show_bug.cgi?id=137925
3263 Reviewed by Mark Lam.
3265 Use new == operator to compare a PropertyName with a string literal.
3267 * bindings/js/JSHTMLDocumentCustom.cpp:
3268 (WebCore::JSHTMLDocument::getOwnPropertySlot):
3270 2014-10-21 Chris Dumez <cdumez@apple.com>
3272 Unreviewed iOS build fix after r174921.
3274 Export new symbol after function rename.
3279 2014-10-21 Chris Dumez <cdumez@apple.com>
3281 Unreviewed iOS build fix after r174921.
3283 Remove symbol from export files that no longer exists.
3288 2014-10-21 peavo@outlook.com <peavo@outlook.com>
3290 [Curl] Optimization; avoid string reallocation.
3291 https://bugs.webkit.org/show_bug.cgi?id=137920
3293 Reviewed by Brent Fulgham.
3295 Profiling reveals that the cookiesForDOM function is spending time on removing a character from a string.
3297 * platform/network/curl/CookieJarCurl.cpp:
3298 (WebCore::domainMatch):
3299 (WebCore::addMatchingCurlCookie):
3301 2014-10-21 Joanmarie Diggs <jdiggs@igalia.com>
3303 AX: [ATK] CSS-generated text content not exposed to assistive technologies
3304 https://bugs.webkit.org/show_bug.cgi?id=137669
3306 Reviewed by Chris Fleizach.
3308 Do not use a text iterator to get the text for elements which include
3311 Test: accessibility/css-content-attribute.html
3313 * accessibility/AccessibilityRenderObject.cpp:
3314 (WebCore::AccessibilityRenderObject::textUnderElement):
3316 2014-10-21 Chris Dumez <cdumez@apple.com>
3318 REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
3319 https://bugs.webkit.org/show_bug.cgi?id=137916
3321 Reviewed by Csaba Osztrogonác.
3323 Fix the !ENABLE(VIDEO) build by adding an #if ENABLE(VIDEO) where
3326 * rendering/RenderLayerBacking.cpp:
3327 (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
3329 2014-10-21 Zalan Bujtas <zalan@apple.com>
3331 REGRESSION: Google Search (mobile) video thumbnails are too large.
3332 https://bugs.webkit.org/show_bug.cgi?id=137895
3334 Reviewed by Simon Fraser.
3336 This patch fixes layer clipping when an ancestor layer has border-radius clipping.
3338 In cases, where the current layer has non-radius cliprect, while an ancestor layer
3339 has border-radius clipping, we only use the border-radius rect to clip.
3341 Test: fast/clip/overflow-hidden-with-border-radius-overflow-clipping-parent.html
3343 * rendering/RenderLayer.cpp:
3344 (WebCore::RenderLayer::clipToRect):
3345 (WebCore::RenderLayer::restoreClip):
3346 (WebCore::RenderLayer::collectFragments):
3347 (WebCore::RenderLayer::calculateClipRects):
3348 * rendering/RenderLayer.h:
3349 (WebCore::ClipRect::ClipRect):
3350 (WebCore::ClipRect::effectedByRadius):
3351 (WebCore::ClipRect::setEffectedByRadius):
3352 (WebCore::ClipRect::operator==):
3353 (WebCore::ClipRect::operator!=):
3354 (WebCore::ClipRect::intersect):
3355 (WebCore::ClipRect::hasRadius): Deleted.
3356 (WebCore::ClipRect::setHasRadius): Deleted.
3358 2014-10-20 Michael Saboff <msaboff@apple.com>
3360 Don't create cached functions for HTMLDocument.write*()
3361 https://bugs.webkit.org/show_bug.cgi?id=137906
3363 Reviewed by Darin Adler.
3365 Made it so that JSHTMLDocument::write() and ::writeln() are always created for every prototype.
3366 This is similar to the change in r174847.
3368 This change is alread covered by the tests:
3369 LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html
3370 LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html
3371 LayoutTests/http/tests/security/aboutBlank/security-context-write.html
3372 LayoutTests/http/tests/security/aboutBlank/security-context-writeln.html
3373 LayoutTests/http/tests/xmlhttprequest/request-from-popup.html
3374 LayoutTests/http/tests/navigation/new-window-redirect-history.html
3375 LayoutTests/http/tests/misc/window-open-then-write.html
3377 * bindings/js/JSHTMLDocumentCustom.cpp:
3378 (WebCore::JSHTMLDocument::getOwnPropertySlot):
3379 * html/HTMLDocument.idl:
3381 2014-10-21 Chris Dumez <cdumez@apple.com>
3383 REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
3384 https://bugs.webkit.org/show_bug.cgi?id=137916
3386 Unreviewed build fix. Add missing header include.
3388 * rendering/RenderLayerBacking.cpp:
3390 2014-10-21 Jer Noble <jer.noble@apple.com>
3392 REGRESSION (r170808): Volume slider in built-in media controls only changes volume when thumb is released, not while dragging
3393 https://bugs.webkit.org/show_bug.cgi?id=137805
3395 Reviewed by Dan Bernstein.
3397 Test: media/video-volume-slider-drag.html
3399 Respond to the 'input' event rather than the 'change' event for the volume slider, so that
3400 volume changes are continuous during drag operations.
3402 Also listen for both 'input' and 'change' events for the timeline slider, doing fastSeek()
3403 during 'input' and setting an explicit currentTime during 'change'. This is the same behavior
3404 as current, but using 'change' instead of 'mouseup' to do the final currentTime change.
3406 * Modules/mediacontrols/mediaControlsApple.js:
3407 (Controller.prototype.createControls):
3408 (Controller.prototype.handleTimelineInput):
3409 (Controller.prototype.handleTimelineChange):
3410 (Controller.prototype.handleTimelineMouseUp):
3411 (Controller.prototype.handleVolumeSliderInput):
3412 (Controller.prototype.handlePlayButtonClicked): Deleted.
3413 (Controller.prototype.handleMaxButtonClicked): Deleted.
3415 2014-10-21 Manuel Rego Casasnovas <rego@igalia.com>
3417 ASSERTION FAILED: !gridWasPopulated() in WebCore::RenderGrid::placeItemsOnGrid
3418 https://bugs.webkit.org/show_bug.cgi?id=136939
3420 Reviewed by Darin Adler.
3422 In some particular situations computeIntrinsicLogicalWidths() is called
3423 in the middle of layoutGridItems(). In these cases we do not need to
3424 populate the grid again, so we should avoid calling placeItemsOnGrid().
3425 In addition, we do not need to clean the grid either, as that will be
3426 done later by layoutGridItems().
3428 Test: fast/css-grid-layout/grid-was-populated-assert.html
3430 * rendering/RenderGrid.cpp:
3431 (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Avoid calls to
3432 placeItemsOnGrid() and clearGrid() if the grid was already populated.
3433 * rendering/RenderGrid.h: Move gridWasPopulated() header out of the
3436 2014-10-21 Zan Dobersek <zdobersek@igalia.com>
3438 [Cairo] Make dashPattern, dotPattern in GraphicsContext::setPlatformStrokeStyle() const
3439 https://bugs.webkit.org/show_bug.cgi?id=137912
3441 Reviewed by Carlos Garcia Campos.
3443 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3444 (WebCore::GraphicsContext::setPlatformStrokeStyle): Make the two static variables
3445 constants since their value doesn't change after initialization.
3447 2014-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
3449 [GTK] Several labels are white instead of b