1 2014-05-13 Simon Fraser <simon.fraser@apple.com>
3 Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
4 https://bugs.webkit.org/show_bug.cgi?id=132899
6 Reviewed by Beth Dakin.
12 2014-05-13 Hans Muller <hmuller@adobe.com>
14 [CSS Shapes] line height grows around polygon and incorrectly causes text to wrap to next line
15 https://bugs.webkit.org/show_bug.cgi?id=131622
17 Reviewed by Bem Jones-Bey.
19 Corrected an earlier PolygonShape fix https://bugs.webkit.org/show_bug.cgi?id=132132
20 When the top or bottom of a layout line is coincident with a polygon edge vertex, we
21 only consider it an intersection if the edge extends into the line.
23 Test: fast/shapes/shape-outside-floats/shape-outside-edge-case.html
25 * rendering/shapes/PolygonShape.cpp:
26 (WebCore::OffsetPolygonEdge::clippedEdgeXRange):
28 2014-05-13 Beth Dakin <bdakin@apple.com>
30 m_layerForOverhangAreas is sometimes not positioned correctly when topContentInset
32 https://bugs.webkit.org/show_bug.cgi?id=132898
34 <rdar://problem/16644710>
36 Reviewed by Anders Carlsson.
38 This function is called whenever the topContentInset changes, so use it as an
39 opportunity to ensure that m_layerForOverhangAreas has been positioned correctly.
40 * rendering/RenderLayerCompositor.cpp:
41 (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
43 Everyone gets an anchor point!
44 (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
46 2014-05-13 Dean Jackson <dino@apple.com>
48 Attempted build fix after https://bugs.webkit.org/show_bug.cgi?id=132891
50 * page/PageDebuggable.cpp:
52 2014-05-13 Timothy Hatcher <timothy@apple.com>
54 Force developerExtrasEnabled when a remote Inspector client connects.
56 https://bugs.webkit.org/show_bug.cgi?id=132891
58 Reviewed by Joseph Pecoraro.
60 * page/PageDebuggable.cpp:
61 (WebCore::PageDebuggable::PageDebuggable): Initialize m_forcedDeveloperExtrasEnabled to false.
62 (WebCore::PageDebuggable::connect): Set m_forcedDeveloperExtrasEnabled if the setting is changed.
63 (WebCore::PageDebuggable::disconnect): Switch developerExtrasEnabled back to false
64 if m_forcedDeveloperExtrasEnabled is true.
65 * page/PageDebuggable.h: Added m_forcedDeveloperExtrasEnabled.
67 2014-05-13 Beth Dakin <bdakin@apple.com>
69 REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes
70 scrolling in News Feed
71 https://bugs.webkit.org/show_bug.cgi?id=132889
73 <rdar://problem/16715716>
75 Reviewed by Simon Fraser.
77 First of all, scrollOffsetRelativeToDocument() was very poorly named. This patch
78 re-names it to the much more accurate documentScrollOffsetRelativeToViewOrigin().
79 Re-naming it makes it clear that ONE call site was not getting the right offset.
80 That call site does not want to know the document’s position relative to the view
81 origin, but rather it wants to know the Document’s position relative to the
87 Use newly re-named documentScrollPositionRelativeToViewOrigin().
89 (WebCore::FrameView::convertToRenderer):
90 * platform/ScrollView.cpp:
91 (WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
92 (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
93 (WebCore::ScrollView::documentScrollOffsetRelativeToScrollableAreaOrigin):
94 (WebCore::ScrollView::rootViewToContents):
95 (WebCore::ScrollView::windowToContents):
96 (WebCore::ScrollView::scrollOffsetRelativeToDocument): Deleted.
97 (WebCore::ScrollView::scrollPositionRelativeToDocument): Deleted.
98 * platform/ScrollView.h:
100 THIS is the spot that needs the new function,
101 documentScrollOffsetRelativeToScrollableAreaOrigin()()
102 * rendering/RenderLayer.cpp:
103 (WebCore::RenderLayer::scrollRectToVisible):
105 2014-05-13 Dean Jackson <dino@apple.com>
107 [iOS] Page scale update messages for media controls should only fire at the end of zooming
108 https://bugs.webkit.org/show_bug.cgi?id=132857
109 <rdar://problem/16631009>
111 Reviewed by Simon Fraser.
113 As the user was zooming, the media controls that responded
114 to the page scale (and resized themselves) would do so
115 slightly out of sync with the screen refreshes, and it looked
116 terrible. They really only need to get told at the end
117 of the zoom that they need to relayout.
119 Allow setPageScaleFactor to accept another parameter
120 that indicates if the change is stable. That way, changes
121 during a user triggers zoom gesture can be ignored for
124 * WebCore.exp.in: Page::setPageScaleFactor takes a new parameter.
126 (WebCore::Document::pageScaleFactorChangedAndStable): Renamed from pageScaleFactorChanged.
127 (WebCore::Document::pageScaleFactorChanged): Deleted.
130 (WebCore::Page::setPageScaleFactor): Accepts a new inStableState parameter,
131 and tells the main frame that the scale factor has changed if it's stable.
134 2014-05-13 Eric Carlson <eric.carlson@apple.com>
136 Unreviewed build fix after r168755.
138 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
139 (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
141 2014-05-13 Eric Carlson <eric.carlson@apple.com>
143 [Mac] hasVideo should return true when video is ready to display
144 https://bugs.webkit.org/show_bug.cgi?id=132885
146 Reviewed by Jer Noble.
148 * html/HTMLMediaElement.cpp:
149 (WebCore::HTMLMediaElement::parseAttribute):
151 * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
152 (WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack): Don't change the
153 enabled state of the AVPlayerItemTrack during setup.
155 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
156 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
157 (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
158 m_cachedIsReadyForDisplay.
159 (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Remove "enabled" KVO observers.
160 (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Observe "readyForDisplay"
161 change notifications.
162 (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): Remove for "readyForDisplay"
164 (WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame): Return cached readyForDisplay
165 state instead of polling every time.
166 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Call setHasVideo(true) if the
167 player layer is ready for display.
168 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Update logging.
169 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
170 (WebCore::MediaPlayerPrivateAVFoundationObjC::firstFrameAvailableDidChange): Cache readyForDisplay
171 state, call tracksChanged() if we haven't seen a video track yet.
172 (WebCore::MediaPlayerPrivateAVFoundationObjC::trackEnabledDidChange): New.
173 (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Correct logging.
174 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Remove old "enabled" listeners
175 before release tracks, add new ones to new tracks.
176 (WebCore::assetTrackMetadataKeyNames): Add "enabled" to the list of properties we require to
177 be loaded before announcing that metadata has loaded.
178 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Observe
179 "readyForDisplay" and "enabled".
181 * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
182 (WebCore::VideoTrackPrivateAVFObjC::resetPropertiesFromTrack): Don't change the
183 enabled state of the AVPlayerItemTrack during setup.
185 2014-05-13 Myles C. Maxfield <litherum@gmail.com>
187 Text decorations do not contribute to visual overflow
188 https://bugs.webkit.org/show_bug.cgi?id=132773
190 Reviewed by Darin Adler.
192 Tests: fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect.html
194 * rendering/InlineTextBox.cpp:
195 (WebCore::textDecorationStrokeThickness): Refactor into a common function
196 (WebCore::wavyOffsetFromDecoration): Ditto
197 (WebCore::InlineTextBox::extendVerticalVisualOverflowForDecorations): Given
198 vertical overflow bounds, possibly extend those to include location of
200 (WebCore::InlineTextBox::paintDecoration): Use refactored functions.
201 * rendering/InlineTextBox.h: Function signature
202 * rendering/RenderBlockLineLayout.cpp:
203 (WebCore::setLogicalWidthForTextRun): Call extendVerticalVisualOverflowForDecorations()
204 * rendering/style/RenderStyle.cpp:
205 (WebCore::RenderStyle::changeAffectsVisualOverflow): Inspects shadows and text decorations
206 (WebCore::RenderStyle::changeRequiresLayout): Calls changeAffectsVisualOverflow()
207 (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline): Moved code from here
208 to changeAffectsVisualOverflow().
209 * rendering/style/RenderStyle.h: Function signature
211 2014-05-13 Enrica Casucci <enrica@apple.com>
213 REGRESSION (WebKit2): Zooming to text field leaves it partially hidden by the form assistant.
214 https://bugs.webkit.org/show_bug.cgi?id=132879
215 <rdar://problem/16318049>
217 Reviewed by Benjamin Poulain.
219 Adding some exports. The fix to setScrollPosition is to avoid clamping the scroll
220 position when using delegate scrolling.
223 * platform/ScrollView.cpp:
224 (WebCore::ScrollView::setScrollPosition):
226 2014-05-13 Brady Eidson <beidson@apple.com>
228 Followup to: Update positioning/drawing of the image controls button.
229 <rdar://problem/16885077> and https://bugs.webkit.org/show_bug.cgi?id=132883
231 Reviewed by Tim Horton.
233 Cleared up the actual intent behind review feedback on the original patch.
235 * html/shadow/mac/ImageControlsButtonElementMac.cpp:
236 (WebCore::ImageControlsButtonElementMac::maybeCreate):
238 2014-05-13 Brady Eidson <beidson@apple.com>
240 Update positioning/drawing of the image controls button.
241 <rdar://problem/16885077> and https://bugs.webkit.org/show_bug.cgi?id=132883
243 Reviewed by Tim Horton.
245 * html/shadow/mac/ImageControlsButtonElementMac.cpp:
246 (WebCore::ImageControlsButtonElementMac::maybeCreate): Add inline style for top/right
247 positioning based on the metrics from the render theme.
249 * html/shadow/mac/imageControlsMac.css:
250 (.x-webkit-image-controls-button): Can’t hard code any positioning.
252 * rendering/RenderTheme.h:
253 (WebCore::RenderTheme::imageControlsButtonPositionOffset):
254 * rendering/RenderThemeMac.h:
255 * rendering/RenderThemeMac.mm:
256 (WebCore::RenderThemeMac::servicesRolloverButtonCell):
257 (WebCore::RenderThemeMac::imageControlsButtonPositionOffset):
259 2014-05-13 Simon Fraser <simon.fraser@apple.com>
261 [iOS WK2] background-attachment:fixed behaves very poorly
262 https://bugs.webkit.org/show_bug.cgi?id=132881
263 <rdar://problem/16789526>
265 Reviewed by Beth Dakin.
267 Remove the old ENABLE_FAST_MOBILE_SCROLLING code, and add a setting that
268 controls whether fixed backgrounds paint relative to the document, which
269 is enabled for iOS (WK1 and WK2). This setting is consulted when we repaint
270 fixed backgrounds on scrolling, when we paint them, and when we decide to make
271 a layer for fixed backgrounds.
275 * rendering/RenderBoxModelObject.cpp:
276 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
277 * rendering/RenderElement.cpp:
278 (WebCore::RenderElement::styleWillChange):
279 (WebCore::RenderElement::willBeRemovedFromTree):
280 (WebCore::shouldRepaintFixedBackgroundsOnScroll): Deleted.
281 * rendering/RenderLayerCompositor.cpp:
282 (WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer):
284 2014-05-13 Zalan Bujtas <zalan@apple.com>
286 REGRESSSION(r168528) Subpixel rendering: Selection rect is not positioned properly when SVG text is selected.
287 https://bugs.webkit.org/show_bug.cgi?id=132868
289 Reviewed by Dirk Schulze.
291 Scale the selection rect. r168528 missed applying this final transform on the selection/painting rect.
293 Test: svg/text/hidpi-text-selection-rect-position.html
295 * rendering/svg/SVGInlineTextBox.cpp:
296 (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
298 2014-05-13 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
300 ASSERTION FAILED: leftCategory != CalcOther && rightCategory != CalcOther
301 in WebCore::CSSCalcBinaryOperation::createSimplified
302 https://bugs.webkit.org/show_bug.cgi?id=132870
304 According to the standard, calc() should be able to handle angle, time
305 and frequency values as well: http://www.w3.org/TR/css3-values/#calc
307 Reviewed by Darin Adler.
309 Test: fast/css/calc-with-angle-time-frequency.html
311 * css/CSSCalculationValue.cpp:
312 (WebCore::unitCategory):
313 (WebCore::CSSCalcPrimitiveValue::createCalcExpression):
314 (WebCore::CSSCalcPrimitiveValue::computeLengthPx):
315 (WebCore::CSSCalcPrimitiveValue::addSubtractResult):
316 (WebCore::CSSCalcPrimitiveValue::determineCategory):
317 (WebCore::CSSCalcBinaryOperation::primitiveType)
318 * css/CSSCalculationValue.h: extending CalculationCategory
320 (WebCore::CSSParser::validCalculationUnit):
321 * css/CSSPrimitiveValue.cpp:
322 (WebCore::CSSPrimitiveValue::primitiveType):
324 2014-05-13 Darin Adler <darin@apple.com>
326 Try to fix the !ENABLE(ICONDATABASE) build
328 * loader/icon/IconDatabase.h: Include WTFString.h.
330 2014-05-13 Carlos Garcia Campos <cgarcia@igalia.com>
332 REGRESSION(r167771): [GTK] Text fields and areas are rendered unthemed
333 https://bugs.webkit.org/show_bug.cgi?id=132864
335 Reviewed by Philippe Normand.
337 This is because the virtual methods changed the API in the parent,
338 and since we don't have the methods marked as override we didn't
339 noticed it. After using override keyword for all virtual methods
340 in the derived class another problem showed up, the ActiveListBox
341 selection methods were incorrectly named.
343 * platform/gtk/RenderThemeGtk.cpp:
344 (WebCore::RenderThemeGtk::paintTextArea): Update to API changes in the
346 * platform/gtk/RenderThemeGtk.h: Mark all virtual methods as
347 override and the class as final.
348 * platform/gtk/RenderThemeGtk2.cpp:
349 (WebCore::RenderThemeGtk::paintTextField): Update to API changes
351 (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
352 (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
353 (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
354 (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
355 (WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor): Deleted.
356 (WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor): Deleted.
357 (WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor): Deleted.
358 (WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor): Deleted.
359 * platform/gtk/RenderThemeGtk3.cpp:
360 (WebCore::RenderThemeGtk::paintTextField): Update to API changes
362 (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
363 (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
364 (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
365 (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
366 (WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor): Deleted.
367 (WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor): Deleted.
368 (WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor): Deleted.
369 (WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor): Deleted.
371 2014-05-13 Xabier Rodriguez Calvar <calvaris@igalia.com>
373 [GStreamer] Move toGstClockTime to utilities
374 https://bugs.webkit.org/show_bug.cgi?id=132702
376 Reviewed by Philippe Normand.
378 toGstClockTime should be in GStreamerUtilities and corrected typo
383 * platform/graphics/gstreamer/GStreamerUtilities.cpp:
384 (WebCore::getGstPlayFlag): Renamed from getGstPlaysFlag.
385 (WebCore::toGstClockTime): Moved from MediaPlayerPrivateGStreamer.
386 (WebCore::getGstPlaysFlag): Deleted.
387 * platform/graphics/gstreamer/GStreamerUtilities.h:
388 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
389 (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
390 Corrected getGstPlayFlag typo.
391 (WebCore::toGstClockTime): Deleted.
393 2014-05-12 Darin Adler <darin@apple.com>
395 Make a few icon database improvements
396 https://bugs.webkit.org/show_bug.cgi?id=132812
398 Reviewed by Brady Eidson.
400 * WebCore.exp.in: Export more IconDatabase functions, since they are now called
401 by WebKit2 through pointers to a class marked final.
403 * loader/icon/IconDatabase.cpp: Removed unneeded includes. Use override for
406 * loader/icon/IconDatabase.h: Removed unneeded includes. Marked the class final.
407 Use override for virtual functions. Use a public constructor instead of a create
410 * loader/icon/IconDatabaseBase.h: Removed unneeded includes.
412 2014-05-13 Kiran <kiran.guduru@samsung.com>
414 [MediaStream] MediaStream.addTrack Should not check for active state.
415 https://bugs.webkit.org/show_bug.cgi?id=132558
417 Reviewed by Eric Carlson.
419 MediaStream.addTrack method is checking for active state of a
420 MediaStream, but it should not check for active state while adding a Track.
422 Test: fast/mediastream/MediaStream-add-tracks-to-inactive-stream.html
424 * Modules/mediastream/MediaStream.cpp:
425 (WebCore::MediaStream::addTrack):
427 2014-05-12 Mark Lam <mark.lam@apple.com>
429 WebKit2 on iOS needs to capture the main thread's floating point environment.
430 <https://webkit.org/b/132755>
432 Reviewed by Geoffrey Garen.
434 For iOS, WorkerThread::workerThread() expects to be able to initialize the
435 worker thread's floating point environment to be the same as the one in the
436 main thread. The FP env of the main thread is expected to have been captured
437 in the mainThreadFEnv global. On WebKit2 for iOS, we neglected to initialize
440 We now introduce a FloatingPointEnvironment class that will encapsulate the main
441 thread (aka "UIThread") fenv, and we'll call FloatingPointEnv::saveMainThreadEnvironment()
442 from ChildProcess::platformInitialize() to ensure that the FloatingPointEnvironment
443 singleton instance is initialized properly for WebKit2.
445 In the ChildProcess::platformInitialize(), we also need to initialize the ARMv7
446 FP env to support denormalized numbers. We'll do this before calling
447 saveMainThreadEnvironment().
449 Tests: fast/workers/worker-floating-point.html
450 js/floating-point-denormalized.html
453 * WebCore.xcodeproj/project.pbxproj:
454 * platform/ios/wak/FloatingPointEnvironment.cpp: Added.
455 (WebCore::FloatingPointEnvironment::env):
456 (WebCore::FloatingPointEnvironment::FloatingPointEnvironment):
457 (WebCore::FloatingPointEnvironment::enableDenormalSupport):
458 (WebCore::FloatingPointEnvironment::saveMainThreadEnvironment):
459 (WebCore::FloatingPointEnvironment::propagateMainThreadEnvironment):
460 * platform/ios/wak/FloatingPointEnvironment.h: Added.
461 * platform/ios/wak/WebCoreThread.h:
462 * platform/ios/wak/WebCoreThread.mm:
465 * workers/WorkerThread.cpp:
466 (WebCore::WorkerThread::workerThread):
468 2014-05-12 Dirk Schulze <krit@webkit.org>
470 SVG root element accepts background color but fails to repaint it
471 https://bugs.webkit.org/show_bug.cgi?id=63153
473 Reviewed by Dean Jackson.
475 This is back ported from Blink. Don't know the exact commit though.
476 The patch checks if the SVGSVGElement is an outermost root element.
477 If it is, mark the whole element for repaint.
479 Test: svg/custom/svg-root-background.html
481 * rendering/RenderBoxModelObject.cpp:
482 (WebCore::RenderBoxModelObject::calculateHasBoxDecorations):
483 (WebCore::RenderBoxModelObject::updateFromStyle):
484 * rendering/RenderBoxModelObject.h:
485 * rendering/svg/RenderSVGRoot.cpp:
486 (WebCore::RenderSVGRoot::RenderSVGRoot):
487 (WebCore::RenderSVGRoot::layout):
488 (WebCore::RenderSVGRoot::paintReplaced):
489 (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
490 This is a simple optimization by taking the necessary parts
491 from RenderReplaced and SVGRenderSupport.
492 * rendering/svg/RenderSVGRoot.h:
494 2014-05-12 Simon Fraser <simon.fraser@apple.com>
496 [iOS] Fixed items are sometimes clipped after rubber-banding
497 https://bugs.webkit.org/show_bug.cgi?id=132851
498 <rdar://problem/16870790>
500 Reviewed by Benjamin Poulain.
502 On iOS fixed-position layers would get clipped to the document rect,
503 but with rubber-banding, we can now have a custom fixed postion rect
504 that extends outside the document rect.
506 Another issue was that we would un-composite fixed elements sometimes
507 when scrolling fast, again because they could fall outside of the document rect.
509 A final issue was that pinching could reveal parts of fixed elements that should
510 lie outside the viewport, rather than clipping the layers.
512 Fix by converting both call points to use viewportConstrainedVisibleContentRect()
513 rather than viewportConstrainedExtentRect(). On non-iOS platforms these are
514 the same, but on iOS viewportConstrainedVisibleContentRect() uses the
515 custom fixed position rect, which is the correct rect to intersect with.
517 * rendering/RenderLayerBacking.cpp:
518 (WebCore::RenderLayerBacking::updateCompositedBounds):
519 * rendering/RenderLayerCompositor.cpp:
520 (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
522 2014-05-06 Jon Honeycutt <jhoneycutt@apple.com>
524 Don't dispatch 'beforeload' event inside FrameView::layout()
526 https://bugs.webkit.org/show_bug.cgi?id=132621
527 <rdar://problem/15661470>
529 This merges Blink revision 162073 with minor renaming and style
530 changes. From that commit:
532 Executing JavaScript code inside FrameView::layout() is problematic.
533 e.g. an assertion failure tested in fast/events/beforeload-assertion.html.
536 This CL makes 'beforeload' event dispatching for plugins and iframes asynchronous,
537 except plugin access from JavaScript code (HTMLPlugInElement::
538 renderWidgetForJSBindings).
540 Reviewed by Brent Fulgham.
542 Tests: fast/events/beforeload-assertion.html
543 fast/events/beforeload-iframe-crash.html
544 fast/events/beforeload-input-time-crash.html
548 (WebCore::Document::updateLayoutIgnorePendingStylesheets):
550 * html/HTMLAppletElement.cpp:
551 (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
552 * html/HTMLEmbedElement.cpp:
553 (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
554 * html/HTMLObjectElement.cpp:
555 (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
556 * page/FrameView.cpp:
557 (WebCore::FrameView::FrameView):
558 (WebCore::FrameView::reset):
559 (WebCore::FrameView::updateEmbeddedObjectsTimerFired):
560 (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
561 (WebCore::FrameView::performPostLayoutTasks):
563 * testing/Internals.cpp:
564 (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
565 * testing/Internals.h:
566 * testing/Internals.idl:
568 2014-05-12 Roger Fong <roger_fong@apple.com>
570 Limit number of active graphics contexts per web process.
571 https://bugs.webkit.org/show_bug.cgi?id=132833.
572 <rdar://problem/16888459>
574 Reviewed by Dean Jackson.
576 Test: webgl/many-contexts.html
578 * platform/graphics/GraphicsContext3D.h:
579 * platform/graphics/mac/GraphicsContext3DMac.mm: Limit number of active contexts to 16.
580 (WebCore::GraphicsContext3D::create):
581 (WebCore::GraphicsContext3D::~GraphicsContext3D):
583 2014-05-12 Simon Fraser <simon.fraser@apple.com>
587 * page/scrolling/ScrollingCoordinator.cpp:
588 (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
590 2014-05-12 Brent Fulgham <bfulgham@apple.com>
592 DataDetectorUI doesn't update with resize
593 https://bugs.webkit.org/show_bug.cgi?id=132830
594 <rdar://problem/16871179>
596 Reviewed by Simon Fraser.
598 * editing/Editor.cpp:
599 (WebCore::Editor::scanSelectionForTelephoneNumbers): Add public, no-argument
600 version that can be called after layout changes.
601 (WebCore::Editor::didLayout): Reprocess telephone number data
602 since Ranges will have changed.
604 * editing/FrameSelection.cpp:
605 (WebCore::FrameSelection::updateDataDetectorsForSelection): Added.
606 * editing/FrameSelection.h:
607 * page/FrameView.cpp:
608 (WebCore::FrameView::performPostLayoutTasks): Ask the FrameSelection to update the
609 Range information for selected phone numbers.
611 2014-05-12 Simon Fraser <simon.fraser@apple.com>
615 * page/scrolling/ScrollingCoordinator.cpp:
616 (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
618 2014-05-12 Simon Fraser <simon.fraser@apple.com>
620 [iOS WK2] Fuzzy tiles on some sites on loading
621 https://bugs.webkit.org/show_bug.cgi?id=132847
622 <rdar://problem/16816178>
624 Reviewed by Benjamin Poulain.
626 Export WebCore::TileController::contentsScale() const
630 2014-05-12 Simon Fraser <simon.fraser@apple.com>
632 Add debug dumping for ViewportConfiguration
633 https://bugs.webkit.org/show_bug.cgi?id=132843
635 Reviewed by Benjamin Poulain.
637 Add some TextStream-based dumping for ViewportConfiguration.
639 * page/ViewportConfiguration.cpp:
640 (WebCore::ViewportConfiguration::updateConfiguration):
641 (WebCore::ViewportConfigurationTextStream::ViewportConfigurationTextStream):
642 (WebCore::ViewportConfigurationTextStream::increaseIndent):
643 (WebCore::ViewportConfigurationTextStream::decreaseIndent):
644 (WebCore::dumpProperty):
645 (WebCore::ViewportConfigurationTextStream::writeIndent):
646 (WebCore::ViewportConfigurationTextStream::operator<<):
647 (WebCore::ViewportConfiguration::description):
648 (WebCore::ViewportConfiguration::dump):
649 * page/ViewportConfiguration.h:
651 2014-05-12 Brady Eidson <beidson@apple.com>
653 Followup to "Teach Editor to support more direct replacement of a Node"
654 <rdar://problem/16817952> and https://bugs.webkit.org/show_bug.cgi?id=132834
656 Pair programmed and pair reviewed by Brady Eidson and Darin Adler.
658 * editing/mac/EditorMac.mm:
659 (WebCore::maybeCopyNodeAttributesToFragment):
660 (WebCore::Editor::replaceNodeFromPasteboard):
662 2014-05-12 Beth Dakin <bdakin@apple.com>
664 Content shadow layer needs to move in sync with the content layer
665 https://bugs.webkit.org/show_bug.cgi?id=132841
667 <rdar://problem/16641115>
669 Reviewed by Simon Fraser.
671 Now that the root content layer moves a little bit (for y scroll positions between
672 0 and topContentInset), the shadow layer needs to move along with it since the
673 shadow layer should always have the same position as the root content layer.
675 Set the root state node’s shadow layer, and update the position whenever the root
676 content layer’s position is updated.
677 * page/scrolling/AsyncScrollingCoordinator.cpp:
678 (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
679 (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
681 Fetch the compositor’s layerForContentShadow().
682 * page/scrolling/ScrollingCoordinator.cpp:
683 (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
684 * page/scrolling/ScrollingCoordinator.h:
686 Hook up the contentShadowLayer in the state node.
687 * page/scrolling/ScrollingStateScrollingNode.cpp:
688 (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
689 (WebCore::ScrollingStateScrollingNode::setContentShadowLayer):
691 Hook it up in the ScrollingTreeNode as well. Move the layer whenever the m
692 _scrolledContentsLayer is moved.
693 * page/scrolling/ScrollingStateScrollingNode.h:
694 * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
695 * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
696 (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
697 (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
699 The shadow layer needs an anchor point now that we are moving it around.
700 * rendering/RenderLayerCompositor.cpp:
701 (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
703 2014-05-12 Dirk Schulze <krit@webkit.org>
705 <svg> with opacity and compositing double-applies its opacity
706 https://bugs.webkit.org/show_bug.cgi?id=116856
708 Reviewed by Simon Fraser.
710 The opacity is applied by the compositor. However, all SVG elements
711 create transparency layers on their own to apply opacity. So did
714 Added a check if the current element has a compositing layer and skip
715 creating transparency layer if it has.
717 Test: svg/custom/composited-svg-with-opacity.html
719 * rendering/svg/SVGRenderingContext.cpp:
720 (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
722 2014-05-12 Brady Eidson <beidson@apple.com>
724 Teach Editor to support more direct replacement of a Node
725 <rdar://problem/16817952> and https://bugs.webkit.org/show_bug.cgi?id=132834
727 Reviewed by Enrica Casucci.
729 The new method "Editor::replaceNodeFromPasteboard" has the intent that the new DocumentFragment
730 from the pasteboard is as similar to the old Node as possible.
732 In practice, the new DocumentFragment:
733 1 - Can represent a single node that's missing various attributes the original Node had.
734 2 - Can be an unwanted fragment of arbitrary depth when the replacement happens inside Mail.app
736 This fixes both of these issues.
738 Add a MailBlockquoteHandling enum class for various Editor operations to pass through to the
739 ReplaceSelectionCommand:
740 * editing/Editor.cpp:
741 (WebCore::Editor::handleTextEvent):
742 (WebCore::Editor::pasteAsFragment):
743 (WebCore::Editor::pasteWithPasteboard):
744 (WebCore::Editor::replaceSelectionWithFragment):
748 (WebCore::TextEvent::createForPlainTextPaste):
749 (WebCore::TextEvent::createForFragmentPaste):
750 (WebCore::TextEvent::TextEvent):
752 (WebCore::TextEvent::mailBlockquoteHandling):
754 * editing/ReplaceSelectionCommand.cpp:
755 (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
756 (WebCore::ReplaceSelectionCommand::doApply): Consider whether or not this particular Editor
757 operation was meant to give special consideration to Mail's Blockquotes.
758 * editing/ReplaceSelectionCommand.h:
760 * editing/efl/EditorEfl.cpp:
761 (WebCore::Editor::pasteWithPasteboard):
762 * editing/ios/EditorIOS.mm:
763 (WebCore::Editor::pasteWithPasteboard):
765 * editing/mac/EditorMac.mm:
766 (WebCore::Editor::pasteWithPasteboard):
767 (WebCore::Editor::readSelectionFromPasteboard):
768 (WebCore::maybeCopyNodeAttributesToFragment): If the new DocumentFragment represents a single HTML node
769 with the same tag name is the original HTML node, copy over most attributes from the original node.
770 (WebCore::Editor::replaceNodeFromPasteboard): Create the fragment, run it through maybeCopyNodeAttributesToFragment.
774 2014-05-12 Alex Christensen <achristensen@webkit.org>
776 Progress on web timing.
777 https://bugs.webkit.org/show_bug.cgi?id=132574
779 Reviewed by Alexey Proskuryakov.
782 Removed ResourceLoadTiming.cpp.
784 Added linker symbols for ResourceLoadTiming.
785 * WebCore.xcodeproj/project.pbxproj:
786 * WebCore.vcxproj/WebCore.vcxproj:
787 * WebCore.vcxproj/WebCore.vcxproj.filters:
788 Removed ResourceLoadTiming.cpp.
789 * inspector/InspectorResourceAgent.cpp:
790 (WebCore::buildObjectForTiming):
791 * inspector/protocol/Network.json:
792 Updated ResourceTiming structure.
793 * loader/DocumentLoadTiming.cpp:
794 (WebCore::DocumentLoadTiming::setNavigationStart):
795 * loader/DocumentLoadTiming.h:
796 Deleted unused setNavigationStart function.
797 * page/Performance.idl:
799 * page/PerformanceResourceTiming.cpp:
800 (WebCore::PerformanceResourceTiming::domainLookupStart):
801 (WebCore::PerformanceResourceTiming::domainLookupEnd):
802 (WebCore::PerformanceResourceTiming::connectStart):
803 (WebCore::PerformanceResourceTiming::secureConnectionStart):
804 (WebCore::PerformanceResourceTiming::responseEnd):
805 Updated ResourceLoadTiming member variable names.
806 (WebCore::PerformanceResourceTiming::responseStart):
807 * page/PerformanceResourceTiming.h:
808 * page/PerformanceResourceTiming.idl:
809 Deleted responseStart because it is not in the spec.
810 * page/PerformanceTiming.cpp:
811 (WebCore::PerformanceTiming::domainLookupStart):
812 (WebCore::PerformanceTiming::domainLookupEnd):
813 (WebCore::PerformanceTiming::connectStart):
814 (WebCore::PerformanceTiming::secureConnectionStart):
815 (WebCore::PerformanceTiming::requestStart):
816 (WebCore::PerformanceTiming::responseStart):
817 Updated ResourceLoadTiming member variable names.
818 (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute):
819 Use navigationStart as base for resource load times.
820 * page/PerformanceTiming.idl:
822 * platform/network/HTTPParsers.h:
823 Removed unused class declarations.
824 * platform/network/ResourceHandle.h:
825 Moved soup request time from ResourceLoadTiming to ResourceHandle.
826 * platform/network/ResourceLoadTiming.cpp: Removed.
827 * platform/network/ResourceLoadTiming.h:
828 (WebCore::ResourceLoadTiming::deepCopy):
829 (WebCore::ResourceLoadTiming::operator==):
830 (WebCore::ResourceLoadTiming::ResourceLoadTiming):
831 Updated ResourceLoadTiming member variable names.
832 * platform/network/mac/ResourceHandleMac.mm:
833 (WebCore::ResourceHandle::createNSURLConnection):
835 * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
836 (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
837 * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
838 (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
839 Save timing data to a ResourceLoadTiming on the ResourceResponse.
840 * platform/network/soup/ResourceHandleSoup.cpp:
841 (WebCore::gotHeadersCallback):
842 (WebCore::restartedCallback):
843 (WebCore::milisecondsSinceRequest):
844 (WebCore::ResourceHandle::didStartRequest):
845 (WebCore::networkEventCallback):
846 (WebCore::createSoupMessageForHandleAndRequest):
847 (WebCore::ResourceHandle::sendPendingRequest):
848 Updated ResourceLoadTiming member variable names.
849 (WebCore::wroteBodyCallback): Deleted.
851 2014-05-12 Dirk Schulze <krit@webkit.org>
853 SVG outline property is broken and inefficient
854 https://bugs.webkit.org/show_bug.cgi?id=113666
856 Reviewed by Dean Jackson.
858 Patch by Erik Dahlström backported from Blink.
860 "[SVG2] css 'outline' property should apply to svg elements
862 The 'outline' property was only partially working in SVG before
863 this patch, this makes it work on text and text content child
866 This makes SVG render the outlines as part of the foreground paint
869 Partly based on Florin Malita's webkit patch https://bugs.webkit.org/show_bug.cgi?id=113666#c12."
871 Tests: svg/custom/outline-stacking-expected.svg
872 svg/custom/outline-stacking.svg
873 svg/custom/rgba-color-outline.svg
874 svg/text/text-outline-expected.svg
875 svg/text/text-outline-rgba.html
876 svg/text/text-outline.html
877 svg/text/textpath-outline-expected.svg
878 svg/text/textpath-outline.svg
879 svg/text/tspan-multiple-outline.svg
880 svg/text/tspan-outline-2-expected.svg
881 svg/text/tspan-outline-2.svg
882 svg/text/tspan-outline-expected.svg
883 svg/text/tspan-outline.html
885 * rendering/svg/RenderSVGContainer.cpp:
886 (WebCore::RenderSVGContainer::paint): Draw outline in forground
888 * rendering/svg/RenderSVGImage.cpp:
889 (WebCore::RenderSVGImage::paint): Draw outline in forground
891 * rendering/svg/RenderSVGRoot.cpp:
892 (WebCore::RenderSVGRoot::paintReplaced): Pass paint offset.
893 * rendering/svg/RenderSVGShape.cpp:
894 (WebCore::RenderSVGShape::paint): Draw outline in forground
896 * rendering/svg/RenderSVGText.cpp:
897 (WebCore::RenderSVGText::paint): Draw outline in forground
899 * rendering/svg/SVGInlineFlowBox.cpp:
900 (WebCore::SVGInlineFlowBox::paint): Pass paint offset.
901 * rendering/svg/SVGInlineTextBox.cpp:
902 (WebCore::SVGInlineTextBox::paint): Draw outline in forground
904 * rendering/svg/SVGRootInlineBox.cpp:
905 (WebCore::SVGRootInlineBox::paint): Pass paint offset.
907 2014-05-12 Beth Dakin <bdakin@apple.com>
909 Layer for bottom overhang area needs to be offset by the topContentInset
910 https://bugs.webkit.org/show_bug.cgi?id=132835
912 <rdar://problem/16641115>
914 Reviewed by Simon Fraser.
916 Push this layer down by the topContentInset in addition to the root layer height,
917 footer height, and header height.
918 * rendering/RenderLayerCompositor.cpp:
919 (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
921 2014-05-09 Jon Honeycutt <jhoneycutt@apple.com>
923 REGRESSION (r167818): editing/inserting/typing-space-to-trigger-smart-link.html fails on WebKit1 bots
925 <https://bugs.webkit.org/show_bug.cgi?id=132207>
926 <rdar://problem/16730393>
928 Reverts the previous workaround in favor of a more specific fix for the
931 Reviewed by Darin Adler.
933 * editing/ApplyStyleCommand.cpp:
934 (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
935 Check whether the run's start and end are still in the document, as
936 removeConflictingInlineStyleFromRun() may have removed them.
938 * editing/CompositeEditCommand.cpp:
939 (WebCore::CompositeEditCommand::apply):
940 Reverted previous workaround.
941 (WebCore::ApplyEditCommand::ReentrancyGuard::isRecursiveCall): Deleted.
942 (WebCore::ApplyEditCommand::ReentrancyGuard::Scope::Scope): Deleted.
943 (WebCore::ApplyEditCommand::ReentrancyGuard::Scope::~Scope): Deleted.
945 2014-05-12 Zan Dobersek <zdobersek@igalia.com>
947 Clean up CrossThreadTask
948 https://bugs.webkit.org/show_bug.cgi?id=132800
950 Reviewed by Darin Adler.
952 Remove the createCallbackTask overloads and the related CrossThreadTask helper classes.
954 Instead, have one simple CrossThreadTask class that derives from ScriptExecutionContext::Task.
955 Its templated constructor takes in the method and the variadic pack of parameters. The cross-thread
956 copies of the parameters are then bound to that method and the resulting bind expression is used to
957 initialize the base class. The bind expression is constructed with a placeholder for the
958 ScriptExecutionContext* parameter that's provided through ScriptExecutionContext::Task::performTask().
960 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
961 (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
962 (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
963 (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
964 (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
965 (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
966 (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
967 (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
968 (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
969 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
970 (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
971 (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
972 (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
973 (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
974 (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
975 (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
976 (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
977 (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
978 (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
979 (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
980 (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
981 (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
982 (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
983 (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
984 (WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
985 (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
986 (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
987 (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
988 (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
989 * dom/CrossThreadTask.h:
990 (WebCore::CrossThreadTask::CrossThreadTask):
991 (WebCore::CrossThreadTask1::CrossThreadTask1): Deleted.
992 (WebCore::CrossThreadTask1::performTask): Deleted.
993 (WebCore::CrossThreadTask2::CrossThreadTask2): Deleted.
994 (WebCore::CrossThreadTask2::performTask): Deleted.
995 (WebCore::CrossThreadTask3::CrossThreadTask3): Deleted.
996 (WebCore::CrossThreadTask3::performTask): Deleted.
997 (WebCore::CrossThreadTask4::CrossThreadTask4): Deleted.
998 (WebCore::CrossThreadTask4::performTask): Deleted.
999 (WebCore::CrossThreadTask5::CrossThreadTask5): Deleted.
1000 (WebCore::CrossThreadTask5::performTask): Deleted.
1001 (WebCore::CrossThreadTask6::CrossThreadTask6): Deleted.
1002 (WebCore::CrossThreadTask6::performTask): Deleted.
1003 (WebCore::CrossThreadTask7::CrossThreadTask7): Deleted.
1004 (WebCore::CrossThreadTask7::performTask): Deleted.
1005 (WebCore::CrossThreadTask8::CrossThreadTask8): Deleted.
1006 (WebCore::CrossThreadTask8::performTask): Deleted.
1007 (WebCore::createCallbackTask): Deleted.
1008 * fileapi/FileReader.cpp:
1009 (WebCore::FileReader::abort):
1010 * loader/WorkerThreadableLoader.cpp:
1011 (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
1012 (WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
1013 (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
1014 (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
1015 (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
1016 (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
1017 (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
1018 (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
1019 (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
1020 (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
1021 * loader/WorkerThreadableLoader.h:
1022 * loader/cache/MemoryCache.cpp:
1023 (WebCore::MemoryCache::removeRequestFromCache):
1024 (WebCore::MemoryCache::removeRequestFromSessionCaches):
1025 * workers/DefaultSharedWorkerRepository.cpp:
1026 (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
1027 (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
1028 * workers/WorkerMessagingProxy.cpp:
1029 (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
1030 (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
1031 (WebCore::WorkerMessagingProxy::connectToInspector):
1032 (WebCore::WorkerMessagingProxy::disconnectFromInspector):
1033 (WebCore::WorkerMessagingProxy::sendMessageToInspector):
1035 2014-05-12 Alex Christensen <achristensen@webkit.org>
1037 Implement EXT_shader_texture_lod in WebGL.
1038 https://bugs.webkit.org/show_bug.cgi?id=128985
1039 <rdar://problem/16111396>
1041 Based on Chromium patch by bajones@chromium.org.
1042 https://src.chromium.org/viewvc/blink?revision=171465&view=revision
1044 Reviewed by Dean Jackson.
1046 Test: webgl/conformance/extensions/ext-shader-texture-lod.html
1049 * DerivedSources.cpp:
1050 * DerivedSources.make:
1051 * WebCore.vcxproj/WebCore.vcxproj:
1052 * WebCore.vcxproj/WebCore.vcxproj.filters:
1053 * WebCore.xcodeproj/project.pbxproj:
1054 Added new EXTShaderTextureLOD files.
1055 * bindings/js/JSWebGLRenderingContextCustom.cpp:
1057 Added EXTShaderTextureLOD.
1058 * html/canvas/EXTShaderTextureLOD.cpp: Added.
1059 (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
1060 (WebCore::EXTShaderTextureLOD::~EXTShaderTextureLOD):
1061 (WebCore::EXTShaderTextureLOD::getName):
1062 * html/canvas/EXTShaderTextureLOD.h: Added.
1063 * html/canvas/EXTShaderTextureLOD.idl: Added.
1064 * html/canvas/WebGLExtension.h:
1065 Added EXTShaderTextureLODName.
1066 * html/canvas/WebGLObject.cpp:
1067 Removed unused inclusion of EXTTextureFilterAnisotropic.h.
1068 * html/canvas/WebGLRenderingContext.cpp:
1069 (WebCore::WebGLRenderingContext::getExtension):
1070 Added EXT_shader_texture_lod.
1071 * html/canvas/WebGLRenderingContext.h:
1072 Added a EXTShaderTextureLOD member variable.
1074 2014-05-12 Martin Hock <mhock@apple.com>
1076 Disallow drag and drop of non-displayable resources.
1077 https://bugs.webkit.org/show_bug.cgi?id=132745
1078 <rdar://problem/10562662>
1080 Reviewed by Alexey Proskuryakov.
1082 Test: http/tests/security/drag-drop-local-file.html
1084 * page/DragController.cpp:
1085 (WebCore::DragController::startDrag):
1087 2014-05-12 Jozsef Berta <jberta.u-szeged@partner.samsung.com>
1089 WinCairo buildfix after r168611
1090 https://bugs.webkit.org/show_bug.cgi?id=132825
1092 Reviewed by Darin Adler.
1094 * platform/network/curl/CurlDownload.cpp:
1095 (WebCore::CurlDownloadManager::downloadThread):
1096 (WebCore::CurlDownload::didReceiveHeader):
1097 (WebCore::CurlDownload::didReceiveData):
1099 2014-05-12 Antti Koivisto <antti@apple.com>
1101 REGRESSION (r159560): Text clips on tile border if line-height < font-size
1102 https://bugs.webkit.org/show_bug.cgi?id=132822
1104 Reviewed by Andreas Kling.
1106 The first line of simple line layout run range was miscomputed.
1108 Test: fast/text/simple-lines-range-low-line-height.html
1110 * rendering/SimpleLineLayoutResolver.h:
1111 (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
1113 Lines may overlap if line-height < font-size. Apply different adjustment when searching for range begin
1114 so that overflowing earlier lines are taken into account.
1116 (WebCore::SimpleLineLayout::RunResolver::rangeForRect):
1118 2014-05-12 Radu Stavila <stavila@adobe.com>
1120 Invalid information remaining in lineToRegion map of RenderFlowThread.
1121 https://bugs.webkit.org/show_bug.cgi?id=132690
1123 Reviewed by Antti Koivisto.
1125 Test: fast/multicol/newmulticol/lines-region-map-crash.html
1127 * rendering/RenderFlowThread.cpp:
1128 (WebCore::RenderFlowThread::deleteLines):
1129 * rendering/RenderFlowThread.h:
1131 2014-05-12 Zan Dobersek <zdobersek@igalia.com>
1133 Clean up MainThreadTask
1134 https://bugs.webkit.org/show_bug.cgi?id=132799
1136 Reviewed by Darin Adler.
1138 Only have one simple MainThreadTask class that derives from std::function<void ()>.
1139 Its templated constructor takes in the method and a variadic pack of parameters.
1140 The cross-thread copies of the parameter are then bound to the given method through
1141 std::bind(), with the resulting bind expression used to initialize the base
1142 std::function<void ()> class.
1144 The WebCore::callOnMainThread() functions and the helper classes are removed in favor
1145 of passing MainThreadTask rvalues directly to WTF::callOnMainThread().
1147 * fileapi/AsyncFileStream.cpp:
1148 (WebCore::AsyncFileStream::startOnFileThread):
1149 (WebCore::AsyncFileStream::stopOnFileThread):
1150 (WebCore::AsyncFileStream::getSizeOnFileThread):
1151 (WebCore::AsyncFileStream::openForReadOnFileThread):
1152 (WebCore::AsyncFileStream::openForWriteOnFileThread):
1153 (WebCore::AsyncFileStream::readOnFileThread):
1154 (WebCore::AsyncFileStream::writeOnFileThread):
1155 (WebCore::AsyncFileStream::truncateOnFileThread):
1156 * platform/MainThreadTask.h:
1157 (WebCore::MainThreadTask::MainThreadTask):
1158 (WebCore::MainThreadTaskBase::MainThreadTaskBase): Deleted.
1159 (WebCore::MainThreadTaskBase::~MainThreadTaskBase): Deleted.
1160 (WebCore::MainThreadTask1::create): Deleted.
1161 (WebCore::MainThreadTask1::MainThreadTask1): Deleted.
1162 (WebCore::MainThreadTask2::create): Deleted.
1163 (WebCore::MainThreadTask2::MainThreadTask2): Deleted.
1164 (WebCore::MainThreadTask3::create): Deleted.
1165 (WebCore::MainThreadTask3::MainThreadTask3): Deleted.
1166 (WebCore::MainThreadTask4::create): Deleted.
1167 (WebCore::MainThreadTask4::MainThreadTask4): Deleted.
1168 (WebCore::MainThreadTask5::create): Deleted.
1169 (WebCore::MainThreadTask5::MainThreadTask5): Deleted.
1170 (WebCore::MainThreadTask6::create): Deleted.
1171 (WebCore::MainThreadTask6::MainThreadTask6): Deleted.
1172 (WebCore::MainThreadTask7::create): Deleted.
1173 (WebCore::MainThreadTask7::MainThreadTask7): Deleted.
1174 (WebCore::MainThreadTask8::create): Deleted.
1175 (WebCore::MainThreadTask8::MainThreadTask8): Deleted.
1176 (WebCore::executeMainThreadTask): Deleted.
1177 (WebCore::callOnMainThread): Deleted.
1179 2014-05-11 Zan Dobersek <zdobersek@igalia.com>
1181 Simplify FileThread::Task usage
1182 https://bugs.webkit.org/show_bug.cgi?id=132798
1184 Reviewed by Darin Adler.
1186 Remove the createFileThreadTask functions and the related FileThreadTask helper classes.
1188 Instead, the FileThread::Task class now has a templated constructor that takes in a pointer
1189 to the object instance, a method, and a variadic pack of parameters. The pointer and the
1190 cross-thread copies of all the parameters are then bound to the given method through std::bind().
1192 Instead of createFileThreadTask, std::make_unique<>() should be used to construct unique pointers
1193 that wrap FileThread::Task objects.
1195 * WebCore.vcxproj/WebCore.vcxproj:
1196 * WebCore.vcxproj/WebCore.vcxproj.filters:
1197 * WebCore.xcodeproj/project.pbxproj:
1198 * fileapi/AsyncFileStream.cpp:
1199 (WebCore::AsyncFileStream::create):
1200 (WebCore::AsyncFileStream::stop):
1201 (WebCore::AsyncFileStream::getSize):
1202 (WebCore::AsyncFileStream::openForRead):
1203 (WebCore::AsyncFileStream::openForWrite):
1204 (WebCore::AsyncFileStream::close):
1205 (WebCore::AsyncFileStream::read):
1206 (WebCore::AsyncFileStream::write):
1207 (WebCore::AsyncFileStream::truncate):
1208 * fileapi/FileThread.h:
1209 (WebCore::FileThread::Task::Task):
1210 (WebCore::FileThread::Task::performTask):
1211 (WebCore::FileThread::Task::~Task): Deleted.
1212 * fileapi/FileThreadTask.h: Removed.
1214 2014-05-11 Benjamin Poulain <benjamin@webkit.org>
1216 Do not create a temporary string to append the SVGLength's unit
1217 https://bugs.webkit.org/show_bug.cgi?id=132807
1219 Reviewed by Geoffrey Garen.
1221 * svg/SVGLength.cpp:
1222 (WebCore::lengthTypeToString):
1223 The caller just append the string to a number string. The function
1224 lengthTypeToString() was creating a new WTF::String from scratch,
1225 copied the characters to make a new string, and destroyed the WTF::String.
1227 Instead, just append the string literal.
1229 2014-05-11 Yusuke Suzuki <utatane.tea@gmail.com>
1231 CSS JIT: reduce cost of computing backtracking height
1232 https://bugs.webkit.org/show_bug.cgi?id=132546
1234 Reviewed by Benjamin Poulain.
1236 Because compiler previously compute backtracking height for
1237 previous child fragment, by leveraging this, we can limit the
1238 `maxPrefixSize` for `computeBacktrackingHeightFromDescendant`.
1240 For example, consider selector "c>a>b>d>a>b e"'s descendant chain,
1243 At the <a> position, we have matching pattern [b, a, d, b, a] and
1244 calculate the backtracking height by following method.
1246 pattern: [b, a, d, b, a]
1247 candidate0: [b, a, d, b] => Not matched.
1248 candidate1: [b, a, d] => Not matched.
1249 candidate2: [b, a] => Matched against the pattern.
1251 At this time, first candidate0's pattern size is `pattern.size() - 1`.
1252 And get backtracking height from descendant 3, that is
1253 `pattern.size() - candidate.size()`, `5 - 2`.
1255 And next, at the <c> position, we calcucate the backtracking height
1258 pattern: [b, a, d, b, a, c]
1259 candidate0: [b, a, d, b, a] => Not matched.
1260 candidate1: [b, a, d, b] => Not matched.
1261 candidate2: [b, a, d] => Not matched.
1262 candidate3: [b, a] => Not matched.
1263 candidate4: [b] => Not matched.
1264 candidate5: [] => Matched against the pattern.
1266 Then, we get the backtracking height, which is 6 (6 - 0).
1267 However, in the above case, we already know that attempts from candidate0
1268 to candidate1 always fail, since parts of these are already tested at
1269 the <b> position trial and we know they don't match.
1271 So in this case, we should start this computation from candidate2,
1274 pattern: [b, a, d, b, a, c]
1275 candidate2: [b, a, d] => Not matched.
1276 candidate3: [b, a] => Not matched.
1277 candidate4: [b] => Not matched.
1278 candidate5: [] => Matched against the pattern.
1280 We can start computation with candidate size
1281 `pattern.size() - previousChildFragmentBacktrackingHeight`.
1282 In this example, `pattern.size()` is 6 and
1283 `previousChildFragmentBacktrackingHeight` is 3, so candidate size is
1284 3, that is candidate2.
1286 * cssjit/SelectorCompiler.cpp:
1287 (WebCore::SelectorCompiler::computeBacktrackingStartHeightFromDescendant):
1288 (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
1290 2014-05-11 Beth Dakin <bdakin@apple.com>
1292 Headers and footers are not positioned correctly with topContentInset
1293 https://bugs.webkit.org/show_bug.cgi?id=132787
1295 <rdar://problem/16641115>
1297 Reviewed by Tim Horton.
1299 Headers and footers need to take the inset into account, and they also need to
1300 factor in the fact that the root layer moves around now too.
1302 The existing yPositionForRootContentLayer() is actually the right calculation for
1303 the header layer. The root content layer wants that value, but pushed down by the
1304 header height. Now there are static functions for both of them and the footer to
1305 avoid duplicated code in the three spots where we need this information.
1306 * page/FrameView.cpp:
1307 (WebCore::FrameView::yPositionForHeaderLayer):
1308 (WebCore::FrameView::yPositionForRootContentLayer):
1309 (WebCore::FrameView::yPositionForFooterLayer):
1312 Use the static functions to compute the layer positions.
1313 * page/scrolling/AsyncScrollingCoordinator.cpp:
1314 (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
1316 How did headers ever work with this bug?? I don’t know. We need to return that
1318 * page/scrolling/ScrollingCoordinator.cpp:
1319 (WebCore::ScrollingCoordinator::headerLayerForFrameView):
1321 Use the static functions to compute the layer positions.
1322 * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1323 (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
1324 * rendering/RenderLayerCompositor.cpp:
1325 (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1326 (WebCore::RenderLayerCompositor::updateLayerForHeader):
1327 (WebCore::RenderLayerCompositor::updateLayerForFooter):
1329 2014-05-11 Zalan Bujtas <zalan@apple.com>
1331 Subpixel rendering[iOS]: <select> decoration is misaligned when the renderer is on subpixel position.
1332 https://bugs.webkit.org/show_bug.cgi?id=132779
1333 <rdar://problem/16631071>
1335 Reviewed by Simon Fraser.
1337 Push <select> theme decoration's rect to device pixel position to ensure
1338 that the theme bounds are aligned with the renderer's bounds. (in painting terms)
1339 However, as the decoration code paints multiple items, they all need to use snapped
1340 final coordinates for painting : tracked here https://bugs.webkit.org/show_bug.cgi?id=132780
1341 This patch also changes the padding values for <select> [iOS] to compensate for the integer
1342 truncation that happened before subpixel.
1348 * platform/efl/RenderThemeEfl.cpp:
1349 (WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
1350 * platform/efl/RenderThemeEfl.h:
1351 * platform/gtk/RenderThemeGtk.cpp:
1352 (WebCore::RenderThemeGtk::paintMenuListButtonDecorations):
1353 * platform/gtk/RenderThemeGtk.h:
1354 * rendering/RenderTheme.cpp:
1355 (WebCore::RenderTheme::paintDecorations):
1356 * rendering/RenderTheme.h:
1357 (WebCore::RenderTheme::paintMenuListButtonDecorations):
1358 * rendering/RenderThemeIOS.h:
1359 * rendering/RenderThemeIOS.mm:
1360 (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
1361 * rendering/RenderThemeMac.h:
1362 * rendering/RenderThemeMac.mm:
1363 (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
1364 * rendering/RenderThemeSafari.cpp:
1365 (WebCore::RenderThemeSafari::paintMenuListButtonDecorations):
1366 * rendering/RenderThemeSafari.h:
1367 * rendering/RenderThemeWin.cpp:
1368 (WebCore::RenderThemeWin::paintMenuList):
1369 (WebCore::RenderThemeWin::paintMenuListButtonDecorations):
1370 * rendering/RenderThemeWin.h:
1372 2014-05-11 Zan Dobersek <zdobersek@igalia.com>
1374 Move Source/WebCore/workers/ code to std::unique_ptr
1375 https://bugs.webkit.org/show_bug.cgi?id=132401
1377 Reviewed by Darin Adler.
1379 Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/workers (and related places)
1380 with std::unique_ptr.
1382 * bindings/js/JSDOMWindowCustom.cpp:
1383 (WebCore::JSDOMWindow::setTimeout):
1384 (WebCore::JSDOMWindow::setInterval):
1385 * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1386 (WebCore::JSWorkerGlobalScope::setTimeout):
1387 (WebCore::JSWorkerGlobalScope::setInterval):
1388 * bindings/js/ScheduledAction.cpp:
1389 (WebCore::ScheduledAction::create):
1390 * bindings/js/ScheduledAction.h:
1391 * page/DOMTimer.cpp:
1392 (WebCore::DOMTimer::DOMTimer):
1393 (WebCore::DOMTimer::install):
1394 (WebCore::DOMTimer::fired):
1395 (WebCore::DOMTimer::didStop):
1397 * page/DOMWindow.cpp:
1398 (WebCore::DOMWindow::setTimeout):
1399 (WebCore::DOMWindow::setInterval):
1401 * workers/WorkerEventQueue.h:
1402 * workers/WorkerGlobalScope.cpp:
1403 (WebCore::WorkerGlobalScope::WorkerGlobalScope):
1404 (WebCore::WorkerGlobalScope::setTimeout):
1405 (WebCore::WorkerGlobalScope::setInterval):
1406 * workers/WorkerGlobalScope.h:
1407 (WebCore::WorkerGlobalScope::clearScript):
1408 * workers/WorkerLoaderProxy.h:
1409 * workers/WorkerMessagingProxy.h:
1410 * workers/WorkerRunLoop.cpp:
1411 (WebCore::WorkerRunLoop::WorkerRunLoop):
1412 * workers/WorkerRunLoop.h:
1413 * workers/WorkerScriptLoader.cpp:
1414 (WebCore::WorkerScriptLoader::loadSynchronously):
1415 (WebCore::WorkerScriptLoader::loadAsynchronously):
1416 (WebCore::WorkerScriptLoader::createResourceRequest):
1417 * workers/WorkerScriptLoader.h:
1418 * workers/WorkerThread.cpp:
1419 (WebCore::WorkerThread::WorkerThread):
1420 (WebCore::WorkerThread::workerThread):
1421 (WebCore::WorkerThreadStartupData::create): Deleted.
1422 * workers/WorkerThread.h:
1424 2014-05-09 Myles C. Maxfield <litherum@gmail.com>
1426 [Mac] [iOS] Underlines are too low
1427 https://bugs.webkit.org/show_bug.cgi?id=132770
1429 Reviewed by Darin Adler.
1431 computeUnderlineOffset() inside InlineTextBox.cpp lowers underlines from text
1432 baseline by a value that is proportional to the font size. However, this
1433 lowering was done a second time in
1434 GraphicsContext::computeLineBoundsAndAntialiasingModeForText(). This patch
1435 removes this second, platform-dependent lowering.
1437 This duplication was caused by merging iOS into open source, where iOS used
1438 the GraphicsContext approach and open source used the InlineTextBox approach.
1440 Covered by fast/css3-text/css3-text-decoration/text-decoration-thickness.html.
1442 * platform/graphics/GraphicsContext.cpp:
1443 (WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText): Remove
1444 redundant lowering code
1445 * rendering/InlineTextBox.cpp:
1446 (WebCore::InlineTextBox::paintDecoration): Clean up textDecorationThickness
1449 2014-05-11 Antti Koivisto <antti@apple.com>
1451 Text with simple line layout not getting pushed below float when there is not enough space for it
1452 https://bugs.webkit.org/show_bug.cgi?id=126991
1454 Reviewed by Andreas Kling.
1456 Tests: fast/text/simple-lines-intruding-wide-float-dynamic.html
1457 fast/text/simple-lines-intruding-wide-float.html
1459 * rendering/RenderBlockFlow.cpp:
1460 (WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):
1462 Invalidate the line layout path when floats change. We need to check SimpleLineLayout::canUseFor again as
1463 intruding floats may make this flow ineligible to use the path.
1465 * rendering/RenderBlockFlow.h:
1466 (WebCore::RenderBlockFlow::floatingObjectSet):
1467 * rendering/SimpleLineLayout.cpp:
1468 (WebCore::SimpleLineLayout::canUseFor):
1470 Test the top positions of all floats for case that would push text below the float instead of just testing
1471 the first line. We may have floats in the middle of the paragraph too.
1473 2014-05-11 peavo@outlook.com <peavo@outlook.com>
1475 WinCairo crashes on acid3 test
1476 https://bugs.webkit.org/show_bug.cgi?id=131364
1478 Reviewed by Brent Fulgham.
1480 When the 304 (Not-modified) response is received, the Curl backend should look up the cached response,
1481 and call the client method didReceiveResponse with the cached response, instead of the 304 response.
1482 Otherwise the response will contain an empty MIME type, which causes the request to be cancelled, and the client deleted.
1483 When the Curl cache manager then accesses the client afterwards, it is deleted, and we crash.
1485 * platform/network/curl/CurlCacheManager.cpp:
1486 (WebCore::CurlCacheManager::didReceiveResponse): Return early if request is cancelled.
1487 (WebCore::CurlCacheManager::getCachedResponse): Added method to get cached response.
1488 * platform/network/curl/CurlCacheManager.h: Ditto.
1489 * platform/network/curl/ResourceHandleManager.cpp:
1490 (WebCore::headerCallback): When 304 response is received, look up cached response, and use it.
1492 2014-05-10 Tim Horton <timothy_horton@apple.com>
1494 [WKWebView _updateScrollViewBackground] churns UI-and-CGColors while repainting
1495 https://bugs.webkit.org/show_bug.cgi?id=132793
1496 <rdar://problem/16877870>
1498 Reviewed by Dan Bernstein.
1501 Export a Color convenience function.
1503 2014-05-10 Commit Queue <commit-queue@webkit.org>
1505 Unreviewed, rolling out r168578.
1506 https://bugs.webkit.org/show_bug.cgi?id=132789
1508 Speculative rollout since this appears to break PLT3.
1509 (Requested by kling on #webkit).
1513 "Move Source/WebCore/workers/ code to std::unique_ptr"
1514 https://bugs.webkit.org/show_bug.cgi?id=132401
1515 http://trac.webkit.org/changeset/168578
1517 2014-05-10 Darin Adler <darin@apple.com>
1519 REGRESSION (r166853): fast/preloader/document-write.html is very flaky
1520 https://bugs.webkit.org/show_bug.cgi?id=130942
1522 Reviewed by Anders Carlsson.
1524 * style/StyleResolveTree.cpp:
1525 (WebCore::Style::suspendMemoryCacheClientCalls): Use a RefPtr to the main
1526 frame as a weak pointer to a Page that will work unless the page is destroyed.
1527 The old code tried to do it with a RefPtr to a document, but as the FIXME
1528 points out, that won't work if the document is disassociated with its frame.
1530 2014-05-10 Anders Carlsson <andersca@apple.com>
1532 Block exceptions when trying to convert attributed strings to RTF and RTFD
1533 https://bugs.webkit.org/show_bug.cgi?id=132778
1534 <rdar://problem/16675805>
1536 Reviewed by Darin Adler.
1538 When the iOS WebHTMLConverter was upstreamed, converting some attributed strings to RTF and RTFD
1539 started throwing Objective-C exceptions (see <rdar://problem/16876920>).
1541 In WebKit2, we now crash on unhandled exceptions so work around that crash by adding exception blocking macros.
1543 * editing/ios/EditorIOS.mm:
1544 (WebCore::dataInRTFDFormat):
1545 (WebCore::dataInRTFFormat):
1546 * editing/mac/EditorMac.mm:
1547 (WebCore::dataInRTFDFormat):
1548 (WebCore::dataInRTFFormat):
1550 2014-05-10 Zan Dobersek <zdobersek@igalia.com>
1552 Move Source/WebCore/workers/ code to std::unique_ptr
1553 https://bugs.webkit.org/show_bug.cgi?id=132401
1555 Reviewed by Andreas Kling.
1557 Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/workers (and related places)
1558 with std::unique_ptr.
1560 * bindings/js/JSDOMWindowCustom.cpp:
1561 (WebCore::JSDOMWindow::setTimeout):
1562 (WebCore::JSDOMWindow::setInterval):
1563 * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1564 (WebCore::JSWorkerGlobalScope::setTimeout):
1565 (WebCore::JSWorkerGlobalScope::setInterval):
1566 * bindings/js/ScheduledAction.cpp:
1567 (WebCore::ScheduledAction::create):
1568 * bindings/js/ScheduledAction.h:
1569 * page/DOMTimer.cpp:
1570 (WebCore::DOMTimer::DOMTimer):
1571 (WebCore::DOMTimer::install):
1572 (WebCore::DOMTimer::fired):
1573 (WebCore::DOMTimer::didStop):
1575 * page/DOMWindow.cpp:
1576 (WebCore::DOMWindow::setTimeout):
1577 (WebCore::DOMWindow::setInterval):
1579 * workers/WorkerEventQueue.h:
1580 * workers/WorkerGlobalScope.cpp:
1581 (WebCore::WorkerGlobalScope::WorkerGlobalScope):
1582 (WebCore::WorkerGlobalScope::setTimeout):
1583 (WebCore::WorkerGlobalScope::setInterval):
1584 * workers/WorkerGlobalScope.h:
1585 (WebCore::WorkerGlobalScope::clearScript):
1586 * workers/WorkerLoaderProxy.h:
1587 * workers/WorkerMessagingProxy.h:
1588 * workers/WorkerRunLoop.cpp:
1589 (WebCore::WorkerRunLoop::WorkerRunLoop):
1590 * workers/WorkerRunLoop.h:
1591 * workers/WorkerScriptLoader.cpp:
1592 (WebCore::WorkerScriptLoader::loadSynchronously):
1593 (WebCore::WorkerScriptLoader::loadAsynchronously):
1594 (WebCore::WorkerScriptLoader::createResourceRequest):
1595 * workers/WorkerScriptLoader.h:
1596 * workers/WorkerThread.cpp:
1597 (WebCore::WorkerThread::WorkerThread):
1598 (WebCore::WorkerThread::workerThread):
1599 (WebCore::WorkerThreadStartupData::create): Deleted.
1600 * workers/WorkerThread.h:
1602 2014-05-09 Dean Jackson <dino@apple.com>
1604 -webkit-filter prevents rendering at retina scale
1605 https://bugs.webkit.org/show_bug.cgi?id=93471
1607 Reviewed by Dirk Schulze.
1609 Implement 2x support for filters that go through
1610 the -webkit-filter property. This includes all
1611 shorthand filters, and any referenced SVG-style filters
1612 (as long as they use only the supported subset of
1613 operations - basically the same as is exposed for
1616 Tests: fast/hidpi/filters-blur.html
1617 fast/hidpi/filters-hue-rotate.html
1618 fast/hidpi/filters-invert.html
1619 fast/hidpi/filters-multiple.html
1620 fast/hidpi/filters-reference.html
1621 fast/hidpi/filters-shadow.html
1623 * platform/graphics/cg/ImageBufferCG.cpp:
1624 (WebCore::ImageBuffer::getUnmultipliedImageData): Scale the source rectangle if the method was
1625 called using LogicalCoordinates.
1626 (WebCore::ImageBuffer::getPremultipliedImageData): Ditto.
1627 (WebCore::ImageBuffer::putByteArray): Ditto.
1629 * platform/graphics/filters/FEDropShadow.cpp:
1630 (WebCore::FEDropShadow::platformApplySoftware): Make sure to scale the blur radius by the filter
1631 resolution, and call the byte-array methods with the native coordinate system.
1632 * platform/graphics/filters/FEGaussianBlur.cpp:
1633 (WebCore::FEGaussianBlur::calculateUnscaledKernelSize): Fix typo.
1634 (WebCore::FEGaussianBlur::platformApplySoftware): Scale the kernel and paint rectangles
1635 by the filter scale.
1637 * platform/graphics/filters/Filter.h:
1638 (WebCore::Filter::Filter): Initialise the filter scale.
1639 (WebCore::Filter::filterScale): New property which reflects the mapping between logical pixels
1641 (WebCore::Filter::setFilterScale):
1643 * platform/graphics/filters/FilterEffect.cpp:
1644 (WebCore::FilterEffect::asImageBuffer): Make sure buffer creation takes scale into account.
1645 (WebCore::FilterEffect::asUnmultipliedImage): Ditto.
1646 (WebCore::FilterEffect::asPremultipliedImage): Ditto.
1647 (WebCore::FilterEffect::copyImageBytes): Scale any incoming regions if they are talking about
1648 device pixels rather than logical pixels.
1649 (WebCore::FilterEffect::copyUnmultipliedImage): Ditto.
1650 (WebCore::FilterEffect::copyPremultipliedImage): Ditto.
1651 (WebCore::FilterEffect::createImageBufferResult): Take scale into account when creating byte array.
1652 (WebCore::FilterEffect::createUnmultipliedImageResult): Ditto.
1653 (WebCore::FilterEffect::createPremultipliedImageResult): Ditto.
1655 * rendering/FilterEffectRenderer.cpp:
1656 (WebCore::FilterEffectRenderer::allocateBackingStoreIfNeeded): Pass filter scale into buffer creation.
1658 * rendering/RenderLayer.cpp:
1659 (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Make sure to set the filter scale to
1660 the device scale factor, and notice if we ever change scales.
1662 2014-05-10 Praveen R Jadhav <praveen.j@samsung.com>
1664 [MediaStream] Rename NavigatorMediaStream as NavigatorUserMedia.
1665 https://bugs.webkit.org/show_bug.cgi?id=132734
1667 Reviewed by Eric Carlson.
1669 Spec: http://www.w3.org/TR/mediacapture-streams/#navigatorusermedia
1671 This patch replaces 'NavigatorMediaStream' with 'NavigatorUserMedia'
1672 throughout the code to be consistent with W3C specifications.
1673 Test cases remain the same as 'Navigator' implies 'NavigatorUserMedia'.
1675 * CMakeLists.txt: Compiles NavigatorUserMedia.cpp
1676 * DerivedSources.make: Compiles NavigatorUserMedia.idl
1677 * Modules/mediastream/NavigatorMediaStream.cpp: Removed.
1678 * Modules/mediastream/NavigatorMediaStream.h: Removed.
1679 * Modules/mediastream/NavigatorMediaStream.idl: Removed.
1680 * Modules/mediastream/NavigatorUserMedia.cpp: Added.
1681 (WebCore::NavigatorUserMedia::NavigatorUserMedia):
1682 (WebCore::NavigatorUserMedia::~NavigatorUserMedia):
1683 (WebCore::NavigatorUserMedia::webkitGetUserMedia):
1684 * Modules/mediastream/NavigatorUserMedia.h: Added.
1685 * Modules/mediastream/NavigatorUserMedia.idl: Added.
1686 * WebCore.xcodeproj/project.pbxproj:
1687 * bindings/js/JSNavigatorCustom.cpp:
1688 (WebCore::JSNavigator::webkitGetUserMedia): NavigatorUserMedia
1689 class is used instead of NavigatorMediaStream.
1691 2014-05-10 Zalan Bujtas <zalan@apple.com>
1693 Subpixel rendering: Empty rects should remain empty after integrally enclosing them.
1694 https://bugs.webkit.org/show_bug.cgi?id=132753
1695 <rdar://problem/16846801>
1697 Reviewed by Simon Fraser.
1699 This patch ensures that empty LayoutRects remain empty after converting to integral enclosing rect.
1700 LayoutRects with fractional position get expanded even if they are empty. This makes rectangle
1701 operations unreliable and can result in undesired side effects.
1703 No testable/covered by existing tests.
1705 * platform/graphics/LayoutRect.cpp:
1706 (WebCore::enclosingIntRect):
1707 * rendering/InlineTextBox.cpp:
1708 (WebCore::InlineTextBox::localSelectionRect):
1709 (WebCore::InlineTextBox::paintDocumentMarker):
1710 (WebCore::InlineTextBox::paintTextMatchMarker):
1711 (WebCore::InlineTextBox::computeRectForReplacementMarker):
1712 (WebCore::integralEnclosingRectForSelection): Deleted.
1714 2014-05-09 Joseph Pecoraro <pecoraro@apple.com>
1716 Web Inspector: Allow Remote Inspector to entitlement check UIProcess through WebProcess
1717 https://bugs.webkit.org/show_bug.cgi?id=132409
1719 Reviewed by Timothy Hatcher.
1721 * inspector/InspectorClient.h:
1722 (WebCore::InspectorClient::parentProcessIdentifier): Deleted.
1723 * page/PageDebuggable.cpp:
1724 (WebCore::PageDebuggable::parentProcessIdentifier): Deleted.
1725 * page/PageDebuggable.h:
1726 pid per debuggable is no longer needed.
1728 2014-05-09 Dean Jackson <dino@apple.com>
1730 [fullscreen] cursor should auto-hide when over video
1731 https://bugs.webkit.org/show_bug.cgi?id=132758
1733 Unreviewed followup based on test failure.
1735 * css/fullscreen.css: Append the previous rule - video children of fullscreen elements.
1737 2014-05-09 Dean Jackson <dino@apple.com>
1739 [fullscreen] cursor should auto-hide when over video
1740 https://bugs.webkit.org/show_bug.cgi?id=132758
1742 Reviewed by Brent Fulgham.
1744 Cursors were not auto-hiding over fullscreen video. There was
1745 a small error in the CSS we load for fullscreen content.
1747 * css/fullscreen.css: Don't hide when video is a child of the fullscreen element - hide when it *is* the fullscreen element.
1748 (video:-webkit-full-screen):
1749 (:-webkit-full-screen video:hover): Deleted.
1751 2014-05-09 Zalan Bujtas <zalan@apple.com>
1753 Subpixel rendering[iOS]: Top bar on apple.com/support jiggles when the swoosh animates.
1754 https://bugs.webkit.org/show_bug.cgi?id=132750
1755 <rdar://problem/16803281>
1757 Reviewed by Simon Fraser.
1759 This patch ensures that GraphicsLayer and RemoteLayerBackingStore have the same dimensions.
1761 Remove integral enclosing when we set the size on RemoteLayerBackingStore. It makes the layer's size
1762 different from the backingstore when the passed value is fractional.
1763 We scale and integral round this value to size the shareable bitmap later. Rounding ensures that
1764 the final size value matches what we calculated at GraphicsLayerCA::updateGeometry()
1766 Currently not testable.
1768 * platform/graphics/ca/GraphicsLayerCA.cpp:
1769 (WebCore::GraphicsLayerCA::updateGeometry):
1770 (WebCore::GraphicsLayerCA::computePixelAlignment): include device scale factor to be able calculate the final content scale.
1771 * platform/graphics/ca/GraphicsLayerCA.h:
1773 2014-05-09 Mark Hahnenberg <mhahnenberg@apple.com>
1775 JSDOMWindow should disable property caching after a certain point
1776 https://bugs.webkit.org/show_bug.cgi?id=132751
1778 Reviewed by Filip Pizlo.
1782 This is part of removing HasImpureGetOwnPropertySlot from JSDOMWindow. After the lookup in the static
1783 hash table for JSDOMWindow fails we want to disable property caching even if the code that follows thinks
1784 that it has provided a cacheable value.
1786 * bindings/js/JSDOMWindowCustom.cpp:
1787 (WebCore::JSDOMWindow::getOwnPropertySlot):
1789 2014-05-09 Benjamin Poulain <bpoulain@apple.com>
1791 Fix the export file after r168556
1793 * WebCore.exp.in: I forgot to fix the export file before landing.
1795 2014-05-09 Benjamin Poulain <bpoulain@apple.com>
1797 [iOS][WK2] Set up the resize events
1798 https://bugs.webkit.org/show_bug.cgi?id=132726
1800 Reviewed by Darin Adler and Simon Fraser.
1802 Let the WebKit2 layer override the size used for resize events.
1805 * page/FrameView.cpp:
1806 (WebCore::FrameView::layout):
1807 (WebCore::FrameView::sizeForResizeEvent):
1808 (WebCore::FrameView::sendResizeEventIfNeeded):
1809 (WebCore::FrameView::setCustomSizeForResizeEvent):
1812 2014-05-09 Alexey Proskuryakov <ap@apple.com>
1814 REGRESSION (r168518): Multiple tests for workers in blobs assert
1815 https://bugs.webkit.org/show_bug.cgi?id=132728
1817 Reviewed by Geoffrey Garen.
1819 Change File serialization to include name, so that we don't have to regenerate anything
1820 on a secondary thread after deserialization.
1822 Files and Blobs can't be stored persistently, because URLs are transient (IndexedDB
1823 has an explicit check, and fails if there were any blob URLs). API doesn't have the
1824 check, but given that anyone who tried to use these to serialize a File would fail,
1825 it seems OK to change the format.
1827 * bindings/js/SerializedScriptValue.cpp:
1828 (WebCore::CloneSerializer::write):
1829 (WebCore::CloneDeserializer::readFile):
1831 (WebCore::File::File):
1834 2014-05-08 Mark Hahnenberg <mhahnenberg@apple.com>
1836 JSDOMWindow should have a WatchpointSet to fire on window close
1837 https://bugs.webkit.org/show_bug.cgi?id=132721
1839 Reviewed by Filip Pizlo.
1843 This patch allows us to reset the inline caches that assumed they could skip
1844 the first part of JSDOMWindow::getOwnPropertySlot that checks if the window has
1845 been closed. This is part of getting rid of HasImpureGetOwnPropertySlot on JSDOMWindow.
1847 JSDOMWindowBase now has a WatchpointSet that the underlying DOMWindow fires when its
1848 frame is cleared. In getOwnPropertySlot, we now pass this WatchpointSet to PropertySlot
1849 which will shepherd it back up to the code that generates the inline cache (and the
1850 Watchpoint for clearing it).
1852 * bindings/js/JSDOMWindowBase.cpp:
1853 (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1854 (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
1855 * bindings/js/JSDOMWindowBase.h:
1856 * bindings/js/JSDOMWindowCustom.cpp:
1857 (WebCore::JSDOMWindow::getOwnPropertySlot):
1858 * page/DOMWindow.cpp:
1859 (WebCore::DOMWindow::frameDestroyed):
1861 2014-05-09 Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com>
1863 ASSERTION FAILED: object->style()->overflowX() == object->style()->overflowY()
1864 https://bugs.webkit.org/show_bug.cgi?id=121682
1866 Reviewed by Dirk Schulze.
1868 Add more overflow freedom to the SVG element:
1869 -overflow-x and overflow-y for controlling each scrollbar independently is now supported
1870 -overflow:scroll will display scrollbars regardless of the svg overflowing or not (as required by CSS)
1871 -overflow:hidden will cause overflow to be clipped away and scrollbars to be hidden
1873 Merged from Blink r172126 by <ed@opera.com>
1875 Tests: svg/W3C-SVG-1.1-SE/painting-marker-05-f.svg
1876 svg/W3C-SVG-1.1-SE/painting-marker-06-f.svg
1877 svg/animations/animate-viewport-overflow-2.html
1878 svg/animations/animate-viewport-overflow.html
1879 svg/in-html/overflow-repaint.html
1880 svg/in-html/overflow-svg-root-attr.html
1881 svg/in-html/overflow-svg-root-style.html
1882 svg/in-html/overflow-svg-root.html
1883 svg/overflow/overflow-on-outermost-svg-element-horizontal-auto.svg
1884 svg/overflow/overflow-on-outermost-svg-element-vertical-auto.svg
1885 svg/overflow/overflow-scroll-on-outermost-svg-element.svg
1886 svg/overflow/overflow-x-hidden-on-outermost-svg-element-expected.svg
1887 svg/overflow/overflow-x-hidden-on-outermost-svg-element.svg
1888 svg/overflow/overflow-y-hidden-on-outermost-svg-element-expected.svg
1889 svg/overflow/overflow-y-hidden-on-outermost-svg-element.svg
1891 * css/StyleResolver.cpp:
1892 (WebCore::StyleResolver::adjustRenderStyle):
1893 * page/FrameView.cpp:
1894 (WebCore::FrameView::applyOverflowToViewport):
1895 * rendering/svg/RenderSVGRoot.cpp:
1896 (WebCore::RenderSVGRoot::layout):
1897 (WebCore::RenderSVGRoot::shouldApplyViewportClip):
1898 (WebCore::RenderSVGRoot::paintReplaced):
1899 (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
1900 * rendering/svg/RenderSVGRoot.h:
1901 * rendering/svg/SVGRenderSupport.cpp:
1902 (WebCore::SVGRenderSupport::isOverflowHidden):
1904 2014-05-09 Jer Noble <jer.noble@apple.com>
1906 [MSE][Mac] Destroy the AVStreamDataParser when the SourceBuffer is removed from its MediaSource.
1907 https://bugs.webkit.org/show_bug.cgi?id=132710
1909 Reviewed by Eric Carlson.
1911 The AVStreamDataParser should be destroyed when the SourceBuffer is removed, so that subsequent
1912 SourceBuffers can utilize resources released by the parser on destruction.
1914 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1915 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1916 (-[WebAVStreamDataParserListener invalidate]):
1917 (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]): Protect against _parent being invalidated.
1918 (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]): Ditto.
1919 (-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]): Ditto.
1920 (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]): Ditto.
1921 (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC): Call destroyParser();.
1922 (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): Ditto.
1923 (WebCore::SourceBufferPrivateAVFObjC::destroyParser): Call -[WebAVStreamDataParserListener invalidate].
1925 2014-05-09 Andrei Bucur <abucur@adobe.com>
1927 [CSS Regions] 1-2% performance regression in html5-full-render after r168286
1928 https://bugs.webkit.org/show_bug.cgi?id=132672
1930 Reviewed by Mihnea Ovidenie.
1932 The patch optimizes the search of regions when there's a single region in the chain.
1933 There's no need to execute advanced search logic, we can directly return that region.
1935 Tests: No function change, no tests.
1937 * rendering/RenderBlock.cpp:
1938 (WebCore::canComputeRegionRangeForBox):
1939 * rendering/RenderFlowThread.cpp:
1940 (WebCore::RenderFlowThread::regionAtBlockOffset):
1941 (WebCore::RenderFlowThread::hasCachedRegionRangeForBox): Renamed from hasRegionRangeForBox to
1942 better suggest what the function does.
1943 (WebCore::RenderFlowThread::getRegionRangeForBox):
1944 (WebCore::RenderFlowThread::hasRegionRangeForBox): Deleted.
1945 * rendering/RenderFlowThread.h:
1947 2014-05-09 Jer Noble <jer.noble@apple.com>
1949 [EME] Call suspendIfNeeded() in the MediaKeySession create() method to avoid an ASSERT.
1950 https://bugs.webkit.org/show_bug.cgi?id=132712
1952 Reviewed by Eric Carlson.
1954 All ActiveDOMObject subclasses must call suspendIfNeeded() immediately after creation.
1956 * Modules/encryptedmedia/MediaKeySession.cpp:
1957 (WebCore::MediaKeySession::MediaKeySession):
1959 2014-05-09 Zalan Bujtas <zalan@apple.com>
1961 Unreviewed. Another attempt to fix Windows build after r168528.
1963 * platform/graphics/win/FontWin.cpp:
1964 (WebCore::Font::adjustSelectionRectForComplexText):
1966 2014-05-09 Zalan Bujtas <zalan@apple.com>
1968 Unreviewed build fix for Win after r168528.
1970 * platform/graphics/win/FontWin.cpp:
1971 (WebCore::Font::adjustSelectionRectForComplexText):
1973 2014-05-09 Zalan Bujtas <zalan@apple.com>
1975 REGRESSION (r168095): 1-pixel gap between adjacent selection inlines
1976 https://bugs.webkit.org/show_bug.cgi?id=132474
1977 <rdar://problem/16797394>
1979 Reviewed by David Hyatt.
1981 This patch changes text selection rectangle calculation from integral to device
1982 pixel snapping. It ensures that selection rect painting matches box boundaries for inline elements.
1983 Directional rounding (horizontal only atm) is moved out from Font class and now accessible
1984 to all the painting code. RTL snapping strategy is changed from floor to round to match ltr behavior.
1985 However this patch does not address all the integral snapping across inline elements. There are
1986 a few places where we still calculate enclosing rects where snapping is sufficient.
1988 Test: fast/inline/hidpi-pixel-gap-between-adjacent-selection-inlines.html
1990 * platform/LayoutUnit.h:
1991 (WebCore::roundToDevicePixel): added fudge factor to change rounding direction as directed.
1992 * platform/graphics/Font.cpp:
1993 (WebCore::Font::adjustSelectionRectForText):
1994 (WebCore::Font::selectionRectForText): Deleted.
1995 * platform/graphics/Font.h:
1996 * platform/graphics/FontFastPath.cpp:
1997 (WebCore::Font::adjustSelectionRectForSimpleText): removed directional rounding.
1998 (WebCore::Font::selectionRectForSimpleText): Deleted.
1999 * platform/graphics/GraphicsContext.cpp:
2000 (WebCore::GraphicsContext::drawHighlightForText): Deleted.
2001 * platform/graphics/GraphicsContext.h:
2002 * platform/graphics/LayoutPoint.h:
2003 (WebCore::roundedForPainting):
2004 * platform/graphics/LayoutRect.h:
2005 (WebCore::directionalPixelSnappedForPainting): Snap top right corner for rtl direction.
2006 * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
2007 (WebCore::Font::adjustSelectionRectForComplexText):
2008 (WebCore::Font::selectionRectForComplexText): Deleted.
2009 * platform/graphics/mac/FontComplexTextMac.cpp:
2010 (WebCore::Font::adjustSelectionRectForComplexText): removed directional rounding.
2011 (WebCore::Font::selectionRectForComplexText): Deleted.
2012 * platform/graphics/win/FontWin.cpp:
2013 (WebCore::Font::adjustSelectionRectForComplexText):
2014 (WebCore::Font::selectionRectForComplexText): Deleted.
2015 * rendering/EllipsisBox.cpp:
2016 (WebCore::EllipsisBox::selectionRect):
2017 (WebCore::EllipsisBox::paintSelection):
2018 * rendering/InlineTextBox.cpp:
2019 (WebCore::integralEnclosingRectForSelection): helper to address enclosing empty rect problem.
2020 (WebCore::InlineTextBox::localSelectionRect):
2021 (WebCore::InlineTextBox::paintSelection):
2022 (WebCore::InlineTextBox::paintCompositionBackground):
2023 (WebCore::InlineTextBox::paintDocumentMarker):
2024 (WebCore::InlineTextBox::paintTextMatchMarker):
2025 (WebCore::InlineTextBox::computeRectForReplacementMarker):
2026 (WebCore::InlineTextBox::positionForOffset):
2027 * rendering/svg/SVGInlineTextBox.cpp:
2028 (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
2030 2014-05-09 Martin Hodovan <mhodovan@inf.u-szeged.hu>
2032 ASSERTION FAILED: !m_code || m_code == defaultExceptionCode
2033 in WebCore::constructQualifiedName
2034 https://bugs.webkit.org/show_bug.cgi?id=132343
2036 'Remove bad assertion in SVGSMILElement's constructQualifiedName() by passing
2037 IGNORE_EXCEPTION instead ASSERT_NO_EXCEPTION to Document::parseQualifiedName().
2038 The constructQualifiedName() function handles parseQualifiedName() failures
2039 propertly by returning early so there is no reason to assert on parsing
2042 Blink merge: http://src.chromium.org/viewvc/blink?view=revision&revision=173564
2043 Based on the patch made by Christophe Dumez <ch.dumez@samsung.com>.
2045 Reviewed by Dirk Schulze.
2047 Test: svg/custom/bad-attributeName-crash.html
2049 * svg/animation/SVGSMILElement.cpp:
2050 (WebCore::constructQualifiedName):
2052 2014-05-08 Brent Fulgham <bfulgham@apple.com>
2054 Multiple (stacked) cues when shuttling through video while playing closed captions
2055 https://bugs.webkit.org/show_bug.cgi?id=132715
2056 <rdar://problem/16795782>
2058 Reviewed by Eric Carlson.
2060 Tests: media/track/track-in-band-cues-added-once.html
2062 * html/track/TextTrack.cpp:
2063 (WebCore::TextTrack::hasCue): Revise to use a relaxed time equality.
2064 * html/track/TextTrackCue.cpp:
2065 (WebCore::TextTrackCue::isEqual): Ditto.
2066 (WebCore::TextTrackCue::hasEquivalentStartTime): Added.
2067 * html/track/TextTrackCue.h:
2068 (WebCore::TextTrackCue::startTimeVariance): Added.
2069 * html/track/TextTrackCueGeneric.h:
2070 * html/track/TextTrackCueGeneric.cpp:
2071 (WebCore::TextTrackCueGeneric::isEqual): Do not call the VTTCue::isEqual method from
2072 this class, since cueType() will not equal VTTCue, and the equality will fail.
2074 2014-05-08 Alexey Proskuryakov <ap@apple.com>
2076 Automatically zip document bundles used via File API
2077 https://bugs.webkit.org/show_bug.cgi?id=132713
2078 <rdar://problem/13397892>
2080 Reviewed by Anders Carlsson.
2082 Tests: fast/files/filereader-zip-bundle.html
2083 http/tests/local/fileapi/upload-zip-bundle-as-blob.html
2085 * FileMac.mm: Added.
2086 (WebCore::File::shouldReplaceFile):
2087 (WebCore::File::computeNameAndContentTypeForReplacedFile):
2088 Added code that decides what to do with a bundle. We need this to happen in
2089 WebProcess, because HTML5 dropzone depends on this, it needs to know file type
2090 even before a File object can be created.
2092 * WebCore.exp.in: Export new functions.
2094 * WebCore.xcodeproj/project.pbxproj: Added new files.
2096 * dom/DataTransfer.cpp: (WebCore::DataTransfer::hasFileOfType): Updated for File
2101 (WebCore::File::File):
2102 (WebCore::File::computeNameAndContentType):
2103 (WebCore::File::contentTypeForFile):
2104 (WebCore::File::contentTypeFromFilePathOrName): Deleted.
2105 Make it possible for a subclass to affect file name and content type calculation.
2107 * platform/network/BlobDataFileReference.cpp:
2108 (WebCore::BlobDataFileReference::BlobDataFileReference):
2109 (WebCore::BlobDataFileReference::~BlobDataFileReference):
2110 (WebCore::BlobDataFileReference::path):
2111 (WebCore::BlobDataFileReference::size):
2112 (WebCore::BlobDataFileReference::expectedModificationTime):
2113 (WebCore::BlobDataFileReference::startTrackingModifications):
2114 * platform/network/BlobDataFileReference.h:
2115 (WebCore::BlobDataFileReference::path): Deleted.
2116 (WebCore::BlobDataFileReference::BlobDataFileReference): Deleted.
2117 Use original or replaced file, as appropriate.
2119 * platform/network/mac/BlobDataFileReferenceMac.mm: Added.
2120 (WebCore::BlobDataFileReference::generateReplacementFile): Implements generateReplacementFile().
2122 * platform/network/FormData.h: Added a FIXME.
2124 * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): Always use Blob code path
2125 for blobs, don't unwrap them into a file path.
2127 2014-05-08 Simon Fraser <simon.fraser@apple.com>
2129 Occasional crash under AsyncScrollingCoordinator::frameViewRootLayerDidChange() on history navigation
2130 https://bugs.webkit.org/show_bug.cgi?id=132723
2132 Reviewed by Sam Weinig.
2134 Crash reports suggest that when we call AsyncScrollingCoordinator::frameViewRootLayerDidChange()
2135 from HistoryController::restoreScrollPositionAndViewState(), the FrameView may not have a
2136 scrolling node ID, which suggests that either the FrameView doesn't have a RenderView,
2137 or compositing hasn't happened yet.
2139 So if we enter AsyncScrollingCoordinator::frameViewRootLayerDidChange()
2140 and the FrameView has no scrollLayerID, just return. We'll fix things up
2141 when compositing kicks in later.
2143 * page/scrolling/AsyncScrollingCoordinator.cpp:
2144 (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
2146 2014-05-08 Simon Fraser <simon.fraser@apple.com>
2148 [iOS WK2] Bottom-relative position:fixed elements are misplaced on page load
2149 https://bugs.webkit.org/show_bug.cgi?id=132719
2150 <rdar://problem/16860837>
2152 Reviewed by Benjamin Poulain.
2154 Add a couple of functions, and sort.
2158 2014-05-08 Jer Noble <jer.noble@apple.com>
2160 [Mac, iOS] Add source application accounting to AVURLAsset.
2161 https://bugs.webkit.org/show_bug.cgi?id=132637
2163 Reviewed by Eric Carlson.
2165 Properly account for the application responisble for data loading by passing the source
2166 application identifier through to AVFoundation through AVURLAsset options.
2168 * html/HTMLMediaElement.cpp:
2169 (WebCore::HTMLMediaElement::parseAttribute):
2170 * html/HTMLMediaElement.h:
2171 * platform/graphics/MediaPlayer.cpp:
2172 (WebCore::MediaPlayer::sourceApplicationIdentifier):
2173 * platform/graphics/MediaPlayer.h:
2174 (WebCore::MediaPlayerClient::mediaPlayerSourceApplicationIdentifier):
2175 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2176 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
2177 * platform/network/NetworkingContext.h:
2179 2014-05-08 Jer Noble <jer.noble@apple.com>
2181 [MSE][Mac] Move AVStreamDataParser off-main-thread.
2182 https://bugs.webkit.org/show_bug.cgi?id=132698
2184 Reviewed by Eric Carlson.
2186 -[AVStreamDataParser appendStreamData:] can casue the main thread to hang when a
2187 large amount of media data is appended at once. Move the actual parsing of data
2188 to a background (synchronous) dispatch queue, and split SourceBuffer::appendBufferTimerFired
2189 into two functions, the latter of which will be called after the background queue
2192 * Modules/mediasource/SourceBuffer.cpp:
2193 (WebCore::SourceBuffer::appendBufferTimerFired): Split into sourceBufferPrivateAppendComplete.
2194 (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Split from appendBufferTimerFired.
2195 * Modules/mediasource/SourceBuffer.h:
2196 * platform/graphics/SourceBufferPrivate.h:
2197 * platform/graphics/SourceBufferPrivateClient.h:
2198 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2199 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2200 (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]): Re-dispatch to the
2202 (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]): Ditto.
2203 (-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]): Ditto.
2204 (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]): Ditto.
2205 (-[WebAVStreamDataParserListener streamDataParser:didReachEndOfTrackWithTrackID:mediaType:]): Ditto.
2206 (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]): Ditto.
2207 (WebCore::globalDataParserQueue): Added.
2208 (WebCore::SourceBufferPrivateAVFObjC::append): Dispatch to the globalDataParserQueue.
2209 (WebCore::SourceBufferPrivateAVFObjC::appendCompleted): Added.
2210 * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2211 (WebCore::MockSourceBufferPrivate::append): Adopt sourceBufferPrivateAppendComplete.
2212 * platform/mock/mediasource/MockSourceBufferPrivate.h:
2214 Update SourceBufferPrivateGStreamer to match the new append return value:
2215 * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp:
2216 (WebCore::SourceBufferPrivateGStreamer::append):
2217 * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h:
2219 2014-05-08 Commit Queue <commit-queue@webkit.org>
2221 Unreviewed, rolling out r168498.
2222 https://bugs.webkit.org/show_bug.cgi?id=132714
2224 broke Mavericks WK2 (Requested by litherum on #webkit).
2228 "http/tests/security/xss-DENIED-xsl-document-redirect.xml
2229 fails with NetworkProcess"
2230 https://bugs.webkit.org/show_bug.cgi?id=132523
2231 http://trac.webkit.org/changeset/168498
2233 2014-05-08 Myles C. Maxfield <mmaxfield@apple.com>
2235 http/tests/security/xss-DENIED-xsl-document-redirect.xml fails with NetworkProcess
2236 https://bugs.webkit.org/show_bug.cgi?id=132523
2238 Reviewed by Alexey Proskuryakov.
2240 We should not manufacture a response in the event of an error during a
2241 synchronous XHR. In addition, this test removes one place that is
2242 sensitive to such a manufactured response.
2244 Updates test expectations.
2246 * platform/network/cf/ResourceHandleCFNet.cpp:
2247 (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
2248 manufacture a response
2249 * platform/network/mac/ResourceHandleMac.mm:
2250 (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
2251 manufacture a response
2252 * xml/XSLTProcessorLibxslt.cpp:
2253 (WebCore::docLoaderFunc): Only use the response's URL if no error
2256 2014-05-08 Andreas Kling <akling@apple.com>
2258 [iOS] WebKit should listen to critical memory warnings.
2259 <https://webkit.org/b/132704>
2260 <rdar://problem/16857112>
2262 Listen for DISPATCH_MEMORYSTATUS_PRESSURE_CRITICAL in addition to
2263 DISPATCH_MEMORYSTATUS_PRESSURE_WARN, since we may only get the critical
2264 notification on some systems.
2266 Reviewed by Gavin Barraclough.
2268 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2269 (WebCore::MemoryPressureHandler::install):
2271 2014-05-08 Joseph Pecoraro <pecoraro@apple.com>
2273 Web Inspector: InspectorDOMAgent::getAccessibilityPropertiesForNode should gracefully handle bad node
2274 https://bugs.webkit.org/show_bug.cgi?id=132697
2276 Reviewed by Timothy Hatcher.
2278 * inspector/InspectorDOMAgent.cpp:
2279 (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
2280 Gracefully handle no node.
2282 2014-05-08 Tim Horton <timothy_horton@apple.com>
2284 Fix the iOS build after r168476.
2286 * platform/graphics/mac/GraphicsContextMac.mm:
2287 (WebCore::GraphicsContext::drawFocusRing):
2289 2014-05-08 Bem Jones-Bey <bjonesbe@adobe.com>
2291 [CSS Shapes] Shapes do not resolve dimensions specified in viewport units
2292 https://bugs.webkit.org/show_bug.cgi?id=124052
2294 Reviewed by Dirk Schulze.
2296 Viewport unit resolution doesn't work unless the RenderView is passed
2297 down into the floatValueForLength methods. All this does is plumb down
2298 a RenderView in all of these cases.
2300 Tests: css3/masking/clip-path-polygon-viewport-units.html
2301 fast/shapes/shape-outside-floats/shape-outside-floats-viewport-units.html
2303 * css/BasicShapeFunctions.cpp:
2304 (WebCore::floatValueForCenterCoordinate):
2305 * css/BasicShapeFunctions.h:
2306 * css/LengthFunctions.cpp:
2307 (WebCore::floatSizeForLengthSize):
2308 * css/LengthFunctions.h:
2309 * rendering/ClipPathOperation.h:
2310 (WebCore::ShapeClipPathOperation::pathForReferenceRect):
2311 (WebCore::BoxClipPathOperation::pathForReferenceRect):
2312 * rendering/RenderLayer.cpp:
2313 (WebCore::RenderLayer::setupClipPath):
2314 * rendering/shapes/Shape.cpp:
2315 (WebCore::Shape::createShape):
2316 * rendering/shapes/Shape.h:
2317 * rendering/shapes/ShapeOutsideInfo.cpp:
2318 (WebCore::ShapeOutsideInfo::computedShape):
2319 * rendering/style/BasicShapes.cpp:
2320 (WebCore::BasicShapeCircle::floatValueForRadiusInBox):
2321 (WebCore::BasicShapeCircle::path):
2322 (WebCore::BasicShapeEllipse::floatValueForRadiusInBox):
2323 (WebCore::BasicShapeEllipse::path):
2324 (WebCore::BasicShapePolygon::path):
2325 (WebCore::floatSizeForLengthSize):
2326 (WebCore::BasicShapeInset::path):
2327 * rendering/style/BasicShapes.h:
2328 * rendering/svg/SVGRenderingContext.cpp:
2329 (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2331 2014-05-08 Brent Fulgham <bfulgham@apple.com>
2333 Cue display events may not be registered during page load.
2334 https://bugs.webkit.org/show_bug.cgi?id=132696
2335 <rdar://problem/16652874>
2337 Reviewed by Eric Carlson.
2339 * Modules/mediacontrols/mediaControlsApple.js:
2340 (Controller.prototype.handleTextTrackAdd): Don't register
2341 for 'cuechange' events anymore.
2342 (Controller.prototype.handleTextTrackRemove): Ditto.
2343 (Controller.prototype.updateCaptionContainer): Reduce CSS
2344 churn by not adding/removing 'Hidden' class every time a
2345 new cue is processed. Only do this when transitioning
2346 track display state.
2347 (Controller.prototype.handleTextTrackCueChange): Deleted.
2348 * html/HTMLMediaElement.cpp:
2349 (WebCore::HTMLMediaElement::updateTextTrackDisplay): Call
2350 'updateTextTrackContainer' directory when processing cues,
2351 rather than trampolining through the JS layer.
2353 2014-05-08 Alexey Proskuryakov <ap@apple.com>
2355 Make BlobDataFileReference manage its sandbox extension
2356 https://bugs.webkit.org/show_bug.cgi?id=132689
2358 Reviewed by Anders Carlsson.
2360 * WebCore.exp.in: Export symbols that are now needed in WebKit2 to subclass BlobDataFileReference.
2362 * fileapi/ThreadableBlobRegistry.cpp: (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
2363 * platform/network/BlobData.cpp: (WebCore::BlobData::appendFile):
2364 * platform/network/BlobData.h: (WebCore::BlobDataItem::BlobDataItem):
2365 * platform/network/BlobRegistry.h:
2366 * platform/network/BlobRegistryImpl.cpp: (WebCore::BlobRegistryImpl::registerFileBlobURL):
2367 * platform/network/BlobRegistryImpl.h:
2368 BlobRegistry now takes a BlobDataFileReference and not a path, so that WebKit2
2369 could pass objects that include sandbox extensions.
2371 * platform/network/BlobDataFileReference.h:
2372 * platform/network/BlobDataFileReference.cpp:
2373 (WebCore::BlobDataFileReference::~BlobDataFileReference): Added a virtual destructor.
2374 (WebCore::BlobDataFileReference::size): We now record the size and modification time right away, no need to lazily calculate them.
2375 (WebCore::BlobDataFileReference::expectedModificationTime): Ditto.
2376 (WebCore::BlobDataFileReference::startTrackingModifications): Record time and size
2377 (since it's a single call). However, size calculation will become complicated again soon.
2378 (WebCore::BlobDataFileReference::prepareForFileAccess): A hook for subclasses.
2379 (WebCore::BlobDataFileReference::revokeFileAccess): Ditto.
2380 (WebCore::BlobDataFileReference::computeFileSystemData): Deleted.
2382 2014-05-08 Rik Cabanier <cabanier@adobe.com>
2384 Add support for drawFocusIfNeeded
2385 https://bugs.webkit.org/show_bug.cgi?id=132584
2387 Reviewed by Dirk Schulze.
2389 The drawFocusIfNeeded API will draw a focus ring if the element that is passed
2390 in is focused and a child element of the canvas.
2392 Test: fast/canvas/draw-focus-if-needed.html
2394 * html/canvas/CanvasRenderingContext2D.cpp:
2395 (WebCore::CanvasRenderingContext2D::drawFocusIfNeeded):
2396 * html/canvas/CanvasRenderingContext2D.h:
2397 * html/canvas/CanvasRenderingContext2D.idl:
2399 2014-05-08 Antti Koivisto <antti@apple.com>
2401 [iOS WebKit2] Can't activate text fields on Facebook
2402 https://bugs.webkit.org/show_bug.cgi?id=132682
2404 Reviewed by Enrica Casucci.
2406 * page/DOMTimer.cpp:
2407 (WebCore::DOMTimer::fired):
2409 The isDocument() test here had reversed in the merge breaking content change observer callback.
2411 2014-05-07 Sergio Villar Senin <svillar@igalia.com>
2413 Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in svg/
2414 https://bugs.webkit.org/show_bug.cgi?id=132647
2416 Reviewed by Darin Adler.
2418 * svg/SVGAElement.cpp:
2419 (WebCore::SVGAElement::isSupportedAttribute):
2420 * svg/SVGAnimateMotionElement.cpp:
2421 (WebCore::SVGAnimateMotionElement::isSupportedAttribute):
2422 * svg/SVGAnimateTransformElement.cpp:
2423 (WebCore::SVGAnimateTransformElement::isSupportedAttribute):
2424 * svg/SVGAnimatedLength.cpp:
2425 (WebCore::sharedSVGLength):
2426 * svg/SVGAnimationElement.cpp:
2427 (WebCore::SVGAnimationElement::isSupportedAttribute):
2428 * svg/SVGCircleElement.cpp:
2429 (WebCore::SVGCircleElement::isSupportedAttribute):
2430 * svg/SVGClipPathElement.cpp:
2431 (WebCore::SVGClipPathElement::isSupportedAttribute):
2432 * svg/SVGComponentTransferFunctionElement.cpp:
2433 (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
2434 * svg/SVGCursorElement.cpp:
2435 (WebCore::SVGCursorElement::isSupportedAttribute):
2436 * svg/SVGElement.cpp:
2437 (WebCore::SVGElement::instancesForElement):
2438 (WebCore::SVGElement::childShouldCreateRenderer):
2439 * svg/SVGEllipseElement.cpp:
2440 (WebCore::SVGEllipseElement::isSupportedAttribute):
2441 * svg/SVGFEBlendElement.cpp:
2442 (WebCore::SVGFEBlendElement::isSupportedAttribute):
2443 * svg/SVGFEColorMatrixElement.cpp:
2444 (WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
2445 * svg/SVGFEComponentTransferElement.cpp:
2446 (WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
2447 * svg/SVGFECompositeElement.cpp:
2448 (WebCore::SVGFECompositeElement::isSupportedAttribute):
2449 * svg/SVGFEConvolveMatrixElement.cpp:
2450 (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
2451 * svg/SVGFEDiffuseLightingElement.cpp:
2452 (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
2453 * svg/SVGFEDisplacementMapElement.cpp:
2454 (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
2455 * svg/SVGFEDropShadowElement.cpp:
2456 (WebCore::SVGFEDropShadowElement::isSupportedAttribute):
2457 * svg/SVGFEGaussianBlurElement.cpp:
2458 (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
2459 * svg/SVGFEImageElement.cpp:
2460 (WebCore::SVGFEImageElement::isSupportedAttribute):
2461 * svg/SVGFELightElement.cpp:
2462 (WebCore::SVGFELightElement::isSupportedAttribute):
2463 * svg/SVGFEMergeNodeElement.cpp:
2464 (WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
2465 * svg/SVGFEMorphologyElement.cpp:
2466 (WebCore::SVGFEMorphologyElement::isSupportedAttribute):
2467 * svg/SVGFEOffsetElement.cpp:
2468 (WebCore::SVGFEOffsetElement::isSupportedAttribute):
2469 * svg/SVGFESpecularLightingElement.cpp:
2470 (WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
2471 * svg/SVGFETileElement.cpp:
2472 (WebCore::SVGFETileElement::isSupportedAttribute):
2473 * svg/SVGFETurbulenceElement.cpp:
2474 (WebCore::SVGFETurbulenceElement::isSupportedAttribute):
2475 * svg/SVGFilterElement.cpp:
2476 (WebCore::SVGFilterElement::isSupportedAttribute):
2477 (WebCore::SVGFilterElement::childShouldCreateRenderer):
2478 * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2479 (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
2480 * svg/SVGForeignObjectElement.cpp:
2481 (WebCore::SVGForeignObjectElement::isSupportedAttribute):
2482 * svg/SVGGElement.cpp:
2483 (WebCore::SVGGElement::isSupportedAttribute):
2484 * svg/SVGGradientElement.cpp:
2485 (WebCore::SVGGradientElement::isSupportedAttribute):
2486 * svg/SVGGraphicsElement.cpp:
2487 (WebCore::SVGGraphicsElement::isSupportedAttribute):
2488 * svg/SVGImageElement.cpp:
2489 (WebCore::SVGImageElement::isSupportedAttribute):
2490 * svg/SVGLength.cpp:
2491 (WebCore::SVGLength::lengthModeForAnimatedLengthAttribute):
2492 * svg/SVGLineElement.cpp:
2493 (WebCore::SVGLineElement::isSupportedAttribute):
2494 * svg/SVGLinearGradientElement.cpp:
2495 (WebCore::SVGLinearGradientElement::isSupportedAttribute):
2496 * svg/SVGMPathElement.cpp:
2497 (WebCore::SVGMPathElement::isSupportedAttribute):
2498 * svg/SVGMarkerElement.cpp:
2499 (WebCore::SVGMarkerElement::isSupportedAttribute):
2500 * svg/SVGMaskElement.cpp:
2501 (WebCore::SVGMaskElement::isSupportedAttribute):
2502 * svg/SVGPathElement.cpp:
2503 (WebCore::SVGPathElement::isSupportedAttribute):
2504 * svg/SVGPatternElement.cpp:
2505 (WebCore::SVGPatternElement::isSupportedAttribute):
2506 * svg/SVGPolyElement.cpp:
2507 (WebCore::SVGPolyElement::isSupportedAttribute):
2508 * svg/SVGRadialGradientElement.cpp:
2509 (WebCore::SVGRadialGradientElement::isSupportedAttribute):
2510 * svg/SVGRectElement.cpp:
2511 (WebCore::SVGRectElement::isSupportedAttribute):
2512 * svg/SVGScriptElement.cpp:
2513 (WebCore::SVGScriptElement::isSupportedAttribute):
2514 * svg/SVGStopElement.cpp:
2515 (WebCore::SVGStopElement::isSupportedAttribute):
2516 * svg/SVGStyleElement.cpp:
2517 (WebCore::SVGStyleElement::isSupportedAttribute):
2518 * svg/SVGSymbolElement.cpp:
2519 (WebCore::SVGSymbolElement::isSupportedAttribute):
2520 * svg/SVGTRefElement.cpp:
2521 (WebCore::SVGTRefElement::isSupportedAttribute):
2523 (WebCore::SVGTests::attributeToPropertyMap):
2524 * svg/SVGTextContentElement.cpp:
2525 (WebCore::SVGTextContentElement::textLengthAnimated):
2526 (WebCore::SVGTextContentElement::isSupportedAttribute):
2527 * svg/SVGTextPathElement.cpp:
2528 (WebCore::SVGTextPathElement::isSupportedAttribute):
2529 * svg/SVGTextPositioningElement.cpp:
2530 (WebCore::SVGTextPositioningElement::isSupportedAttribute):
2531 * svg/SVGUseElement.cpp:
2532 (WebCore::SVGUseElement::isSupportedAttribute):
2533 (WebCore::isDisallowedElement):
2534 * svg/SVGViewElement.cpp:
2535 (WebCore::SVGViewElement::isSupportedAttribute):
2537 2014-05-08 Ion Rosca <rosca@adobe.com>
2539 [CSS Blending] Replacing Unisolated with NotIsolated in variables and methods names
2540 https://bugs.webkit.org/show_bug.cgi?id=132677
2542 Reviewed by Dirk Schulze.
2544 No new tests required.
2546 * rendering/RenderLayer.cpp:
2547 (WebCore::RenderLayer::RenderLayer):
2548 (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants):
2549 (WebCore::RenderLayer::dirtyAncestorChainHasBlendingDescendants):
2550 (WebCore::RenderLayer::updateDescendantDependentFlags):
2551 hasUnisolatedBlendingDescendants -> hasNotIsolatedBlendingDescendants
2552 (WebCore::RenderLayer::addChild):
2553 (WebCore::RenderLayer::removeChild):
2554 (WebCore::RenderLayer::updateStackingContextsAfterStyleChange):
2555 * rendering/RenderLayer.h:
2556 m_hasUnisolatedBlendingDescendants -> m_hasNotIsolatedBlendingDescendants
2557 m_hasUnisolatedBlendingDescendantsStatusDirty -> m_hasNotIsolatedBlendingDescendantsStatusDirty
2558 hasUnisolatedBlendingDescendants() -> hasNotIsolatedBlendingDescendants()
2559 hasUnisolatedBlendingDescendantsStatusDirty() -> hasNotIsolatedBlendingDescendantsStatusDirty()
2560 m_hasUnisolatedCompositedBlendingDescendants -> m_hasNotIsolatedCompositedBlendingDescendants
2561 hasUnisolatedCompositedBlendingDescendants() -> hasNotIsolatedCompositedBlendingDescendants()
2562 setHasUnisolatedCompositedBlendingDescendants() -> setHasNotIsolatedCompositedBlendingDescendants
2563 * rendering/RenderLayerCompositor.cpp:
2564 (WebCore::CompositingState::CompositingState):
2565 m_hasUnisolatedCompositedBlendingDescendants -> m_hasNotIsolatedCompositedBlendingDescendants
2566 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2568 2014-05-08 Xabier Rodriguez Calvar <calvaris@igalia.com>
2570 [GTK] Enable skipped http/tests/media/hls/video-controls-live-stream.html
2571 https://bugs.webkit.org/show_bug.cgi?id=132329
2573 Reviewed by Eric Carlson.
2575 GTK port needed to define what happened with live stream media
2576 controls. Now we disable and dim the timeline and tweak the
2579 Test: http/tests/media/hls/video-controls-live-stream.html.
2581 * Modules/mediacontrols/mediaControlsGtk.js:
2582 (ControllerGtk.prototype.configureControls): Moved logic from
2583 setControlsType and changed to use an early return.
2584 (ControllerGtk.prototype.reconnectControls): Redefined to just
2585 configure the controls.
2586 (ControllerGtk.prototype.handlePlay): If stream is live we don't
2587 activate the current time just in case.
2588 (ControllerGtk.prototype.updateDuration): Calls the superclass and
2589 sets timeline.max to 0.
2590 (ControllerGtk.prototype.setControlsType): Deleted.
2591 (ControllerGtk.prototype.setIsLive): Configures controls and
2592 disables the timeline if stream is live.
2593 * css/mediaControlsGtk.css:
2594 (audio::-webkit-media-controls-timeline[disabled])
2595 (video::-webkit-media-controls-timeline[disabled]): Dimmed the
2596 timeline by setting opacity to 0.3.
2598 2014-05-08 Ion Rosca <rosca@adobe.com>
2600 [CSS Blending] Changing isolation CSS property should not trigger repaint in RenderStyle::changeRequiresLayerRepaint
2601 https://bugs.webkit.org/show_bug.cgi?id=131436
2603 Reviewed by Dirk Schulze.
2605 The isolation:isolate property will create a stacking context. This is done in
2606 StyleResolver::adjustRenderStyle where z-index is forced to 0.
2607 If the element is already a stacking context for any other reason,
2608 changing the isolation flag should not have any effect.
2610 Tests: css3/blending/repaint/blend-mode-turn-off-isolation-no-effect.html
2611 css3/blending/repaint/blend-mode-turn-off-isolation.html
2613 * rendering/style/RenderStyle.cpp:
2614 (WebCore::RenderStyle::changeRequiresLayerRepaint):
2615 do not request repaint if isolation has changed.
2617 2014-05-08 Manuel Rego Casasnovas <rego@igalia.com>
2619 REGRESSION (r167652): SelectionState is not set properly for non leaf objects in pages with regions
2620 https://bugs.webkit.org/show_bug.cgi?id=132493
2622 Reviewed by David Hyatt.
2624 Non selection leaf elements were not included in the selection ranges,
2625 that was causing that their selection state was not set properly and
2626 when one of the element was removed as it was marked as SelectionNone
2627 current selection was not removed.
2629 Due to this fix, the regression detected in bug #131982 arose again.
2630 Reverted changes from r167675 and reopened bug as previous fix was not
2631 right. Updated TestExpectations accordingly.
2633 Test: fast/regions/selection/crash-select-all.html
2635 * rendering/RenderView.cpp:
2636 (WebCore::RenderView::splitSelectionBetweenSubtrees): We need to include
2637 non selection leafs in the range, otherwise we won't be marking
2638 selection state of some elements properly.
2640 2014-05-08 Zoltan Horvath <zoltan@webkit.org>
2642 [CSS Shapes] Can't select content within the area of the floating box when clip-path is applied
2643 https://bugs.webkit.org/show_bug.cgi?id=131375
2645 Reviewed by Dirk Schulze.
2647 According to http://www.w3.org/TR/css-masking-1/, the clipped part of the element should
2648 not have pointer event dispatching. So add this logic to RenderBlock::nodeAtPoint. This
2649 fixes the bug as it disallows selection on any clipped parts.
2651 I implemented the proper selection for the various CSS box types and added testing
2652 for them. Also, I made and run performance tests for exposing mouse events over the
2653 clipped/non-clipped area, which results can be seen in bugzilla.
2655 Based on the patch made by Rob Buis <rob.buis@samsung.com>
2656 Blink revision: http://src.chromium.org/viewvc/blink?view=revision&revision=172619
2658 Tests: fast/masking/clip-path-selection.html
2659 fast/shapes/shape-outside-floats/shape-outside-clip-path-selection.html
2661 * rendering/RenderBlock.cpp:
2662 (WebCore::RenderBlock::nodeAtPoint):
2664 2014-05-07 Ion Rosca <rosca@adobe.com>
2666 [CSS Blending] Blending doesn't work if the parent stacking context is not a self painting layer
2667 https://bugs.webkit.org/show_bug.cgi?id=130891
2669 Reviewed by Dean Jackson.
2671 The stacking context layers having unisolated blending descendants should be able
2672 to create transparency layers or to become composited in order to restrict blending
2673 content to accessing the information outside the current stacking context.
2674 Some layers are not self painting layers and these layers cannot crate transparency
2675 layers and cannot be composited, thus they are not able to isolate blending descendants
2678 The solution in this patch is to make a layer isSelfPaintingLayer when
2679 it needs to isolate blending descendants (hasUnisolatedBlendingDescendants).
2681 Tests: css3/blending/blend-mode-isolation-accelerated-overflow-hidden.html
2682 css3/blending/blend-mode-isolation-overflow-hidden.html
2683 css3/blending/blend-mode-isolation-turn-off-self-painting-layer.html
2684 css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html
2685 css3/blending/blend-mode-isolation-turn-off-self-painting-layer2.html
2686 css3/blending/blend-mode-isolation-turn-on-self-painting-layer.html
2688 * rendering/RenderLayer.cpp:
2689 (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants):
2690 When hasUnisolatedBlendingDescendants is set we make sure that isSelfPaintingLayer flag is set too.
2691 (WebCore::RenderLayer::updateDescendantDependentFlags):
2692 The flags might be read or changed while walking the descendants, so we don't want to reset
2693 them before traversing the tree.
2694 (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
2695 Adding isolatesBlending() condition for a layer to be self painting.
2696 * rendering/RenderLayer.h:
2697 Removing ASSERT from hasUnisolatedBlendingDescendants(). It crashes in minibrowser
2698 and in layout tests when painting contents. Similar bugs on other flags: #71044, #71277.
2699 * rendering/RenderLayerModelObject.cpp:
2700 (WebCore::RenderLayerModelObject::styleDidChange):
2701 Telling ancestors that blend mode property has been removed from CSS when the layer for
2702 this element is going to be removed; styleChanged will not be called anymore.
2704 2014-05-06 Myles C. Maxfield <mmaxfield@apple.com>
2706 Dragging text from one paragraph to another does not render as expected
2707 https://bugs.webkit.org/show_bug.cgi?id=132633
2709 Reviewed by Darin Adler and Ryosuke Niwa.
2711 When we are dragging and dropping into a content editable field, we detect
2712 if we are trying to put a <p> into an existing <p>, and if so, split the
2713 outer <p> and insert the new <p> as its sibling. However, the outer <p>
2714 might not be editable, so we don't want to do any splitting and inserting
2717 Test: editing/pasteboard/drag-drop-paragraph-crasher.html
2719 * editing/ReplaceSelectionCommand.cpp:
2720 (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
2722 2014-05-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2724 [CoordinatedGraphics][WK2] Scale factor and scroll position is not being restored properly in a back/forward load
2725 https://bugs.webkit.org/show_bug.cgi?id=126022
2727 Reviewed by Benjamin Poulain.
2729 Original author : Thiago de Barros Lacerda, and finished by Gyuyoung Kim.
2731 When user is navigating back/forward to a page that has been scrolled and/or scaled, that page must be shown
2732 with its last scroll position and scale factor. However, when fixed layout was enabled with CoordinatedGraphics
2733 and TILED_BACKING_STORE, Page::setPageScaleFactor() doesn't send previous scroll position since r165652 and r165913.
2735 This patch allows the Page::setPageScaleFactor() send stored position to WK2 implementation by calling delegatedScrollRequested()
2736 directly when delegatesScrolling() is on.
2739 (WebCore::Page::setPageScaleFactor): TILED_BACKING_STORE and delegateScrolling are enabled, we pass new scroll position to WK2 though
2740 delegateScrolling is disabled.
2741 * platform/ScrollView.cpp: delegatedScrollRequested() call is moved from ScrollView::setScrollPosition() to Page::setPageScaleFactor().
2742 (WebCore::ScrollView::setScrollPosition):
2744 2014-05-07 Dean Jackson <dino@apple.com>
2746 Using a fill pattern much larger than actual canvas reliably segfaults browser
2747 https://bugs.webkit.org/show_bug.cgi?id=132635
2749 Reviewed by Simon Fraser.
2751 Make sure that createPattern checks that the canvas it is about to use
2752 as a source is valid.
2754 Test: fast/canvas/pattern-too-large-to-create.html
2756 * html/canvas/CanvasRenderingContext2D.cpp:
2757 (WebCore::CanvasRenderingContext2D::createPattern): Check that the source canvas has
2760 2014-05-07 Pratik Solanki <psolanki@apple.com>
2762 Use system defaults for hardware jpeg decoding
2763 https://bugs.webkit.org/show_bug.cgi?id=132661
2764 <rdar://problem/11348201>
2766 Reviewed by Tim Horton.
2768 Remove code that explicitly disabled hardware image decoding. Let the system decide what to do.
2771 * platform/graphics/ImageSource.h:
2772 (WebCore::ImageSource::acceleratedImageDecodingEnabled): Deleted.
2773 (WebCore::ImageSource::setAcceleratedImageDecodingEnabled): Deleted.
2774 * platform/graphics/cg/ImageSourceCG.cpp:
2775 (WebCore::ImageSource::imageSourceOptions):
2777 2014-05-07 Radu Stavila <stavila@adobe.com>
2779 Use after free in WebCore::RenderObject::nextSibling / WebCore::RenderBoxModelObject::moveChildrenTo
2780 https://bugs.webkit.org/show_bug.cgi?id=132625
2782 Reviewed by David Hyatt.
2784 Fixed problem with dynamically inserting first letter elements.
2786 Test: fast/multicol/newmulticol/first-letter-create.html
2788 * rendering/RenderBlock.cpp:
2789 (WebCore::RenderBlock::getFirstLetter):
2790 (WebCore::RenderBlock::updateFirstLetter):
2791 * rendering/RenderBlock.h:
2792 * rendering/RenderBoxModelObject.cpp:
2793 (WebCore::RenderBoxModelObject::moveChildrenTo):
2795 2014-05-07 Enrica Casucci <enrica@apple.com>
2797 WK2: Programatic scroll requests during scroll or zoom animation to reveal focused element are ignored.
2798 https://bugs.webkit.org/show_bug.cgi?id=132657
2799 <rdar://problem/16468462>
2801 Reviewed by Benjamin Poulain.
2803 With the scrolling model we use on iOS, a programatic scroll
2804 request can be received while we are still animating to reveal
2805 the focused input element. The WebProcess is unaware that the
2806 scroll position is being changed in the UIProcess, and does not
2807 honor the scroll request from JavaScript.
2808 This is patch changes the behavior for clients using scroll delegates
2809 to always send the scroll request to the UIProcess without checking
2810 the current scroll position.
2813 * platform/ScrollView.cpp:
2814 (WebCore::ScrollView::setScrollPosition):
2815 * platform/ScrollView.h:
2816 (WebCore::ScrollView::inProgrammaticScroll):
2818 2014-05-07 Brent Fulgham <bfulgham@apple.com>
2820 [Mac, iOS] REGRESSION: WK2 YouTube support
2821 https://bugs.webkit.org/show_bug.cgi?id=132568
2822 <rdar://problem/11464344>
2824 Reviewed by Darin Adler.
2826 Move the custom YouTube loader code out of the WebFrameLoaderClient into a
2827 PluginReplacement-based class.
2829 * Modules/plugins/PluginReplacement.h:
2830 (WebCore::PluginReplacement::supportsURL): New predicate so we can restrict
2831 use of a plugin to a particular category of URLs.
2832 * Modules/plugins/QuickTimePluginReplacement.mm:
2833 (WebCore::QuickTimePluginReplacement): Updated for new registrar signature.
2834 * Modules/plugins/YouTubePluginReplacement.h: Added.
2835 (WebCore::YouTubePluginReplacement::parentElement):
2836 * Modules/plugins/YouTubePluginReplacement.cpp: Added.
2837 (WebCore::YouTubePluginReplacement::registerPluginReplacement):
2838 (WebCore::YouTubePluginReplacement::create):
2839 (WebCore::YouTubePluginReplacement::supportsMimeType):
2840 (WebCore::YouTubePluginReplacement::supportsFileExtension):
2842 (WebCore::YouTubePluginReplacement::YouTubePluginReplacement):
2843 (WebCore::YouTubePluginReplacement::createElementRenderer):
2844 (WebCore::objectForKey):
2845 (WebCore::YouTubePluginReplacement::installReplacement):
2846 (WebCore::createYouTubeURL):
2847 (WebCore::processAndCreateYouTubeURL):
2848 (WebCore::YouTubePluginReplacement::youTubeURL):
2849 * WebCore.exp.in: Add new export from WebCore.
2850 * WebCore.xcodeproj/project.pbxproj:
2851 * html/HTMLPlugInElement.cpp:
2852 (WebCore::pluginReplacementForType): Update to also check that the URL is supported
2854 (WebCore::registeredPluginReplacements): Add new YouTubePluginReplacement to registry.
2855 * html/HTMLPlugInImageElement.cpp:
2856 (WebCore::HTMLPlugInImageElement::createElementRenderer): Remove custom YouTube code
2857 now that this logic is handled in the plugin replacement class.
2858 (WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree): Deleted.
2859 * html/HTMLPlugInImageElement.h:
2860 * html/shadow/YouTubeEmbedShadowElement.cpp:
2861 (WebCore::YouTubeEmbedShadowElement::YouTubeEmbedShadowElement):
2862 (WebCore::YouTubeEmbedShadowElement::shadowPseudoId): Use correct pseudoID for the
2863 plugin replacement architecture.
2864 * html/shadow/YouTubeEmbedShadowElement.h:
2865 * platform/mac/WebCoreNSURLExtras.h:
2866 * platform/mac/WebCoreNSURLExtras.mm:
2867 (WebCore::unescapedQueryValue): Moved from WebKit/Misc/WebNSURLExtras.
2868 (WebCore::queryKeysAndValues): Ditto.
2870 2014-05-07 Simon Fraser <simon.fraser@apple.com>
2872 [iOS] Acclerated overflow-scrolling broken in WK1
2873 https://bugs.webkit.org/show_bug.cgi?id=132665
2874 <rdar://problem/16842909>
2876 Reviewed by Tim Horton.
2878 r168301 added a CALayer delegate to disable implicit animations,
2879 but for some layers we wrap them in UIViews (which are themselves
2880 layer delegates), so bad things happened.
2882 Fix by falling back to setting the null actions dictionary for
2883 layers with custom scrolling behavior.
2885 * platform/graphics/GraphicsLayer.h:
2886 * platform/graphics/ca/mac/PlatformCALayerMac.h:
2887 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2888 (PlatformCALayerMac::updateCustomBehavior):
2889 * rendering/RenderLayerBacking.cpp:
2890 (WebCore::RenderLayerBacking::updateScrollingLayers):
2892 2014-05-07 Jeremy Jones <jeremyj@apple.com>
2894 HTMLMediaElement should exitFullscreen when view is removed from the window.
2895 https://bugs.webkit.org/show_bug.cgi?id=132506
2897 Reviewed by Tim Horton.
2899 * platform/ios/WebVideoFullscreenControllerAVKit.h:
2900 Add -requestExitFullscreen.
2902 * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2903 (-[WebVideoFullscreenController requestExitFullscreen]):
2904 Forward request onto WebVideoFullscreenModelMediaElement.
2906 * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2907 (WebVideoFullscreenModelMediaElement::requestExitFullscreen):
2908 Add some protection here since this may be called when not in fullscreen.
2910 2014-05-07 Dean Jackson <dino@apple.com>
2912 Clean up the difference between painting focus rings and adding PDF annotations
2913 https://bugs.webkit.org/show_bug.cgi?id=132638
2915 Follow-up comments from Darin Adler.
2917 * rendering/RenderInline.cpp:
2918 (WebCore::RenderInline::paintOutline): Move "else if" to a separate "if" for clarity.
2919 * rendering/RenderObject.cpp:
2920 (WebCore::RenderObject::paintFocusRing): Don't guard against outlineIsAuto(). ASSERT instead.
2921 (WebCore::RenderObject::addPDFURLRect): Give "rect" variable a better name.
2922 (WebCore::RenderObject::paintOutline): Move "else if" to a separate "if" for clarity.
2924 2014-05-07 Alexey Proskuryakov <ap@apple.com>
2926 Make blob size computation lazy
2927 https://bugs.webkit.org/show_bug.cgi?id=132653
2929 Reviewed by Anders Carlsson.
2932 (WebCore::Blob::Blob):
2933 (WebCore::Blob::size):
2935 (WebCore::Blob::size): Deleted.
2937 (WebCore::File::size): Deleted.
2939 * fileapi/ThreadableBlobRegistry.cpp:
2940 (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
2941 (WebCore::ThreadableBlobRegistry::registerBlobURL):
2942 (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
2943 (WebCore::ThreadableBlobRegistry::blobSize):
2944 (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
2945 (WebCore::unregisterBlobURLTask): Deleted.
2946 * fileapi/ThreadableBlobRegistry.h:
2947 * platform/network/BlobData.cpp:
2948 (WebCore::BlobData::appendData):
2949 * platform/network/BlobRegistry.h:
2950 * platform/network/BlobRegistryImpl.cpp:
2951 (WebCore::BlobRegistryImpl::registerBlobURL):
2952 (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
2953 * platform/network/BlobRegistryImpl.h:
2955 2014-05-06 Simon Fraser <simon.fraser@apple.com>
2957 Add scrolling tree logging to RemoteLayerTree output
2958 https://bugs.webkit.org/show_bug.cgi?id=132640
2960 Reviewed by Beth Dakin.
2962 Support scrolling tree logging in the RemoteLayerTree log channel
2965 ScrollingStateTree::commit() unconditionally set treeStateClone->m_hasChangedProperties
2966 to true, but we should set it based on original scrolling state tree's
2967 m_hasChangedProperties.
2969 We have to encode all of the scrolling state nodes anyway (they only encode
2970 changed properties), but we can use this for future optimizations, and to
2971 avoid spurious logging.
2973 * WebCore.exp.in: Export a couple of things we need.
2974 * page/scrolling/ScrollingStateTree.cpp:
2975 (WebCore::ScrollingStateTree::commit):
2977 2014-05-07 Chris Fleizach <cfleizach@apple.com>
2979 AX: aria-expanded changes are not communicated to clients
2980 https://bugs.webkit.org/show_bug.cgi?id=132642
2982 Reviewed by Mario Sanchez Prada.
2984 When aria-expanded changes on non list/tree items, send out a generic
2985 AXExpandedChange notification.
2987 Test: platform/mac/accessibility/expanded-notification.html
2989 * accessibility/AXObjectCache.h:
2990 * accessibility/AccessibilityRenderObject.cpp:
2991 (WebCore::AccessibilityRenderObject::handleAriaExpandedChanged):
2992 * accessibility/mac/AXObjectCacheMac.mm:
2993 (WebCore::AXObjectCache::postPlatformNotification):
2995 2014-05-07 Alexey Proskuryakov <ap@apple.com>
2999 * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedImageMIMETypes):
3000 Removed unused globals.
3002 2014-05-07 Alexey Proskuryakov <ap@apple.com>
3004 Eliminate "well known MIME type" support
3005 https://bugs.webkit.org/show_bug.cgi?id=132654
3007 Reviewed by Anders Carlsson.
3009 Vestiges of FileSystem API.
3011 * dom/DataTransfer.cpp:
3012 (WebCore::DataTransfer::files):
3013 (WebCore::DataTransfer::hasFileOfType):
3015 (WebCore::File::File):
3016 (WebCore::File::contentTypeFromFilePathOrName):
3018 * html/FileInputType.cpp:
3019 (WebCore::FileInputType::createFileList):
3020 * platform/MIMETypeRegistry.cpp:
3021 (WebCore::initializeSupportedImageMIMETypes):
3022 (WebCore::findMimeType): Deleted.
3023 (WebCore::MIMETypeRegistry::getWellKnownMIMETypeForExtension): Deleted.
3024 * platform/MIMETypeRegistry.h:
3026 2014-05-07 Christophe Dumez <ch.dumez@samsung.com>
3028 [HTML] Default argument to HTMLTableElement.insertRow() should be -1
3029 https://bugs.webkit.org/show_bug.cgi?id=132651
3031 Reviewed by Alexey Proskuryakov.
3033 HTMLTableElement.insertRow()'s argument default value should be -1, not 0,
3034 as per the specification:
3035 http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#htmltableelement
3037 The new behavior matches the one of Firefox 29 and IE11, and soon Blink:
3038 https://codereview.chromium.org/270213007/
3040 Test: fast/dom/HTMLTableElement/insertRow-default-argument.html
3042 * html/HTMLTableElement.h:
3043 * html/HTMLTableElement.idl:
3045 2014-05-07 Chris Fleizach <cfleizach@apple.com>
3047 AX: AXSelectTextWithCriteria should support capitalize/lowercase/uppercase
3048 https://bugs.webkit.org/show_bug.cgi?id=132622
3050 Reviewed by Mario Sanchez Prada.
3052 The select text with criteria mechanism used through accessibility needs to support
3053 a few more parameters to be complete (including capitalize, lowercase and uppercase).
3055 Updated: accessibility/select-text.html
3057 * accessibility/AccessibilityObject.cpp:
3058 (WebCore::AccessibilityObject::selectText):
3059 * accessibility/AccessibilityObject.h:
3060 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3061 (accessibilitySelectTextCriteriaForCriteriaParameterizedAttribute):
3062 * rendering/RenderText.cpp:
3063 (WebCore::makeCapitalized):
3064 * rendering/RenderText.h:
3066 2014-05-07 peavo@outlook.com <peavo@outlook.com>
3068 DocumentLoader::dataReceived assertion failed
3069 https://bugs.webkit.org/show_bug.cgi?id=132017
3071 Reviewed by Brent Fulgham.
3073 We need to call didReceiveResponse client method before the didReceiveData client method, otherwise we get a lot of asserts.
3074 This patch also fixes frequent crashes in downloadTimerCallback method on page loading.
3076 * platform/network/curl/ResourceHandleManager.cpp:
3077 (WebCore::calculateWebTimingInformations): Initialize local variables.
3078 (WebCore::headerCallback): Call didReceiveResponse client method here instead of in downloadTimerCallback.
3079 (WebCore::ResourceHandleManager::downloadTimerCallback): Remove call to didReceiveResponse method.
3080 (WebCore::ResourceHandleManager::dispatchSynchronousJob): Removed empty line.
3082 2014-05-06 Antti Koivisto <antti@apple.com>
3084 REGRESSION: Animated GIF inside compositing layer never resumes animation when scrolled back into view
3085 https://bugs.webkit.org/show_bug.cgi?id=132608
3087 Reviewed by Simon Fraser.
3089 Test: fast/repaint/animation-after-layer-scroll.html
3091 * rendering/RenderLayer.cpp:
3092 (WebCore::RenderLayer::scrollTo):
3094 Check if any animations need to be restarted after layer scroll.
3096 2014-05-07 Hyowon Kim <hw1008.kim@samsung.com>
3098 GraphicsLayer::client() should return a reference.
3099 https://bugs.webkit.org/show_bug.cgi?id=126372
3101 Reviewed by Simon Fraser.
3103 GraphicsLayers always have a GraphicsLayerClient attached,
3104 so make client() a reference and remove some unnecessary branches.
3105 The author of the changes in the mac port is Andreas Kling <akling@apple.com>.
3108 * platform/graphics/GraphicsLayer.cpp:
3109 (WebCore::GraphicsLayer::GraphicsLayer):
3110 (WebCore::GraphicsLayer::willBeDestroyed):
3111 (WebCore::GraphicsLayer::paintGraphicsLayerContents):
3112 (WebCore::GraphicsLayer::addRepaintRect):
3113 (WebCore::dumpChildren):
3114 (WebCore::GraphicsLayer::dumpProperties):
3115 * platform/graphics/GraphicsLayer.h:
3116 (WebCore::GraphicsLayer::client):
3117 (WebCore::GraphicsLayer::pageScaleFactor):
3118 (WebCore::GraphicsLayer::deviceScaleFactor):
3119 * platform/graphics/GraphicsLayerFactory.h:
3120 * platform/graphics/ca/GraphicsLayerCA.cpp:
3121 (WebCore::GraphicsLayer::create):
3122 (WebCore::GraphicsLayerCA::GraphicsLayerCA):
3123 (WebCore::GraphicsLayerCA::initialize):
3124 (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
3125 (WebCore::GraphicsLayerCA::computePositionRelativeToBase):
3126 (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
3127 (WebCore::GraphicsLayerCA::computeVisibleRect):
3128 (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3129 (WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
3130 (WebCore::GraphicsLayerCA::platformCALayerShouldAggressivelyRetainTiles):
3131 (WebCore::GraphicsLayerCA::platformCALayerShouldTemporarilyRetainTileCohorts):
3132 (WebCore::GraphicsLayerCA::updateContentsOpaque):
3133 (WebCore::GraphicsLayerCA::updateContentsScale):
3134 (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
3135 (WebCore::GraphicsLayerCA::noteLayerPropertyChanged):
3136 * platform/graphics/ca/GraphicsLayerCA.h:
3137 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3138 (WebCore::GraphicsLayer::create):
3139 (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
3140 (WebCore::GraphicsLayerTextureMapper::notifyChange):
3141 (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
3142 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
3143 * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
3144 (WebCore::CompositingCoordinator::createRootLayer):
3145 (WebCore::CompositingCoordinator::createGraphicsLayer):
3146 * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
3147 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3148 (WebCore::CoordinatedGraphicsLayer::notifyFlushRequired):
3149 (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
3150 (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
3151 (WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
3152 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
3153 * rendering/RenderLayerBacking.cpp:
3154 (WebCore::RenderLayerBacking::createGraphicsLayer):
3155 * rendering/RenderLayerCompositor.cpp:
3156 (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
3157 (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
3158 (WebCore::RenderLayerCompositor::updateLayerForHeader):
3159 (WebCore::RenderLayerCompositor::updateLayerForFooter):
3160 (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
3161 (WebCore::RenderLayerCompositor::ensureRootLayer):
3163 2014-05-07 Xabier Rodriguez Calvar <calvaris@igalia.com>
3165 [GStreamer] Corrected typo
3166 https://bugs.webkit.org/show_bug.cgi?id=132609
3168 Reviewed by Martin Robinson.
3170 Corrected m_canFallBackToLastFinishedSeekPositon typo and
3171 initialized in the constructor to prevent problems in the future.
3175 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3176 (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3177 Initialized m_canFallBackToLastFinishedSeekPosition as false.
3178 (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
3179 (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
3180 (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
3181 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3182 m_canFallBackToLastFinishedSeekPositon ->
3183 m_canFallBackToLastFinishedSeekPosition
3185 2014-05-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3187 Convert PassOwnPtr to unique_ptr in CrossThreadTask.h
3188 https://bugs.webkit.org/show_bug.cgi?id=132605
3190 Reviewed by Dirk Schulze.
3192 * dom/CrossThreadTask.h: Converted.
3194 2014-05-07 Carlos Garcia Campos <cgarcia@igalia.com>
3196 [SOUP] TLSErrors do not cause page load to fail when not ignored
3197 https://bugs.webkit.org/show_bug.cgi?id=121548
3199 Reviewed by Sergio Villar Senin.
3201 This only happens in case of redirection, when the initial URL is
3202 an HTTPS site with an invalid certificate, that redirects to
3203 another location. We are starting the redirection without checking
3206 * platform/network/soup/ResourceHandleSoup.cpp:
3207 (WebCore::sendRequestCallback): Check TLS errors before starting a
3208 possible redirection.
3210 2014-05-07 Manuel Rego Casasnovas <rego@igalia.com>
3212 [CSS Grid Layout] Remove runtime feature
3213 https://bugs.webkit.org/show_bug.cgi?id=132382
3215 Reviewed by Benjamin Poulain.
3217 Remove cssGridLayoutEnabled setting. Update methods using it accordingly.
3220 * css/CSSParser.cpp:
3221 (WebCore::CSSParserContext::CSSParserContext):
3222 (WebCore::operator==):
3223 (WebCore::isValidKeywordPropertyAndValue):
3224 (WebCore::CSSParser::parseValue):
3225 (WebCore::CSSParser::parseGridTemplateShorthand):
3226 (WebCore::CSSParser::parseGridAreaShorthand):
3227 (WebCore::CSSParser::cssGridLayoutEnabled): Deleted.
3229 * css/CSSParserMode.h:
3231 (WebCore::Document::cssGridLayoutEnabled): Deleted.
3235 2014-05-07 Praveen R Jadhav <praveen.j@samsung.com>
3237 Fix build errors for BlobDataItem after r168391.
3238 https://bugs.webkit.org/show_bug.cgi?id=132643
3240 Reviewed by Carlos Garcia Campos.
3242 Patch updates BlobDataItem params usage in ResourceHandleSoup.cpp
3243 to be inline with r168391.
3245 * platform/network/soup/ResourceHandleSoup.cpp:
3246 (WebCore::blobIsOutOfDate): BlobDataItem class is updated in r168391.
3247 Corresponding parameter changes are done to resolve build error.
3248 (WebCore::addEncodedBlobItemToSoupMessageBody): BlobDataItem class is updated
3249 in r168391. Corresponding parameter changes are done to resolve build error.
3251 2014-05-06 Dean Jackson <dino@apple.com>
3253 Clean up the difference between painting focus rings and adding PDF annotations
3254 https://bugs.webkit.org/show_bug.cgi?id=132638
3256 Reviewed by Simon Fraser.
3258 The code to add a PDF annotation when printing was called from
3259 drawFocusRing, which is quite confusing. With just little movement
3260 of code, we can detect an annotation and call addPDFURLRect in the
3261 paint phase, and drawFocusRing becomes something that only
3264 * rendering/RenderInline.cpp:
3265 (WebCore::RenderInline::paintOutline): Split calls to drawFocusRing
3267 * rendering/RenderObject.cpp:
3268 (WebCore::RenderObject::paintFocusRing): Get rid of call to PDF.
3269 (WebCore::RenderObject::addPDFURLRect): Change the signature so it
3270 can be called externally, and calculates the rectangle itself.
3271 (WebCore::RenderObject::paintOutline): Split the calls.
3272 * rendering/RenderObject.h:
3274 2014-05-06 Rik Cabanier <cabanier@adobe.com>
3276 Calling createPattern with a broken image must throw an invalidstate error
3277 https://bugs.webkit.org/show_bug.cgi?id=132407
3279 Reviewed by Darin Adler.
3281 Updated createPattern so it throws an invalidState exception
3282 if you pass it an image that is in the broken state.
3285 * canvas/philip/tests/2d.pattern.image.broken.html:
3286 * canvas/philip/tests/2d.pattern.image.incomplete.empty.html:
3287 * fast/canvas/canvas-empty-image-pattern.html:
3289 * html/canvas/CanvasRenderingContext2D.cpp:
3290 (WebCore::CanvasRenderingContext2D::createPattern):
3292 2014-05-06 Jer Noble <jer.noble@apple.com>
3294 [iOS][Mac] Display sleeps while playing <video> content.
3295 https://bugs.webkit.org/show_bug.cgi?id=132624
3297 Reviewed by Darin Adler.
3299 On iOS and Mac, create a DisplaySleepDisablerCocoa rather than an (no-op) DisplaySleepDisabler.
3301 * platform/cocoa/DisplaySleepDisablerCocoa.cpp:
3302 (WebCore::DisplaySleepDisabler::create):
3303 * platform/cocoa/DisplaySleepDisablerCocoa.h:
3305 2014-05-06 Dean Jackson <dino@apple.com>
3307 [Mac] Allow focus rings to redraw themselves if necessary
3308 https://bugs.webkit.org/show_bug.cgi?id=132593
3312 * platform/graphics/mac/GraphicsContextMac.mm:
3313 (WebCore::GraphicsContext::drawFocusRing): We no longer use the color parameter.
3315 2014-05-06 Dean Jackson <dino@apple.com>
3317 [Mac] Allow focus rings to redraw themselves if necessary
3318 https://bugs.webkit.org/show_bug.cgi?id=132593
3320 Reviewed by Simon Fraser.
3322 Mac allows focus rings to change rendering over time. Expose this
3323 functionality to WebKit by having the rendering code detect that
3324 a focused element has asked to repaint itself, and also have
3325 the FocusController object remember how long it has been since
3326 an element was focused.
3328 This patch removes WebCoreNSCellExtras, since a better version is
3329 available in WebKitSystemInterface, and it was going to be cumbersome
3330 to port the code from there into WebKit.
3332 * WebCore.exp.in: Export _wkDrawFocusRingAtTime and _wkDrawCellFocusRingWithFrameAtTime.
3333 * WebCore.xcodeproj/project.pbxproj: Remove WebCoreNSCellExtras.
3334 * page/FocusController.cpp:
3335 (WebCore::FocusController::FocusController): Initialize the repaint timer.
3336 (WebCore::FocusController::~FocusController): Stop the repaint timer on deletion.
3337 (WebCore::FocusController::setFocusedElement): Keep track of the current time when focused.
3338 (WebCore::FocusController::focusedElementNeedsRepaint): Start the repaint timer.
3339 (WebCore::FocusController::focusRepaintTimerFired): Ask the focused element to repaint itself.
3340 (WebCore::FocusController::timeSinceFocusWasSet):
3341 * page/FocusController.h: Expose timeSinceFocusWasSet() and focusedElementNeedsRepaint(), as
3342 well as add the timer for repainting.
3344 * platform/ControlStates.h: Add timeSinceControlWasFocused member variable, allowing the platform
3345 code such as Theme to obtain the value from FocusController.
3346 (WebCore::ControlStates::ControlStates):
3347 (WebCore::ControlStates::timeSinceControlWasFocused):
3348 (WebCore::ControlStates::setTimeSinceControlWasFocused):
3350 * platform/graphics/GraphicsContext.h:
3351 (WebCore::GraphicsContext::drawFocusRing): New Mac-only method that uses timeOffset.
3353 * platform/graphics/mac/GraphicsContextMac.mm:
3354 (WebCore::drawFocusRingToContext): No need to pass in color and radius - these are now
3355 ignored in WKDrawFocusRing. However, I didn't want to change the signature of the
3357 (WebCore::drawFocusRingToContextAtTime): Call into the new method WKDrawFocusRingAtTime.
3358 (WebCore::GraphicsContext::drawFocusRing): Color and radius no longer used.
3360 * platform/mac/ThemeMac.mm:
3361 (WebCore::checkboxMargins): Update the margins since our focus ring can be a lot bigger.
3362 (WebCore::radioMargins): Ditto.
3363 (WebCore::paintToggleButton): Drawing a focus ring might trigger a repaint too.
3364 (WebCore::buttonMargins): Increase the margins.
3365 (WebCore::paintButton): If our focus ring wants to be drawn again, set the ControlStates flag.
3367 * platform/mac/WebCoreNSCellExtras.h: Removed.
3368 * platform/mac/WebCoreNSCellExtras.m: Removed.
3370 * platform/mac/WebCoreSystemInterface.h: Declare the new methods.
3371 * platform/mac/WebCoreSystemInterface.mm:
3373 * rendering/RenderElement.cpp:
3374 (WebCore::RenderElement::initializeStyle): Expand the overflow rects by the maximum
3375 focus ring width. This might be different from the current outline size.
3376 (WebCore::RenderElement::setStyle): Ditto.
3378 * rendering/RenderObject.cpp:
3379 (WebCore::RenderObject::paintFocusRing): If we're on Mac, use the new drawFocusRing method,
3380 which sets a parameter to true if the focused element needs a repaint.
3382 * rendering/RenderTheme.cpp:
3383 (WebCore::RenderTheme::updateControlStatesForRenderer): Copy the value from FocusController
3384 so that the platform Theme code can use it.
3386 * rendering/RenderTheme.h:
3387 (WebCore::RenderTheme::platformFocusRingMaxWidth): Add a way to get the maximum width
3388 of a focus ring for the platform. This is used to extend the overflow rects.
3389 * rendering/RenderThemeMac.h: Override the focus ring width.
3390 * rendering/RenderThemeMac.mm: On newer versions of OS X, we have a larger focus ring.
3391 (WebCore::RenderThemeMac::platformFocusRingMaxWidth):
3392 (WebCore::RenderThemeMac::paintMenuList): If a menu is focused, and needs a repaint, mark
3395 2014-05-06 Jer Noble <jer.noble@apple.com>
3397 [iOS] Animate AVPlayerLayer into and out of full screen
3398 https://bugs.webkit.org/show_bug.cgi?id=132603
3400 Reviewed by Simon Fraser.
3402 Rather than synchronize animations across the WebProcess / UIProcess boundary, animate
3403 the AVPlayerLayer into place by first resizing the full screen layer to occupy the
3404 entire screen in the WebProcess, and use a sublayerTransform animation in the UIProcess
3405 to scale the AVPlayer from its initial screen location, as well as back to its final screen
3408 * platform/graphics/GeometryUtilities.cpp:
3409 (WebCore::largestRectWithAspectRatioInsideRect): Added utility method.
3410 * platform/graphics/GeometryUtilities.h:
3411 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3412 (-[WebAVVideoLayer init]): Added, initialize video gravity and enable child layer masking.
3413 (-[WebAVVideoLayer setBounds:]): Create a transform to scale the video area.
3414 (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Block implicit animations during setup.
3415 (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Reset the gravity to ResizeAspect
3418 2014-05-06 Alexey Proskuryakov <ap@apple.com>
3420 Make BlobDataItem use a refcounted object for files
3421 https://bugs.webkit.org/show_bug.cgi?id=132628
3423 Reviewed by Anders Carlsson.
3426 * WebCore.vcxproj/WebCore.vcxproj:
3427 * WebCore.vcxproj/WebCore.vcxproj.filters:
3428 * WebCore.xcodeproj/project.pbxproj:
3429 Added BlobDataFileReference.{h|cpp}
3431 * WebCore.exp.in: Removed unused exports.
3433 * platform/network/BlobData.h:
3434 (WebCore::BlobDataItem::offset):