1 2014-08-14 Andreas Kling <akling@apple.com>
3 Remove two unused Range functions.
4 <https://webkit.org/b/135944>
6 Reviewed by Geoffrey Garen.
9 (WebCore::Range::maxStartOffset): Deleted.
10 (WebCore::Range::maxEndOffset): Deleted.
13 2014-08-14 Daniel Bates <dabates@apple.com>
15 Preserve editing style for -webkit-tap-highlight-color on all ports that enable ENABLE_TOUCH_EVENTS
16 https://bugs.webkit.org/show_bug.cgi?id=135963
18 Reviewed by Andy Estes.
20 Currently we only preserve the CSS property -webkit-tap-highlight-color during editing operations
21 for iOS. Instead we should preserve it for all ports that enable ENABLE_TOUCH_EVENTS as this CSS
22 property isn't specific to iOS.
24 Also added FIXME comment with regards to the CSS property -webkit-composition-fill-color.
26 * editing/EditingStyle.cpp:
28 2014-08-14 Benjamin Poulain <benjamin@webkit.org>
30 CSS JIT: compile the :empty pseudo class
31 https://bugs.webkit.org/show_bug.cgi?id=135958
33 Reviewed by Andreas Kling.
35 Compile :empty, nothing fancy.
37 Tests: fast/selectors/empty-basics.html
38 fast/selectors/empty-long-adjacent-backtracking.html
39 fast/selectors/empty-adjacent-style-update.html
40 fast/selectors/empty-style-update.html
42 * cssjit/SelectorCompiler.cpp:
43 (WebCore::SelectorCompiler::addPseudoClassType):
44 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
45 (WebCore::SelectorCompiler::jumpIfElementIsNotEmpty):
46 (WebCore::SelectorCompiler::setElementStyleIsAffectedByEmpty):
47 (WebCore::SelectorCompiler::setElementStyleFromContextIsAffectedByEmptyAndUpdateRenderStyleIfNecessary):
48 (WebCore::SelectorCompiler::setElementStyleIsAffectedByEmptyAndUpdateRenderStyleIfNecessary):
49 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
50 * dom/CharacterData.h:
51 (WebCore::CharacterData::dataMemoryOffset):
52 * dom/ContainerNode.h:
53 (WebCore::ContainerNode::firstChildMemoryOffset):
55 (WebCore::Node::flagIsText):
57 2014-08-14 Wenson Hsieh <wenson_hsieh@apple.com>
59 Implement scroll snapping animations on Mac
60 https://bugs.webkit.org/show_bug.cgi?id=135768
62 Reviewed by Beth Dakin.
64 Implementing the scroll snap animations required for snapping in both overflow and mainframe areas on Mac.
65 Since we receive a series of discrete wheel events, we need to predict the distance we need to traverse,
66 compute the appropriate snap point, and then compute an animation curve to that location. The snap animations
67 are split into two types: snapping, which handles letting go of the trackpad with zero velocity, and gliding,
68 which handles flick gestures. In both cases, sinusoidal curves are used to ease animation to the target
69 location. In the former case, the initial velocity is low, and increases to a maximum value during the middle
70 of the animation before decreasing to 0. In the latter case, the curve is computed such that the initial
71 velocity matches the user's scroll velocity, and the final velocity matches a lower final velocity that is
72 somewhat arbitrarily computed. (See the FIXME in AxisScrollSnapOffsets::initializeGlideParameters). How the
73 equations and constants were chosen is described in greater detail in the comments above
74 AxisScrollSnapOffsets::computeGlideDelta and AxisScrollSnapOffsets::computeSnapDelta. Note that the final
75 velocity should ideally be equal to 0. However, with this particular curve, this caused the animation to feel
76 too slow near the snap point.
78 No tests, since there is no observable change in behavior. Tests will be included when iOS and Mac scrolling
79 areas hook into this code.
82 * WebCore.xcodeproj/project.pbxproj:
83 * page/scrolling/AxisScrollSnapOffsets.cpp:
84 (WebCore::closestSnapOffset): Computes the closest snap offset given velocity and prdicted destination.
85 * page/scrolling/AxisScrollSnapOffsets.h:
86 * platform/mac/AxisScrollSnapAnimator.h: Added.
87 (WebCore::AxisScrollSnapAnimatorClient::~AxisScrollSnapAnimatorClient):
88 * platform/mac/AxisScrollSnapAnimator.mm: Added.
89 (WebCore::toWheelEventStatus): Converts a pair of PlatformWheelEventPhases to a WheelEventStatus.
90 (WebCore::projectedInertialScrollDistance): Attempts to predict the distance covered by the inertial scrolling phase.
91 (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator):
92 (WebCore::AxisScrollSnapAnimator::handleWheelEvent): Updates the internal state of the AxisScrollSnapAnimator, given a PlatformWheelEvent
93 (WebCore::AxisScrollSnapAnimator::shouldOverrideWheelEvent): Determines whether or not we should override a wheel event given the animator's internal state.
94 (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Updates a single loop of the scroll snapping animation.
95 (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation):
96 (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation):
97 (WebCore::AxisScrollSnapAnimator::computeSnapDelta): See comments for more information.
98 (WebCore::AxisScrollSnapAnimator::computeGlideDelta): See comments for more information.
99 (WebCore::AxisScrollSnapAnimator::initializeGlideParameters):
100 (WebCore::AxisScrollSnapAnimator::pushInitialWheelDelta):
101 (WebCore::AxisScrollSnapAnimator::averageInitialWheelDelta):
102 (WebCore::AxisScrollSnapAnimator::clearInitialWheelDeltaWindow):
104 2014-08-14 Saam Barati <sbarati@apple.com>
106 Allow high fidelity type profiling to be enabled and disabled.
107 https://bugs.webkit.org/show_bug.cgi?id=135423
109 Reviewed by Geoffrey Garen.
111 PageRuntimeAgent and WorkerRuntimeAgent now call their super
112 class's (InspectorRuntimeAgent) implementation of willDestroyFrontendAndBackend
113 to give InspectorRuntimeAgent a chance to recompile all JavaScript
114 functions, if necessary, for type profiling.
116 * inspector/PageRuntimeAgent.cpp:
117 (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
118 * inspector/WorkerRuntimeAgent.cpp:
119 (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
121 2014-08-14 Brent Fulgham <bfulgham@apple.com>
123 [Win] Correct build when DerivedSources location not supplied by build environment
124 https://bugs.webkit.org/show_bug.cgi?id=135954
125 <rdar://problem/18023620>
127 Reviewed by Joseph Pecoraro.
129 The DerivedSourcesDirectory is not always defined, depending on what
130 solution is being used to build this project. Instead, just define
131 it directly, since we already know where it needs to go.
134 1. Stop redirecting the copy output to NUL so I can see if this fails in the future.
135 2. Make sure the target directory exists before copying to it.
137 * WebCore.vcxproj/copyForwardingHeaders.cmd: Properly specify
138 the directories for copying the JS file.
140 2014-08-14 Zoltan Horvath <zoltan@webkit.org>
142 [CSS3-Text] Cosmetics on RenderBlockFlow::textAlignmentForLine
143 https://bugs.webkit.org/show_bug.cgi?id=135940
145 Reviewed by Darin Adler.
147 Processing the not CSS3_TEXT case first, and removing an extra whitespace after r172524.
149 * rendering/RenderBlockLineLayout.cpp:
150 (WebCore::RenderBlockFlow::textAlignmentForLine):
152 2014-08-14 Martin Hock <mhock@apple.com>
154 IndexedDB should respect SchemeRegistry's database access setting.
155 https://bugs.webkit.org/show_bug.cgi?id=135890
156 <rdar://problem/17989469>
158 Reviewed by Alexey Proskuryakov.
160 Test: storage/indexeddb/open-db-private-browsing.html
162 * Modules/indexeddb/IDBFactory.cpp:
164 2014-08-14 Yoav Weiss <yoav@yoav.ws>
166 srcset with w descriptor doesn't behave as expected when sizes is not supported.
167 https://bugs.webkit.org/show_bug.cgi?id=135935
169 Reviewed by Dean Jackson.
171 In current implementation, if sizes is not supported, when authors would write
172 markup such as `<img src=fallback.jpg srcset="100px.jpg 100w, 400px.jpg 400w">`
173 the first candidate in srcset would be picked, regardless of its dimensions
174 That is likely to be confusing for authors.
175 Dropping these "not yet supported" candidates is likely to be less confusing,
176 and will result in the "fallback.jpg" candidate being picked.
178 No new tests since this change only concerns builds that are built
179 with the PICTURE_SIZES compile flag turned off.
181 * html/parser/HTMLSrcsetParser.cpp:
182 (WebCore::parseDescriptors):
183 Drop candidates that include either 'w' or 'h' descriptors when the
184 sizes feature is not supported.
186 2014-08-14 Antti Koivisto <antti@apple.com>
188 Make inherited style and parent renderer references
189 https://bugs.webkit.org/show_bug.cgi?id=135857
191 Reviewed by Andreas Kling.
193 We don't recurse into non-rendered subtrees anymore so they can't be null.
194 Also stop using Element::renderStyle() as it differs from e->renderer().style() in
195 some rare cases (that should be fixed).
197 * style/StyleResolveTree.cpp:
198 (WebCore::Style::RenderTreePosition::parent):
199 (WebCore::Style::RenderTreePosition::RenderTreePosition):
200 (WebCore::Style::RenderTreePosition::canInsert):
201 (WebCore::Style::RenderTreePosition::insert):
202 (WebCore::Style::RenderTreePosition::computeNextSibling):
203 (WebCore::Style::shouldCreateRenderer):
204 (WebCore::Style::styleForElement):
205 (WebCore::Style::createRendererIfNeeded):
206 (WebCore::Style::textRendererIsNeeded):
207 (WebCore::Style::createTextRendererIfNeeded):
208 (WebCore::Style::updateTextRendererAfterContentChange):
209 (WebCore::Style::attachChildren):
210 (WebCore::Style::attachDistributedChildren):
211 (WebCore::Style::attachShadowRoot):
212 (WebCore::Style::resetStyleForNonRenderedDescendants):
213 (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
214 (WebCore::Style::attachRenderTree):
215 (WebCore::Style::resolveLocal):
216 (WebCore::Style::resolveShadowTree):
217 (WebCore::Style::updateBeforeOrAfterPseudoElement):
218 (WebCore::Style::resolveTree):
220 2014-08-14 Antti Koivisto <antti@apple.com>
222 [Forms] We should share RenderStyle object for optgroup and option element
223 https://bugs.webkit.org/show_bug.cgi?id=88405
225 Reviewed by Andreas Kling.
227 We can remove this special case now.
229 * css/StyleResolver.cpp:
230 (WebCore::StyleResolver::canShareStyleWithElement):
232 2014-08-14 Antti Koivisto <antti@apple.com>
234 Remove nonRendererStyle
235 https://bugs.webkit.org/show_bug.cgi?id=135938
237 Reviewed by Andreas Kling.
239 It is used to support styling of non-renderer option elements. We have a better
240 mechanism for this, Element::computedStyle().
243 (WebCore::Element::resetComputedStyle):
244 (WebCore::Element::willResetComputedStyle):
246 Add a virtual callback for computed style reset.
250 (WebCore::Node::nonRendererStyle): Deleted.
251 * dom/NodeRenderStyle.h:
252 (WebCore::Node::renderStyle):
254 renderStyle() now always matches renderer()->style()
256 * html/HTMLOptGroupElement.cpp:
257 (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
258 (WebCore::HTMLOptGroupElement::isFocusable):
259 (WebCore::HTMLOptGroupElement::didAttachRenderers): Deleted.
260 (WebCore::HTMLOptGroupElement::willDetachRenderers): Deleted.
261 (WebCore::HTMLOptGroupElement::updateNonRenderStyle): Deleted.
262 (WebCore::HTMLOptGroupElement::nonRendererStyle): Deleted.
263 (WebCore::HTMLOptGroupElement::customStyleForRenderer): Deleted.
264 * html/HTMLOptGroupElement.h:
265 * html/HTMLOptionElement.cpp:
266 (WebCore::HTMLOptionElement::isFocusable):
270 (WebCore::HTMLOptionElement::willResetComputedStyle):
271 (WebCore::HTMLOptionElement::didAttachRenderers): Deleted.
272 (WebCore::HTMLOptionElement::willDetachRenderers): Deleted.
273 (WebCore::HTMLOptionElement::updateNonRenderStyle): Deleted.
274 (WebCore::HTMLOptionElement::nonRendererStyle): Deleted.
275 (WebCore::HTMLOptionElement::customStyleForRenderer): Deleted.
276 (WebCore::HTMLOptionElement::didRecalcStyle): Deleted.
277 * html/HTMLOptionElement.h:
278 * rendering/RenderMenuList.cpp:
279 (RenderMenuList::updateOptionsWidth):
280 (RenderMenuList::setTextFromOption):
284 2014-08-14 Jer Noble <jer.noble@apple.com>
286 [MSE] Altering the quality of a YouTube video will cause the video to distort and display an error message
287 https://bugs.webkit.org/show_bug.cgi?id=135931
289 Reviewed by Eric Carlson.
291 When removing samples from the TrackBuffer's sample map, also remove those samples from the
292 TrackBuffer's decode queue. Otherwise, removed samples may persist in the decode queue and
293 either break sync-sample dependencies or cause decoding artifacts.
295 Pull the code which removes samples from a track buffer into its own utility function, and
296 use this function both from removeCodedFrames(), and also when samples are removed due to
297 overlapping appends in sourceBufferPrivateDidReceiveSample(). In order to reference
298 TrackBuffers outside of SourceBuffer (and in the static removeSamplesFromTrackBuffer()
299 function), make TrackBuffer a public forward declaration.
301 * Modules/mediasource/SourceBuffer.cpp:
302 (WebCore::removeSamplesFromTrackBuffer):
303 (WebCore::SourceBuffer::removeCodedFrames):
304 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
305 * Modules/mediasource/SourceBuffer.h:
307 2014-08-14 Zan Dobersek <zdobersek@igalia.com>
309 ImageBufferDataCairo.h is missing header guards
310 https://bugs.webkit.org/show_bug.cgi?id=135933
312 Reviewed by Philippe Normand.
314 * platform/graphics/cairo/ImageBufferDataCairo.h:
315 Add the missing head guards to avoid problems when re-inclusion occurs.
317 2014-08-13 Wenson Hsieh <wenson_hsieh@apple.com>
319 Enable CSS_SCROLL_SNAP for iOS
320 https://bugs.webkit.org/show_bug.cgi?id=135915
322 Turn on CSS_SCROLL_SNAP for iOS and the iOS simulator.
324 Reviewed by Tim Horton.
326 * Configurations/FeatureDefines.xcconfig:
328 2014-08-13 Wenson Hsieh <wenson_hsieh@apple.com>
330 Compute and store snap point positions
331 https://bugs.webkit.org/show_bug.cgi?id=135268
333 Reviewed by Simon Fraser.
335 Working towards implementing a way to extract snap positions (i.e. LayoutUnits) from the parsed snap point properties from CSS,
336 as well as a way of storing the information. Supports both mainframe and overflow scrolling.
338 No changes in behavior. I will write tests when I implement snapping for iOS and Mac.
340 * WebCore.xcodeproj/project.pbxproj:
341 * page/FrameView.cpp:
342 (WebCore::FrameView::updateSnapOffsets): Invokes the static routine in AxisScrollSnapOffsets to update snap offsets for mainframe.
344 * page/scrolling/AxisScrollSnapOffsets.cpp: Added.
345 (WebCore::appendAndSortChildSnapOffsets):
346 (WebCore::updateFromStyle):
347 (WebCore::updateSnapOffsetsForScrollableArea): Update the ScrollableArea's snap axes.
348 * page/scrolling/AxisScrollSnapOffsets.h: Added.
349 * platform/ScrollableArea.cpp:
350 (WebCore::ScrollableArea::setHorizontalSnapOffsets):
351 (WebCore::ScrollableArea::setVerticalSnapOffsets):
352 (WebCore::ScrollableArea::clearHorizontalSnapOffsets): Resets the unique_ptr for horizontal snap points.
353 (WebCore::ScrollableArea::clearVerticalSnapOffsets): Resets the unique_ptr for vertical snap points.
354 * platform/ScrollableArea.h:
355 (WebCore::ScrollableArea::horizontalSnapOffsets): Returns a pointer to the ScrollableArea's horizontal snap points.
356 (WebCore::ScrollableArea::verticalSnapOffsets): Returns a pointer to the ScrollableArea's vertical snap points.
357 (WebCore::ScrollableArea::updateSnapOffsets):
358 * rendering/RenderLayer.cpp:
359 (WebCore::RenderLayer::updateSnapOffsets): Invokes the static routine in AxisScrollSnapOffsets to update snap offsets for an overflow area.
360 * rendering/RenderLayer.h:
362 2014-08-13 Mark Rowe <mrowe@apple.com>
364 <https://webkit.org/b/135911> WebKit should build on Yosemite with the public SDK.
366 Reviewed by Darin Adler.
368 * rendering/RenderThemeMac.mm: Fix the forward-declaration of NSServicesRolloverButtonCell.
370 2014-08-13 Alex Christensen <achristensen@webkit.org>
372 Progress towards CMake on Mac.
373 https://bugs.webkit.org/show_bug.cgi?id=135819
375 Reviewed by Laszlo Gombos.
378 Include derived sources directory, which is needed by Apple ports.
379 Separated svg and non-svg idls for ObjC bindings.
380 Don't build the new gamepad API right now. It's causing naming conflicts and it's not done.
381 Process CSSUnknownRule.idl.
383 Added cpp as the extension of the generated bindings.
385 Include more directories and sources.
386 Add forwarding headers.
387 Generate ObjC bindings.
388 * bindings/objc/DOMUIKitExtensions.mm:
389 Moved config.h to recognize the PLATFORM macro.
390 * bindings/scripts/CodeGeneratorObjC.pm:
391 (ReadPublicInterfaces):
393 Added some workarounds for CMake.
394 * bindings/scripts/IDLAttributes.txt:
395 Added missing attribute names.
396 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
397 Added PLATFORM(IOS) to protect IOS_AIRPLAY code.
398 * platform/mac/PasteboardMac.mm:
399 Added necessary DRAG_SUPPORT protection.
400 * platform/text/mac/TextCodecMac.cpp:
401 Moved config.h to recognize the PLATFORM macro.
403 2014-08-13 Jer Noble <jer.noble@apple.com>
405 [MSE] Replacing existing samples with overlapping new samples will cause playback to stutter.
406 https://bugs.webkit.org/show_bug.cgi?id=135902
408 Reviewed by Eric Carlson.
410 Only mark the TrackBuffer as needing re-enqueueing if the samples removed by overlapping samples
411 themselves overlap with potentially enqueued but not yet displayed frames.
413 * Modules/mediasource/SourceBuffer.cpp:
414 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
416 2014-08-13 Andreas Kling <akling@apple.com>
418 CSSValueList should never contain null values.
419 <https://webkit.org/b/135887>
421 It's not legal for a CSSValueList to contain null CSSValues, so make
422 it store a Vector of Ref<CSSValue> internally instead.
424 This allows the compiler to avoid emitting a number of null checks.
425 It will also allow a future patch to make CSSValueList vend CSSValue&
426 instead of CSSValue*.
428 Most of the patch is fixing up things on their way into a CSSValueList
429 to not be null at the call site, now that append() and prepend() are
430 taking PassRef instead of PassRefPtr.
432 Reviewed by Sam Weinig.
434 * css/BasicShapeFunctions.cpp:
435 (WebCore::valueForBasicShape):
436 * css/BasicShapeFunctions.h:
437 * css/CSSBorderImage.cpp:
438 (WebCore::createBorderImageValue):
439 * css/CSSBorderImage.h:
440 * css/CSSComputedStyleDeclaration.cpp:
441 (WebCore::valueForImageSliceSide):
442 (WebCore::valueForNinePieceImageSlice):
443 (WebCore::valueForNinePieceImageQuad):
444 (WebCore::valueForNinePieceImage):
445 (WebCore::getBorderRadiusShorthandValue):
446 (WebCore::ComputedStyleExtractor::valueForShadow):
447 (WebCore::ComputedStyleExtractor::valueForFilter):
448 (WebCore::specifiedValueForGridTrackSize):
449 (WebCore::addValuesForNamedGridLinesAtIndex):
450 (WebCore::scrollSnapCoordinates):
451 (WebCore::createTimingFunctionValue):
452 (WebCore::fillSourceTypeToCSSValue):
453 (WebCore::contentToCSSValue):
454 (WebCore::shapePropertyValue):
455 (WebCore::ComputedStyleExtractor::propertyValue):
456 (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
457 (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
458 (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
459 (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
460 * css/CSSComputedStyleDeclaration.h:
461 * css/CSSFontSelector.cpp:
462 (WebCore::CSSFontSelector::addFontFaceRule):
464 (WebCore::createPrimitiveValuePair):
465 (WebCore::parseTranslateTransformValue):
466 (WebCore::CSSParser::createPrimitiveNumericValue):
467 (WebCore::CSSParser::createPrimitiveStringValue):
468 (WebCore::CSSParser::addFillValue):
469 (WebCore::CSSParser::parseNonElementSnapPoints):
470 (WebCore::CSSParser::parseScrollSnapDestination):
471 (WebCore::CSSParser::parseFillShorthand):
472 (WebCore::CSSParser::addAnimationValue):
473 (WebCore::CSSParser::parseAnimationShorthand):
474 (WebCore::CSSParser::parseTransitionShorthand):
475 (WebCore::CSSParser::parseQuotes):
476 (WebCore::CSSParser::parseContent):
477 (WebCore::CSSParser::parseFillProperty):
478 (WebCore::CSSParser::parseAnimationProperty):
479 (WebCore::CSSParser::parseGridPosition):
480 (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
481 (WebCore::CSSParser::parseGridLineNames):
482 (WebCore::CSSParser::parseGridTrackList):
483 (WebCore::CSSParser::parseGridTrackRepeatFunction):
484 (WebCore::CSSParser::parseGridTrackSize):
485 (WebCore::CSSParser::parseBasicShapeAndOrBox):
486 (WebCore::CSSParser::parseFontVariant):
487 (WebCore::CSSParser::parseTransform):
488 (WebCore::CSSParser::parseBuiltinFilterArguments):
489 (WebCore::CSSParser::parseFilter):
490 (WebCore::CSSParser::parseTextEmphasisStyle):
492 * css/CSSProperty.cpp:
493 (WebCore::CSSProperty::wrapValueInCommaSeparatedList):
494 * css/CSSValueList.cpp:
495 (WebCore::CSSValueList::CSSValueList):
496 (WebCore::CSSValueList::removeAll):
497 (WebCore::CSSValueList::hasValue):
498 (WebCore::CSSValueList::copy):
499 (WebCore::CSSValueList::customCSSText):
500 (WebCore::CSSValueList::equals):
501 (WebCore::CSSValueList::addSubresourceStyleURLs):
502 (WebCore::CSSValueList::hasFailedOrCanceledSubresources):
503 * css/CSSValueList.h:
504 (WebCore::CSSValueList::item):
505 (WebCore::CSSValueList::itemWithoutBoundsCheck):
506 (WebCore::CSSValueList::append):
507 (WebCore::CSSValueList::prepend):
508 * css/SVGCSSComputedStyleDeclaration.cpp:
509 (WebCore::paintOrder):
510 * css/SVGCSSParser.cpp:
511 (WebCore::CSSParser::parsePaintOrder):
512 * editing/EditingStyle.cpp:
513 (WebCore::mergeTextDecorationValues):
514 * editing/EditorCommand.cpp:
515 (WebCore::executeToggleStyleInList):
516 * svg/SVGFontFaceSrcElement.cpp:
517 (WebCore::SVGFontFaceSrcElement::srcValue):
519 (WebCore::SVGLength::toCSSPrimitiveValue):
522 2014-08-13 Alex Christensen <achristensen@webkit.org>
524 Removed dead plugins code.
525 https://bugs.webkit.org/show_bug.cgi?id=135862
527 Reviewed by Alexey Proskuryakov.
529 * plugins/PluginDataNone.cpp: Removed.
530 * plugins/mac: Removed.
531 * plugins/mac/PluginPackageMac.cpp: Removed.
532 * plugins/mac/PluginViewMac.mm: Removed.
534 2014-08-13 Simon Fraser <simon.fraser@apple.com>
536 [WK1] A fixed-position <img> may not show on page load
537 https://bugs.webkit.org/show_bug.cgi?id=135893
539 Reviewed by Tim Horton.
541 A position:fixed image could fail to display because we didn't make a
542 compositing layer for it under some circumstances. This can happen if
543 RenderLayerCompositor::requiresCompositingForPosition() runs before the
544 image is loaded, in which cause the layer is zero-sized, so does not get
547 When the image loads, there was no code path that ensured that compositing
548 would be re-evaluated (unlike size changes due to style updates). Fix by
549 having RenderLayer::contentChanged() also check for ImageChanged.
551 Test: compositing/fixed-image-loading.html
553 * rendering/RenderLayer.cpp:
554 (WebCore::RenderLayer::contentChanged):
556 2014-08-13 Bem Jones-Bey <bjonesbe@adobe.com>
558 Refactor ShapeOutsideInfo so it isn't mutated for each line
559 https://bugs.webkit.org/show_bug.cgi?id=135781
561 Reviewed by Zoltan Horvath.
563 Encapsulate the per line state into a ShapeOutsideDeltas object.
564 updateDeltasForContainingBlockLine has been renamed to
565 computeDeltasForContainingBlockLine, and it returns an instance of the
566 ShapeOutsideDeltas object for that line. This object is cached, but
567 none of the functionality of ShapeOutsideInfo is dependant on any line
568 specific data anymore.
570 No new tests, no behavior change.
572 * rendering/FloatingObjects.cpp:
573 (WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
574 Update to take a FloatingObject reference because the FloatingObject cannot be null.
575 (WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
577 (WebCore::ComputeFloatOffsetAdapter<FloatTypeValue>::collectIfNeeded): Pass FloatingObject to
578 updateOffsetIfNeeded as a reference, since it cannot be null.
579 (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
580 Use ShapeOutsideDeltas object to calculate the offset and take the FloatingObject as a
582 (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
584 (WebCore::shapeInfoForFloat): Deleted.
585 * rendering/line/LineWidth.cpp:
586 (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Update to use ShapeOutsideDeltas object.
587 * rendering/shapes/ShapeOutsideInfo.cpp:
588 (WebCore::ShapeOutsideInfo::computeDeltasForContainingBlockLine): Return a ShaoeOutsideDeltas object
589 instead of storing line specific data in instance variables.
590 (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine): Deleted.
591 * rendering/shapes/ShapeOutsideInfo.h:
593 2014-08-13 Zoltan Horvath <zoltan@webkit.org>
595 [CSS3-Text] Add rendering support for the none value of text-justify property
596 https://bugs.webkit.org/show_bug.cgi?id=135349
598 Reviewed by David Hyatt.
600 Spec: http://dev.w3.org/csswg/css-text-3/#valdef-text-justify.none
602 Test: fast/css3-text/css3-text-justify/text-justify-none.html
604 * rendering/RenderBlockLineLayout.cpp:
605 (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
607 2014-08-13 Eric Carlson <eric.carlson@apple.com>
609 Media document sends incorrect referer header
610 https://bugs.webkit.org/show_bug.cgi?id=135839
612 Reviewed by Jer Noble.
614 Test: http/tests/media/media-document-referer.html
616 * html/MediaDocument.cpp:
617 (WebCore::MediaDocumentParser::MediaDocumentParser): Stash referrer.
618 (WebCore::MediaDocumentParser::createDocumentStructure): Set outgoing referrer.
619 (WebCore::MediaDocument::MediaDocument): Stash referrer.
620 * html/MediaDocument.h:
622 2014-08-13 Antti Koivisto <antti@apple.com>
624 Don't recurse into non-rendered subtrees when computing style
625 https://bugs.webkit.org/show_bug.cgi?id=135844
627 Reviewed by Andreas Kling.
629 * style/StyleResolveTree.cpp:
630 (WebCore::Style::resetStyleForNonRenderedDescendants):
632 Do a simple reset of the style dirty bits and any computed style in non-renderer subtrees.
634 (WebCore::Style::attachRenderTree):
635 (WebCore::Style::resolveTree):
637 Don't recurse into descendants if the element does not create a renderer.
638 We didn't compute style anyway in such subtrees.
640 2014-08-11 Myles C. Maxfield <mmaxfield@apple.com>
642 Elements whose contents start with an astral Unicode symbol disappear when CSS `::first-letter` is applied to them
643 https://bugs.webkit.org/show_bug.cgi?id=135756
645 Reviewed by Darin Adler.
647 The previous code assumed that all "characters" are exactly 1 16-bit code unit wide. Instead, use numCharactersInGraphemeClusters().
649 This patch also modifies the signature of numCharactersInGraphemeClusters() to take a StringView instead
650 of a string, which will avoid a copy.
652 Test: css1/pseudo/firstletter-surrogate.html
654 * platform/text/TextBreakIterator.cpp:
655 (WebCore::numCharactersInGraphemeClusters): Update numCharactersInGraphemeClusters() to take a StringView.
656 * platform/text/TextBreakIterator.h: Ditto.
657 * rendering/RenderBlock.cpp:
658 (WebCore::RenderBlock::createFirstLetterRenderer): Use numCharactersInGraphemeClusters() to determine the length
659 of the first letter, rather than assuming it has length of 1 code unit
660 (WebCore::RenderBlock::updateFirstLetter): Add a FIXME comment.
662 2014-08-12 Jer Noble <jer.noble@apple.com>
664 [MSE][Mac] Seeking to the very beginning of a buffered range stalls video playback
665 https://bugs.webkit.org/show_bug.cgi?id=135865
667 Reviewed by Eric Carlson.
669 AVSampleBufferRenderSynchronizer will report a current time of about 100ms or so before
670 the destination seek time when seeking. It does this in order to pre-roll the synchronized
671 audio renderer, but this can lead to playback stalling when MediaSource::monitorSourceBuffers()
672 looks at the media element's current time and determines that the current time is 100ms before
673 any buffered samples.
675 Clamp the value of currentMediaTime() to, at a minimum, the last requested seek time. This was
676 the suggested course of action from <rdar://problem/17789374>.
678 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
679 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
680 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
681 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime):
682 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
684 2014-08-12 Jer Noble <jer.noble@apple.com>
686 [MSE] YouTube will lose audio, video after seeking backwards to an unbuffered range.
687 https://bugs.webkit.org/show_bug.cgi?id=135855
689 Reviewed by Eric Carlson.
691 When seeking into an unbuffered or partially buffered range, we will unconditionally pass samples to the
692 decode queue even if there exist large gaps between those samples. Subsequently, the decoder will not
693 notify us that it has become ready for new samples until playback reaches those later samples and the samples
696 When sending samples to be decoded in provideMediaData(), stop if there exists a large gap in the sample timeline.
697 Do this by tracking the last enqueued decode end time, and look to see if the next sample's decode time indicates
698 a gap of greater than 1 second.
700 * Modules/mediasource/SourceBuffer.cpp:
701 (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): Initialize lastEnqueuedDecodeEndTime.
702 (WebCore::SourceBuffer::seekToTime): Set needsReenqueueing, in case samples do not yet exist in the trackBuffer
703 sufficient to re-enqueue for the destination time, so that re-enqueueing will occur after the next append.
704 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Check against lastEnqueuedDecodeEndTime, rather than
705 lastEnqueuedPresentationTime before adding samples to the decodeQueue.
706 (WebCore::SourceBuffer::provideMediaData): Stop when we reach a large gap between samples.
707 (WebCore::SourceBuffer::reenqueueMediaForTime): Set or clear lastEnqueuedDecodeEndTime based on whether we
708 have appended any non-displaying samples after flushing.
710 2014-08-12 Commit Queue <commit-queue@webkit.org>
712 Unreviewed, rolling out r172494.
713 https://bugs.webkit.org/show_bug.cgi?id=135864
715 asserting on bots (Requested by kling on #webkit).
719 "Don't recurse into non-rendered subtrees when computing
721 https://bugs.webkit.org/show_bug.cgi?id=135844
722 http://trac.webkit.org/changeset/172494
724 2014-08-12 Myles C. Maxfield <mmaxfield@apple.com>
726 Fonts forced to use non synthetic italics might be laid out with the incorrect baseline
727 https://bugs.webkit.org/show_bug.cgi?id=135403
729 Reviewed by Darin Adler.
731 When italics is specified on a font, and the font isn't coming from the cache, we ask
732 the SimpleFontData to provide a non-synthetic-italic version of itself. Our current
733 implementation doesn't preserve whether or not the SimpleFontData includes vertical
734 glyphs (glyphs that are not rotated when drawn in the vertical writing mode), which
735 determines which baseline we use to lay out the text. By passing "false" to
736 the isTextOrientationFallback argument to SimpleFontData::create(), we preserve this
737 hasVerticalGlyphs flag.
739 Test: fast/text/international/synthesized-italic-vertical-latin-double.html
741 * platform/graphics/SimpleFontData.cpp:
742 (WebCore::SimpleFontData::nonSyntheticItalicFontData):
743 * testing/Internals.cpp:
744 (WebCore::Internals::invalidateFontCache): Add "invalidateFontCache" to window.internals.
745 * testing/Internals.h: Ditto.
746 * testing/Internals.idl: Ditto.
748 2014-08-12 Peyton Randolph <prandolph@apple.com>
750 Runtime switch for long mouse press gesture. Part of 135257 - Add long mouse press gesture.
751 https://bugs.webkit.org/show_bug.cgi?id=135682
753 Reviewed by Tim Horton.
755 This patch adds a runtime switch for the Long Mouse Press Gesture and initially sets the feature flag
756 to false. It also removes the ENABLE_LONG_MOUSE_PRESS feature flag as the runtime switch now guards
759 * Configurations/FeatureDefines.xcconfig: Remove LONG_MOUSE_PRESS feature flag.
760 * page/EventHandler.cpp:
761 (WebCore::EventHandler::EventHandler):
762 (WebCore::EventHandler::clear): Remove feature flag.
763 (WebCore::EventHandler::handleMousePressEvent): Ditto.
764 (WebCore::EventHandler::eventMayStartDrag): Ditto.
765 (WebCore::EventHandler::handleMouseReleaseEvent):
766 Perform event iff long mouse presses are enabled.
767 (WebCore::EventHandler::beginTrackingPotentialLongMousePress): Ditto.
768 (WebCore::EventHandler::recognizeLongMousePress): Ditto.
769 (WebCore::EventHandler::cancelTrackingPotentialLongMousePress): Ditto.
770 (WebCore::EventHandler::handleMouseMoveEvent): Remove feature flag.
771 (WebCore::EventHandler::handleDrag): Ditto.
772 (WebCore::EventHandler::mouseMovementExceedsThreshold): Ditto.
773 * page/EventHandler.h:
774 * page/Settings.in: Add longMousePressEnabled setting, initially false.
776 2014-08-12 Pratik Solanki <psolanki@apple.com>
778 Cached file backed resources don't make it to the Web Process when NETWORK_CFDATA_ARRAY_CALLBACK is enabled
779 https://bugs.webkit.org/show_bug.cgi?id=135727
780 <rdar://problem/17947880>
782 Reviewed by Darin Adler.
784 Add SharedBuffer::existingCFData() which returns CFDataRef if it has one. Refactor
785 this code out of createCFData().
788 * platform/SharedBuffer.h:
789 * platform/mac/SharedBufferMac.mm:
790 (WebCore::SharedBuffer::existingCFData): Added.
791 (WebCore::SharedBuffer::createCFData):
793 2014-08-12 Tim Horton <timothy_horton@apple.com>
795 Small region (~1px tall) where you get the selection button instead of the phone number overlay
796 https://bugs.webkit.org/show_bug.cgi?id=135852
797 <rdar://problem/17992795>
799 Reviewed by Enrica Casucci.
803 2014-08-12 Alex Christensen <achristensen@webkit.org>
805 Generate header detection headers for CMake on Windows.
806 https://bugs.webkit.org/show_bug.cgi?id=135807
808 Reviewed by Brent Fulgham.
812 Generate and include a stub WebCoreHeaderDetection.h.
814 2014-08-12 Renata Hodovan <rhodovan.u-szeged@partner.samsung.com>
816 Make sure that begin time cannot be greater than SMILTime::indefiniteValue unintentionally.
817 https://bugs.webkit.org/show_bug.cgi?id=135838
819 Reviewed by Darin Adler.
821 When WebCore::SVGSMILElement::resolveInterval creates a SMILTime begin
822 node for a SMILInterval, then it only checks if the value of begin is
823 indefinite or unresolved but misses the case if it is between these two
826 This is a backport of my fix in Blink: https://codereview.chromium.org/406263002/.
828 Test: svg/animations/animateMotion-crash-with-large-begin-time.html
830 * svg/animation/SVGSMILElement.cpp:
831 (WebCore::SVGSMILElement::parseOffsetValue):
832 (WebCore::SVGSMILElement::parseClockValue):
834 2014-08-12 Andy Estes <aestes@apple.com>
836 Revert a change that wasn't meant to be a part of r172482.
838 * loader/ResourceLoader.cpp:
839 (WebCore::ResourceLoader::init):
841 2014-08-12 Antti Koivisto <antti@apple.com>
843 Don't recurse into non-rendered subtrees when computing style
844 https://bugs.webkit.org/show_bug.cgi?id=135844
846 Reviewed by Andreas Kling.
848 * style/StyleResolveTree.cpp:
849 (WebCore::Style::resetStyleForNonRenderedDescendants):
851 Do a simple reset of the style dirty bits and any computed style in non-rendered subtrees.
853 (WebCore::Style::attachRenderTree):
854 (WebCore::Style::resolveTree):
856 Don't recurse into descendants if the element does not create a renderer.
857 We didn't compute style anyway in such subtrees.
859 2014-08-12 Antti Koivisto <antti@apple.com>
861 Remove isInCanvasSubtree bit
862 https://bugs.webkit.org/show_bug.cgi?id=135837
864 Reviewed by Andreas Kling.
866 The logic to update this bit is in a wrong place and it is not clear it does
867 the right thing in all cases. Also the optimization doesn't seem necessary,
868 the focus code is not that hot.
870 * accessibility/AXObjectCache.cpp:
871 (WebCore::AXObjectCache::getOrCreate):
873 (WebCore::Element::isFocusable):
874 (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
875 (WebCore::Element::setIsInCanvasSubtree): Deleted.
876 (WebCore::Element::isInCanvasSubtree): Deleted.
878 * dom/ElementRareData.h:
879 (WebCore::ElementRareData::ElementRareData):
880 (WebCore::ElementRareData::isInCanvasSubtree): Deleted.
881 (WebCore::ElementRareData::setIsInCanvasSubtree): Deleted.
882 * html/HTMLAnchorElement.cpp:
883 (WebCore::HTMLAnchorElement::isKeyboardFocusable):
884 * html/HTMLCanvasElement.cpp:
885 (WebCore::HTMLCanvasElement::HTMLCanvasElement):
886 (WebCore::HTMLCanvasElement::willAttachRenderers): Deleted.
887 * html/HTMLCanvasElement.h:
888 * style/StyleResolveTree.cpp:
889 (WebCore::Style::attachRenderTree):
891 2014-08-11 Andy Estes <aestes@apple.com>
893 [iOS] Get rid of iOS.xcconfig
894 https://bugs.webkit.org/show_bug.cgi?id=135809
896 Reviewed by Joseph Pecoraro.
898 All iOS.xcconfig did was include AspenFamily.xcconfig, so there's no need for the indirection.
900 * Configurations/Base.xcconfig:
901 * Configurations/iOS.xcconfig: Removed.
902 * WebCore.xcodeproj/project.pbxproj:
904 2014-08-11 Roger Fong <roger_fong@apple.com>
906 Adjust max-width of cues based on text alignment when cue size is expanded.
907 https://bugs.webkit.org/show_bug.cgi?id=135823.
909 Reviewed by Brent Fulgham.
911 All units are in percentages.
912 If we are left aligned the max cue width is the 100 minus the cue position.
913 If we are right aligned the max cue width is the cue position.
914 If we are centered the max cue width is just 100.
916 * html/track/TextTrackCueGeneric.cpp:
917 (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
918 * html/track/VTTCue.cpp:
919 (WebCore::VTTCueBox::applyCSSProperties):
921 2014-08-12 Fabien Vallée <fvallee@connected-labs.com>
923 [GStreamer] playback rate is rounded to integer
924 https://bugs.webkit.org/show_bug.cgi?id=135802
926 Reviewed by Philippe Normand.
928 Test: media/video-ended-event-slow-motion-playback.html
930 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
931 (WebCore::MediaPlayerPrivateGStreamer::setRate):
933 2014-08-12 Brent Fulgham <bfulgham@apple.com>
935 [Win] Unreviewed build fix after r17425
937 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Remove
938 unused 'currentTime' declaration from header file. This is now fully implemented
939 in platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h.
941 2014-08-12 Zan Dobersek <zdobersek@igalia.com>
943 Dont allocate GCond in VideoSinkGStreamer.cpp dynamically.
945 Rubber-stamped by Carlos Garcia Campos.
947 * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
948 (_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Move the
949 g_cond_init() and gst_video_info_init() calls here.
950 (_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Move the
951 g_cond_clear() call here.
952 (webkit_video_sink_init):
953 (webkitVideoSinkTimeoutCallback):
954 (webkitVideoSinkRender):
956 (webkit_video_sink_class_init):
957 (webkitVideoSinkDispose): Deleted. Not required anymore.
959 2014-08-12 Zan Dobersek <zdobersek@igalia.com>
961 Clean up GMutexLocker
962 https://bugs.webkit.org/show_bug.cgi?id=135833
964 Reviewed by Carlos Garcia Campos.
966 Don't dynamically allocate GMutex objects. Update GMutexLocker
967 initializations to pass in a GMutex reference, not a pointer.
969 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
970 (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
971 (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
972 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
973 * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
974 (_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Initialize the GMutex.
975 (_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Clear the GMutex.
976 (webkit_video_sink_init):
977 (webkitVideoSinkRender):
978 (webkitVideoSinkDispose):
979 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
980 (webKitWebSrcGetProperty):
983 (webKitWebSrcChangeState):
984 (webKitWebSrcQueryWithParent):
985 (webKitWebSrcGetUri):
986 (webKitWebSrcSetUri):
987 (webKitWebSrcNeedDataMainCb):
988 (webKitWebSrcNeedDataCb):
989 (webKitWebSrcEnoughDataMainCb):
990 (webKitWebSrcEnoughDataCb):
991 (webKitWebSrcSeekDataCb):
992 (webKitWebSrcSetMediaPlayer):
993 (StreamingClient::createReadBuffer):
994 (StreamingClient::handleResponseReceived):
995 (StreamingClient::handleDataReceived):
996 (StreamingClient::handleNotifyFinished):
997 (ResourceHandleStreamingClient::wasBlocked):
998 (ResourceHandleStreamingClient::cannotShowURL):
1000 2014-08-12 Eduardo Lima Mitev <elima@igalia.com>
1001 [GTK] Adds dependency on GnuTLS 3.0+ for the implementation of subtle crypto algorithms
1002 https://bugs.webkit.org/show_bug.cgi?id=133317
1004 Reviewed by Philippe Normand.
1006 No new tests since no new functionality has been added.
1008 * PlatformGTK.cmake: Adds GnuTLS libs and included dirs to WebCore targets
1010 2014-08-10 Philippe Normand <pnormand@igalia.com>
1012 [WebAudio] FFTFrame is cluttered with dead code
1013 https://bugs.webkit.org/show_bug.cgi?id=135751
1015 Reviewed by Eric Carlson.
1017 Cleaned up unused FFTFrame implementations from the tree. If the
1018 FFMPEG or IPP versions are needed later on again this patch can be
1021 No new tests, the code removed was disabled on all ports.
1023 * platform/audio/Biquad.cpp:
1024 (WebCore::Biquad::Biquad):
1025 (WebCore::Biquad::~Biquad):
1026 (WebCore::Biquad::process):
1027 (WebCore::Biquad::reset):
1028 (WebCore::Biquad::setNormalizedCoefficients):
1029 * platform/audio/Biquad.h:
1030 * platform/audio/DirectConvolver.cpp:
1031 (WebCore::DirectConvolver::DirectConvolver):
1032 (WebCore::DirectConvolver::process):
1033 (WebCore::DirectConvolver::reset):
1034 * platform/audio/DirectConvolver.h:
1035 * platform/audio/FFTFrame.h:
1036 * platform/audio/FFTFrameStub.cpp:
1037 * platform/audio/ffmpeg/FFTFrameFFMPEG.cpp: Removed.
1038 * platform/audio/ipp/FFTFrameIPP.cpp: Removed.
1039 * platform/audio/mac/FFTFrameMac.cpp:
1041 2014-08-11 Mark Rowe <mrowe@apple.com>
1045 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1046 #if a function that's only used on iOS.
1048 2014-08-11 Brent Fulgham <bfulgham@apple.com>
1050 [Mac, iOS] Some media content never reaches full 'loaded' state
1051 https://bugs.webkit.org/show_bug.cgi?id=135814
1052 <rdar://problem/17476923>
1054 Reviewed by Jer Noble.
1056 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1057 (WebCore::MediaPlayerPrivateAVFoundation::duration): Change to a wrapper that just calls
1058 the durationDouble method and narrows to a float.
1059 (WebCore::MediaPlayerPrivateAVFoundation::durationDouble): Revised version of duration
1060 that works with doubles.
1061 (WebCore::MediaPlayerPrivateAVFoundation::currentTime): Wrapper that calls the
1062 currentTimeDouble method and narrows to a float.
1063 (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Use durationDouble for
1064 comparison with passed 'time' argument (which is a double).
1065 (WebCore::MediaPlayerPrivateAVFoundation::didEnd): Use 'currentTimeDouble' so we can
1066 cache the double precision version of this value.
1067 (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Use 'durationDouble' since
1068 the rest of the calculation is in terms of doubles.
1069 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1070 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1071 (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration): Convert to 'double'. All
1072 uses of this method are internal to the MediaPlayerPrivateAVFoundation* files.
1073 (WebCore::MediaPlayerPrivateAVFoundationCF::currentTimeDouble): Switch from float implementation.
1074 (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime): Deleted. (Moved to parent class)
1075 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1076 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1077 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1078 (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Convert to 'double'. All
1079 uses of this method are internal to the MediaPlayerPrivateAVFoundation* files.
1080 (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTimeDouble): Switch from floating implementation.
1081 (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Deleted. (Moved to parent class)
1083 2014-08-11 Enrica Casucci <enrica@apple.com>
1085 Improve look and feel of combined service menu..
1086 https://bugs.webkit.org/show_bug.cgi?id=135824
1087 <rdar://problem/17936880>
1089 Reviewed by Tim Horton.
1091 Adding some localizable strings.
1093 * English.lproj/Localizable.strings:
1095 2014-08-11 Jer Noble <jer.noble@apple.com>
1097 [iOS] <video> element requests are missing session cookies; sometimes persistant cookies.
1098 https://bugs.webkit.org/show_bug.cgi?id=135816
1100 Reviewed by Alexey Proskuryakov.
1102 On iOS, the AVFoundation framework will copy appropriate cookies for the requested URL across to the
1103 mediaserverd process. For WebKit2, the WebProcess does not have access to session cookies for the
1104 current browsing session. When creating an AVURLAsset, fetch the appropriate cookies for the requested
1105 URL, and pass them into AVURLAsset in the options dictionary.
1107 * html/HTMLMediaElement.cpp:
1108 (WebCore::HTMLMediaElement::mediaPlayerGetRawCookies): Call CookieJar's equivalent method.
1109 * html/HTMLMediaElement.h:
1110 * platform/graphics/MediaPlayer.cpp:
1111 (WebCore::MediaPlayer::getRawCookies): Pass to HTMLMediaElement.
1112 * platform/graphics/MediaPlayer.h:
1113 (WebCore::MediaPlayerClient::mediaPlayerGetRawCookies):
1114 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1115 (WebCore::toNSHTTPCookie): Convert a WebCore Cookie -> NSHTTPCookie.
1116 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Fetch cookies for the requested
1117 URL, and if successful, add them to the AVURLAsset options dictionary.
1119 2014-08-11 Roger Fong <roger_fong@apple.com>
1121 Adjustments to CueBox CSS Width calculations Part 2.
1122 https://bugs.webkit.org/show_bug.cgi?id=135820
1123 <rdar://problem/17954473>.
1125 Reviewed by Brent Fulgham.
1127 Two adjustments made:
1128 a) The default font size used was incorrect. It is not just 10px,
1129 but should be based off a percentage of the video size.
1130 b) The top/left CSS property needs to be adjusted appropriately if the cue
1131 is center aligned and we change the cue's size such that the cue remains centered.
1132 * html/track/TextTrackCueGeneric.cpp:
1133 (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
1134 * html/track/VTTCue.cpp:
1135 (WebCore::VTTCueBox::applyCSSProperties):
1136 * html/track/VTTCue.h: Remove unnecessary constant.
1138 2014-08-11 Beth Dakin <bdakin@apple.com>
1140 Fixed backgrounds don't paint in blurred inset areas
1141 https://bugs.webkit.org/show_bug.cgi?id=135712
1143 Reviewed by Simon Fraser.
1145 Background geometry calculations for fixed background need to use the larger
1148 The first version of this patch caused a regression because it universally
1149 adjusted the value for top to account for the inset whether or not the
1150 viewportRect location was adjusted for the same. This version fixes that — those
1151 two changes go hand-in-hand.
1152 * rendering/RenderBoxModelObject.cpp:
1153 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1155 2014-08-11 Antti Koivisto <antti@apple.com>
1157 Pass inherited style only when resolving tree style
1158 https://bugs.webkit.org/show_bug.cgi?id=135799
1160 Reviewed by Andreas Kling.
1162 No need to pass around the style parent element.
1164 * dom/ContainerNode.h:
1165 (WebCore::ContainerNode::childShouldCreateRenderer): Deleted.
1167 (WebCore::Element::childShouldCreateRenderer):
1169 * style/StyleResolveTree.cpp:
1170 (WebCore::Style::RenderTreePosition::parent):
1171 (WebCore::Style::nextSiblingRenderer):
1172 (WebCore::Style::RenderTreePosition::RenderTreePosition):
1173 (WebCore::Style::RenderTreePosition::computeNextSibling):
1174 (WebCore::Style::shouldCreateRenderer):
1175 (WebCore::Style::styleForElement):
1176 (WebCore::Style::createRendererIfNeeded):
1177 (WebCore::Style::textRendererIsNeeded):
1178 (WebCore::Style::createTextRendererIfNeeded):
1179 (WebCore::Style::attachTextRenderer):
1180 (WebCore::Style::updateTextRendererAfterContentChange):
1181 (WebCore::Style::attachChildren):
1182 (WebCore::Style::attachDistributedChildren):
1183 (WebCore::Style::attachShadowRoot):
1184 (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
1185 (WebCore::Style::attachRenderTree):
1186 (WebCore::Style::resolveLocal):
1187 (WebCore::Style::resolveTextNode):
1188 (WebCore::Style::resolveShadowTree):
1189 (WebCore::Style::updateBeforeOrAfterPseudoElement):
1190 (WebCore::Style::resolveTree):
1191 * svg/SVGDocument.cpp:
1192 (WebCore::SVGDocument::childShouldCreateRenderer): Deleted.
1194 Implement this in SVGSVGElement::rendererIsNeeded instead.
1196 * svg/SVGDocument.h:
1197 * svg/SVGSVGElement.cpp:
1198 (WebCore::SVGSVGElement::rendererIsNeeded):
1200 2014-08-11 Yusuke Suzuki <utatane.tea@gmail.com>
1202 CSS JIT: support :scope
1203 https://bugs.webkit.org/show_bug.cgi?id=135733
1205 Reviewed by Benjamin Poulain.
1207 Implement :scope for CSS JIT. It introduces scope field to CheckingContext
1208 and it makes CheckingContext more similar to SelectorChecker::SelectorCheckingContext.
1209 And since :scope requires CheckingContext, QueryingRules can accept SelectorCheckerWithCheckingContext.
1211 Tests: fast/selectors/querySelector-scope-filtered-root.html
1212 fast/selectors/scope-works-as-root.html
1214 * css/ElementRuleCollector.cpp:
1215 (WebCore::ElementRuleCollector::ruleMatches):
1216 * cssjit/SelectorCompiler.cpp:
1217 (WebCore::SelectorCompiler::shouldUseRenderStyleFromCheckingContext):
1218 (WebCore::SelectorCompiler::addPseudoClassType):
1219 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1220 (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
1221 (WebCore::SelectorCompiler::SelectorCodeGenerator::loadCheckingContext):
1222 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1223 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
1224 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
1225 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
1226 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
1227 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
1228 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1229 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
1230 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
1231 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsScopeRoot):
1232 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
1233 * cssjit/SelectorCompiler.h:
1234 (WebCore::SelectorCompiler::CheckingContext::CheckingContext):
1235 * dom/SelectorQuery.cpp:
1236 (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
1237 (WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext):
1238 (WebCore::SelectorDataList::execute):
1239 * dom/SelectorQuery.h:
1241 2014-08-11 Timothy Hatcher <timothy@apple.com>
1243 Web Inspector: console.profile shouldn't stop auto-recorded profiles
1244 https://bugs.webkit.org/show_bug.cgi?id=135810
1246 Reviewed by Joseph Pecoraro.
1248 * inspector/InspectorTimelineAgent.cpp:
1249 (WebCore::InspectorTimelineAgent::start): Added. Call internalStart. Set m_enabledFromFrontend.
1250 (WebCore::InspectorTimelineAgent::stop): Added. Calls internalStop. Clear m_enabledFromFrontend.
1251 (WebCore::InspectorTimelineAgent::internalStart): Renamed from start.
1252 (WebCore::InspectorTimelineAgent::internalStop): Renamed from stop.
1253 (WebCore::InspectorTimelineAgent::startFromConsole): Use internalStart.
1254 (WebCore::InspectorTimelineAgent::stopFromConsole): Use internalStop. Only stop if !m_enabledFromFrontend.
1255 (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): Initialize m_enabledFromFrontend.
1256 * inspector/InspectorTimelineAgent.h: Added m_enabledFromFrontend.
1258 2014-08-11 Brent Fulgham <bfulgham@apple.com>
1260 [Win] Adjust build script for Windows production build.
1261 https://bugs.webkit.org/show_bug.cgi?id=135806
1262 <rdar://problem/17978299>
1264 Reviewed by Timothy Hatcher.
1266 * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy file needed
1267 for WebInspectorUI build.
1269 2014-08-11 Commit Queue <commit-queue@webkit.org>
1271 Unreviewed, rolling out r172393.
1272 https://bugs.webkit.org/show_bug.cgi?id=135796
1274 discussion needed about GnuTLS version bump on the bots
1275 (Requested by philn on #webkit).
1279 https://bugs.webkit.org/show_bug.cgi?id=133317
1280 http://trac.webkit.org/changeset/172393
1282 2014-08-11 Eduardo Lima Mitev <elima@igalia.com>
1283 [GTK] Adds dependency on GnuTLS 3.0+ for the implementation of subtle crypto algorithms
1284 https://bugs.webkit.org/show_bug.cgi?id=133317
1286 Reviewed by Philippe Normand.
1288 No new tests since no new functionality has been added.
1290 * PlatformGTK.cmake: Adds GnuTLS libs and included dirs to WebCore targets
1292 2014-08-11 Eduardo Lima Mitev <elima@igalia.com>
1294 [GTK] Fix debug build after r172389.
1296 Rubber-stamped by Philippe Normand.
1298 * crypto/gtk/CryptoKeyRSAGtk.cpp:
1299 (WebCore::CryptoKeyRSA::exportData): Remove spurious ASSERT from
1300 stub. It will be added back along with the real implementation of
1303 2014-08-11 Zan Dobersek <zdobersek@igalia.com>
1305 Unreviewed fix after r172348.
1307 * platform/graphics/cairo/BitmapImageCairo.cpp:
1308 (WebCore::BitmapImage::BitmapImage): Initialize m_minimumSubsamplingLevel to 0.
1310 2014-08-11 Eduardo Lima Mitev <elima@igalia.com>
1312 [GTK] Adds stubs for all subtle crypto algorithm implemntations
1313 https://bugs.webkit.org/show_bug.cgi?id=133316
1315 Reviewed by Philippe Normand.
1317 No new tests since no new functionality has been added.
1319 * CMakeLists.txt: Add subtle crypto 'algorithms' and 'parameters' dirs to WebCore incuded dirs
1320 * PlatformGTK.cmake: Add subtle crypto sources to WebCore target
1321 * crypto/gtk/CryptoAlgorithmAES_CBCGtk.cpp: Added.
1322 (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
1323 (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
1324 * crypto/gtk/CryptoAlgorithmAES_KWGtk.cpp: Added.
1325 (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
1326 (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
1327 * crypto/gtk/CryptoAlgorithmHMACGtk.cpp: Added.
1328 (WebCore::CryptoAlgorithmHMAC::platformSign):
1329 (WebCore::CryptoAlgorithmHMAC::platformVerify):
1330 * crypto/gtk/CryptoAlgorithmRSAES_PKCS1_v1_5Gtk.cpp: Added.
1331 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
1332 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
1333 * crypto/gtk/CryptoAlgorithmRSASSA_PKCS1_v1_5Gtk.cpp: Added.
1334 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
1335 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
1336 * crypto/gtk/CryptoAlgorithmRSA_OAEPGtk.cpp: Added.
1337 (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
1338 (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
1339 * crypto/gtk/CryptoAlgorithmRegistryGtk.cpp: Added.
1340 (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
1341 * crypto/gtk/CryptoDigestGtk.cpp: Added.
1342 (WebCore::CryptoDigest::CryptoDigest):
1343 (WebCore::CryptoDigest::~CryptoDigest):
1344 (WebCore::CryptoDigest::create):
1345 (WebCore::CryptoDigest::addBytes):
1346 (WebCore::CryptoDigest::computeHash):
1347 * crypto/gtk/CryptoKeyRSAGtk.cpp: Added.
1348 (WebCore::CryptoKeyRSA::CryptoKeyRSA):
1349 (WebCore::CryptoKeyRSA::create):
1350 (WebCore::CryptoKeyRSA::~CryptoKeyRSA):
1351 (WebCore::CryptoKeyRSA::restrictToHash):
1352 (WebCore::CryptoKeyRSA::isRestrictedToHash):
1353 (WebCore::CryptoKeyRSA::keySizeInBits):
1354 (WebCore::CryptoKeyRSA::buildAlgorithmDescription):
1355 (WebCore::CryptoKeyRSA::exportData):
1356 (WebCore::CryptoKeyRSA::generatePair):
1357 * crypto/gtk/SerializedCryptoKeyWrapGtk.cpp: Added.
1358 (WebCore::getDefaultWebCryptoMasterKey):
1359 (WebCore::wrapSerializedCryptoKey):
1360 (WebCore::unwrapSerializedCryptoKey):
1361 * crypto/keys/CryptoKeyRSA.h:
1363 2014-08-10 Benjamin Poulain <bpoulain@apple.com>
1365 Remove inputSpeech.png
1366 https://bugs.webkit.org/show_bug.cgi?id=135771
1368 Reviewed by Andreas Kling.
1370 * Resources/inputSpeech.png: Removed.
1371 * WebCore.xcodeproj/project.pbxproj:
1373 2014-08-10 Tim Horton <timothy_horton@apple.com>
1375 Yelp phone number highlights often disappear
1376 https://bugs.webkit.org/show_bug.cgi?id=135789
1377 <rdar://problem/17971057>
1379 Reviewed by Brady Eidson.
1381 * editing/Editor.cpp:
1382 (WebCore::Editor::scanSelectionForTelephoneNumbers):
1383 (WebCore::Editor::clearDataDetectedTelephoneNumbers): Deleted.
1385 (WebCore::Editor::detectedTelephoneNumberRanges):
1386 * page/EditorClient.h:
1387 (WebCore::EditorClient::selectedTelephoneNumberRangesChanged):
1388 Cache and expose detected telephone number ranges on Editor.
1389 Change selectedTelephoneNumberRangesChanged to take no arguments; it's
1390 just a notification now.
1392 2014-08-09 Zalan Bujtas <zalan@apple.com>
1394 Subpixel rendering: Transforms on non-compositing layers leave bits behind when the box boundaries changes.
1395 https://bugs.webkit.org/show_bug.cgi?id=135786
1397 Reviewed by Simon Fraser.
1399 Since we don't control the transformed context painting's snapping strategy, our best bet to fully
1400 include the transformed box when requesting for repaint is to use enclosing.
1401 Pixelsnapping doesn't work here for all cases. For example, a scaled box at 0.8px can be anti-aliased painted
1402 both at 0.5px and 1px, while with pixelsnapping we'd expect it to be painted starting from 1px;
1404 Test: fast/repaint/hidpi-transform-on-subpixel-repaintrect.html
1406 * rendering/RenderBox.cpp:
1407 (WebCore::RenderBox::computeRectForRepaint): enclose the result of the transform.
1409 2014-08-08 Mark Lam <mark.lam@apple.com>
1411 REGRESSION: Inspector crashes when debugger is paused and injected scripts access window.screen().
1412 <https://webkit.org/b/135656>
1416 Rolling out r170680 which was merged to ToT in r172129.
1418 * bindings/js/ScriptController.cpp:
1419 (WebCore::ScriptController::attachDebugger):
1421 2014-08-08 Peyton Randolph <prandolph@apple.com>
1423 Implement long mouse press over links. Part of 135257 - Add long mouse press gesture.
1424 https://bugs.webkit.org/show_bug.cgi?id=135476
1426 Reviewed by Tim Horton.
1428 * page/EventHandler.cpp:
1429 (WebCore::EventHandler::EventHandler):
1430 (WebCore::EventHandler::clear): Clear long press state.
1431 (WebCore::EventHandler::handleMousePressEvent): Start the long-press if the mouse press is a left
1432 mouse press over a link.
1433 (WebCore::EventHandler::eventMayStartDrag): We cannot start a drag if we've recognized a long press.
1434 (WebCore::EventHandler::handleMouseReleaseEvent):
1435 If we didn't recognize a long press, cancel the long press.
1436 (WebCore::EventHandler::beginTrackingPotentialLongMousePress):
1437 Begin the long mouse press by kicking off a timer. If the timer fires before the long press is
1438 cancelled, the long press is recognized.
1439 (WebCore::EventHandler::recognizeLongMousePress): Added. Trigger the long-press and disable other
1440 actions like dragging.
1441 (WebCore::EventHandler::cancelTrackingPotentialLongMousePress): Added. Cancel the long press by
1442 clearing related state.
1443 (WebCore::EventHandler::clearLongMousePressState): Added. Clear long press state.
1444 (WebCore::EventHandler::handleLongMousePressMouseMovedEvent): Added. Cancel the long press if
1445 the mouse moves outside a specified hysteresis interval.
1446 (WebCore::EventHandler::handleMouseMoveEvent): Ask handleLongMousePressMouseMovedEvent whether to
1447 return early and not update hovers, cursors, drags, etc.
1448 (WebCore::EventHandler::dragHysteresisExceeded): Factor out the hysteresis bounds check into
1449 mouseHysteresisExceeded().
1450 (WebCore::EventHandler::handleDrag): Cancel long press upon starting drag.
1451 (WebCore::EventHandler::mouseHysteresisExceeded): Added. General hysteresis function that takes an
1452 arbitrary mouse movement threshold. Factored out from dragHysteresisExceeded.
1453 * page/EventHandler.h:
1455 2014-08-08 Simon Fraser <simon.fraser@apple.com>
1457 [WK2] Scrolling does not work inside nested frames
1458 https://bugs.webkit.org/show_bug.cgi?id=135775
1459 <rdar://problem/17959896>
1461 Reviewed by Tim Horton.
1463 r169733 added an "isMainFrame" check in AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged.
1464 However we have to rebuild the non-fast-scrollable region when any subframe changes,
1465 even a deeply nested one. So always rebuild it, starting from the root frame.
1467 Fixes scrolling on nested framesets like http://www.opengl.org/sdk/docs/man3/.
1469 Test: platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability.html
1471 * page/scrolling/AsyncScrollingCoordinator.cpp:
1472 (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
1474 2014-08-08 Bem Jones-Bey <bjonesbe@adobe.com>
1476 [CSS Shapes] Refactor getExcludedIntervals since only one LineSegment is ever returned
1477 https://bugs.webkit.org/show_bug.cgi?id=135757
1479 Reviewed by Zoltan Horvath.
1481 The interface for getExcludedIntervals was designed when shape-inside
1482 was still a thing, and it was possible for a line in a shape to have
1483 multiple segments. shape-outside can only have one segment per line,
1484 so this refactors the code to simplify and reflect that reality.
1486 No new test, no behavior change.
1488 * rendering/shapes/BoxShape.cpp:
1489 (WebCore::BoxShape::getExcludedInterval):
1490 (WebCore::BoxShape::getExcludedIntervals): Deleted.
1491 * rendering/shapes/BoxShape.h:
1492 * rendering/shapes/PolygonShape.cpp:
1493 (WebCore::PolygonShape::getExcludedInterval):
1494 (WebCore::PolygonShape::getExcludedIntervals): Deleted.
1495 * rendering/shapes/PolygonShape.h:
1496 * rendering/shapes/RasterShape.cpp:
1497 (WebCore::RasterShape::getExcludedInterval):
1498 (WebCore::RasterShape::getExcludedIntervals): Deleted.
1499 * rendering/shapes/RasterShape.h:
1500 * rendering/shapes/RectangleShape.cpp:
1501 (WebCore::RectangleShape::getExcludedInterval):
1502 (WebCore::RectangleShape::getExcludedIntervals): Deleted.
1503 * rendering/shapes/RectangleShape.h:
1504 * rendering/shapes/Shape.h:
1505 (WebCore::LineSegment::LineSegment):
1506 * rendering/shapes/ShapeOutsideInfo.cpp:
1507 (WebCore::ShapeOutsideInfo::logicalLeftOffset):
1508 (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
1509 (WebCore::ShapeOutsideInfo::computeSegmentsForLine): Deleted.
1510 * rendering/shapes/ShapeOutsideInfo.h:
1512 2014-08-08 Brian J. Burg <burg@cs.washington.edu>
1514 Web Inspector: add debugging flag to InspectorTest for unbuffered logging to stderr
1515 https://bugs.webkit.org/show_bug.cgi?id=135726
1517 Reviewed by Timothy Hatcher.
1519 Add a bridge so that InspectorTest can synchronously log to the console.
1521 * inspector/InspectorFrontendHost.cpp:
1522 (WebCore::InspectorFrontendHost::unbufferedLog): Added.
1523 * inspector/InspectorFrontendHost.h:
1524 * inspector/InspectorFrontendHost.idl:
1526 2014-08-08 Roger Fong <roger_fong@apple.com>
1528 Adjustments to CueBox CSS Width calculations.
1529 https://bugs.webkit.org/show_bug.cgi?id=135759
1530 <rdar://problem/17954473>.
1532 Reviewed by Eric Carlson.
1534 This is a followup patch that addresses some of the test failures caused by r172224.
1535 These tests were skipped in r172253.
1536 * html/shadow/MediaControlElements.cpp:
1537 (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
1538 Tell the cue boxes that they need to be updated when the font size specified in the user prefs changes.
1540 Cap width to 100%, calculate max-width in percentages instead of pixels.
1541 * html/track/TextTrackCueGeneric.cpp:
1542 (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
1543 * html/track/VTTCue.cpp:
1544 (WebCore::VTTCueBox::applyCSSProperties):
1546 (WebCore::VTTCue::setFontSize):
1547 Remove some unnecessary code that doesn't actually work.
1548 Make sure to tell cuebox that it needs to be updated.
1549 * html/track/VTTCue.h: Change float constant to double.
1551 2014-08-08 Simon Fraser <simon.fraser@apple.com>
1553 Clean up image subsampling code, make it less iOS-specific
1554 https://bugs.webkit.org/show_bug.cgi?id=134916
1556 Reviewed by Dean Jackson.
1558 Compile the image subsampling code on both Mac and iOS, and make it more platform
1559 neutral in general. Add a setting to allow it to be enabled on Mac for testing.
1561 The most significant changes are in ImageSourceCG and BitmapImageCG. CG's ImageSource
1562 is no longer stateful with respect to subsampling; its functions take a SubsamplingLevel
1563 when appropriate. CG's BitmapImage now determines which level of subsampling to use
1564 for a given frame, storing the subsampling level in the frame data. It can replace
1565 an aggressively subsampled frame with a less subsampled frame if necessary.
1567 To reduce the chances of subsampling affecting rendering, BitmapImage::size() now
1568 always returns the non-subsampled size; subsampling is strictly internal to BitmapImage.
1569 BitmapImage::draw() takes care of scaling the srcRect for subsampled images.
1571 iOS had a code path that enabled caching of frame metadata in BitmapImage without
1572 actually decoding the frame; make this cross-platform.
1574 Fix a couple of issues in the original pathc: remove a log, and ImageSource::allowSubsamplingOfFrameAtIndex()
1577 * WebCore.exp.in: Changed signature for GraphicsContext::drawNativeImage().
1578 * WebCore.xcodeproj/project.pbxproj: Added ImageSource.cpp, which is not built
1579 for Cocoa but useful for reference.
1580 * loader/cache/CachedImage.cpp:
1581 (WebCore::CachedImage::imageSizeForRenderer): Remove iOS-specific subsampling code.
1582 (WebCore::CachedImage::createImage): Call setAllowSubsampling() on the image if we
1583 can get to Settings (m_loader is null for image documents).
1584 (WebCore::CachedImage::currentFrameKnownToBeOpaque): This forced decode always
1585 caused creation of the non-subsampled image, so remove it. There's no reason to
1586 eagerly decode the frame here.
1587 * loader/cache/CachedImage.h: Fix comment.
1588 * page/Settings.cpp: Add defaultImageSubsamplingEnabled, true for iOS and false for Mac.
1589 * page/Settings.in: Added imageSubsamplingEnabled.
1590 * platform/graphics/BitmapImage.cpp:
1591 (WebCore::BitmapImage::BitmapImage): Init some more things. Default m_allowSubsampling to
1592 true for iOS to catch images created in code paths where we can't get to Settings.
1593 (WebCore::BitmapImage::haveFrameAtIndex): Handy helper.
1594 (WebCore::BitmapImage::cacheFrame): Now takes the subsampling level and whether to cache
1595 just metadata, or also the frame.
1596 (WebCore::BitmapImage::didDecodeProperties): No need to store originalSize.
1597 (WebCore::BitmapImage::updateSize): When we get the size for the first time, call
1598 determineMinimumSubsamplingLevel() to choose a reasonable subsampling level which takes
1599 platform-specific limits into account.
1600 (WebCore::BitmapImage::dataChanged): Comment.
1601 (WebCore::BitmapImage::ensureFrameIsCached): Take ImageFrameCaching into account.
1602 (WebCore::BitmapImage::frameAtIndex): Choose a subsampling level given the scale,
1603 then determine if we can use the currently cached frame, or whether we should resample.
1604 (WebCore::BitmapImage::frameIsCompleteAtIndex): Caching m_isComplete is now done when caching
1606 (WebCore::BitmapImage::frameDurationAtIndex):
1607 (WebCore::BitmapImage::frameHasAlphaAtIndex): The 'true' return is the safe return value.
1608 (WebCore::BitmapImage::frameOrientationAtIndex): Caching m_orientation is now done when caching
1610 (WebCore::BitmapImage::cacheFrameInfo): Deleted.
1611 (WebCore::BitmapImage::originalSize): Deleted.
1612 (WebCore::BitmapImage::originalSizeRespectingOrientation): Deleted.
1613 (WebCore::BitmapImage::currentFrameSize): Deleted.
1614 (WebCore::BitmapImage::ensureFrameInfoIsCached): Deleted.
1615 * platform/graphics/BitmapImage.h:
1616 (WebCore::FrameData::FrameData):
1617 * platform/graphics/GraphicsContext.h: No need to pass a scale param now.
1618 * platform/graphics/ImageSource.cpp: Non-Cocoa changes.
1619 (WebCore::ImageSource::subsamplingLevelForScale):
1620 (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
1621 (WebCore::ImageSource::size):
1622 (WebCore::ImageSource::frameSizeAtIndex):
1623 (WebCore::ImageSource::createFrameAtIndex):
1624 (WebCore::ImageSource::frameBytesAtIndex):
1625 * platform/graphics/ImageSource.h: No longer stores subsampling state.
1626 (WebCore::ImageSource::isSubsampled): Deleted.
1627 * platform/graphics/cairo/BitmapImageCairo.cpp:
1628 (WebCore::BitmapImage::determineMinimumSubsamplingLevel):
1629 * platform/graphics/cg/BitmapImageCG.cpp:
1630 (WebCore::FrameData::clear):
1631 (WebCore::BitmapImage::BitmapImage): Init more members.
1632 (WebCore::BitmapImage::determineMinimumSubsamplingLevel): Choose a minimum subsampling
1633 level for the platform (subsample until the image area falls under a threshold).
1634 (WebCore::BitmapImage::checkForSolidColor): Don't bother decoding frames if the image
1635 is not 1x1. Also take care not to decode a non-subsampled image.
1636 (WebCore::BitmapImage::draw): The actual bug fix is here; remove logic that
1637 computed srcRectForCurrentFrame from m_size and m_originalSize; for some callers
1638 srcRect was computed using the pre-subsampled size, and for others it was the subsampled size.
1639 Instead, scale srcRect by mapping between the non-subsampled size, and the size of the CGImageRef
1640 which is affected by subsampling.
1641 (WebCore::BitmapImage::copyUnscaledFrameAtIndex):
1642 * platform/graphics/cg/GraphicsContext3DCG.cpp:
1643 (WebCore::GraphicsContext3D::ImageExtractor::extractImage): Remove #ifdeffed code.
1644 (WebCore::GraphicsContext3D::paintToCanvas):
1645 * platform/graphics/cg/GraphicsContextCG.cpp:
1646 (WebCore::GraphicsContext::drawNativeImage): No more weird scaling!
1647 * platform/graphics/cg/ImageBufferCG.cpp:
1648 (WebCore::ImageBuffer::draw):
1649 * platform/graphics/cg/ImageSourceCG.cpp:
1650 (WebCore::ImageSource::ImageSource):
1651 (WebCore::createImageSourceOptions): Helper that always returns a new CFDictionaryRef.
1652 (WebCore::imageSourceOptions): If not subsampling, return the cached CFDictionaryRef, otherwise
1653 make a new options dict and return it.
1654 (WebCore::ImageSource::subsamplingLevelForScale): Helper that returns a subsampling level
1655 between 0 and 3 given a scale.
1656 (WebCore::ImageSource::isSizeAvailable): SkipMetadata is a default value for the param now.
1657 (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex): We turn off subsampling for progressive
1658 JPEGs because of a bug, so need this to know if a frame should be subsampled.
1659 (WebCore::ImageSource::frameSizeAtIndex): The looping to find a subsampling level is now in BitmapImageCG.
1660 (WebCore::ImageSource::orientationAtIndex):
1661 (WebCore::ImageSource::size): Always use a subsampling level of 0 for size().
1662 (WebCore::ImageSource::getHotSpot):
1663 (WebCore::ImageSource::repetitionCount):
1664 (WebCore::ImageSource::createFrameAtIndex): The caller mapped a scale to a level.
1665 (WebCore::ImageSource::frameDurationAtIndex):
1666 (WebCore::ImageSource::frameBytesAtIndex):
1667 (WebCore::ImageSource::imageSourceOptions): Deleted.
1668 (WebCore::ImageSource::originalSize): Deleted.
1669 * platform/graphics/mac/ImageMac.mm:
1670 (WebCore::BitmapImage::invalidatePlatformData): 0 -> nullptr
1671 * platform/graphics/wince/ImageWinCE.cpp:
1672 (WebCore::BitmapImage::determineMinimumSubsamplingLevel):
1674 2014-08-08 Alex Christensen <achristensen@webkit.org>
1676 Progress towards using CMake on Mac.
1677 https://bugs.webkit.org/show_bug.cgi?id=135662
1679 Reviewed by Laszlo Gombos.
1682 Added necessary include directories and idls.
1683 * PlatformEfl.cmake:
1684 * PlatformGTK.cmake:
1685 Moved ImageSource.cpp and image-decoders to platform CMake files because they are not used on mac.
1686 * PlatformMac.cmake:
1687 Corrected some sources.
1689 Added workaround for not using prefix headers with CMake.
1690 * platform/graphics/ANGLEWebKitBridge.h:
1691 Compile fix to find ANGLE headers while using CMake.
1692 * platform/graphics/FormatConverter.h:
1693 * platform/mac/NSScrollerImpDetails.h:
1694 Removed unnecessary config.h includes.
1696 2014-08-08 Zan Dobersek <zdobersek@igalia.com>
1698 [CMake] Drop the required version of CMake down to 2.8.8
1699 https://bugs.webkit.org/show_bug.cgi?id=135713
1701 Reviewed by Alex Christensen.
1703 * CMakeLists.txt: Use set_property() to set INCLUDE_DIRECTORIES for
1704 the ANGLESupport library. This avoids using target_include_directories()
1705 which requires CMake 2.8.11.
1707 2014-08-05 Philippe Normand <pnormand@igalia.com>
1709 [GStreamer][1.4] Caps negotiation failure in playback pipeline
1710 https://bugs.webkit.org/show_bug.cgi?id=135607
1712 Reviewed by Carlos Garcia Campos.
1714 Ensure the capsfilters used in front of interleave negotiate their
1715 caps correctly with audioconvert which requires audio buffers with
1718 No new tests, existing webaudio tests will cover this change once
1719 we bump our JHBuild moduleset to GStreamer 1.4.
1721 * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1722 (getGStreamerMonoAudioCaps):
1724 2014-08-07 Commit Queue <commit-queue@webkit.org>
1726 Unreviewed, rolling out r172291.
1727 https://bugs.webkit.org/show_bug.cgi?id=135748
1729 broke background-attachment-fixed with backround-size-contain
1730 (e.g. iCloud.com) (Requested by thorton on #webkit).
1734 "Fixed backgrounds don't paint in blurred inset areas"
1735 https://bugs.webkit.org/show_bug.cgi?id=135712
1736 http://trac.webkit.org/changeset/172291
1738 2014-08-07 Zalan Bujtas <zalan@apple.com>
1740 Subpixel rendering: Border thickness and length flooring can result empty borders
1741 due to losing precision during multiple float <-> LayoutUnit conversions.
1742 https://bugs.webkit.org/show_bug.cgi?id=135686
1744 Reviewed by Simon Fraser.
1746 The combination of losing precision and flooring the border thickness/length to avoid
1747 empty border rect drawing can lead to false positives of missing borders.
1748 This patch moves empty border checking right before painting where we can safely use round
1751 Tests: fast/borders/hidpi-border-width-flooring.html
1753 * rendering/RenderObject.cpp:
1754 (WebCore::drawBorderLineRect):
1755 (WebCore::drawBorderLine):
1756 (WebCore::RenderObject::drawLineForBoxSide):
1758 2014-08-07 Ryuan Choi <ryuan.choi@samsung.com>
1760 [EFL] Build break with mpegts since r167025
1761 https://bugs.webkit.org/show_bug.cgi?id=135737
1763 Reviewed by Gyuyoung Kim.
1765 * PlatformEfl.cmake: Added includes and libraries about MPEG-TS
1767 2014-08-07 Simon Fraser <simon.fraser@apple.com>
1769 HTML <sub> and <sup> elements do not work in some 64-bit builds
1770 https://bugs.webkit.org/show_bug.cgi?id=135736
1772 Reviewed by Tim Horton.
1774 RootInlineBox::verticalPositionForBox() had some implicit conversions between
1775 LayoutUnit and int that caused overflow, and resulted in different comparison
1776 behavior with an int constant in different architectures, since overflow behavior
1779 Specifically, VerticalPositionCache was written in terms of ints with a special
1780 0x80000000 "not found" value. However, 0x80000000 was being assigned to
1781 a LayoutUnit, which multiplies by 64 causing overflow. The result was then
1782 compared again with 0x80000000 which could pass or fail depending on overflow
1785 Fix by converting VerticalPositionCache to use LayoutUnits, and to have a bool
1786 return value with a result out param, instead of a special return value.
1788 Not easily testable, since the difference does not show in DRT output,
1789 and a ref test would be flakey.
1791 * rendering/RootInlineBox.cpp:
1792 (WebCore::RootInlineBox::ascentAndDescentForBox):
1793 * rendering/VerticalPositionCache.h:
1794 (WebCore::VerticalPositionCache::get):
1795 (WebCore::VerticalPositionCache::set):
1797 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
1799 Get rid of SCRIPTED_SPEECH
1800 https://bugs.webkit.org/show_bug.cgi?id=135729
1802 Reviewed by Brent Fulgham.
1804 * Configurations/FeatureDefines.xcconfig:
1805 * Modules/speech/SpeechGrammar.cpp: Removed.
1806 * Modules/speech/SpeechGrammar.h: Removed.
1807 * Modules/speech/SpeechGrammar.idl: Removed.
1808 * Modules/speech/SpeechGrammarList.cpp: Removed.
1809 * Modules/speech/SpeechGrammarList.h: Removed.
1810 * Modules/speech/SpeechGrammarList.idl: Removed.
1811 * Modules/speech/SpeechRecognition.cpp: Removed.
1812 * Modules/speech/SpeechRecognition.h: Removed.
1813 * Modules/speech/SpeechRecognition.idl: Removed.
1814 * Modules/speech/SpeechRecognitionAlternative.cpp: Removed.
1815 * Modules/speech/SpeechRecognitionAlternative.h: Removed.
1816 * Modules/speech/SpeechRecognitionAlternative.idl: Removed.
1817 * Modules/speech/SpeechRecognitionClient.h: Removed.
1818 * Modules/speech/SpeechRecognitionController.cpp: Removed.
1819 * Modules/speech/SpeechRecognitionController.h: Removed.
1820 * Modules/speech/SpeechRecognitionError.cpp: Removed.
1821 * Modules/speech/SpeechRecognitionError.h: Removed.
1822 * Modules/speech/SpeechRecognitionError.idl: Removed.
1823 * Modules/speech/SpeechRecognitionEvent.cpp: Removed.
1824 * Modules/speech/SpeechRecognitionEvent.h: Removed.
1825 * Modules/speech/SpeechRecognitionEvent.idl: Removed.
1826 * Modules/speech/SpeechRecognitionResult.cpp: Removed.
1827 * Modules/speech/SpeechRecognitionResult.h: Removed.
1828 * Modules/speech/SpeechRecognitionResult.idl: Removed.
1829 * Modules/speech/SpeechRecognitionResultList.cpp: Removed.
1830 * Modules/speech/SpeechRecognitionResultList.h: Removed.
1831 * Modules/speech/SpeechRecognitionResultList.idl: Removed.
1832 * bindings/generic/RuntimeEnabledFeatures.cpp:
1833 (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
1834 * bindings/generic/RuntimeEnabledFeatures.h:
1835 (WebCore::RuntimeEnabledFeatures::setScriptedSpeechEnabled): Deleted.
1836 (WebCore::RuntimeEnabledFeatures::scriptedSpeechEnabled): Deleted.
1837 (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEnabled): Deleted.
1838 (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionErrorEnabled): Deleted.
1839 (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEventEnabled): Deleted.
1840 (WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarEnabled): Deleted.
1841 (WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarListEnabled): Deleted.
1842 * bindings/js/JSDictionary.cpp:
1843 (WebCore::JSDictionary::convertValue): Deleted.
1844 * bindings/js/JSDictionary.h:
1845 * dom/EventNames.in:
1846 * dom/EventTargetFactory.in:
1848 2014-08-07 Brent Fulgham <bfulgham@apple.com>
1850 [Win] Unreviewed gardening.
1852 Don't build the JSFileException and JSFileReaderSync files in 64-bit; they are already part
1853 of DerivedObjects.cpp.
1855 * WebCore.vcxproj/WebCore.vcxproj: Exclude JSFileException and JSFileReaderSync to avoid
1856 multiple definitions of symbols.
1858 2014-08-07 Enrica Casucci <enrica@apple.com>
1860 [Services with UI] Action menu does not appear if selection includes both text and an image.
1861 https://bugs.webkit.org/show_bug.cgi?id=135731
1862 <rdar://problem/17837491>
1864 Reviewed by Brady Eidson.
1866 When collecting selection rects via SelectionRectGatherer we should also note if the selection
1867 contains non text elements. This way the Notifier class can send that information to ServicesOverlayController
1868 to properly handle the highlight for the service.
1870 * editing/SelectionRectGatherer.cpp:
1871 (WebCore::SelectionRectGatherer::SelectionRectGatherer):
1872 (WebCore::SelectionRectGatherer::Notifier::~Notifier):
1873 (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
1874 * editing/SelectionRectGatherer.h:
1875 (WebCore::SelectionRectGatherer::setTextOnly):
1876 (WebCore::SelectionRectGatherer::isTextOnly):
1877 * page/EditorClient.h:
1878 (WebCore::EditorClient::selectionRectsDidChange):
1879 * rendering/RenderView.cpp:
1880 (WebCore::RenderView::applySubtreeSelection):
1882 2014-08-07 Andy Estes <aestes@apple.com>
1884 [Mac] Parental Controls content filter is mistakenly enabled for HTTP responses
1885 https://bugs.webkit.org/show_bug.cgi?id=135730
1887 Reviewed by Brady Eidson.
1889 On the Mac, the WebFilterEvaluator (Parental Controls) content filter should only be enabled for HTTPS
1890 responses. During iOS upstreaming we mistakenly enabled it for HTTP responses as well, and this causes HTTP
1891 responses to be filtered twice -- once by the Parental Controls HTTP proxy and once by WebCore. Revert to the
1892 pre-upstreaming behavior and only enable the content filter for HTTPS responses.
1894 No new tests. Content filtering is not testable from WebKit.
1896 * loader/DocumentLoader.cpp:
1897 (WebCore::DocumentLoader::responseReceived): Passed the response to ContentFilter::canHandleResponse().
1898 * platform/ContentFilter.h:
1899 * platform/mac/ContentFilterMac.mm:
1900 (WebCore::ContentFilter::canHandleResponse): Renamed from isEnabled(). Checks the response's scheme on Mac to
1901 determine whether WebFilterEvaluator should be used.
1902 (WebCore::ContentFilter::isEnabled): Deleted.
1904 2014-08-07 Beth Dakin <bdakin@apple.com>
1906 Fixed backgrounds don't paint in blurred inset areas
1907 https://bugs.webkit.org/show_bug.cgi?id=135712
1909 Reviewed by Simon Fraser.
1911 Background geometry calculations for fixed background need to use the larger
1914 * rendering/RenderBoxModelObject.cpp:
1915 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1917 2014-08-07 Jer Noble <jer.noble@apple.com>
1919 [EME][Mac] Error codes returned by AVSampleBufferDisplayLayer are negative; clip when passed to JavaScript as doubles.
1920 https://bugs.webkit.org/show_bug.cgi?id=135710
1922 Reviewed by Brent Fulgham.
1924 Return the absolute value of the error codes returned by AVSampleBufferDisplayLayer, so that the conversion from
1925 unsigned -> double does not clip due to the (converted) value being greater than 2^53.
1927 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
1928 (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
1929 (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
1931 2014-08-07 Daniel Bates <dabates@apple.com>
1933 Sometimes Gmail cannot load messages, particularly on refresh ("...the application ran into an unexpected error...")
1934 https://bugs.webkit.org/show_bug.cgi?id=135688
1935 <rdar://problem/17886686>
1937 Reviewed by Alexey Proskuryakov.
1939 Fixes an issue where gmail.com may fail to load the list of messages. In particular, a SQLTransactionCallback
1940 function may not be executed and hence Gmail will not display the list of messages and
1941 will subsequently display an error message.
1943 When a WebKit client defers loading of a page (e.g. -[WebView setDefersCallbacks:YES]), WebCore
1944 may still load the main resource, say if substitute data is available for it, and defer executing
1945 tasks, such as a SQLTransactionCallback function, by appending such tasks to the end of the list
1946 of pending tasks for the associated Document. This list of pending tasks is never processed when
1947 a client subsequently allows loading (e.g. -[WebView setDefersCallbacks:NO])). Therefore, we never
1948 execute a SQLTransactionCallback function that was deferred.
1950 Ideally WebCore would defer loading of substitute data when a WebKit client requests that loading
1951 be deferred and hence a SQLTransactionCallback function would be deferred as a consequence of the
1952 lack of JavaScript script execution (since substitute data wasn't loaded and hence any JavaScript
1953 script contained in the substitute data that initiates a SQL transaction isn't executed). For now,
1954 it's sufficient to only defer executing tasks when either there are existing pending tasks or the
1955 page defers loading and active DOM objects in the document are suspended (e.g. Document::suspendActiveDOMObjects() was called).
1958 (WebCore::Document::postTask):
1960 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
1962 Get rid of INPUT_SPEECH
1963 https://bugs.webkit.org/show_bug.cgi?id=135672
1965 Reviewed by Andreas Kling.
1968 * Configurations/FeatureDefines.xcconfig:
1969 * DerivedSources.make:
1970 * Modules/speech/SpeechSynthesis.cpp:
1971 * WebCore.vcxproj/WebCore.vcxproj:
1972 * WebCore.vcxproj/WebCore.vcxproj.filters:
1973 * WebCore.xcodeproj/project.pbxproj:
1974 * bindings/generic/RuntimeEnabledFeatures.cpp:
1975 (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
1976 * bindings/generic/RuntimeEnabledFeatures.h:
1977 (WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled): Deleted.
1978 (WebCore::RuntimeEnabledFeatures::speechInputEnabled): Deleted.
1979 (WebCore::RuntimeEnabledFeatures::webkitSpeechEnabled): Deleted.
1980 (WebCore::RuntimeEnabledFeatures::webkitGrammarEnabled): Deleted.
1981 * css/CSSPrimitiveValueMappings.h:
1982 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1983 * css/CSSValueKeywords.in:
1985 (input::-webkit-input-speech-button): Deleted.
1987 (WebCore::Element::isInputFieldSpeechButtonElement): Deleted.
1988 * dom/EventNames.in:
1989 * html/HTMLInputElement.cpp:
1990 (WebCore::HTMLInputElement::parseAttribute):
1991 (WebCore::HTMLInputElement::speechButtonElement): Deleted.
1992 (WebCore::HTMLInputElement::isSpeechEnabled): Deleted.
1993 * html/HTMLInputElement.h:
1994 * html/HTMLInputElement.idl:
1995 * html/InputType.cpp:
1996 (WebCore::InputType::shouldRespectListAttribute):
1997 (WebCore::InputType::shouldRespectSpeechAttribute): Deleted.
1999 (WebCore::InputType::speechButtonElement): Deleted.
2000 * html/NumberInputType.cpp:
2001 (WebCore::NumberInputType::shouldRespectSpeechAttribute): Deleted.
2002 * html/NumberInputType.h:
2003 * html/PasswordInputType.cpp:
2004 (WebCore::PasswordInputType::shouldRespectSpeechAttribute): Deleted.
2005 * html/PasswordInputType.h:
2006 * html/SearchInputType.cpp:
2007 (WebCore::SearchInputType::shouldRespectSpeechAttribute): Deleted.
2008 * html/SearchInputType.h:
2009 * html/TelephoneInputType.cpp:
2010 (WebCore::TelephoneInputType::shouldRespectSpeechAttribute): Deleted.
2011 * html/TelephoneInputType.h:
2012 * html/TextFieldInputType.cpp:
2013 (WebCore::TextFieldInputType::needsContainer):
2014 (WebCore::TextFieldInputType::createShadowSubtree):
2015 (WebCore::TextFieldInputType::destroyShadowSubtree):
2016 (WebCore::TextFieldInputType::speechButtonElement): Deleted.
2017 * html/TextFieldInputType.h:
2018 * html/TextInputType.cpp:
2019 (WebCore::TextInputType::shouldRespectSpeechAttribute): Deleted.
2020 * html/TextInputType.h:
2021 * html/shadow/TextControlInnerElements.cpp:
2022 (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement): Deleted.
2023 (WebCore::InputFieldSpeechButtonElement::~InputFieldSpeechButtonElement): Deleted.
2024 (WebCore::InputFieldSpeechButtonElement::create): Deleted.
2025 (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): Deleted.
2026 (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents): Deleted.
2027 (WebCore::InputFieldSpeechButtonElement::setState): Deleted.
2028 (WebCore::InputFieldSpeechButtonElement::speechInput): Deleted.
2029 (WebCore::InputFieldSpeechButtonElement::didCompleteRecording): Deleted.
2030 (WebCore::InputFieldSpeechButtonElement::didCompleteRecognition): Deleted.
2031 (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): Deleted.
2032 (WebCore::InputFieldSpeechButtonElement::willAttachRenderers): Deleted.
2033 (WebCore::InputFieldSpeechButtonElement::willDetachRenderers): Deleted.
2034 (WebCore::InputFieldSpeechButtonElement::startSpeechInput): Deleted.
2035 (WebCore::InputFieldSpeechButtonElement::stopSpeechInput): Deleted.
2036 * html/shadow/TextControlInnerElements.h:
2037 (WebCore::toInputFieldSpeechButtonElement): Deleted.
2038 * page/SpeechInput.cpp: Removed.
2039 * page/SpeechInput.h: Removed.
2040 * page/SpeechInputClient.h: Removed.
2041 * page/SpeechInputEvent.cpp: Removed.
2042 * page/SpeechInputEvent.h: Removed.
2043 * page/SpeechInputEvent.idl: Removed.
2044 * page/SpeechInputListener.h: Removed.
2045 * page/SpeechInputResult.cpp: Removed.
2046 * page/SpeechInputResult.h: Removed.
2047 * page/SpeechInputResult.idl: Removed.
2048 * page/SpeechInputResultList.cpp: Removed.
2049 * page/SpeechInputResultList.h: Removed.
2050 * page/SpeechInputResultList.idl: Removed.
2051 * platform/ThemeTypes.h:
2052 * rendering/RenderInputSpeech.cpp: Removed.
2053 * rendering/RenderInputSpeech.h: Removed.
2054 * rendering/RenderTheme.cpp:
2055 (WebCore::RenderTheme::adjustStyle):
2056 (WebCore::RenderTheme::paint):
2057 (WebCore::RenderTheme::paintBorderOnly):
2058 (WebCore::RenderTheme::paintDecorations):
2059 (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle): Deleted.
2060 (WebCore::RenderTheme::paintInputFieldSpeechButton): Deleted.
2061 * rendering/RenderTheme.h:
2062 * rendering/RenderThemeMac.mm:
2063 (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2065 2014-08-07 Eric Carlson <eric.carlson@apple.com>
2067 Create UTF-8 string from in-band VTT cues
2068 https://bugs.webkit.org/show_bug.cgi?id=135716
2070 Reviewed by Brent Fulgham.
2072 Tests will be added in https://bugs.webkit.org/show_bug.cgi?id=135717.
2074 * platform/graphics/ISOVTTCue.cpp:
2075 (WebCore::ISOBox::peekString): Call String::fromUTF8 because we know that VTT is always
2078 2014-08-06 Jeremy Jones <jeremyj@apple.com>
2080 Disable implicit animations on video layer.
2081 https://bugs.webkit.org/show_bug.cgi?id=135679
2083 Reviewed by Eric Carlson.
2085 Disable implicit animations on AVPlayerLayer except when setting fullscreen frame.
2086 This prevents unwanted animations.
2088 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2089 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): disable implicit animations
2090 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame): allow implicit animations while changing fullscreen frame.
2092 2014-08-07 Gordon Sheridan <gordon_sheridan@apple.com>
2094 Provide methods to clear undesired references to HistoryItems that have been removed from the back/forard list.
2095 https://bugs.webkit.org/show_bug.cgi?id=135634
2096 <rdar://problem/17388461>
2098 Reviewed by Brady Eidson.
2100 No new tests. Would require an API test that also needs an httpd, which we don't currently support.
2103 Added export for Page::clearPreviousItemFromAllPages.
2105 * loader/HistoryController.cpp:
2106 (WebCore::HistoryController::clearPreviousItem):
2107 Clear m_previousItem and iterate over children recursively calling clearPreviousItem().
2108 The m_previousItem is cleared for the target HistoryController, and all of its descendents.
2110 * loader/HistoryController.h:
2111 Declared HistoryController::clearPreviousItem.
2114 (WebCore::Page::clearPreviousItemFromAllPages):
2115 Iterate over each page in the web process, checking if the previous item of
2116 the HistoryController for the main frame is the same as the item being removed. If so, the
2117 frameTree is traversed and each associated HistoryController has its m_previousItem cleared.
2120 Declared Page::clearPreviousItemFromAllPages.
2122 2014-08-07 Roger Fong <roger_fong@apple.com>
2124 Unreviewed build fix attempt #2 following r172224.
2126 * html/track/VTTCue.cpp:
2127 (WebCore::VTTCueBox::applyCSSProperties):
2129 2014-08-07 Roger Fong <roger_fong@apple.com>
2131 Unreviewed build fix following r172224.
2133 * html/track/TextTrackCueGeneric.cpp:
2134 (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
2135 * html/track/VTTCue.cpp:
2136 (WebCore::VTTCueBox::applyCSSProperties):
2137 * html/track/VTTCue.h:
2139 2014-08-07 Daniel Bates <dabates@apple.com>
2141 Unreviewed, rolling out r172219.
2143 Caused some /fast/workers tests to fail; will investigate
2148 "Sometimes Gmail cannot load messages, particularly on refresh
2149 ("...the application ran into an unexpected error...")"
2150 https://bugs.webkit.org/show_bug.cgi?id=135688
2151 http://trac.webkit.org/changeset/172219
2153 2014-08-06 Roger Fong <roger_fong@apple.com>
2155 Increase width of caption container if a larger font size is selected from user prefs.
2156 https://bugs.webkit.org/show_bug.cgi?id=135677.
2158 Reviewed by Brent Fulgham.
2160 * html/shadow/MediaControlElements.cpp:
2161 (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2162 Upon creation of a VTTCueBox make sure to supply the font size set by the user prefs.
2163 * html/track/TextTrackCueGeneric.cpp:
2164 (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
2165 Increase the width of the cue box based on user prefs font size selection.
2167 * html/track/VTTCue.h:
2168 Keep track of the font size set in the user prefs for use when the cue boxes are created.
2169 (WebCore::VTTCueBox::setFontSizeFromCaptionUserPrefs):
2170 * html/track/VTTCue.cpp:
2171 (WebCore::VTTCueBox::applyCSSProperties):
2172 Increase the width of the cue box based on user prefs font size selection.
2173 (WebCore::VTTCue::getDisplayTree):
2174 (WebCore::VTTCue::setFontSize):
2175 If the font size set is important then we don't want to use the font size set by user prefs, set it to 0.
2177 2014-08-07 Alex Christensen <achristensen@webkit.org>
2179 Unreviewed build fix after r172220.
2181 * css/SelectorChecker.cpp:
2182 (WebCore::hasScrollbarPseudoElement):
2183 Use ASSERT_UNUSED instead of just ASSERT.
2185 2014-08-07 Alex Christensen <achristensen@webkit.org>
2187 Compile scrollbar pseudoclass css selectors.
2188 https://bugs.webkit.org/show_bug.cgi?id=135242
2190 Reviewed by Benjamin Poulain.
2192 Tests: scrollbars/corner-resizer-window-inactive.html
2193 scrollbars/scrollbar-selectors.html
2195 * css/ElementRuleCollector.cpp:
2196 (WebCore::ElementRuleCollector::ruleMatches):
2197 Changed assertion because there are pseudo-elements selectors that return CannotCompileAnything now, which
2198 make SimpleSelectorCheckers.
2199 Add scrollbar, scrollbarPart, and document to the CheckingContext and compile scrollbar pseudo-element selectors.
2200 * css/SelectorChecker.cpp:
2201 (WebCore::hasScrollbarPseudoElement):
2202 Added. Logic moved from matchRecursively to be easier to read and to add assertions.
2203 context.scrollbar is always non-null when dynamicPseudo is SCROLLBAR_CORNER.
2204 (WebCore::SelectorChecker::matchRecursively):
2205 Moved logic to hasScrollbarPseudoElement.
2206 (WebCore::SelectorChecker::checkOne):
2207 checkScrollbarPseudoClass accesses the document through the element now.
2208 (WebCore::SelectorChecker::checkScrollbarPseudoClass):
2209 * css/SelectorChecker.h:
2210 (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
2211 * css/SelectorCheckerTestFunctions.h:
2212 (WebCore::scrollbarMatchesEnabledPseudoClass):
2213 (WebCore::scrollbarMatchesDisabledPseudoClass):
2214 (WebCore::scrollbarMatchesHoverPseudoClass):
2215 (WebCore::scrollbarMatchesActivePseudoClass):
2216 (WebCore::scrollbarMatchesHorizontalPseudoClass):
2217 (WebCore::scrollbarMatchesVerticalPseudoClass):
2218 (WebCore::scrollbarMatchesDecrementPseudoClass):
2219 (WebCore::scrollbarMatchesIncrementPseudoClass):
2220 (WebCore::scrollbarMatchesStartPseudoClass):
2221 (WebCore::scrollbarMatchesEndPseudoClass):
2222 (WebCore::scrollbarMatchesDoubleButtonPseudoClass):
2223 (WebCore::scrollbarMatchesSingleButtonPseudoClass):
2224 (WebCore::scrollbarMatchesNoButtonPseudoClass):
2225 (WebCore::scrollbarMatchesCornerPresentPseudoClass):
2226 Move scrollbar selector logic from SelectorChecker.cpp to SelectorCheckerTestFunctions.h
2227 For window-inactive pseudo classes, we now access the document through the element instead of as a separate parameter.
2228 * cssjit/SelectorCompiler.cpp:
2229 (WebCore::SelectorCompiler::SelectorFragment::appendUnoptimizedPseudoClassWithContext):
2230 (WebCore::SelectorCompiler::addScrollbarPseudoClassType):
2231 (WebCore::SelectorCompiler::addPseudoClassType):
2232 (WebCore::SelectorCompiler::isScrollbarPseudoElement):
2233 (WebCore::SelectorCompiler::constructFragments):
2234 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2235 Call functions for unoptimized pseudo classes that require a context.
2236 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateContextFunctionCallTest):
2237 Added. Similar to generateElementFunctionCallTest, but the CheckingContext pointer is stored on the stack instead of a dedicated register.
2238 * cssjit/SelectorCompiler.h:
2239 Added scrollbar, scrollbarPart, and document to the CheckingContext.
2240 (WebCore::SelectorCompiler::CheckingContext::document):
2241 Added method to access the document in a way that is syntactically equal to SelectorCheckingContext.
2242 This way, the template functions in SelectorCheckerTestFunctions.h can be compiled with both context types,
2243 but the context types store the document differently.
2245 2014-08-07 Daniel Bates <dabates@apple.com>
2247 Sometimes Gmail cannot load messages, particularly on refresh ("...the application ran into an unexpected error...")
2248 https://bugs.webkit.org/show_bug.cgi?id=135688
2249 <rdar://problem/17886686>
2251 Reviewed by Maciej Stachowiak.
2253 Fixes an issue where gmail.com may fail to load the list of messages. In particular, a SQLTransactionCallback
2254 function may not be executed and hence Gmail will not display the list of messages and
2255 will subsequently display an error message.
2257 When a WebKit client defers loading of a page (e.g. -[WebView setDefersCallbacks:YES]), WebCore
2258 may still load the main resource, say if substitute data is available for it, and defer executing
2259 tasks, such as a SQLTransactionCallback function, by appending such tasks to the end of the list
2260 of pending tasks for the associated Document. This list of pending tasks is never processed when
2261 a client subsequently allows loading (e.g. -[WebView setDefersCallbacks:NO])). Therefore, we never
2262 execute a SQLTransactionCallback function that was deferred.
2264 Ideally WebCore would defer loading of substitute data when a WebKit client requests that loading
2265 be deferred and hence a SQLTransactionCallback function would be deferred as a consequence of the
2266 lack of JavaScript script execution (since substitute data wasn't loaded and hence any JavaScript
2267 script contained in the substitute data that initiates a SQL transaction isn't executed). For now,
2268 it's sufficient to only defer executing tasks when either there are existing pending tasks or the
2269 active DOM objects for the document are suspended (e.g. Document::suspendActiveDOMObjects() was called).
2272 (WebCore::Document::postTask):
2274 2014-08-07 Zalan Bujtas <zalan@apple.com>
2276 border-radius on html does not render properly.
2277 https://bugs.webkit.org/show_bug.cgi?id=135706
2279 Reviewed by Simon Fraser.
2281 Ensure that background is initialized when border-radius is present.
2283 Test: fast/borders/border-radius-on-html.html
2285 * rendering/RenderView.cpp:
2286 (WebCore::rendererObscuresBackground):
2288 2014-08-07 Pratik Solanki <psolanki@apple.com>
2290 Random resource replacement on beta.icloud.com
2291 https://bugs.webkit.org/show_bug.cgi?id=135685
2292 <rdar://problem/17937975>
2294 Reviewed by Alexey Proskuryakov.
2296 Revert the performance optimization in r170499. It turns out we could get a delayed disk
2297 cache notification for a resource that has since been changed in WebCore. In such a case, we
2298 were replacing the newer resource data with the older disk cached resource data. This was
2299 happening for cached POST content on beta.icloud.com. Fix this by forcing a memcmp of data
2300 contents before replacing it which is what we used to do before.
2302 * loader/cache/CachedResource.cpp:
2303 (WebCore::CachedResource::tryReplaceEncodedData):
2305 2014-08-06 Brent Fulgham <bfulgham@apple.com>
2307 [Mac, iOS] Captions are appearing multiple times during repeated video play through
2308 https://bugs.webkit.org/show_bug.cgi?id=135680
2309 <rdar://problem/17926802>
2311 Reviewed by Eric Carlson.
2313 Test: media/track/track-in-band-cues-added-once.html
2315 Revert TextTrackCueGeneric::isOrderedBefore logic to its original form, and add
2316 a new 'isOrderedBeforeDuringDisplay' for the special case of displaying captions.
2318 * html/shadow/MediaControlElements.cpp:
2319 (WebCore::compareCueIntervalForDisplay): Added helper function.
2320 (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Use the new
2321 'isOrderedBeforeDuringDisplay' to order the cues for display.
2322 * html/track/TextTrackCue.h:
2323 (WebCore::TextTrackCue::isOrderedBeforeDuringDisplay): Added. This just
2324 calls the existing 'isOrderedBefore' method.
2325 * html/track/TextTrackCueGeneric.cpp:
2326 (WebCore::TextTrackCueGeneric::isOrderedBefore): Revert to logic used
2328 (WebCore::TextTrackCueGeneric::isOrderedBeforeDuringDisplay): New method that
2329 implements the behavior in r171700.
2330 * html/track/TextTrackCueGeneric.h:
2332 2014-08-07 Jer Noble <jer.noble@apple.com>
2334 [Mac] Taking a paused video full screen flashes black at beginning of animation.
2335 https://bugs.webkit.org/show_bug.cgi?id=135668
2337 Reviewed by Eric Carlson.
2339 When entering fullscreen, the full screen window will momentarily occlude the browser
2340 window, causing a visiblity change notification. To avoid flickering when client buffering
2341 is disabled, throttle calls to updateClientDataBuffering by delaying those calls for a
2344 * platform/audio/MediaSession.cpp:
2345 (WebCore::MediaSession::MediaSession):
2346 (WebCore::MediaSession::clientWillPausePlayback):
2347 (WebCore::MediaSession::visibilityChanged):
2348 (WebCore::MediaSession::clientDataBufferingTimerFired):
2349 (WebCore::MediaSession::updateClientDataBuffering):
2350 * platform/audio/MediaSession.h:
2352 2014-08-07 Zan Dobersek <zdobersek@igalia.com>
2354 ASSERT in Document::unregisterCollection reloading apple.com
2355 https://bugs.webkit.org/show_bug.cgi?id=135168
2357 Reviewed by Andreas Kling.
2360 (WebCore::Document::unregisterCollection): This assertion was failing
2361 because the passed-in HTMLCollection was not invalidated for a non-related
2362 attribute, but was instead unregistered during destruction, at which point
2363 the m_collectionsInvalidatedAtDocument HashSet was empty.
2364 The assertion could be trivially reduced into checking that the HashSet is
2365 empty when it was moved out of in Document::invalidateNodeListAndCollectionCaches(),
2366 but that just checks that the move semantics on HashSet work properly. Removing
2367 a non-existent element from a HashSet is harmless, so the assertion can be removed
2370 2014-08-06 Brent Fulgham <bfulgham@apple.com>
2372 [Win] Correct build errors when WebGL Disabled
2373 https://bugs.webkit.org/show_bug.cgi?id=135687
2375 Unreviewed build fix.
2377 * WebCore.vcxproj/WebCore.vcxproj: Don't build Cairo files
2379 * platform/graphics/GLContext.cpp: Correct use of 3D_GRAPHICS macro.
2380 * platform/graphics/GraphicsContext3DPrivate.cpp: Ditto.
2381 * platform/graphics/opengl/GLPlatformContext.cpp: Ditto.
2382 * platform/graphics/opengl/GLPlatformSurface.cpp: Ditto.
2384 2014-08-06 Ryuan Choi <ryuan.choi@samsung.com>
2386 Unreviewed build fix on non Cocoa port since r172172
2388 * platform/text/TextEncodingRegistry.cpp:
2389 (WebCore::defaultTextEncodingNameForSystemLanguage):
2390 * platform/text/TextEncodingRegistry.h:
2392 2014-08-06 Myles C. Maxfield <mmaxfield@apple.com>
2394 [iOS] Make document marker assets not specific to particular scale factors
2395 https://bugs.webkit.org/show_bug.cgi?id=135671
2397 Reviewed by Simon Fraser.
2401 * WebCore.xcodeproj/project.pbxproj:
2402 * platform/ios/wak/WKGraphics.mm:
2403 (imageResourcePath):
2404 (WKGraphicsCreateImageFromBundleWithName):
2406 2014-08-06 Enrica Casucci <enrica@apple.com>
2408 Services menu doesn't show up after you defocus/refocus the Safari window.
2409 https://bugs.webkit.org/show_bug.cgi?id=135678
2410 <rdar://problem/17929247>
2412 Reviewed by Tim Horton.
2414 In setSelection we create a SelectionRectGatherer::Notifier object that will notify
2415 SelectionOverlayController about changes to the selection rects.
2416 Upon creation, the list of selections rects is cleared, since it is populated by
2417 the code that collects the selection rects. That code is never called
2418 when setSelection won't change the selection, which the case when the window is
2419 activated. The fix consists in postponing the SelectionRectGatherer::Notifier object
2420 creation until we know for sure that the selection is indeed going to change.
2422 * rendering/RenderView.cpp:
2423 (WebCore::RenderView::setSelection):
2425 2014-08-06 Dean Jackson <dino@apple.com>
2427 ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED is not used anywhere. Remove it.
2428 https://bugs.webkit.org/show_bug.cgi?id=135675
2430 Reviewed by Sam Weinig.
2432 * Configurations/FeatureDefines.xcconfig:
2434 2014-08-06 Brady Eidson <beidson@apple.com>
2436 IDB transactions never reset if the Web Process ends before cleaning up
2437 https://bugs.webkit.org/show_bug.cgi?id=135218
2439 Reviewed by David Kilzer.
2441 No new tests (Covered by existing tests).
2443 * Modules/indexeddb/IDBServerConnection.h: Add sync versions of reset/rollback.
2445 * Modules/indexeddb/IDBTransactionBackend.cpp:
2446 (WebCore::IDBTransactionBackend::abort): Call the sync versions.
2448 2014-08-06 Wenson Hsieh <wenson_hsieh@apple.com>
2450 Implement parsing for CSS scroll snap points
2451 https://bugs.webkit.org/show_bug.cgi?id=134301
2453 Provided support for parsing -webkit-scroll-snap-* properties, i.e. type, points-x, points-y, destination, and coordinates.
2454 The exact syntax of the scroll snap CSS properties follow the W3C spec at http://dev.w3.org/csswg/css-snappoints/
2456 Reviewed by Dean Jackson.
2458 Tests: css3/scroll-snap/scroll-snap-property-parsing.html,
2459 css3/scroll-snap/scroll-snap-property-computed-style.html
2461 * CMakeLists.txt: Added StyleScrollSnapPoints.h, StyleScrollSnapPoints.cpp
2462 * Configurations/FeatureDefines.xcconfig: Added ENABLE_CSS_SCROLL_SNAP
2463 * WebCore.vcxproj/WebCore.vcxproj: Added StyleScrollSnapPoints.h, StyleScrollSnapPoints.cpp
2464 * WebCore.vcxproj/WebCore.vcxproj.filters: Added StyleScrollSnapPoints.h, StyleScrollSnapPoints.cpp
2465 * WebCore.xcodeproj/project.pbxproj: Added StyleScrollSnapPoints.h, StyleScrollSnapPoints.cpp, LengthRepeat.h
2466 * css/CSSCalculationValue.cpp: Support for LengthRepeat
2467 (WebCore::hasDoubleValue):
2468 * css/CSSComputedStyleDeclaration.cpp: Support for showing computed style for snap point properties.
2469 (WebCore::scrollSnapDestination):
2470 (WebCore::scrollSnapPoints):
2471 (WebCore::scrollSnapCoordinates):
2472 (WebCore::ComputedStyleExtractor::propertyValue):
2473 * css/CSSParser.cpp: Support for parsing snap point properties.
2474 (WebCore::isValidKeywordPropertyAndValue): handle snap point type
2475 (WebCore::isKeywordPropertyID):
2476 (WebCore::CSSParser::parseValue): Added support for parsing snap points.
2477 (WebCore::CSSParser::parseNonElementSnapPoints): Helper for parsing snap points-x/y.
2478 (WebCore::CSSParser::parseScrollSnapDestination): Helper for parsing snap point destinations.
2479 (WebCore::CSSParser::parseScrollSnapCoordinate): Helper for parsing snap point coordinates.
2480 * css/CSSParser.h: Support for parsing snap point properties.
2481 * css/CSSParserValues.cpp:
2482 (WebCore::CSSParserValue::createCSSValue):
2483 * css/CSSPrimitiveValue.cpp:
2484 (WebCore::isValidCSSUnitTypeForDoubleConversion):
2485 (WebCore::CSSPrimitiveValue::init):
2486 (WebCore::CSSPrimitiveValue::cleanup):
2487 (WebCore::CSSPrimitiveValue::getLengthRepeatValue):
2488 (WebCore::CSSPrimitiveValue::formatNumberForcustomCSSText):
2489 (WebCore::CSSPrimitiveValue::cloneForCSSOM):
2490 (WebCore::CSSPrimitiveValue::equals):
2491 * css/CSSPrimitiveValue.h:
2492 (WebCore::CSSPrimitiveValue::isLengthRepeat):
2493 (WebCore::CSSPrimitiveValue::getLengthRepeatValue):
2494 * css/CSSPrimitiveValueMappings.h: Added converters for snap point type properties.
2495 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2496 (WebCore::CSSPrimitiveValue::operator ScrollSnapType):
2497 * css/CSSPropertyNames.in: Added relevant snap point property names.
2498 * css/CSSValueKeywords.in: Added "proximity", "mandatory" and "elements".
2499 * css/LengthRepeat.h: Added to represent values of repeat(<length>)
2500 (WebCore::LengthRepeat::create):
2501 (WebCore::LengthRepeat::cloneForCSSOM):
2502 (WebCore::LengthRepeat::interval):
2503 (WebCore::LengthRepeat::setInterval):
2504 (WebCore::LengthRepeat::equals):
2505 (WebCore::LengthRepeat::cssText):
2506 (WebCore::LengthRepeat::LengthRepeat):
2507 * css/StyleResolver.cpp: Support for handling snap point properties
2508 (WebCore::StyleResolver::applyProperty):Updated switch case to build snap-point-related style data
2509 * rendering/style/RenderStyle.h: Added methods to access and modify snap point data
2510 * rendering/style/RenderStyleConstants.h: Added scroll snap type flags.
2511 * rendering/style/StyleAllInOne.cpp: Added StyleScrollSnapPoints.cpp
2512 * rendering/style/StyleRareNonInheritedData.cpp: Added initiazing for m_scrollSnapPoints, updated equality check
2513 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2514 (WebCore::StyleRareNonInheritedData::operator==):
2515 * rendering/style/StyleRareNonInheritedData.h: Added field for StyleScrollSnapPoints
2516 * rendering/style/StyleScrollSnapPoints.cpp: Added. Wrapper for basic snap point data structures.
2517 (WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints):
2518 (WebCore::StyleScrollSnapPoints::copy):
2519 (WebCore::StyleScrollSnapPoints::operator==):
2520 * rendering/style/StyleScrollSnapPoints.h: Added.
2521 (WebCore::StyleScrollSnapPoints::create):
2522 (WebCore::StyleScrollSnapPoints::defaultRepeatOffset): Creates a new Length representing the default repeat value of repeat(100%)
2523 (WebCore::StyleScrollSnapPoints::defaultDestinationOffset): Creates a new Length representing a default destination value (0px)
2524 (WebCore::StyleScrollSnapPoints::operator!=):
2526 2014-08-06 Andy Estes <aestes@apple.com>
2528 [iOS] Subresources referenced in converted QuickLook documents sometimes fail to load
2529 https://bugs.webkit.org/show_bug.cgi?id=135676
2531 Reviewed by David Kilzer.
2533 * loader/DocumentLoader.h:
2534 (WebCore::DocumentLoader::setQuickLookHandle):
2535 (WebCore::DocumentLoader::quickLookHandle):
2537 2014-08-06 Simon Fraser <simon.fraser@apple.com>
2539 REGRESSION (r168119): Album flipping animation doesn’t work
2540 https://bugs.webkit.org/show_bug.cgi?id=132801
2541 <rdar://problem/16878497>, <rdar://problem/17908085>
2543 Reviewed by Dean Jackson.
2545 In r168119 I avoided creating backing store for backface-visibility:hidden unless
2546 some ancestor was 3d-transformed. However, when starting transitions or animations
2547 that apply transforms, we don't do a layout, and therefore don't update the RenderLayer
2548 flags that mark an ancestor as having a transform. This broke various content which
2549 used backface-visibility:hidden for "flip" animations.
2551 Make a low-risk fix that looks for the pattern of CSS properties used for flipping,
2552 making a compositing layer for backface-visibility:hidden if the stacking context element
2553 has transform-style: preserve-3d.
2555 Test: compositing/backing/backface-visibility-flip.html
2557 * rendering/RenderLayerCompositor.cpp:
2558 (WebCore::RenderLayerCompositor::requiresCompositingForBackfaceVisibility):
2560 2014-08-06 Brent Fulgham <bfulgham@apple.com>
2562 Consolidate logic for calculating scrollbar page step size
2563 https://bugs.webkit.org/show_bug.cgi?id=135670
2565 Reviewed by Simon Fraser.
2567 Consolidate the calculation of the scroll step size into a single place.
2568 Improve the handling of sub-pixel layout behavior by performing proper
2569 rounding on the fractional scroll ranges.
2571 * editing/EditorCommand.cpp:
2572 (WebCore::verticalScrollDistance): Switch to Scrollbar::pageStep method.
2573 * platform/ScrollAnimator.cpp:
2574 (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
2575 * platform/ScrollView.cpp:
2576 (WebCore::ScrollView::updateScrollbars): Ditto.
2577 * platform/Scrollbar.h:
2578 (WebCore::Scrollbar::pageStep): Added.
2579 (WebCore::Scrollbar::pageStepDelta): Added.
2580 * rendering/RenderLayer.cpp:
2581 (WebCore::RenderLayer::updateScrollbarsAfterLayout): Switch to Scrollbar method.
2583 2014-08-06 Brian J. Burg <burg@cs.washington.edu>
2585 Web Replay: dispatch timing information should be stored out-of-line in a replay segment
2586 https://bugs.webkit.org/show_bug.cgi?id=135295
2588 Reviewed by Timothy Hatcher.
2590 We need to save a timestamp for each event loop input so that replay can
2591 simulate the original user and network delays. Currently that timestamp
2592 is stored on each EventLoopInput instance.
2594 This patch stores timestamp data in a separate vector attached to the segment.
2595 The event loop input class is now immutable, and new auxiliary data can be added
2596 without adding members to the EventLoopInput class.
2598 As part of the refactoring, InputCursors now keep a reference to the relevant
2599 session segment instead of a reference to their input storage. InputCursors can
2600 be created directly, instead of through ReplaySessionSegment.
2602 No new tests. No behavior was changed.
2604 * inspector/InspectorReplayAgent.cpp:
2605 (WebCore::buildInspectorObjectForInput): Don't send the timestamp with the input.
2606 (WebCore::buildInspectorObjectForSegment):
2607 * inspector/protocol/Replay.json: Remove optional timestamp field for ReplayInput.
2608 * replay/CapturingInputCursor.cpp:
2609 (WebCore::CapturingInputCursor::CapturingInputCursor):
2610 (WebCore::CapturingInputCursor::create):
2611 (WebCore::CapturingInputCursor::storeInput): Save event loop input timings here.
2612 * replay/CapturingInputCursor.h:
2613 * replay/EventLoopInput.h:
2614 (WebCore::EventLoopInputBase::EventLoopInputBase): Deleted.
2615 (WebCore::EventLoopInputBase::timestamp): Deleted.
2616 (WebCore::EventLoopInputBase::setTimestamp): Deleted.
2617 * replay/EventLoopInputDispatcher.cpp: Use a struct for dispatch information.
2618 (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
2619 (WebCore::EventLoopInputDispatcher::dispatchInputSoon):
2620 (WebCore::EventLoopInputDispatcher::dispatchInput):
2621 * replay/EventLoopInputDispatcher.h:
2622 * replay/FunctorInputCursor.h:
2623 (WebCore::FunctorInputCursor::forEachInputInQueue):
2624 (WebCore::FunctorInputCursor::FunctorInputCursor):
2625 * replay/ReplayController.cpp:
2626 (WebCore::ReplayController::createSegment):
2627 (WebCore::ReplayController::loadSegmentAtIndex):
2628 (WebCore::ReplayController::unloadSegment): Deleted.
2629 (WebCore::ReplayController::startPlayback): Deleted.
2630 * replay/ReplaySessionSegment.cpp:
2631 (WebCore::ReplaySessionSegment::createCapturingCursor): Deleted.
2632 (WebCore::ReplaySessionSegment::createReplayingCursor): Deleted.
2633 (WebCore::ReplaySessionSegment::createFunctorCursor): Deleted.
2634 * replay/ReplaySessionSegment.h:
2635 (WebCore::ReplaySessionSegment::storage):
2636 (WebCore::ReplaySessionSegment::eventLoopTimings):
2637 * replay/ReplayingInputCursor.cpp:
2638 (WebCore::ReplayingInputCursor::ReplayingInputCursor):
2639 (WebCore::ReplayingInputCursor::create):
2640 (WebCore::ReplayingInputCursor::uncheckedLoadInput):
2641 (WebCore::ReplayingInputCursor::loadEventLoopInput): Added. This method collates
2642 and returns the next event loop input with its associated dispatch information.
2643 * replay/ReplayingInputCursor.h:
2645 2014-08-06 Tim Horton <timothy_horton@apple.com>
2647 Document-relative overlays disappear after doing page-cache navigations
2648 https://bugs.webkit.org/show_bug.cgi?id=135669
2649 <rdar://problem/17929171>
2651 Reviewed by Simon Fraser.
2653 * rendering/RenderLayerCompositor.cpp:
2654 (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
2655 When navigating from one page to another, the document-relative overlay
2656 layer is moved from the layer tree of the RenderLayerCompositor of the
2657 first RenderView to the layer tree of the RenderLayerCompositor of the
2658 new RenderView, upon layer tree construction.
2659 When going "back" via a page cache navigation, we don't rebuild the
2660 layer tree, and just assume that it is in a valid state.
2661 However, the document-relative overlay layer was *moved*, and as such,
2662 needs to be moved back. To do this, reattach the document-relative
2663 overlay layer whenever the root layer attachment of a RenderLayerCompositor
2664 changes, which will happen in the right order when going back to a cached page.
2666 2014-08-06 Filip Pizlo <fpizlo@apple.com>
2668 Merge r171389, r171495, r171508, r171510, r171605, r171606, r171611, r171614, r171763 from ftlopt.
2670 2014-08-06 Mark Hahnenberg <mhahnenberg@apple.com>
2672 Refactor our current implementation of for-in
2673 https://bugs.webkit.org/show_bug.cgi?id=134142
2675 Reviewed by Filip Pizlo.
2679 This patch splits for-in loops into three distinct parts:
2681 - Iterating over the indexed properties in the base object.
2682 - Iterating over the Structure properties in the base object.
2683 - Iterating over any other enumerable properties for that object and any objects in the prototype chain.
2685 It does this by emitting these explicit loops in bytecode, using a new set of bytecodes to
2686 support the various operations required for each loop.
2688 * bindings/js/JSDOMWindowCustom.cpp:
2689 (WebCore::JSDOMWindow::getEnumerableLength):
2690 (WebCore::JSDOMWindow::getStructurePropertyNames):
2691 (WebCore::JSDOMWindow::getGenericPropertyNames):
2692 * bindings/scripts/CodeGeneratorJS.pm:
2694 * bridge/runtime_array.cpp:
2695 (JSC::RuntimeArray::getOwnPropertyNames):
2697 2014-08-06 Alexey Proskuryakov <ap@apple.com>
2699 REGRESSION (WebKit2): iOS Safari default encoding doesn't follow system language
2700 https://bugs.webkit.org/show_bug.cgi?id=135667
2701 <rdar://problem/17862892>
2703 Reviewed by Anders Carlsson.
2705 Moved a function that computes default encoding from WebKit to WebCore, so that
2706 it could be shared with WebKit2.
2709 * platform/ios/WebCoreSystemInterfaceIOS.mm:
2710 * platform/mac/WebCoreSystemInterface.h:
2711 * platform/mac/WebCoreSystemInterface.mm:
2712 * platform/text/TextEncodingRegistry.cpp:
2713 (WebCore::defaultTextEncodingNameForSystemLanguage):
2714 * platform/text/TextEncodingRegistry.h:
2716 2014-08-06 Andreas Kling <akling@apple.com>
2718 Remove unused RenderBox::reflectionBox().
2719 <https://webkit.org/b/135661>
2721 Reviewed by Antti Koivisto.
2723 * rendering/RenderBox.cpp:
2724 (WebCore::RenderBox::reflectionBox): Deleted.
2725 * rendering/RenderBox.h:
2727 2014-08-06 Brian J. Burg <burg@cs.washington.edu>
2729 Web Inspector: convert ReplayManager to a promise-based API
2730 https://bugs.webkit.org/show_bug.cgi?id=135249
2732 Reviewed by Timothy Hatcher.
2734 Fix some assertions to match ReplayController's preconditions.
2736 * inspector/InspectorReplayAgent.cpp:
2737 (WebCore::InspectorReplayAgent::replayToPosition):
2738 (WebCore::InspectorReplayAgent::replayToCompletion):
2740 2014-08-05 Brent Fulgham <bfulgham@apple.com>
2742 [Mac] Unable to scroll to bottom of nested scrollable areas
2743 https://bugs.webkit.org/show_bug.cgi?id=135637
2744 <rdar://problem/17910241>
2746 Reviewed by Zalan Bujtas.
2748 Test: platform/mac/fast/scrolling/scroll-latched-nested-div.html
2750 Avoid truncating the fractional portion of scroll ranges.
2752 * rendering/RenderLayer.cpp:
2753 (WebCore::RenderLayer::updateScrollbarsAfterLayout): Round
2754 the LayoutUnit values for scroll width and height rather than
2757 2014-08-06 Andy Estes <aestes@apple.com>
2759 [iOS] QuickLook returns an invalid MIME type for some documents
2760 https://bugs.webkit.org/show_bug.cgi?id=135651
2762 Reviewed by David Kilzer.
2764 r172151 ensured that we ignore QuickLook delegate messages after an error, but neglected to do so for
2765 connectionDidFinishLoading:. Do not call ResourceLoader::didFinishLoading() if an error has occurred.
2767 * platform/network/ios/QuickLook.mm:
2768 (-[WebResourceLoaderQuickLookDelegate connectionDidFinishLoading:]):
2770 2014-08-06 Commit Queue <commit-queue@webkit.org>
2772 Unreviewed, rolling out r172155.
2773 https://bugs.webkit.org/show_bug.cgi?id=135659
2775 ChangeLog and commit message are wrong (Requested by estes on
2780 "Unreviewed, rolling out r172145."
2781 https://bugs.webkit.org/show_bug.cgi?id=135657
2782 http://trac.webkit.org/changeset/172155
2784 2014-07-28 Myles C. Maxfield <mmaxfield@apple.com>
2786 Unreviewed build fix
2788 * rendering/TextPainter.cpp: Used incorrect variable name
2790 2014-08-06 Commit Queue <commit-queue@webkit.org>
2792 Unreviewed, rolling out r172145.
2793 https://bugs.webkit.org/show_bug.cgi?id=135657
2795 caused 1 API test to fail (Requested by zalan on #webkit).
2799 "Cleanup InlineTextBox::paintSelection and
2800 ::localSelectionRect."
2801 https://bugs.webkit.org/show_bug.cgi?id=135631
2802 http://trac.webkit.org/changeset/172145
2804 2014-07-28 Myles C. Maxfield <mmaxfield@apple.com>
2806 Text-shadow with (0, 0) offset and radius = 0 is ugly
2807 https://bugs.webkit.org/show_bug.cgi?id=135357
2809 Reviewed by Darin Adler.
2811 Instead, check for this kind of shadow and don't draw it.
2813 Test: fast/text/empty-shadow.html
2815 * rendering/TextPainter.cpp:
2816 (WebCore::isEmptyShadow): Does a shadow match these criteria?
2817 (WebCore::paintTextWithShadows): If so, don't draw it.
2819 2014-08-06 Andy Estes <aestes@apple.com>
2821 [iOS] QuickLook returns an invalid MIME type for some documents
2822 https://bugs.webkit.org/show_bug.cgi?id=135651
2824 Reviewed by David Kilzer.
2826 In some cases QuickLook indicates a failure by returning a nil MIME type in -[QLPreviewConverter previewResponse]
2827 rather than calling connection:didFailWithError:. Calling ResourceLoader::didReceiveResponse() with a response
2828 containing a nil MIME type leads to a crash.
2830 Stop loading the resource and display an error page if QuickLook cannot provide a MIME type for the converted response.
2832 No new tests. QuickLook is not testable from WebKit.
2834 * platform/network/ios/QuickLook.mm:
2835 (-[WebResourceLoaderQuickLookDelegate _sendDidReceiveResponseIfNecessary]): Called ResourceLoader::didFail() if
2836 MIME type was nil. Called ResourceLoader::didReceiveResponse() otherwise.
2837 (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): Called -_sendDidReceiveResponseIfNecessary.
2838 (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto.
2839 (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto.
2841 2014-08-06 Radu Stavila <stavila@adobe.com>
2843 REGRESSION (r163382): Overflow hidden for inner elements breaks blurring
2844 https://bugs.webkit.org/show_bug.cgi?id=135318
2846 Reviewed by Zalan Bujtas.
2848 For elements with border radius, clipping must be applied using clipRoundedRect.
2849 This regressed in r163382, when normal clipping started being applied also
2850 for elements having border radius.
2852 Test: fast/filter-image/clipped-filter.html
2854 * rendering/RenderLayer.cpp:
2855 (WebCore::RenderLayer::clipToRect):
2856 (WebCore::RenderLayer::restoreClip):
2858 2014-08-06 Zalan Bujtas <zalan@apple.com>
2860 Cleanup InlineTextBox::paintSelection and ::localSelectionRect.
2861 https://bugs.webkit.org/show_bug.cgi?id=135631
2863 Reviewed by Darin Adler.
2865 Covered by existing tests.
2867 * rendering/InlineTextBox.cpp: Ideally these 2 functions should share some more code.
2868 (WebCore::InlineTextBox::localSelectionRect): Local coordinates should not be snapped/enclosed.
2869 This change could potentially break some selections. Should that be the case, they need to be addressed
2871 (WebCore::InlineTextBox::paint):
2872 (WebCore::InlineTextBox::paintSelection): Minor cleanup.
2873 * rendering/InlineTextBox.h:
2875 2014-08-06 Carlos Garcia Campos <cgarcia@igalia.com>
2877 [GTK] Be able to disable gtk2 dependency
2878 https://bugs.webkit.org/show_bug.cgi?id=135505
2880 Reviewed by Gustavo Noronha Silva.
2882 Do not build WebCorePlatformGTK2 when ENABLE_PLUGIN_PROCESS_GTK2
2885 * PlatformGTK.cmake:
2887 2014-08-06 Mark Lam <mark.lam@apple.com>
2889 Gardening: fix bindings test breakage for for r170564 merged in r172129.
2890 <https://webkit.org/b/134333>
2896 * bindings/scripts/test/JS/JSTestEventTarget.h:
2897 (WebCore::JSTestEventTarget::create):
2899 2014-08-06 Ryuan Choi <ryuan.choi@samsung.com>
2901 Unreviewed typo correction.
2903 * bindings/scripts/CodeGeneratorJS.pm: removed unnecessary space.
2904 (GenerateImplementation):
2906 2014-08-05 James Craig <jcraig@apple.com>
2908 Web Inspector: AXI: Add label string once AccessibilityObject::computedLabel() is available
2909 https://bugs.webkit.org/show_bug.cgi?id=129940
2911 Reviewed by Chris Fleizach.
2913 Test: inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt
2915 * accessibility/AccessibilityObject.cpp: Fixed crash.
2916 (WebCore::AccessibilityObject::accessibilityComputedLabel):
2917 * accessibility/AccessibilityObject.h: Method name update.
2918 * inspector/InspectorDOMAgent.cpp: New support for getting Node label from AccessibilityObject.
2919 (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2921 2014-07-29 Filip Pizlo <fpizlo@apple.com>
2923 Merge r170564, r170571, r170604, r170628, r170672, r170680, r170724, r170728, r170729, r170819, r170821, r170836, r170855, r170860, r170890, r170907, r170929, r171052, r171106, r171152, r171153, r171214 from ftlopt.
2925 2014-07-01 Mark Lam <mark.lam@apple.com>
2927 [ftlopt] DebuggerCallFrame::scope() should return a DebuggerScope.
2928 <https://webkit.org/b/134420>
2930 Reviewed by Geoffrey Garen.
2934 * ForwardingHeaders/debugger/DebuggerCallFrame.h: Removed.
2935 - This is not in use. Hence, we can remove it.
2936 * bindings/js/ScriptController.cpp:
2937 (WebCore::ScriptController::attachDebugger):
2938 - We should acquire the JSLock before modifying a JS global object.
2940 2014-06-25 Filip Pizlo <fpizlo@apple.com>
2942 [ftlopt] If a CodeBlock is jettisoned due to a watchpoint then it should be possible to figure out something about that watchpoint
2943 https://bugs.webkit.org/show_bug.cgi?id=134333
2945 Reviewed by Geoffrey Garen.
2947 No new tests because no change in behavior.
2949 * bindings/scripts/CodeGeneratorJS.pm:
2952 2014-08-05 Ryuan Choi <ryuan.choi@samsung.com>
2954 Build break since r172093
2955 https://bugs.webkit.org/show_bug.cgi?id=135636
2957 Reviewed by Gyuyoung Kim.
2959 Since r172093, AbstractView.idl is added in CMake Build but CodeGeneratorJS.pm does not take care of it.
2961 No new tests required, no new functionality.
2963 * bindings/scripts/CodeGeneratorJS.pm:
2964 (ShouldGenerateToJSDeclaration):
2965 (ShouldGenerateToJSImplementation):
2966 (GetImplClassName): Added to rename implClassName to DOMWindow if interface name is AbstractView.
2968 (GenerateImplementation):
2970 2014-08-05 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
2972 [CG] strokeRect does not honor lineJoin
2973 https://bugs.webkit.org/show_bug.cgi?id=132948
2975 Reviewed by Darin Adler.
2977 Replaced use of CGContextStrokeRectWithWidth convenience function with explicit
2978 call to CGContextAddRect and CGContextStrokePath. The convenience functions
2979 CGContextStrokeRect and CGContextStrokeRectWithWidth fail to apply some attributes
2980 (e.g. stroke join) of the graphics state in certain cases.
2982 Test: fast/canvas/canvas-strokeRect-lineJoin.html
2984 * platform/graphics/cg/GraphicsContextCG.cpp:
2985 (WebCore::GraphicsContext::strokeRect):
2987 2014-08-05 Brent Fulgham <bfulgham@apple.com>
2989 [Win] Build attempts to use ANGLE when not building WebGL.
2990 https://bugs.webkit.org/show_bug.cgi?id=135630
2991 <rdar://problem/135630>
2993 Unreviewed build fix.
2995 * platform/graphics/win/GraphicsContext3DWin.cpp: Move #include of GraphicsContext3D.h
2996 inside USE(3D_GRAPHICS) guard.
2998 2014-08-05 Simon Fraser <simon.fraser@apple.com>
3000 [iOS WK2] Crash going back on a specific tumblr blog (under ScrollingStateTree::removeNodeAndAllDescendants)
3001 https://bugs.webkit.org/show_bug.cgi?id=135629
3002 <rdar://problem/17802174>
3004 Reviewed by Tim Horton.
3006 In r170198 I added an "orphan scrolling nodes" code path that sets aside subtrees
3007 of scrolling nodes into an m_orphanedSubframeNodes map, which keeps them alive until
3008 they get reparented or destroyed. The nodes in that subtree remain in m_stateNodeMap,
3009 which holds raw pointers to them.
3011 However, ScrollingStateTree::commit() can clear m_orphanedSubframeNodes, which is
3012 sometimes non-empty at this point. When that happened, we would destroy nodes which
3013 were still referenced by m_stateNodeMap, with the result that a later query for the
3014 same nodeID would hand back a pointer to a deleted object.
3016 Fix by calling recursiveNodeWillBeRemoved() on nodes in the m_orphanedSubframeNodes
3017 before clearing it, which removes them and all their descendants from the state node map.
3019 Test: platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree.html
3021 * page/scrolling/ScrollingStateTree.cpp:
3022 (WebCore::ScrollingStateTree::clear):
3023 (WebCore::ScrollingStateTree::commit):
3025 2014-08-05 Peyton Randolph <prandolph@apple.com>
3027 Add the ability to force text to render in white, not just black
3028 https://bugs.webkit.org/show_bug.cgi?id=135625
3030 Reviewed by Beth Dakin.
3032 This patch introduces PaintBehaviorForceWhiteText, a complement to PaintBehaviorForceBlackText. If
3033 a client specifies both PaintBehaviorForceWhiteText and PaintBehaviorForceBlackText, the text will be
3038 * rendering/EllipsisBox.cpp:
3039 (WebCore::EllipsisBox::paint): Use the forced text color to paint the text if requested.
3040 * rendering/InlineTextBox.cpp:
3041 (WebCore::InlineTextBox::paint): Disable the text shadow if a text color has been forced.
3042 * rendering/PaintInfo.h:
3043 (WebCore::PaintInfo::forceTextColor):
3044 Return true iff the client has requested to force a black or white text color.
3045 (WebCore::PaintInfo::forceWhiteText):
3046 Return true iff forcing white text has been requested.
3047 (WebCore::PaintInfo::forcedTextColor):
3048 Return the forced text color. Currently only white and black are supported.
3049 * rendering/PaintPhase.h:
3050 * rendering/RenderLayer.cpp:
3051 (WebCore::RenderLayer::paintLayerContents): Remove the forceBlackText-related code as it is redundant.
3052 (WebCore::RenderLayer::paintForegroundForFragments):
3053 Remove forceBlackText parameter and infer the correct behavior from the given paint behavior.
3054 * rendering/RenderLayer.h:
3055 * rendering/TextPaintStyle.cpp:
3056 (WebCore::computeTextPaintStyle): Use the forced text color if available.
3057 (WebCore::computeTextSelectionPaintStyle): Use the forced text color if available.
3059 2014-08-05 Alex Christensen <achristensen@webkit.org>
3062 https://bugs.webkit.org/show_bug.cgi?id=135620
3064 Reviewed by Reviewed by Laszlo Gombos.
3068 * PlatformMac.cmake:
3069 Added additional include directories and source files.
3070 * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
3071 * css/makeSelectorPseudoElementsMap.py:
3072 The Windows distribution of gperf doesn't like single quotes for its key-positions parameters.
3076 2014-08-05 Brian J. Burg <burg@cs.washington.edu>
3078 Web Inspector: ReplayManager shouldn't assume replay status when the inspector is opened
3079 https://bugs.webkit.org/show_bug.cgi?id=135212
3081 Reviewed by Timothy Hatcher.
3083 The frontend should be able to introspect the session and segment state machines,
3084 currently loaded segment and session identifiers, and replay position.
3086 * inspector/InspectorReplayAgent.cpp:
3087 (WebCore::buildInspectorObjectForSessionState): Added.
3088 (WebCore::buildInspectorObjectForSegmentState): Added.
3089 (WebCore::InspectorReplayAgent::currentReplayState): Added.
3090 * inspector/InspectorReplayAgent.h:
3091 * inspector/protocol/Replay.json: Add currentReplayState query command.
3092 * replay/ReplayController.h: Add some accessors.
3094 2014-08-05 Dean Jackson <dino@apple.com>
3096 [iOS] Media controls layout incorrectly in RTL content
3097 https://bugs.webkit.org/show_bug.cgi?id=135621
3098 <rdar://problem/17849206>
3100 Reviewed by Eric Carlson.
3102 Media controls should always layout in LTR mode, even when the
3103 page content is RTL. There already was a rule to do this on
3104 non-iOS systems, but it wasn't getting included for iOS.
3105 In this case I put the rule on the composited parent of the
3106 controls in order to maintain the padding of the control panel.
3107 This should still leave the captions unaffected.
3109 * Modules/mediacontrols/mediaControlsiOS.css:
3110 (video::-webkit-media-controls-panel-composited-parent): Add direction: ltr.
3112 2014-08-05 Brian J. Burg <burg@cs.washington.edu>
3114 Web Replay: rename protocol methods for getting replay session/segment data
3115 https://bugs.webkit.org/show_bug.cgi?id=135618
3117 Reviewed by Timothy Hatcher.
3119 * inspector/InspectorReplayAgent.cpp:
3120 (WebCore::InspectorReplayAgent::getSessionData):
3121 (WebCore::InspectorReplayAgent::getSegmentData):
3122 (WebCore::InspectorReplayAgent::getSerializedSession): Deleted.
3123 (WebCore::InspectorReplayAgent::getSerializedSegment): Deleted.
3124 * inspector/InspectorReplayAgent.h:
3125 * inspector/protocol/Replay.json:
3127 2014-08-05 Antti Koivisto <antti@apple.com>
3129 REGRESSION: Extremely flashy scrolling while a page is still loading (because of flush throttling)
3130 https://bugs.webkit.org/show_bug.cgi?id=135603
3131 <rdar://problem/17876385>
3133 This hit ASSERT(frame().isMainFrame()) in FrameView::updateLayerFlushThrottling
3134 running scrollbars/scrollbar-iframe-click-does-not-blur-content.html and a few other tests.
3136 * page/FrameView.cpp:
3137 (WebCore::FrameView::setWasScrolledByUser): Only invoke updateLayerFlushThrottling for the main frame.
3139 2014-08-05 Peyton Randolph <prandolph@apple.com>
3141 Rename MAC_LONG_PRESS feature flag to LONG_MOUSE_PRESS.
3142 https://bugs.webkit.org/show_bug.cgi?id=135276
3144 Reviewed by Beth Dakin.
3146 No new tests. Just a compiler flag.
3148 * Configurations/FeatureDefines.xcconfig:
3150 2014-08-05 Dean Jackson <dino@apple.com>
3152 [Media iOS] Ensure there is a nice default fallback for missing wireless target names
3153 https://bugs.webkit.org/show_bug.cgi?id=135488
3154 <rdar://problem/17879156>
3156 Reviewed by Antoine Quint.
3158 Antoine found me on iMessage to tell me I'm an idiot and that I've
3159 forgotten how to write JavaScript. Embarrassingly, this code is what
3160 I originally had, but then second-guessed myself.
3162 * Modules/mediacontrols/mediaControlsiOS.js:
3163 (ControllerIOS.prototype.updateWirelessPlaybackStatus): No need for the local
3164 variable or conditional statement, since null and "" both evaluate as false.
3166 2014-08-05 Antti Koivisto <antti@apple.com>
3168 REGRESSION: Extremely flashy scrolling while a page is still loading (because of flush throttling)
3169 https://bugs.webkit.org/show_bug.cgi?id=135603
3170 <rdar://problem/17876385>
3172 Reviewed by Andreas Kling.
3174 * page/FrameView.cpp:
3175 (WebCore::determineLayerFlushThrottleState):
3177 Disable throttling after user has scrolled the page.
3178 This is consistent with the speculative tiling. It also gets enabled on first scroll.
3180 (WebCore::FrameView::setWasScrolledByUser):
3182 2014-08-05 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
3184 ASSERTION FAILED: name[0] == '@' && length >= 2 in WebCore::CSSParser::detectAtToken
3185 https://bugs.webkit.org/show_bug.cgi?id=134632
3187 At-rules must consist of at least two characters: the '@' symbol followed by
3188 an identifier name. The failure of this condition makes the assertion fail.
3190 The length of an at-rule is currently calculated by pointer arithmetic on
3191 the 'result' pointer, which is expected to be set to the end of the at-rule
3192 identifier by the WebCore::*CSSTokenizer::parseIdentifier method.
3193 If the at-rule token is a sequence of 8-bit-only characters then
3194 'result' will point correctly at the end of the identifier. However, if
3195 the at-rule contains a 16-bit Unicode escape then 'result' will not be
3196 updated correctly anymore, hence it cannot be used for length calculation.
3197 The patch makes the parseIdentifier bump the result pointer even in the 16-bit slow case.
3199 Patch by Renata Hodovan, backported from Chromium: https://codereview.chromium.org/241053002
3201 Reviewed by Darin Adler.
3203 Test: fast/css/atrule-with-escape-character-crash.html
3205 * css/CSSParser.cpp:
3206 (WebCore::CSSParser::realLex):
3208 2014-08-04 Andy Estes <aestes@apple.com>
3210 [iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
3211 https://bugs.webkit.org/show_bug.cgi?id=135596
3213 Reviewed by David Kilzer.
3215 Some iWork documents contain pre-rendered PDF previews. When WebKit asks QuickLook to convert such a document,
3216 QuickLook will return this PDF as the converted response. However, until WebKit has sent the document's data to
3217 QuickLook, -[QLPreviewConverter previewResponse] will misleadingly tell WebKit that the converted resource will
3218 be of type 'text/html'. This leads WebKit to render the PDF preview as HTML.
3220 Instead of querying QLPreviewConverter for the previewResponse before we've sent it any data, postpone calling
3221 ResourceLoader::didReceiveResponse until we've begun to receive data via the QLPreviewConverter delegate. At
3222 that point -[QLPreviewConverter previewResponse] will have the correct MIME type and we can call didReceiveResponse.
3224 No new tests. QuickLook is not testable from WebKit.
3226 * platform/network/ios/QuickLook.mm:
3227 (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): If didReceiveResponse has yet to be
3228 called, call it now with QuickLookHandle::nsResponse().
3229 (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto.
3230 (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto.
3231 (-[WebResourceLoaderQuickLookDelegate connectionDidFinishLoading:]): Assert that didReceiveResponse has been called.
3232 (-[WebResourceLoaderQuickLookDelegate clearHandle]): Cleared the raw pointer to QuickLookHandle.
3233 (WebCore::QuickLookHandle::create): Pointed WebResourceLoaderQuickLookDelegate's quickLookHandle property to
3234 the newly created QuickLookHandle.
3236 2014-08-05 Renata Hodovan <rhodovan.u-szeged@partner.samsung.com>
3238 Fixing calc() parameter parsing in cubic-bezier functions
3239 https://bugs.webkit.org/show_bug.cgi?id=135605
3241 Reviewed by Andreas Kling.
3243 Before this patch, calc values in cubic-bezier functions weren't being read correctly
3244 since they were handled as simple floats.
3246 This is a backport of my fix in Blink: https://codereview.chromium.org/369313002/
3248 Test: css3/calc/cubic-bezier-with-multiple-calcs-crash.html.html
3250 * css/CSSParser.cpp:
3251 (WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
3253 2014-08-05 Jer Noble <jer.noble@apple.com>
3255 [MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
3256 https://bugs.webkit.org/show_bug.cgi?id=135422
3258 Reviewed by Eric Carlson.
3260 Three related fixes:
3262 In reenqueueMediaForTime(), update TrackBuffer.lastEnqueuedPresentationTime when we flush
3263 samples, so that the next time samples are re-enqueued, the starting point for re-enqueueing
3266 In sourceBufferPrivateDidReceiveSample(), do not add samples to the decode queue
3267 if they are before the current media time.
3269 When a seek is pending, but samples for the new time is not yet present in the SourceBuffer,
3270 the SourceBufferPrivate may signal that it's ready for new samples through the
3271 sourceBufferPrivateDidBecomeReadyForMoreSamples() method. In this situation, we should not
3272 continue to provideMediaData(), as that will append samples from the prior-to-seeking media
3273 timeline. Since the timeline may have moved forward due to the seek, a decoder may decide to
3274 display those frames as quickly as possible (the "fast forward" behavior) in order to catch
3275 up to the new current time.
3277 If a re-enqueue is pending, don't provide media data in response to being notified that the
3278 SourceBufferPrivate is ready for more samples. Wait until samples for the new current time
3281 Also, don't provide media data if we are waiting for a seek to complete.
3283 * Modules/mediasource/MediaSource.h:
3284 (WebCore::MediaSource::isSeeking): Convenience method.
3285 * Modules/mediasource/SourceBuffer.cpp:
3286 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
3287 (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
3288 (WebCore::SourceBuffer::reenqueueMediaForTime):
3290 2014-08-05 Chris Fleizach <cfleizach@apple.com>
3292 AX: Select text activity should return replaced text instead of previously selected text
3293 https://bugs.webkit.org/show_bug.cgi?id=135595
3295 Reviewed by Mario Sanchez Prada.
3297 When the select activity API is used to replace text, the replacement string should be returned instead of the old selected text.
3299 Updated existing test: platform/mac/accessibility/select-text.html
3301 * accessibility/AccessibilityObject.cpp:
3302 (WebCore::AccessibilityObject::selectText):
3304 2014-08-04 Chris Fleizach <cfleizach@apple.com>
3306 AX: Select activity behavior does not work when an existing range is already selected
3307 https://bugs.webkit.org/show_bug.cgi?id=135579
3309 Reviewed by Mario Sanchez Prada.
3311 If you have an existing range selected, and try to apply a select and replace operation, like capitalize,
3312 searching for that range will fail because it skips the currently selected range.
3314 For these cases, it seems the best way is to start the search from the start position, rather than relying on the
3317 Updated existing test: platform/mac/accessibility/select-text.html
3319 * accessibility/AccessibilityObject.cpp:
3320 (WebCore::AccessibilityObject::selectText):
3322 2014-08-04 Jer Noble <jer.noble@apple.com>
3324 [MSE][Mac] Seeking past buffered range will not resume playback when seek completes.
3325 https://bugs.webkit.org/show_bug.cgi?id=135591
3327 Reviewed by Eric Carlson.
3329 If a seek is delayed due to seeking into an unbuffered area, playback will not be restarted
3330 at that point. Instead, playback must resume when enough media data has been added, and
3331 the MediaSource indicates the seek should complete.
3333 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3334 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted):
3336 2014-08-04 Jer Noble <jer.noble@apple.com>
3338 [MSE] Videos will report a stall when within 1 frame-duration before the end of a movie.
3339 https://bugs.webkit.org/show_bug.cgi?id=135586
3341 Reviewed by Eric Carlson.
3343 Under certain circumstances, videos which are within 1/24 seconds before the end of a media stream when
3344 monitorSourceBuffers() is called will fail the hasFutureTime() check. This is because hasFutureTime()
3345 checks whether enough media is buffered to play back at least some time in the future, but when the
3346 current time is close to the duration, not enough data is buffered to satisfy that check.
3348 Add some logic which will break out early when the SourceBuffer has buffered up to and including the
3349 media's duration, and return that the buffer indeed hasFutureTime() available.
3351 * Modules/mediasource/SourceBuffer.cpp:
3352 (WebCore::SourceBuffer::hasFutureTime):
3354 2014-08-04 Benjamin Poulain <benjamin@webkit.org>
3356 Simplify the StyleInvalidation mode of rule collection
3357 https://bugs.webkit.org/show_bug.cgi?id=135521
3359 Reviewed by Antti Koivisto.
3361 There are two branches where StyleInvalidation code is removed:
3362 -Pseudo elements for shadow dom elements.
3363 -Pseudo elements without dom tree counterpart.
3365 The first can never be hit because StyleInvalidationAnalysis does a complete invalidation
3366 when there is any shadow dom styling involved in the stylesheets.
3368 Even if that branch was hit, not failing on custom pseudo elements would be equivalent
3369 to ignoring those pseudo elements from the Selector. By doing so, we would match elements
3370 that do not have shadow dom and invalidate pretty much everything.
3372 Unlike pseudo elements without real elements, shadow dom elements are not matched separately with a different
3373 context, thus we could generalize StyleInvalidationAnalysis to handle this case.
3376 The second case handle pseudo elements that do not have a real element. That case no longer need to be handled
3377 separately at the filter time, it has become a special case of SelectorChecker::match() after everything else
3380 The only condition for this to work is that the Context's pseudoId must be NOPSEUDO. This is the case
3381 in practice since matching specific pseudo types would be a waste of time. ElementRuleCollector::collectMatchingRules()
3382 has a new assertion to enforce that.
3384 Test: fast/css/stylesheet-change-updates-pseudo-elements.html
3386 * css/ElementRuleCollector.cpp:
3387 (WebCore::ElementRuleCollector::collectMatchingRules):
3388 * css/SelectorChecker.cpp:
3389 (WebCore::SelectorChecker::matchRecursively):
3390 * cssjit/SelectorCompiler.cpp:
3391 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
3393 2014-08-04 Benjamin Poulain <benjamin@webkit.org>
3395 Add a flag for the CSS Selectors level 4 implementation
3396 https://bugs.webkit.org/show_bug.cgi?id=135535
3398 Reviewed by Andreas Kling.
3400 * Configurations/FeatureDefines.xcconfig:
3402 2014-08-04 Chris Fleizach <cfleizach@apple.com>