1 2014-04-29 Manuel Rego Casasnovas <rego@igalia.com>
3 REGRESSION (r167879): Heap-use-after-free in WebCore::RenderFlexibleBox
4 https://bugs.webkit.org/show_bug.cgi?id=132337
6 Reviewed by Simon Fraser.
8 From Blink r154582 by <jchaffraix@chromium.org>
10 This is a regression from the changes in OrderIterator. The issue is
11 that we don't invalidate our iterator when a child is removed. This
12 means that we could hold onto free'd memory until the next layout
13 when we will recompute the iterator.
15 The solution is simple: just clear the memory when we remove a child.
17 Note that RenderGrid is not impacted by this bug as we don't use the
18 iterator outside layout yet, but if we do it at some point the very same
19 problem will arise, so the same treatment was applied to the class.
21 Test: fast/flexbox/order-iterator-crash.html
23 * rendering/OrderIterator.cpp:
24 (WebCore::OrderIterator::invalidate): Clear m_children Vector.
25 * rendering/OrderIterator.h:
26 (WebCore::OrderIteratorPopulator::OrderIteratorPopulator): Use
28 * rendering/RenderFlexibleBox.cpp:
29 (WebCore::RenderFlexibleBox::removeChild): Invalidate m_orderIterator.
30 * rendering/RenderFlexibleBox.h: Add removeChild() signature.
31 * rendering/RenderGrid.cpp: Invalidate m_orderIterator.
32 (WebCore::RenderGrid::removeChild):
33 * rendering/RenderGrid.h: Add removeChild() header.
35 2014-04-29 Enrica Casucci <enrica@apple.com>
37 iOS build fix after http://trac.webkit.org/changeset/167937.
40 * rendering/RenderThemeIOS.mm:
41 (WebCore::RenderThemeIOS::adjustButtonStyle):
43 2014-04-29 Hans Muller <hmuller@adobe.com>
45 [CSS Shapes] off-by-one error in Shape::createRasterShape()
46 https://bugs.webkit.org/show_bug.cgi?id=132154
48 Reviewed by Bem Jones-Bey.
50 This is a port of a patch for a bug that was reported by and fixed in Blink by
51 David Vest: https://codereview.chromium.org/237123002/. Shape::createRasterShape()
52 now consistently reports "end-point exclusive" intervals. Before the patch
53 an entire row of pixels was above the shape-image-threshold, the interval's end
54 index was reported as image.width. Now it's image.width + 1, which is consistent
55 with the way the end index is reported if the last above threshold pixel is within
58 Two existing tests were revised to account for this change.
60 * rendering/shapes/RasterShape.cpp:
61 (WebCore::RasterShape::getExcludedIntervals):
62 * rendering/shapes/Shape.cpp:
63 (WebCore::Shape::createRasterShape):
65 2014-04-29 Bem Jones-Bey <bjonesbe@adobe.com>
67 Wrap CSS length conversion arguments in an object
68 https://bugs.webkit.org/show_bug.cgi?id=131552
70 Reviewed by Andreas Kling.
72 This patch introduces a class CSSToLengthConversionData to wrap the
73 data required to convert CSS lengths to Lengths. This simplifies the
74 plumbing that goes on whenever we need to resolve CSS lengths and
75 makes it easier to update the arguments needed for resolving these (in
76 particular adding a RenderView for resolving viewport units at style
77 recalc time; removing the computingFontSize bool also appears
80 Note that the zoom argument, which was previously a float in some
81 places and a double in others is now a float.
83 This is a port of a Blink patch by timloh@chromium.org.
85 No new tests, no behavior change.
88 * WebCore.vcxproj/WebCore.vcxproj:
89 * WebCore.xcodeproj/project.pbxproj:
90 * css/BasicShapeFunctions.cpp:
91 (WebCore::convertToLength):
92 (WebCore::convertToLengthSize):
93 (WebCore::convertToCenterCoordinate):
94 (WebCore::cssValueToBasicShapeRadius):
95 (WebCore::basicShapeForValue):
96 * css/BasicShapeFunctions.h:
97 * css/CSSCalculationValue.cpp:
98 (WebCore::CSSCalcValue::computeLengthPx):
99 (WebCore::determineCategory):
100 * css/CSSCalculationValue.h:
101 (WebCore::CSSCalcValue::createCalculationValue):
102 * css/CSSGradientValue.cpp:
103 (WebCore::CSSGradientValue::addStops):
104 (WebCore::positionFromValue):
105 (WebCore::CSSGradientValue::computeEndPoint):
106 (WebCore::CSSLinearGradientValue::createGradient):
107 (WebCore::CSSRadialGradientValue::resolveRadius):
108 (WebCore::CSSRadialGradientValue::createGradient):
109 * css/CSSGradientValue.h:
110 * css/CSSPrimitiveValue.cpp:
111 (WebCore::CSSPrimitiveValue::computeLength):
112 (WebCore::CSSPrimitiveValue::computeLengthDouble):
113 * css/CSSPrimitiveValue.h:
114 * css/CSSPrimitiveValueMappings.h:
115 (WebCore::CSSPrimitiveValue::convertToLength):
116 * css/CSSToLengthConversionData.cpp: Added.
117 (WebCore::CSSToLengthConversionData::zoom):
118 * css/CSSToLengthConversionData.h: Added.
119 (WebCore::CSSToLengthConversionData::CSSToLengthConversionData):
120 (WebCore::CSSToLengthConversionData::style):
121 (WebCore::CSSToLengthConversionData::rootStyle):
122 (WebCore::CSSToLengthConversionData::computingFontSize):
123 (WebCore::CSSToLengthConversionData::copyWithAdjustedZoom):
124 * css/CSSToStyleMap.cpp:
125 (WebCore::CSSToStyleMap::CSSToStyleMap):
126 (WebCore::CSSToStyleMap::mapFillSize):
127 (WebCore::CSSToStyleMap::mapFillXPosition):
128 (WebCore::CSSToStyleMap::mapFillYPosition):
129 (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
130 * css/CSSToStyleMap.h:
131 (WebCore::CSSToStyleMap::CSSToStyleMap): Deleted.
132 * css/DeprecatedStyleBuilder.cpp:
133 (WebCore::ApplyPropertyAuto::applyValue):
134 (WebCore::ApplyPropertyClip::convertToLength):
135 (WebCore::ApplyPropertyLength::applyValue):
136 (WebCore::ApplyPropertyBorderRadius::applyValue):
137 (WebCore::ApplyPropertyComputeLength::applyValue):
138 (WebCore::ApplyPropertyFontSize::applyValue):
139 (WebCore::csstoLengthConversionDataWithTextZoomFactor):
140 (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
141 (WebCore::ApplyPropertyLineHeight::applyValue):
142 (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
143 (WebCore::ApplyPropertyWordSpacing::applyValue):
144 (WebCore::ApplyPropertyPageSize::mmLength):
145 (WebCore::ApplyPropertyPageSize::inchLength):
146 (WebCore::ApplyPropertyPageSize::applyValue):
147 (WebCore::ApplyPropertyVerticalAlign::applyValue):
148 (WebCore::ApplyPropertyClipPath::applyValue):
149 (WebCore::ApplyPropertyShape::applyValue):
150 (WebCore::ApplyPropertyTextIndent::applyValue):
151 * css/MediaQueryEvaluator.cpp:
152 (WebCore::colorMediaFeatureEval):
153 (WebCore::color_indexMediaFeatureEval):
154 (WebCore::monochromeMediaFeatureEval):
155 (WebCore::orientationMediaFeatureEval):
156 (WebCore::aspect_ratioMediaFeatureEval):
157 (WebCore::device_aspect_ratioMediaFeatureEval):
158 (WebCore::device_pixel_ratioMediaFeatureEval):
159 (WebCore::resolutionMediaFeatureEval):
160 (WebCore::gridMediaFeatureEval):
161 (WebCore::computeLength):
162 (WebCore::device_heightMediaFeatureEval):
163 (WebCore::device_widthMediaFeatureEval):
164 (WebCore::heightMediaFeatureEval):
165 (WebCore::widthMediaFeatureEval):
166 (WebCore::min_colorMediaFeatureEval):
167 (WebCore::max_colorMediaFeatureEval):
168 (WebCore::min_color_indexMediaFeatureEval):
169 (WebCore::max_color_indexMediaFeatureEval):
170 (WebCore::min_monochromeMediaFeatureEval):
171 (WebCore::max_monochromeMediaFeatureEval):
172 (WebCore::min_aspect_ratioMediaFeatureEval):
173 (WebCore::max_aspect_ratioMediaFeatureEval):
174 (WebCore::min_device_aspect_ratioMediaFeatureEval):
175 (WebCore::max_device_aspect_ratioMediaFeatureEval):
176 (WebCore::min_device_pixel_ratioMediaFeatureEval):
177 (WebCore::max_device_pixel_ratioMediaFeatureEval):
178 (WebCore::min_heightMediaFeatureEval):
179 (WebCore::max_heightMediaFeatureEval):
180 (WebCore::min_widthMediaFeatureEval):
181 (WebCore::max_widthMediaFeatureEval):
182 (WebCore::min_device_heightMediaFeatureEval):
183 (WebCore::max_device_heightMediaFeatureEval):
184 (WebCore::min_device_widthMediaFeatureEval):
185 (WebCore::max_device_widthMediaFeatureEval):
186 (WebCore::min_resolutionMediaFeatureEval):
187 (WebCore::max_resolutionMediaFeatureEval):
188 (WebCore::animationMediaFeatureEval):
189 (WebCore::transitionMediaFeatureEval):
190 (WebCore::transform_2dMediaFeatureEval):
191 (WebCore::transform_3dMediaFeatureEval):
192 (WebCore::view_modeMediaFeatureEval):
193 (WebCore::video_playable_inlineMediaFeatureEval):
194 (WebCore::hoverMediaFeatureEval):
195 (WebCore::pointerMediaFeatureEval):
196 (WebCore::MediaQueryEvaluator::eval):
197 * css/SVGCSSStyleSelector.cpp:
198 (WebCore::StyleResolver::applySVGProperty):
199 * css/StyleResolver.cpp:
200 (WebCore::StyleResolver::State::clear):
201 (WebCore::StyleResolver::State::initForStyleResolve):
202 (WebCore::StyleResolver::convertToIntLength):
203 (WebCore::StyleResolver::convertToFloatLength):
204 (WebCore::createGridTrackBreadth):
205 (WebCore::StyleResolver::applyProperty):
206 (WebCore::StyleResolver::createFilterOperations):
207 * css/StyleResolver.h:
208 (WebCore::StyleResolver::State::setStyle):
209 (WebCore::StyleResolver::State::cssToLengthConversionData):
210 * css/TransformFunctions.cpp:
211 (WebCore::convertToFloatLength):
212 (WebCore::transformsForValue):
213 * css/TransformFunctions.h:
214 * css/WebKitCSSMatrix.cpp:
215 (WebCore::WebKitCSSMatrix::setMatrixValue):
216 * rendering/RenderThemeIOS.mm:
217 (WebCore::applyCommonButtonPaddingToStyle):
218 (WebCore::RenderThemeIOS::adjustButtonStyle):
220 2014-04-29 Zoltan Horvath <zoltan@webkit.org>
222 [CSS Shapes] complex calc args for inset round vanish
223 https://bugs.webkit.org/show_bug.cgi?id=132293
225 Reviewed by Bem Jones-Bey.
227 In order to use calc in the rounded parameters for inset shapes, we need
228 to pass RenderStyle for the value creation as we did for the width arguments.
229 Without taking RenderStyle into account, we hit an assert not reache
230 in CSSPrimitiveValue::init in the debug builds.
232 I've added new parsing test.
234 * css/BasicShapeFunctions.cpp:
235 (WebCore::valueForBasicShape):
236 * css/CSSPrimitiveValue.cpp:
237 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
238 (WebCore::CSSPrimitiveValue::init):
239 * css/CSSPrimitiveValue.h:
240 (WebCore::CSSPrimitiveValue::create):
241 * css/CSSValuePool.h:
242 (WebCore::CSSValuePool::createValue):
244 2014-04-29 Zoltan Horvath <zoltan@webkit.org>
246 [CSS Shapes] complex calc values for shape-margin return null for computed style
247 https://bugs.webkit.org/show_bug.cgi?id=132313
249 Reviewed by Bem Jones-Bey.
251 We need to pass RenderStyle* to the cssValuePool when parsing
252 shape-margin in order to use calc() as a parameter.
254 I've added the new test case to parsing-shape-margin.html
256 * css/CSSComputedStyleDeclaration.cpp:
257 (WebCore::ComputedStyleExtractor::propertyValue):
259 2014-04-29 Chris Fleizach <cfleizach@apple.com>
261 AX: Row span info is wrong for table cells when a footer section is placed above a body section
262 https://bugs.webkit.org/show_bug.cgi?id=131832
264 Reviewed by Mario Sanchez Prada.
266 If a <footer> section is placed before the body, it renders AX row information and order incorrectly.
267 This also affects ARIA tables because they add their children by looking at renderer children, instead
268 interrogating the RenderTable directly.
270 Test: accessibility/table-with-footer-section-above-body.html
272 * accessibility/AccessibilityARIAGrid.cpp:
273 (WebCore::AccessibilityARIAGrid::addTableCellChild):
274 (WebCore::AccessibilityARIAGrid::addChildren):
275 * accessibility/AccessibilityTable.cpp:
276 (WebCore::AccessibilityTable::addChildren):
277 (WebCore::AccessibilityTable::addChildrenFromSection):
278 * accessibility/AccessibilityTable.h:
279 * accessibility/AccessibilityTableCell.cpp:
280 (WebCore::AccessibilityTableCell::rowIndexRange):
281 (WebCore::AccessibilityTableCell::columnIndexRange):
283 2014-04-29 Chris Fleizach <cfleizach@apple.com>
285 AX: SpeechSynthesisUtterance cannot addEventListener
286 https://bugs.webkit.org/show_bug.cgi?id=132321
288 Reviewed by Mario Sanchez Prada.
290 Modified an existing test (speech-synthesis-speak.html) to use addEventTarget.
292 * Modules/speech/SpeechSynthesisUtterance.idl:
294 2014-04-29 Hans Muller <hmuller@adobe.com>
296 [CSS Shapes] shape-outside polygon fails when first vertex is 0,0
297 https://bugs.webkit.org/show_bug.cgi?id=132132
299 Reviewed by Bem Jones-Bey.
301 ShapeInterval now distinguishes between x1==x2 - isEmpty() and x1,x2 haven't been
302 set yet - isUndefined(). Removed the ShapeInterval setX1() and setX2() methods, since
303 they're no longer used.
305 The polygon algorithm for computing excluded intervals now ignores horizontal
306 edges. It also ignores edges whose lower vertex matches the top of the line, if
307 the edge's Y direction is upwards (away from the top of the line). The rationale
308 for this was explained here:
309 http://hansmuller-webkit.blogspot.com/2012/11/revised-horizontal-box-algorithm.html
311 Test: fast/shapes/shape-outside-floats/shape-outside-polygon-zero-vertex.html
313 * rendering/shapes/PolygonShape.cpp:
314 (WebCore::OffsetPolygonEdge::clippedEdgeXRange):
315 (WebCore::PolygonShape::getExcludedIntervals):
316 * rendering/shapes/ShapeInterval.h:
317 (WebCore::ShapeInterval::ShapeInterval):
318 (WebCore::ShapeInterval::isUndefined):
319 (WebCore::ShapeInterval::x1):
320 (WebCore::ShapeInterval::x2):
321 (WebCore::ShapeInterval::width):
322 (WebCore::ShapeInterval::isEmpty):
323 (WebCore::ShapeInterval::setX1):
324 (WebCore::ShapeInterval::setX2):
325 (WebCore::ShapeInterval::overlaps):
326 (WebCore::ShapeInterval::contains):
327 (WebCore::ShapeInterval::unite):
329 2014-04-29 Andrei Bucur <abucur@adobe.com>
331 [CSS Regions] Fix getClientRects() for content nodes
332 https://bugs.webkit.org/show_bug.cgi?id=117407
334 Reviewed by David Hyatt.
336 This patch modifies getClientRects() to return a list of fragments
337 for a fragmented box instead of a single rectangle positioned inside
338 the region where the box center would appear.
340 The approach is to split the border box of the element in regions using
341 the layout positioning. Then each fragment is mapped to the view coordinates
342 and the result added to the list of rectangles. To preserve the originating
343 region when mapping the fragment through the ancestor tree I've introduced
344 the concept of a current region. The current region is stored inside a
345 CurrentRenderRegionMaintainer object, created whenever an algorithm needing
346 it needs to run. When the maintainer is destroyed, the cleanup is made
347 automatically. The RenderFlowThread holds a pointer to this structure for
350 Tests: fast/regions/cssom/client-rects-fixed-content.html
351 fast/regions/cssom/client-rects-forced-breaks.html
352 fast/regions/cssom/client-rects-inline-complex.html
353 fast/regions/cssom/client-rects-inline.html
354 fast/regions/cssom/client-rects-nested-regions.html
355 fast/regions/cssom/client-rects-positioned.html
356 fast/regions/cssom/client-rects-relative-position.html
357 fast/regions/cssom/client-rects-simple-block.html
358 fast/regions/cssom/client-rects-transforms.html
359 fast/regions/cssom/client-rects-unsplittable-float.html
361 * rendering/RenderBlock.cpp:
362 (WebCore::RenderBlock::absoluteQuads): Split the box in fragments.
363 * rendering/RenderBox.cpp:
364 (WebCore::RenderBox::absoluteQuads): Split the box in fragments.
365 * rendering/RenderFlowThread.cpp:
366 (WebCore::RenderFlowThread::RenderFlowThread):
367 (WebCore::RenderFlowThread::mapFromFlowToRegion):
368 (WebCore::RenderFlowThread::mapLocalToContainer):
369 (WebCore::RenderFlowThread::currentRegion):
370 * rendering/RenderFlowThread.h:
371 * rendering/RenderNamedFlowFragment.cpp:
372 (WebCore::RenderNamedFlowFragment::absoluteQuadsForBoxInRegion): Get
373 the fragments for this box in the region.
374 * rendering/RenderNamedFlowFragment.h:
375 * rendering/RenderNamedFlowThread.cpp:
376 (WebCore::RenderNamedFlowThread::absoluteQuadsForBox): Virtual function
377 that can be used to implement fragments to client rects mapping.
378 * rendering/RenderNamedFlowThread.h:
379 * rendering/RenderRegion.cpp:
380 (WebCore::RenderRegion::rectFlowPortionForBox): Small change to correctly
381 map empty rectangles to containers.
382 (WebCore::CurrentRenderRegionMaintainer::CurrentRenderRegionMaintainer):
383 (WebCore::CurrentRenderRegionMaintainer::~CurrentRenderRegionMaintainer):
384 * rendering/RenderRegion.h:
385 (WebCore::RenderRegion::absoluteQuadsForBoxInRegion):
386 (WebCore::CurrentRenderRegionMaintainer::region):
388 2014-04-29 Andrei Bucur <abucur@adobe.com>
390 Store the containing region map inside the flow thread
391 https://bugs.webkit.org/show_bug.cgi?id=131647
393 Reviewed by Mihnea Ovidenie.
395 The patch moves the containing region map inside the flow thread where
396 it can be better handled in case the region chain changes and the map
399 As a result of this move we are able to also cleanup the lines region
400 information of a block flow when it is removed from the tree.
402 Test: fast/regions/inline-strike-through.html
404 * rendering/InlineFlowBox.h:
405 (WebCore::InlineFlowBox::InlineFlowBox):
406 * rendering/RenderBlockLineLayout.cpp:
407 (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
408 * rendering/RenderFlowThread.cpp:
409 (WebCore::RenderFlowThread::removeFlowChildInfo):
410 (WebCore::RenderFlowThread::invalidateRegions):
411 (WebCore::RenderFlowThread::removeLineRegionInfo):
412 (WebCore::RenderFlowThread::checkLinesConsistency):
413 (WebCore::RenderFlowThread::containingRegionMap):
414 * rendering/RenderFlowThread.h:
415 * rendering/RootInlineBox.cpp:
416 (WebCore::containingRegionMap):
417 (WebCore::RootInlineBox::~RootInlineBox):
418 (WebCore::RootInlineBox::paint):
419 (WebCore::RootInlineBox::containingRegion):
420 (WebCore::RootInlineBox::clearContainingRegion):
421 (WebCore::RootInlineBox::setContainingRegion):
423 2014-04-28 Benjamin Poulain <benjamin@webkit.org>
425 SelectorCodeGenerator::generateElementIsNthChild() leaks the parent register :nth-child() is non-filtering
426 https://bugs.webkit.org/show_bug.cgi?id=132311
428 Reviewed by Andreas Kling.
430 In two cases, the parent register was never returned to the register allocator:
431 -Non filtering selectors (the early return).
432 -Non marking selectors (at the moment: only querySelector API).
434 Unfortunately, generateElementIsNthChild() makes function call, which forces us to do this manual allocation
435 of the parentElement register. Long term, I want RegisterAllocator and FunctionCall to have a special type for that.
437 Test: fast/selectors/several-nth-child.html
439 * cssjit/SelectorCompiler.cpp:
440 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
442 2014-04-28 Yusuke Suzuki <utatane.tea@gmail.com>
444 CSS JIT: backtracking with current / parent element for child
445 https://bugs.webkit.org/show_bug.cgi?id=132057
447 Reviewed by Benjamin Poulain.
449 Calculate appropriate backtracking start height from the closest
450 descendant. And at first, we use it for a simple optimization.
452 1. When backtracking start height equals to current height, we
453 can simply jump to a descendant element check phase.
454 2. When backtracking start height equals to current height + 1, we
455 can simply jump to a descendant element traversing phase.
457 We can apply this optimization to fragments with adjacent combinators.
458 But, in the meantime, we start to implement it for a fragment with
461 * cssjit/SelectorCompiler.cpp:
462 (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
463 (WebCore::SelectorCompiler::TagNamePattern::TagNamePattern):
464 (WebCore::SelectorCompiler::solveDescendantBacktrackingActionForChild):
465 (WebCore::SelectorCompiler::solveBacktrackingAction):
466 (WebCore::SelectorCompiler::equalTagNames):
467 (WebCore::SelectorCompiler::equalTagNamePatterns):
468 (WebCore::SelectorCompiler::computeBacktrackingStartHeightFromDescendant):
469 (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
470 (WebCore::SelectorCompiler::requiresAdjacentTail):
471 (WebCore::SelectorCompiler::requiresDescendantTail):
472 (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
473 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
474 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentNode):
475 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElement):
476 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
477 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAncestorTreeWalker):
478 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
479 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
480 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
482 2014-04-28 Benjamin Poulain <bpoulain@apple.com>
484 [iOS][WK2] Restore the scroll position and scale from the HistoryItem (mostly)
485 https://bugs.webkit.org/show_bug.cgi?id=132307
487 Reviewed by Simon Fraser.
491 2014-04-28 Beth Dakin <bdakin@apple.com>
493 Scrollbars do not update properly when topContentInset changes dynamically
494 https://bugs.webkit.org/show_bug.cgi?id=132309
496 <rdar://problem/16642232>
498 Reviewed by Tim Horton.
500 It is not sufficient to do a layout and call updateScrollbars(). We must also call
501 RenderLayerCompositor::frameViewDidChangeSize() in order to properly adjust the
502 size and position of all of the scrolling-related layers.
503 * page/FrameView.cpp:
504 (WebCore::FrameView::topContentInsetDidChange):
506 2014-04-28 David Hyatt <hyatt@apple.com>
508 [New Multicolumn] event.offsetX/offsetY don't work correctly
509 https://bugs.webkit.org/show_bug.cgi?id=132284
511 Reviewed by Simon Fraser.
513 * rendering/RenderBoxModelObject.cpp:
514 (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
515 Change the code here to only trigger for CSS Regions and not for
516 multi-column. Add a FIXME pointing out that the code is broken even for
519 * rendering/RenderMultiColumnFlowThread.cpp:
520 (WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint):
521 Override mapAbsoluteToLocalPoint in order to guess a region and attempt
522 to translate the point from that region to the flow thread local coordinate
525 (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromRegionToFlow):
526 * rendering/RenderMultiColumnFlowThread.h:
527 New helper function that just wraps calling the region's logical translation
528 function and converting to/from physical coordinates.
530 2014-04-28 Commit Queue <commit-queue@webkit.org>
532 Unreviewed, rolling out r167857.
533 https://bugs.webkit.org/show_bug.cgi?id=132305
535 the change was rolled out, roll out the new expectations as
536 well (Requested by thorton on #webkit).
540 "Unreviewed. Updating one bindings test baseline after
542 http://trac.webkit.org/changeset/167857
544 2014-04-28 Dean Jackson <dino@apple.com>
546 [Mac] Use the animated version of setHighlighted on NSButtonCell where available
547 https://bugs.webkit.org/show_bug.cgi?id=132295
548 <rdar://problem/16747240>
550 Reviewed by Beth Dakin.
552 Like setState, there is an animated version of setHighlighted available.
554 * platform/mac/ThemeMac.mm:
555 (WebCore::updateStates): Use private version of _setHighlighted where possible.
557 2014-04-28 Commit Queue <commit-queue@webkit.org>
559 Unreviewed, rolling out r167855.
560 https://bugs.webkit.org/show_bug.cgi?id=132301
562 Broke the windows build (Requested by bfulgham on #webkit).
566 "ScriptExecutionContext::Task should work well with C++11
568 https://bugs.webkit.org/show_bug.cgi?id=129795
569 http://trac.webkit.org/changeset/167855
571 2014-04-24 Andy Estes <aestes@apple.com>
573 [iOS] Implement WebQuickLookHandleClient for WebKit2
574 https://bugs.webkit.org/show_bug.cgi?id=132157
576 Reviewed by Darin Adler.
578 * WebCore.exp.in: Exported QuickLookHandle::previewUTI().
579 * platform/network/ios/QuickLook.h:
580 * platform/network/ios/QuickLook.mm:
581 (WebCore::QuickLookHandle::previewFileName): Changed to return a WTF::String.
582 (WebCore::QuickLookHandle::previewUTI): Added.
584 2014-04-28 Chris Fleizach <cfleizach@apple.com>
586 REGRESSION: Intermittent crash in SpeechSynthesis::didFinishSpeaking
587 https://bugs.webkit.org/show_bug.cgi?id=111613
589 Reviewed by Mark Lam.
591 I think it's possible that didFinishSpeaking ends up calling directly back into start speaking, and the utterance reference
592 we were holding can get cleared, so protecting this should avoid a few asserts.
594 * platform/mock/PlatformSpeechSynthesizerMock.cpp:
595 (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
597 2014-04-28 Commit Queue <commit-queue@webkit.org>
599 Unreviewed, rolling out r167871.
600 https://bugs.webkit.org/show_bug.cgi?id=132290
602 broke a newmulticol test (spanner-nested-dynamic) (Requested
603 by thorton on #webkit).
607 "Store the containing region map inside the flow thread"
608 https://bugs.webkit.org/show_bug.cgi?id=131647
609 http://trac.webkit.org/changeset/167871
611 2014-04-28 Commit Queue <commit-queue@webkit.org>
613 Unreviewed, rolling out r167853.
614 https://bugs.webkit.org/show_bug.cgi?id=132288
616 caused crashes+timeouts+layout test failures described in the
617 bug (Requested by thorton on #webkit).
621 "Coalesce responses on network process side"
622 https://bugs.webkit.org/show_bug.cgi?id=132229
623 http://trac.webkit.org/changeset/167853
625 2014-04-24 Simon Fraser <simon.fraser@apple.com>
627 [iOS WK2] flickery scrolling with overflow-scrolling:touch
628 https://bugs.webkit.org/show_bug.cgi?id=132150
630 Reviewed by Tim Horton.
632 Fix typo in a comment.
634 * page/scrolling/AsyncScrollingCoordinator.cpp:
635 (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
637 2014-04-28 Martin Robinson <mrobinson@igalia.com>
639 [GTK] Builtin cursors do not properly handle transparency
640 https://bugs.webkit.org/show_bug.cgi?id=131866
642 Reviewed by Gustavo Noronha Silva.
644 Tested by ManualTests/cursor.html.
646 * platform/gtk/CursorGtk.cpp:
647 (WebCore::createNamedCursor): Instead of interpreting the source bitmap as an A1 image, use
648 it as a 1-bit black and white image. We do this by:
649 1. Painting the result to a full color image with transparency instead of an alpha-only surface.
650 2. Masking a white background using the cursor alpha surface.
651 3. Painting the black parts of the cursor by painting the source surface, where black pixels
652 will be interpreted as full opaque pixels.
654 2014-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
656 Unreviewed. Update GObject DOM bindings symbols file.
658 * bindings/gobject/webkitdom.symbols: Add missing symbols.
660 2014-04-28 Manuel Rego Casasnovas <rego@igalia.com>
662 OrderIterator refactoring to avoid extra loops
663 https://bugs.webkit.org/show_bug.cgi?id=119061
665 Reviewed by Darin Adler.
667 This patch removes order values Vector and use a Vector of pairs instead. The pairs are formed by a child
668 (RenderBox) and the index of this child. In addition, OrderIterator code is simplified.
670 It provides a helper class OrderIteratorPopulator, used for manipulating the Vector directly. Which allows to
671 consolidate the code into a single implementation across flexbox and grid. OrderIteratorPopulator part is based
672 on a patch from Blink r153971 by <jchaffraix@chromium.org>.
674 Current implementation is O(number of children * number of order values). Now it will just do a sort operation
675 and then a regular loop. So if you have different order values in a flexbox or grid the performance will
678 Comparing results of perf-tests:
679 * Layout/auto-grid-lots-of-data: ~0.5% worse.
680 * Layout/fixed-grid-lots-of-data: ~0.5% worse.
681 * Layout/fixed-grid-lots-of-data (setting 100 different order values): ~50% better.
682 * Layout/flexbox-lots-of-data: ~5% better.
684 No new tests, already covered by current tests.
686 * rendering/OrderIterator.cpp:
687 (WebCore::OrderIterator::currentChild): Return current child according to m_childrenIndex.
688 (WebCore::OrderIterator::first): Initialize m_childrenIndex and return current child.
689 (WebCore::OrderIterator::next): Increase m_childrenIndex and return current child.
690 (WebCore::compareByOrderValueAndIndex): Sorts the Vector by order value and index.
691 (WebCore::OrderIteratorPopulator::~OrderIteratorPopulator): Calls compareByOrderValueAndIndex() if there is any
692 child with non default order value.
693 (WebCore::OrderIteratorPopulator::collectChild): Adds the child and index to the Vector. Update
694 m_allChildrenHaveDefaultOrderValue accordingly.
695 (WebCore::OrderIterator::OrderIterator): Deleted.
696 (WebCore::OrderIterator::setOrderValues): Deleted.
697 (WebCore::OrderIterator::reset): Deleted.
698 * rendering/OrderIterator.h:
699 (WebCore::OrderIteratorPopulator::OrderIteratorPopulator): New helper class to manipulate the Vector.
700 (WebCore::OrderIterator::currentChild): Deleted.
701 * rendering/RenderFlexibleBox.cpp:
702 (WebCore::RenderFlexibleBox::RenderFlexibleBox): Remove OrderIterator intialization.
703 (WebCore::RenderFlexibleBox::layoutBlock): Remove unneeded code related to old OrderValues vector.
704 (WebCore::RenderFlexibleBox::prepareOrderIteratorAndMargins): Populate OrderIterator using collectChild().
705 (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Deleted.
706 * rendering/RenderFlexibleBox.h: Rename computeMainAxisPreferredSizes() to prepareOrderIteratorAndMargins().
707 * rendering/RenderGrid.cpp:
708 (WebCore::RenderGrid::RenderGrid): Remove OrderIterator initialization.
709 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Populate OrderIterator using collectChild().
711 2014-04-28 Zan Dobersek <zdobersek@igalia.com>
713 std::bitset<>::test() does unnecessary bounds checks on CSSPropertyID bitsets
714 https://bugs.webkit.org/show_bug.cgi?id=131685
716 Reviewed by Darin Adler.
718 Use std::bitset<>::operator[]() instead of std::bitset<>::test() to avoid
719 bounds checks which are not necessary as long as a CSSPropertyID value is used.
722 (WebCore::filterProperties):
723 * css/StyleProperties.cpp:
724 (WebCore::StyleProperties::asText):
725 * css/StyleResolver.cpp:
726 (WebCore::StyleResolver::CascadedProperties::hasProperty):
727 (WebCore::StyleResolver::CascadedProperties::set):
729 2014-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
731 [GTK] TextTrack kind and mode attributes are enums since r166180
732 https://bugs.webkit.org/show_bug.cgi?id=132228
734 Reviewed by Martin Robinson.
736 Improve coding style according to review comments, that I forgot
737 to do before landing previous commit.
739 * bindings/gobject/WebKitDOMCustom.cpp:
740 (webkit_dom_text_track_get_kind):
741 (webkit_dom_text_track_get_mode):
742 (webkit_dom_text_track_set_mode):
744 2014-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
746 [GTK] TextTrack kind and mode attributes are enums since r166180
747 https://bugs.webkit.org/show_bug.cgi?id=132228
749 Reviewed by Martin Robinson.
751 We don't support enum values yet in GObject DOM bindings, but they
752 are internally strings anyway, so we can keep the old
753 implementations using strings as custom functions until we
754 properly support enums.
756 * bindings/gobject/WebKitDOMCustom.cpp:
757 (webkit_dom_text_track_get_kind):
758 (webkit_dom_text_track_get_mode):
759 (webkit_dom_text_track_set_mode):
760 * bindings/gobject/WebKitDOMCustom.h:
761 * bindings/gobject/WebKitDOMCustom.symbols:
763 2014-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
765 [GTK] TextTrack::addCue can raise an exception since r163974
766 https://bugs.webkit.org/show_bug.cgi?id=132227
768 Reviewed by Martin Robinson.
770 webkit_dom_text_track_add_cue() now receives a GError paramater
771 which is an API break. Add
772 webkit_dom_text_track_add_cue_with_error and keep
773 webkit_dom_text_track_add_cue as deprecated to keep API
776 * bindings/gobject/WebKitDOMDeprecated.cpp:
777 (webkit_dom_text_track_add_cue):
778 * bindings/gobject/WebKitDOMDeprecated.h:
779 * bindings/gobject/WebKitDOMDeprecated.symbols:
780 * bindings/gobject/webkitdom.symbols:
781 * bindings/scripts/CodeGeneratorGObject.pm:
782 (GetEffectiveFunctionName):
784 2014-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
786 [GTK] TextTrackCue API changed in r163649
787 https://bugs.webkit.org/show_bug.cgi?id=132226
789 Reviewed by Martin Robinson.
791 TextTrackCue is now a base class and part of its API was moved to
792 the derived class VTTCue. Update the GObject DOM bindings to keep
793 backwards compatibility.
795 * PlatformGTK.cmake: Generate bindings for DataCue and VTTCue.
796 * bindings/gobject/WebKitDOMDeprecated.cpp:
797 (webkit_dom_text_track_cue_get_cue_as_html): Mark as deprecated in
799 (webkit_dom_text_track_cue_get_vertical): Ditto.
800 (webkit_dom_text_track_cue_set_vertical): Ditto.
801 (webkit_dom_text_track_cue_get_snap_to_lines): Ditto.
802 (webkit_dom_text_track_cue_set_snap_to_lines): Ditto.
803 (webkit_dom_text_track_cue_get_line): Ditto.
804 (webkit_dom_text_track_cue_set_line): Ditto.
805 (webkit_dom_text_track_cue_get_position): Ditto.
806 (webkit_dom_text_track_cue_set_position): Ditto.
807 (webkit_dom_text_track_cue_get_size): Ditto.
808 (webkit_dom_text_track_cue_set_size): Ditto.
809 (webkit_dom_text_track_cue_get_align): Ditto.
810 (webkit_dom_text_track_cue_set_align): Ditto.
811 (webkit_dom_text_track_cue_get_text): Ditto.
812 (webkit_dom_text_track_cue_set_text): Ditto.
813 * bindings/gobject/WebKitDOMDeprecated.h:
814 * bindings/gobject/WebKitDOMDeprecated.symbols: Add new deprecated symbols.
815 * bindings/gobject/WebKitDOMPrivate.cpp:
816 (WebKit::wrap): Add generic wrap for TextTrackCue now that it's a
817 base class to generate DataCue or VTTCue objects.
818 * bindings/gobject/WebKitDOMPrivate.h:
819 * bindings/gobject/webkitdom.symbols: Add DataCue symbols.
820 * bindings/scripts/CodeGeneratorGObject.pm:
821 (IsPolymorphic): Add TextTrackCue to the list of polymorphic classes.
823 2014-04-27 Andrei Bucur <abucur@adobe.com>
825 Store the containing region map inside the flow thread
826 https://bugs.webkit.org/show_bug.cgi?id=131647
828 Reviewed by Mihnea Ovidenie.
830 The patch moves the containing region map inside the flow thread where
831 it can be better handled in case the region chain changes and the map
834 As a result of this move we are able to also cleanup the lines region
835 information of a block flow when it is removed from the tree.
837 Test: fast/regions/inline-strike-through.html
839 * rendering/InlineFlowBox.h:
840 (WebCore::InlineFlowBox::InlineFlowBox):
841 * rendering/RenderBlockLineLayout.cpp:
842 (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
843 * rendering/RenderFlowThread.cpp:
844 (WebCore::RenderFlowThread::removeFlowChildInfo):
845 (WebCore::RenderFlowThread::invalidateRegions):
846 (WebCore::RenderFlowThread::removeLineRegionInfo):
847 (WebCore::RenderFlowThread::checkLinesConsistency):
848 (WebCore::RenderFlowThread::containingRegionMap):
849 * rendering/RenderFlowThread.h:
850 * rendering/RootInlineBox.cpp:
851 (WebCore::containingRegionMap):
852 (WebCore::RootInlineBox::~RootInlineBox):
853 (WebCore::RootInlineBox::paint):
854 (WebCore::RootInlineBox::containingRegion):
855 (WebCore::RootInlineBox::clearContainingRegion):
856 (WebCore::RootInlineBox::setContainingRegion):
858 2014-04-27 Darin Adler <darin@apple.com>
860 REGRESSION (r159345): The hover state for links in the top navigation of Yahoo.com doesn't work
861 https://bugs.webkit.org/show_bug.cgi?id=132241
862 rdar://problem/16501924
864 Reviewed by Andreas Kling.
866 Test: fast/text/simple-lines-hover-underline.html
868 Checked that this does not hurt performance by running the
869 run-perf-tests PerformanceTests/Layout/line-layout.html command before and after.
871 * rendering/RenderBlockFlow.cpp:
872 (WebCore::RenderBlockFlow::hitTestInlineChildren): Use simpleLineLayout function rather than
873 getting at the data member directly.
874 (WebCore::RenderBlockFlow::firstLineBaseline): Ditto.
875 (WebCore::RenderBlockFlow::inlineBlockBaseline): Ditto.
876 (WebCore::RenderBlockFlow::lineCount): Ditto.
877 (WebCore::RenderBlockFlow::paintInlineChildren): Ditto.
878 (WebCore::RenderBlockFlow::hasLines): Ditto.
879 (WebCore::RenderBlockFlow::simpleLineLayout): Added logic to determine which path to use if
880 m_lineLayoutPath is undetermined, and call createLineBoxes if it's not simple.
881 (WebCore::RenderBlockFlow::ensureLineBoxes): Factored out most of the code into a new
882 createLineBoxes function.
883 (WebCore::RenderBlockFlow::createLineBoxes): Ditto.
885 * rendering/RenderBlockFlow.h: Made simpleLineLayout function no longer an inline.
886 Added a private createLineBoxes function.
888 2014-04-27 Praveen R Jadhav <praveen.j@samsung.com>
890 [MediaStream] .ended shouldn't be part of MediaStream IDL
891 https://bugs.webkit.org/show_bug.cgi?id=132104
893 Reviewed by Eric Carlson.
895 .ended attribute is spec'ed out of MediaStream IDL. Instead, .active
896 is introduced to handle more scenarios. This patch replaces all 'ended'
897 attribute calls with corresponding 'active' attributes.
899 MediaStream-add-remove-tracks.html is updated.
901 * Modules/mediastream/MediaStream.cpp:
902 (WebCore::MediaStream::addTrack): Replaced ended() with active().
903 (WebCore::MediaStream::removeTrack): setEnded() isn't called. setActive()
904 is retained which propagates oninactive event.
905 (WebCore::MediaStream::trackDidEnd): setEnded() isn't called.
906 (WebCore::MediaStream::removeRemoteSource): Replaced ended() with active().
907 (WebCore::MediaStream::addRemoteTrack): Replaced ended() with active().
908 (WebCore::MediaStream::removeRemoteTrack): Replaced ended() with active().
909 (WebCore::MediaStream::ended): Deleted.
910 (WebCore::MediaStream::setEnded): Deleted.
911 (WebCore::MediaStream::streamDidEnd): Deleted.
912 * Modules/mediastream/MediaStream.h:
913 * Modules/mediastream/MediaStream.idl:
914 * Modules/mediastream/RTCPeerConnection.cpp:
915 (WebCore::RTCPeerConnection::didRemoveRemoteStream): Replaced setEnded()
917 * platform/mediastream/MediaStreamPrivate.cpp:
918 (WebCore::MediaStreamPrivate::MediaStreamPrivate):
919 (WebCore::MediaStreamPrivate::setActive): Updated comment from bug
920 https://bugs.webkit.org/show_bug.cgi?id=131973
921 (WebCore::MediaStreamPrivate::setEnded): Deleted.
922 * platform/mediastream/MediaStreamPrivate.h:
923 (WebCore::MediaStreamPrivate::ended): Deleted.
925 2014-04-25 Andy Estes <aestes@apple.com>
927 [iOS] Stop creating a WKWebResourceQuickLookDelegate for every WebResourceLoader
928 https://bugs.webkit.org/show_bug.cgi?id=132215
930 Reviewed by Dan Bernstein.
932 * WebCore.exp.in: Moved QuickLook symbols to the USE(QUICK_LOOK) stanza.
933 * platform/network/ios/QuickLook.h: Changed one of the create() overloads to no longer take a delegate argument.
934 * platform/network/ios/QuickLook.mm: Moved WKWebResourceQuickLookDelegate to here and renamed to WebResourceLoaderQuickLookDelegate.
935 (WebCore::QuickLookHandle::create): Created a WebResourceLoaderQuickLookDelegate only if QuickLook can handle the response.
937 2014-04-27 Sam Weinig <sam@webkit.org>
939 [iOS WebKit2] Add support for text autosizing
940 <rdar://problem/16545245>
941 https://bugs.webkit.org/show_bug.cgi?id=132237
943 Reviewed by Tim Horton.
945 Move text autosizing width from Frame to Page, as it is a Page level concept.
949 (WebCore::Frame::textAutosizingWidth): Deleted.
950 (WebCore::Frame::setTextAutosizingWidth): Deleted.
952 * page/FrameView.cpp:
953 (WebCore::FrameView::layout):
955 (WebCore::Page::Page):
957 (WebCore::Page::textAutosizingWidth):
958 (WebCore::Page::setTextAutosizingWidth):
960 2014-04-27 Zan Dobersek <zdobersek@igalia.com>
962 Unreviewed. Updating one bindings test baseline after r167855.
964 * bindings/scripts/test/JS/JSTestCallback.cpp:
965 (WebCore::JSTestCallback::~JSTestCallback):
967 2014-04-27 Darin Adler <darin@apple.com>
969 Webpages can trigger loads with invalid URLs
970 https://bugs.webkit.org/show_bug.cgi?id=132224
971 rdar://problem/16697142
973 Reviewed by Alexey Proskuryakov.
975 Invalid URLs can be a way to trick the user about what website they
976 are looking at. Still trying to figure out a good way to regression-test this.
979 (WebCore::Document::processHttpEquiv): Pass a URL rather than a String to
980 the navigation scheduler.
981 * loader/FrameLoader.cpp:
982 (WebCore::FrameLoader::receivedFirstData): Ditto.
984 * loader/NavigationScheduler.cpp:
985 (WebCore::ScheduledURLNavigation::ScheduledURLNavigation): Take a URL rather
987 (WebCore::ScheduledURLNavigation::url): Ditto.
988 (WebCore::ScheduledRedirect::ScheduledRedirect): Ditto.
989 (WebCore::ScheduledLocationChange::ScheduledLocationChange): Ditto.
990 (WebCore::ScheduledRefresh::ScheduledRefresh): Ditto.
991 (WebCore::NavigationScheduler::shouldScheduleNavigation): Added a check that
992 prevents navigation to any URL that is invalid, except for JavaScript URLs,
993 which need not be valid.
994 (WebCore::NavigationScheduler::scheduleRedirect): Use URL instead of String.
995 (WebCore::NavigationScheduler::scheduleLocationChange): Use URL instead of
996 String. Also got rid of empty string check since empty URLs are also invalid,
997 and so shouldScheduleNavigation will take care of it.
998 (WebCore::NavigationScheduler::scheduleRefresh): Use URL instead of String.
1000 * loader/NavigationScheduler.h: Take URL instead of String. Also removed some
1001 unneeded incldues and uses of WTF_MAKE_NONCOPYABLE. NavigationScheduler is
1002 already noncopyable because it has a reference for a data member, and the
1003 disabler doesn't have any real reason to be noncopyable.
1005 * loader/SubframeLoader.cpp:
1006 (WebCore::SubframeLoader::loadOrRedirectSubframe): Pass a URL rather than a
1007 String to the NavigationScheduler.
1008 * page/DOMWindow.cpp:
1009 (WebCore::DOMWindow::createWindow): Ditto.
1011 * page/SecurityOrigin.cpp:
1012 (WebCore::SecurityOrigin::urlWithUniqueSecurityOrigin): Return a URL instead
1014 * page/SecurityOrigin.h: Updated for above change.
1016 2014-04-27 Zan Dobersek <zdobersek@igalia.com>
1018 ScriptExecutionContext::Task should work well with C++11 lambdas
1019 https://bugs.webkit.org/show_bug.cgi?id=129795
1021 Reviewed by Darin Adler.
1023 Instead of having classes that subclass ScriptExecutionContext::Task and override
1024 the performTask(ScriptExecutionContext*) method, have the ScriptExecutionContext::Task
1025 take in a std::function<void (ScriptExecutionContext*)>-like object trough the constructor
1026 which would contain the code currently kept in the performTask() methods.
1028 This enables inlining C++11 lambdas into ScriptExecutionContext::postTask() calls. For
1029 cleanup tasks, the Task object can be implicitly constructed by using the initializer list
1030 constructor with the first argument being the ScriptExecutionContext::Task::CleanupTask tag.
1031 The ScriptExecutionContext class remains non-copyable and now stores the passed-in invokable
1032 object in the std::function wrapper, along with a boolean member that indicates whether the
1033 task is of cleanup nature.
1035 * Modules/quota/StorageErrorCallback.cpp:
1036 (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
1037 (WebCore::StorageErrorCallback::CallbackTask::performTask): Deleted.
1038 * Modules/quota/StorageErrorCallback.h:
1039 (WebCore::StorageErrorCallback::CallbackTask::create): Deleted.
1040 * Modules/webdatabase/Database.cpp:
1041 (WebCore::Database::~Database):
1042 (WebCore::Database::runTransaction):
1043 (WebCore::Database::scheduleTransactionCallback):
1044 (WebCore::DerefContextTask::create): Deleted.
1045 (WebCore::DerefContextTask::performTask): Deleted.
1046 (WebCore::DerefContextTask::isCleanupTask): Deleted.
1047 (WebCore::DerefContextTask::DerefContextTask): Deleted.
1048 (WebCore::callTransactionErrorCallback): Deleted.
1049 (WebCore::DeliverPendingCallbackTask::create): Deleted.
1050 (WebCore::DeliverPendingCallbackTask::performTask): Deleted.
1051 (WebCore::DeliverPendingCallbackTask::DeliverPendingCallbackTask): Deleted.
1052 * Modules/webdatabase/DatabaseManager.cpp:
1053 (WebCore::DatabaseManager::openDatabase):
1054 (WebCore::DatabaseCreationCallbackTask::create): Deleted.
1055 (WebCore::DatabaseCreationCallbackTask::performTask): Deleted.
1056 (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask): Deleted.
1057 * Modules/webdatabase/DatabaseSync.cpp:
1058 (WebCore::CloseSyncDatabaseOnContextThreadTask::create): Deleted.
1059 (WebCore::CloseSyncDatabaseOnContextThreadTask::performTask): Deleted.
1060 (WebCore::CloseSyncDatabaseOnContextThreadTask::CloseSyncDatabaseOnContextThreadTask): Deleted.
1061 * Modules/webdatabase/SQLCallbackWrapper.h:
1062 (WebCore::SQLCallbackWrapper::clear):
1063 (WebCore::SQLCallbackWrapper::SafeReleaseTask::create): Deleted.
1064 (WebCore::SQLCallbackWrapper::SafeReleaseTask::performTask): Deleted.
1065 (WebCore::SQLCallbackWrapper::SafeReleaseTask::isCleanupTask): Deleted.
1066 (WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask): Deleted.
1067 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1068 (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
1069 (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
1070 (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
1071 (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
1072 (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
1073 (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
1074 (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
1075 (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
1076 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
1077 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1078 (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
1079 (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
1080 (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
1081 (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create): Deleted.
1082 (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask): Deleted.
1083 (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask): Deleted.
1084 * Modules/websockets/WorkerThreadableWebSocketChannel.h:
1085 * bindings/js/JSCallbackData.h:
1086 (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
1087 (WebCore::DeleteCallbackDataTask::create): Deleted.
1088 (WebCore::DeleteCallbackDataTask::performTask): Deleted.
1089 (WebCore::DeleteCallbackDataTask::isCleanupTask): Deleted.
1090 * bindings/js/JSDOMGlobalObjectTask.cpp:
1091 (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
1092 (WebCore::JSGlobalObjectTask::~JSGlobalObjectTask): Deleted.
1093 (WebCore::JSGlobalObjectTask::performTask): Deleted.
1094 * bindings/js/JSDOMGlobalObjectTask.h:
1095 * bindings/js/JSDOMWindowBase.cpp:
1096 (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
1097 * bindings/js/JSWorkerGlobalScopeBase.cpp:
1098 (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
1099 * bindings/scripts/CodeGeneratorJS.pm:
1100 (GenerateCallbackImplementation):
1101 * dom/CrossThreadTask.h:
1102 (WebCore::CrossThreadTask1::performTask):
1103 (WebCore::CrossThreadTask2::performTask):
1104 (WebCore::CrossThreadTask3::performTask):
1105 (WebCore::CrossThreadTask4::performTask):
1106 (WebCore::CrossThreadTask5::performTask):
1107 (WebCore::CrossThreadTask6::performTask):
1108 (WebCore::CrossThreadTask7::performTask):
1109 (WebCore::CrossThreadTask8::performTask):
1110 (WebCore::createCallbackTask):
1111 (WebCore::CrossThreadTask1::create): Deleted.
1112 (WebCore::CrossThreadTask2::create): Deleted.
1113 (WebCore::CrossThreadTask3::create): Deleted.
1114 (WebCore::CrossThreadTask4::create): Deleted.
1115 (WebCore::CrossThreadTask5::create): Deleted.
1116 (WebCore::CrossThreadTask6::create): Deleted.
1117 (WebCore::CrossThreadTask7::create): Deleted.
1118 (WebCore::CrossThreadTask8::create): Deleted.
1120 (WebCore::Document::addConsoleMessage):
1121 (WebCore::Document::addMessage):
1122 (WebCore::Document::postTask):
1123 (WebCore::Document::pendingTasksTimerFired):
1124 (WebCore::PerformTaskContext::PerformTaskContext): Deleted.
1125 (WebCore::Document::didReceiveTask): Deleted.
1127 * dom/ScriptExecutionContext.cpp:
1128 (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
1129 (WebCore::ScriptExecutionContext::timerAlignmentInterval):
1130 (WebCore::ProcessMessagesSoonTask::create): Deleted.
1131 (WebCore::ScriptExecutionContext::AddConsoleMessageTask::performTask): Deleted.
1132 (WebCore::ScriptExecutionContext::Task::~Task): Deleted.
1133 * dom/ScriptExecutionContext.h:
1134 (WebCore::ScriptExecutionContext::Task::Task):
1135 (WebCore::ScriptExecutionContext::Task::performTask):
1136 (WebCore::ScriptExecutionContext::Task::isCleanupTask):
1137 (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
1138 (WebCore::ScriptExecutionContext::AddConsoleMessageTask::create): Deleted.
1139 * dom/StringCallback.cpp:
1140 (WebCore::StringCallback::scheduleCallback):
1141 * loader/appcache/ApplicationCacheGroup.cpp:
1142 (WebCore::ApplicationCacheGroup::postListenerTask):
1143 (WebCore::CallCacheListenerTask::create): Deleted.
1144 (WebCore::CallCacheListenerTask::CallCacheListenerTask): Deleted.
1145 * workers/DefaultSharedWorkerRepository.cpp:
1146 (WebCore::SharedWorkerProxy::postTaskToLoader):
1147 (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
1148 (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
1149 (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
1150 (WebCore::DefaultSharedWorkerRepository::connectToWorker):
1151 (WebCore::SharedWorkerConnectTask::create): Deleted.
1152 (WebCore::SharedWorkerConnectTask::performTask): Deleted.
1153 * workers/WorkerEventQueue.cpp:
1154 (WebCore::WorkerEventQueue::EventDispatcher::EventDispatcher):
1155 (WebCore::WorkerEventQueue::EventDispatcher::~EventDispatcher):
1156 (WebCore::WorkerEventQueue::EventDispatcher::dispatch):
1157 (WebCore::WorkerEventQueue::enqueueEvent):
1158 (WebCore::WorkerEventQueue::cancelEvent):
1159 (WebCore::WorkerEventQueue::close):
1160 * workers/WorkerEventQueue.h:
1161 * workers/WorkerGlobalScope.cpp:
1162 (WebCore::WorkerGlobalScope::close):
1163 (WebCore::WorkerGlobalScope::postTask):
1164 (WebCore::WorkerGlobalScope::addConsoleMessage):
1165 (WebCore::WorkerGlobalScope::addMessage):
1166 (WebCore::CloseWorkerGlobalScopeTask::create): Deleted.
1167 (WebCore::CloseWorkerGlobalScopeTask::performTask): Deleted.
1168 (WebCore::CloseWorkerGlobalScopeTask::isCleanupTask): Deleted.
1169 * workers/WorkerGlobalScope.h:
1170 * workers/WorkerLoaderProxy.h:
1171 * workers/WorkerMessagingProxy.cpp:
1172 (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
1173 (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
1174 (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
1175 (WebCore::WorkerMessagingProxy::postTaskToLoader):
1176 (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
1177 (WebCore::WorkerMessagingProxy::workerThreadCreated):
1178 (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
1179 (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
1180 (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
1181 (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
1182 (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
1183 (WebCore::WorkerMessagingProxy::reportPendingActivity):
1184 (WebCore::MessageWorkerGlobalScopeTask::create): Deleted.
1185 (WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask): Deleted.
1186 (WebCore::MessageWorkerGlobalScopeTask::performTask): Deleted.
1187 (WebCore::MessageWorkerTask::create): Deleted.
1188 (WebCore::MessageWorkerTask::MessageWorkerTask): Deleted.
1189 (WebCore::MessageWorkerTask::performTask): Deleted.
1190 (WebCore::WorkerExceptionTask::create): Deleted.
1191 (WebCore::WorkerExceptionTask::WorkerExceptionTask): Deleted.
1192 (WebCore::WorkerExceptionTask::performTask): Deleted.
1193 (WebCore::WorkerGlobalScopeDestroyedTask::create): Deleted.
1194 (WebCore::WorkerGlobalScopeDestroyedTask::WorkerGlobalScopeDestroyedTask): Deleted.
1195 (WebCore::WorkerGlobalScopeDestroyedTask::performTask): Deleted.
1196 (WebCore::WorkerTerminateTask::create): Deleted.
1197 (WebCore::WorkerTerminateTask::WorkerTerminateTask): Deleted.
1198 (WebCore::WorkerTerminateTask::performTask): Deleted.
1199 (WebCore::WorkerThreadActivityReportTask::create): Deleted.
1200 (WebCore::WorkerThreadActivityReportTask::WorkerThreadActivityReportTask): Deleted.
1201 (WebCore::WorkerThreadActivityReportTask::performTask): Deleted.
1202 (WebCore::PostMessageToPageInspectorTask::create): Deleted.
1203 (WebCore::PostMessageToPageInspectorTask::PostMessageToPageInspectorTask): Deleted.
1204 (WebCore::PostMessageToPageInspectorTask::performTask): Deleted.
1205 (WebCore::NotifyNetworkStateChangeTask::create): Deleted.
1206 (WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask): Deleted.
1207 (WebCore::NotifyNetworkStateChangeTask::performTask): Deleted.
1208 * workers/WorkerMessagingProxy.h:
1209 * workers/WorkerRunLoop.cpp:
1210 (WebCore::WorkerRunLoop::postTask):
1211 (WebCore::WorkerRunLoop::postTaskAndTerminate):
1212 (WebCore::WorkerRunLoop::postTaskForMode):
1213 (WebCore::WorkerRunLoop::Task::create):
1214 (WebCore::WorkerRunLoop::Task::performTask):
1215 (WebCore::WorkerRunLoop::Task::Task):
1216 * workers/WorkerRunLoop.h:
1217 * workers/WorkerThread.cpp:
1218 (WebCore::WorkerThread::stop):
1219 (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
1220 (WebCore::WorkerThreadShutdownFinishTask::create): Deleted.
1221 (WebCore::WorkerThreadShutdownFinishTask::performTask): Deleted.
1222 (WebCore::WorkerThreadShutdownFinishTask::isCleanupTask): Deleted.
1223 (WebCore::WorkerThreadShutdownStartTask::create): Deleted.
1224 (WebCore::WorkerThreadShutdownStartTask::performTask): Deleted.
1225 (WebCore::WorkerThreadShutdownStartTask::isCleanupTask): Deleted.
1227 2014-04-27 Antti Koivisto <antti@apple.com>
1229 Coalesce responses on network process side
1230 https://bugs.webkit.org/show_bug.cgi?id=132229
1232 Reviewed by Andreas Kling.
1236 2014-04-27 David Kilzer <ddkilzer@apple.com>
1238 Roll out changes not part of the patch reviewed for Bug 132089
1239 <http://webkit.org/b/132089>
1241 * loader/SubframeLoader.cpp:
1242 (WebCore::SubframeLoader::loadOrRedirectSubframe):
1243 * page/DOMWindow.cpp:
1244 (WebCore::DOMWindow::setLocation):
1245 (WebCore::DOMWindow::createWindow):
1246 (WebCore::DOMWindow::open):
1248 2014-04-26 Darin Adler <darin@apple.com>
1250 Frame and page lifetime fixes in WebCore::createWindow
1251 https://bugs.webkit.org/show_bug.cgi?id=132089
1253 Reviewed by Sam Weinig.
1255 Speculative fix because I was unable to reproduce the crash that was
1256 reported with the test case attached to this bug.
1258 * loader/FrameLoader.cpp:
1259 (WebCore::createWindow): Changed code to remove the assumption that calls
1260 out will not destroy the page or frame. Use RefPtr for the frame, and
1261 added early exits if frame->page() becomes null at any point before we
1264 2014-04-26 Alexey Proskuryakov <ap@apple.com>
1266 Local files should not be allowed to read pasteboard data during drag
1267 https://bugs.webkit.org/show_bug.cgi?id=131767
1269 Reviewed by Sam Weinig.
1271 Test: fast/files/local-file-drag-security.html
1273 * page/DragController.cpp:
1274 (WebCore::DragController::dragExited):
1275 (WebCore::DragController::tryDHTMLDrag):
1276 Make an old Dashboard quirk really Dashboard only.
1278 2014-04-24 Darin Adler <darin@apple.com>
1280 REGRESSION (r164133): Selection doesn't paint when scrolling some pages
1281 https://bugs.webkit.org/show_bug.cgi?id=132172
1282 rdar://problem/16719473
1284 Reviewed by Brent Fulgham.
1286 Tests: fast/dynamic/remove-invisible-node-inside-selection.html
1287 fast/dynamic/remove-node-inside-selection.html
1289 * editing/FrameSelection.cpp:
1290 (WebCore::clearRenderViewSelection): Changed to take a Node& because having
1291 this take a Position& was unnecessary and strange, when really it just needs
1292 to take a document as an argument.
1293 (WebCore::DragCaretController::nodeWillBeRemoved): Updated for the above.
1294 (WebCore::FrameSelection::respondToNodeModification): Added code to set the
1295 m_pendingSelectionUpdate flag and call RenderView::setNeedsLayout so the
1296 selection will be recomputed after it's temporarily cleared when one of
1297 the selected nodes is removed.
1299 2014-04-25 Ryosuke Niwa <rniwa@webkit.org>
1301 REGRESSION (r167689): Hovering file name in a file input causes a crash
1302 https://bugs.webkit.org/show_bug.cgi?id=132214
1304 Reviewed by Andreas Kling.
1306 The bug was caused by callDefaultEventHandlersInTheBubblingOrder unconditionally
1307 accessing path.contextAt(0) even if the event path was empty.
1309 Fixed the bug by exiting early when the event path is empty.
1311 Test: fast/events/shadow-event-path-2.html
1313 * dom/EventDispatcher.cpp:
1314 (WebCore::callDefaultEventHandlersInTheBubblingOrder):
1316 2014-04-25 Tim Horton <timothy_horton@apple.com>
1318 REGRESSION (r167828): http/tests/media/hls/video-controls-live-stream.html fails
1320 * English.lproj/mediaControlsLocalizedStrings.js:
1321 Add 'Live Broadcast' to the localized strings list.
1323 2014-04-25 Brady Eidson <beidson@apple.com>
1325 Add a selection overlay.
1326 <rdar://problem/16727797> and https://bugs.webkit.org/show_bug.cgi?id=132200
1328 Reviewed by David Hyatt.
1330 No new tests (WK2 feature in development).
1332 * WebCore.xcodeproj/project.pbxproj:
1334 Add a SelectionRectGathterer class.
1335 It creates a Notifier (given a RenderView) then accepts Rects from the RenderView.
1336 When the Notifier is destroyed, the appropriate EditorClient is notified of the gathered rects.
1337 * editing/SelectionRectGatherer.cpp: Added.
1338 (WebCore::SelectionRectGatherer::SelectionRectGatherer):
1339 (WebCore::SelectionRectGatherer::addRect):
1340 (WebCore::SelectionRectGatherer::addRects):
1341 (WebCore::SelectionRectGatherer::Notifier::Notifier):
1342 (WebCore::SelectionRectGatherer::Notifier::~Notifier):
1343 (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
1344 * editing/SelectionRectGatherer.h: Added.
1346 * page/EditorClient.h:
1347 (WebCore::EditorClient::selectionRectsDidChange):
1349 * rendering/RenderView.cpp:
1350 (WebCore::RenderView::RenderView):
1351 (WebCore::RenderView::setSelection): Clear the gatherer’s rects then create a Notifier.
1352 (WebCore::RenderView::setSubtreeSelection): Give all the selection rects to be painted to
1353 the SelectionRectGatherer.
1354 * rendering/RenderView.h:
1356 2014-04-08 Jer Noble <jer.noble@apple.com>
1358 Support "Live" streams in media controls.
1359 https://bugs.webkit.org/show_bug.cgi?id=131390
1361 Reviewed by Brent Fulgham.
1363 Test: http/tests/media/hls/video-controls-live-stream.html
1365 Support "Live" streams by adding an isLive property to our media controls.
1367 * Modules/mediacontrols/mediaControlsApple.css:
1368 (audio::-webkit-media-controls-status-display):
1369 (video:-webkit-full-screen::-webkit-media-controls-status-display):
1370 * Modules/mediacontrols/mediaControlsApple.js:
1371 (Controller): isLive defaults to false.
1372 (Controller.prototype.setIsLive): Set the isLive property and conditionally reconfigure the controls.
1373 (Controller.prototype.configureInlineControls): Don't add the timeline if we are live.
1374 (Controller.prototype.configureFullScreenControls): Ditto.
1375 (Controller.prototype.updateStatusDisplay): Added.
1376 (Controller.prototype.handleLoadStart): Call updateStatusDisplay().
1377 (Controller.prototype.handleError): Ditto.
1378 (Controller.prototype.handleAbort): Ditto.
1379 (Controller.prototype.handleSuspend): Ditto.
1380 (Controller.prototype.handleStalled): Ditto.
1381 (Controller.prototype.handleWaiting): Ditto.
1382 (Controller.prototype.updateDuration): Ditto.
1383 (Controller.prototype.updateReadyState): Ditto.
1385 2014-04-25 Dean Jackson <dino@apple.com>
1387 Allow a platform-specific size enumeration to be passed into popup-menu display
1388 https://bugs.webkit.org/show_bug.cgi?id=132195
1390 Reviewed by Brent Fulgham. With some in-person review comments from Sam Weinig.
1392 Platforms like OS X use a set of predefined sizes for built-in controls
1393 used for <select>: normal, small and mini. Expose that information to
1394 the PopupMenuClient via the PopupMenuStyle, allowing it to be passed
1395 into the platform code in WebKitSystemInterface.
1397 * platform/PopupMenuStyle.h: Add a menu size enum.
1398 (WebCore::PopupMenuStyle::PopupMenuStyle):
1399 (WebCore::PopupMenuStyle::menuSize):
1400 * platform/mac/WebCoreSystemInterface.h: Pass in NSControlSize as a parameter
1402 * platform/mac/WebCoreSystemInterface.mm: Ditto.
1403 * rendering/RenderMenuList.cpp:
1404 (RenderMenuList::menuStyle): Ask the RenderTheme to calculate the size
1405 of the menu button, so that it can be added to the PopupMenuStyle.
1406 * rendering/RenderTheme.h: New method to retrieve the menu size.
1407 (WebCore::RenderTheme::popupMenuSize): Convert an NSControlSize into a PopupMenuSize.
1408 * rendering/RenderThemeMac.h: Override the base function, and add a
1409 controlSizeForCell helper.
1410 * rendering/RenderThemeMac.mm:
1411 (WebCore::RenderThemeMac::controlSizeForCell): Used by this new
1412 code and the old setControlSizeForCell to calculate the NSControlSize
1413 that would be used for the button.
1414 (WebCore::RenderThemeMac::setControlSize): Call the new helper.
1415 (WebCore::RenderThemeMac::popupMenuSize): Return the value from the helper.
1417 2014-04-25 Javier Fernandez <jfernandez@igalia.com>
1419 REGRESSION(r167799): ASSERTION in parseGridTemplateShorthand in fast/css-grid-layout/grid-template-shorthand-get-set.html
1420 https://bugs.webkit.org/show_bug.cgi?id=132194
1422 Reviewed by Martin Robinson.
1424 Properly resolving the grid-template shorthand for the corresponding longhand
1427 No new tests, grid-template-shorthand-get-set.html already covers this case.
1429 * css/StyleProperties.cpp:
1430 (WebCore::StyleProperties::getPropertyValue):
1431 * css/StylePropertyShorthand.cpp:
1432 (WebCore::shorthandForProperty):
1433 (WebCore::matchingShorthandsForLonghand):
1434 * css/StyleResolver.cpp:
1435 (WebCore::StyleResolver::applyProperty):
1437 2014-04-25 David Hyatt <hyatt@apple.com>
1439 Column rules not respecting scroll offsets.
1440 https://bugs.webkit.org/show_bug.cgi?id=109683
1442 Reviewed by Dean Jackson.
1444 Added fast/multicol/scrolling-column-rules.html
1446 * rendering/RenderBlock.cpp:
1447 (WebCore::RenderBlock::paintColumnRules):
1448 Make paintColumnRules virtual so that it works with both column implementations.
1450 (WebCore::RenderBlock::paintObject):
1451 Changed to call paintColumnRules with the adjusted scroll offset and to do it after
1452 bailing on the root background only check.
1454 * rendering/RenderBlock.h:
1455 paintColumnRules is now virtual.
1457 * rendering/RenderBlockFlow.cpp:
1458 (WebCore::RenderBlockFlow::paintColumnRules):
1459 (WebCore::RenderBlockFlow::paintBoxDecorations): Deleted.
1460 * rendering/RenderBlockFlow.h:
1461 Got rid of paintBoxDecorations override since it failed when hasBoxDecorations was false
1462 anyway. Override paintColumnRules instead to paint at the right time.
1464 2014-04-23 Jon Honeycutt <jhoneycutt@apple.com>
1466 Crash applying editing commands from iframe onload event
1468 <https://bugs.webkit.org/show_bug.cgi?id=132103>
1469 <rdar://problem/15696351>
1471 This patch merges the Chromium bug workaround from
1472 <http://src.chromium.org/viewvc/blink?revision=162080&view=revision>,
1473 which prevents reentrancy in CompositeEditCommand::apply().
1475 Reviewed by Darin Adler.
1477 Test: editing/apply-style-iframe-crash.html
1479 * editing/CompositeEditCommand.cpp:
1480 (WebCore::HTMLNames::ReentrancyGuard::isRecursiveCall):
1481 (WebCore::HTMLNames::ReentrancyGuard::Scope::Scope):
1482 (WebCore::HTMLNames::ReentrancyGuard::Scope::~Scope):
1483 (WebCore::CompositeEditCommand::apply):
1484 If this is a recursive call, return early.
1486 2014-04-25 David Hyatt <hyatt@apple.com>
1488 [New Multicolumn] fast/multicol/hit-test-* layout tests all fail
1489 https://bugs.webkit.org/show_bug.cgi?id=132081
1491 Reviewed by Dean Jackson.
1493 Added a bunch of tests in fast/multicol/newmulticol/compare-with-old-impl/hit-test-*.html
1495 * rendering/RenderBlock.h:
1496 Make offsetForContents public, since I need to call it from RenderMultiColumnSet.
1498 * rendering/RenderMultiColumnFlowThread.cpp:
1499 (WebCore::RenderMultiColumnFlowThread::populate):
1500 Stop an ASSERT in the new columns code on the hit tests by making sure layout state is
1501 disabled when moving children around.
1503 * rendering/RenderMultiColumnSet.cpp:
1504 (WebCore::RenderMultiColumnSet::positionForPoint):
1505 Refactor this function to call a helper function instead, translateRegionPointToFlowThread.
1507 (WebCore::RenderMultiColumnSet::translateRegionPointToFlowThread):
1508 This function is logical (unlike the mistaken physical function I first implemented in
1511 (WebCore::RenderMultiColumnSet::updateHitTestResult):
1512 * rendering/RenderMultiColumnSet.h:
1513 Overridden to fill in the correct local coordinate when the HTML document is inside a paginated
1514 RenderView. Note that column spans don't actually work, but once we move over to a
1515 non-column based pagination API, that will become irrelevant.
1517 2014-04-25 Andreas Kling <akling@apple.com>
1519 Mark some things with WTF_MAKE_FAST_ALLOCATED.
1520 <https://webkit.org/b/132198>
1522 Use FastMalloc for more things.
1524 Reviewed by Anders Carlsson.
1526 * bindings/js/ScriptController.h:
1527 * dom/DocumentOrderedMap.h:
1528 * inspector/InspectorCSSAgent.h:
1529 * inspector/InspectorDOMAgent.h:
1530 * inspector/InspectorDOMDebuggerAgent.h:
1531 * inspector/InspectorDOMStorageAgent.h:
1532 * inspector/InspectorDatabaseAgent.h:
1533 * inspector/InspectorLayerTreeAgent.h:
1534 * inspector/InspectorPageAgent.h:
1535 * inspector/InspectorResourceAgent.h:
1536 * inspector/InspectorTimelineAgent.h:
1537 * inspector/InspectorWorkerAgent.h:
1538 * inspector/PageRuntimeAgent.h:
1539 * loader/HistoryController.h:
1540 * page/DeviceClient.h:
1541 * page/DeviceController.h:
1542 * page/EventHandler.h:
1544 * page/scrolling/ScrollingStateNode.h:
1545 * platform/graphics/FontGenericFamilies.h:
1546 * platform/graphics/FontPlatformData.h:
1548 2014-04-25 Radu Stavila <stavila@adobe.com>
1550 [CSS Regions] Rename objectShouldPaintInFlowRegion to something more clear
1551 https://bugs.webkit.org/show_bug.cgi?id=132050
1553 Reviewed by Andreas Kling.
1555 The objectShouldPaintInFlowRegion is no longer used only by the painting process
1556 but also for hit-testing, so it was renamed to something more generic (objectShouldFragmentInFlowRegion).
1558 No new tests required, it's just a method rename.
1560 * rendering/RenderBlock.cpp:
1561 (WebCore::RenderBlock::paint):
1562 (WebCore::RenderBlock::selectionGaps):
1563 (WebCore::RenderBlock::nodeAtPoint):
1564 * rendering/RenderBox.cpp:
1565 (WebCore::RenderBox::positionForPoint):
1566 * rendering/RenderFlowThread.cpp:
1567 (WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion):
1568 (WebCore::RenderFlowThread::objectShouldPaintInFlowRegion): Deleted.
1569 * rendering/RenderFlowThread.h:
1570 * rendering/RenderLayer.cpp:
1571 (WebCore::RenderLayer::paintLayer):
1572 (WebCore::RenderLayer::hitTestLayer):
1573 * rendering/RenderRegion.cpp:
1574 (WebCore::RenderRegion::ensureOverflowForBox):
1575 * rendering/RenderReplaced.cpp:
1576 (WebCore::RenderReplaced::shouldPaint):
1578 2014-04-25 Enrica Casucci <enrica@apple.com>
1580 iOS build fix after http://trac.webkit.org/changeset/167803
1584 (WebCore::Frame::checkOverflowScroll):
1585 * rendering/RenderBlock.cpp:
1586 (WebCore::positionForPointRespectingEditingBoundaries):
1588 2014-04-24 David Hyatt <hyatt@apple.com>
1590 [New Multicolumn] Add support for offsetLeft and offsetTop.
1591 https://bugs.webkit.org/show_bug.cgi?id=132080
1593 Reviewed by Andrei Bucur.
1595 Added fast/multicol/client-spanners-complex.html and offset-top-left.html
1597 * rendering/RenderBoxModelObject.cpp:
1598 (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
1599 Patch the offsetLeft/Top loop to handle calling into RenderMultiColumnFlowThread
1600 in order to adjust the coordinates for the new multicolumn layout.
1602 * rendering/RenderMultiColumnFlowThread.cpp:
1603 (WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
1604 Modified to use a helper that can be shared by offsetLeft/Top code. This code
1605 ran for client rects, and I'm moving/refactoring it for more sharing.
1607 (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
1608 (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion):
1609 * rendering/RenderMultiColumnFlowThread.h:
1610 New functions that beef up what was in mapFromFlowToRegion and fix some bugs
1611 with the translation code.
1613 * rendering/RenderMultiColumnSet.cpp:
1614 (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
1615 Patched to factor in the flow thread portion rect of the specific multicolumn set.
1617 * rendering/RenderObject.h:
1618 (WebCore::RenderObject::isRenderMultiColumnFlowThread):
1619 Added for toRenderMultiColumnFlowThread capability.
1621 2014-04-25 Brent Fulgham <bfulgham@apple.com>
1623 ScrollingCoordinator is unaware of topContentInset
1624 https://bugs.webkit.org/show_bug.cgi?id=132158
1625 <rdar://problem/16706152>
1627 Reviewed by Darin Adler.
1629 Test: platform/mac/fast/scrolling/scroll-select-bottom-test.html
1631 The calculation of non-fast-scrollable regions does not currently take
1632 the topContentOffset into account. Consequently, the logic that decides
1633 whether to stay on the scrolling thread, or drop down to an individual
1634 page element, can make the wrong choice. This is especially true for
1635 small scrollable regions (such as <select> elements), where the
1636 topContentInset may be quite close to the size of the scrollable
1639 * page/scrolling/ScrollingCoordinator.cpp:
1640 (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Also
1641 include the topContentInset value in our calculation.
1643 2014-04-25 Javier Fernandez <jfernandez@igalia.com>
1645 REGRESSION(r167799): Breaks debug build
1646 https://bugs.webkit.org/show_bug.cgi?id=132194
1648 Reviewed by Andrei Bucur.
1650 Fix the debug bots after r167799
1652 No new tests, no new functionality.
1654 * css/CSSParser.cpp:
1655 (WebCore::CSSParser::parseGridTemplateShorthand):
1657 2014-04-25 Miyoung Shin <myid.shin@samsung.com>
1659 Web process is crashed during dispatching touchEvent created by JS.
1660 https://bugs.webkit.org/show_bug.cgi?id=113225
1662 Reviewed by Benjamin Poulain.
1664 TouchEvent created by JS should have the necessary attributes
1665 of touches, targetTouches and changedTouches.
1666 It should be verified weather there are touchLists before dispatching touch event.
1668 Test: fast/events/touch/create-touch-event-without-touchList.html
1670 * dom/EventDispatcher.cpp:
1671 (WebCore::EventDispatcher::dispatchEvent):
1672 (WebCore::EventPath::updateTouchLists):
1673 (WebCore::addRelatedNodeResolversForTouchList): Deleted.
1675 2014-04-25 Philippe Normand <pnormand@igalia.com>
1677 [GTK] File webkitRelativePath attribute was removed in r163483
1678 https://bugs.webkit.org/show_bug.cgi?id=132193
1680 Reviewed by Carlos Garcia Campos.
1682 Add the removed getter as deprecated API to keep backwards compatibility.
1684 * bindings/gobject/WebKitDOMDeprecated.cpp:
1685 (webkit_dom_file_get_webkit_relative_path):
1686 * bindings/gobject/WebKitDOMDeprecated.h:
1687 * bindings/gobject/WebKitDOMDeprecated.symbols:
1689 2014-04-25 Radu Stavila <stavila@adobe.com>
1691 [CSS Regions] Overflow selection doesn't work properly
1692 https://bugs.webkit.org/show_bug.cgi?id=130715
1694 Reviewed by David Hyatt.
1696 When hit-testing, painting block selection gaps and searching for the node at a specific point inside a flow thread,
1697 the region range of the box being checked must be validated in order to not return false positives. Otherwise, hit-testing
1698 at the top of region B could hit elements that overflow the bottom of region A.
1700 Tests: fast/regions/selection-in-overflow-hit-testing.html
1701 fast/regions/selection-in-overflow.html
1702 fast/regions/selection-in-text-after-overflow-hit-testing.html
1704 * accessibility/AccessibilityRenderObject.cpp:
1705 (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine):
1706 (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
1708 (WebCore::Document::caretRangeFromPoint):
1709 * editing/FrameSelection.cpp:
1710 (WebCore::FrameSelection::contains):
1711 * editing/VisibleUnits.cpp:
1712 (WebCore::previousLinePosition):
1713 (WebCore::nextLinePosition):
1714 * page/EventHandler.cpp:
1715 (WebCore::EventHandler::selectClosestWordFromHitTestResult):
1716 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
1717 (WebCore::EventHandler::handleMousePressEventTripleClick):
1718 (WebCore::EventHandler::handleMousePressEventSingleClick):
1719 (WebCore::selectionExtentRespectingEditingBoundary):
1720 (WebCore::EventHandler::updateSelectionForMouseDrag):
1721 (WebCore::EventHandler::handleMouseReleaseEvent):
1723 (WebCore::Frame::visiblePositionForPoint):
1724 * rendering/RenderBlock.cpp:
1725 (WebCore::RenderBlock::selectionGaps):
1726 (WebCore::RenderBlock::nodeAtPoint):
1727 (WebCore::positionForPointRespectingEditingBoundaries):
1728 (WebCore::RenderBlock::positionForPointWithInlineChildren):
1729 (WebCore::isChildHitTestCandidate):
1730 (WebCore::RenderBlock::positionForPoint):
1731 * rendering/RenderBlock.h:
1732 * rendering/RenderBlockFlow.cpp:
1733 (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
1734 (WebCore::RenderBlockFlow::positionForPoint):
1735 * rendering/RenderBlockFlow.h:
1736 * rendering/RenderBox.cpp:
1737 (WebCore::RenderBox::positionForPoint):
1738 * rendering/RenderBox.h:
1739 * rendering/RenderFileUploadControl.cpp:
1740 (WebCore::RenderFileUploadControl::positionForPoint):
1741 * rendering/RenderFileUploadControl.h:
1742 * rendering/RenderInline.cpp:
1743 (WebCore::RenderInline::positionForPoint):
1744 * rendering/RenderInline.h:
1745 * rendering/RenderLineBreak.cpp:
1746 (WebCore::RenderLineBreak::positionForPoint):
1747 * rendering/RenderLineBreak.h:
1748 * rendering/RenderMultiColumnSet.cpp:
1749 (WebCore::RenderMultiColumnSet::positionForPoint):
1750 * rendering/RenderMultiColumnSet.h:
1751 * rendering/RenderObject.cpp:
1752 (WebCore::RenderObject::positionForPoint):
1753 * rendering/RenderObject.h:
1754 * rendering/RenderRegion.cpp:
1755 (WebCore::RenderRegion::positionForPoint):
1756 * rendering/RenderRegion.h:
1757 * rendering/RenderReplaced.cpp:
1758 (WebCore::RenderReplaced::positionForPoint):
1759 * rendering/RenderReplaced.h:
1760 * rendering/RenderText.cpp:
1761 (WebCore::RenderText::positionForPoint):
1762 * rendering/RenderText.h:
1763 * rendering/svg/RenderSVGInlineText.cpp:
1764 (WebCore::RenderSVGInlineText::positionForPoint):
1765 * rendering/svg/RenderSVGInlineText.h:
1766 * rendering/svg/RenderSVGText.cpp:
1767 (WebCore::RenderSVGText::positionForPoint):
1768 * rendering/svg/RenderSVGText.h:
1770 2014-04-25 Philippe Normand <pnormand@igalia.com>
1772 [GTK] Iframe seamless support was removed in r163427
1773 https://bugs.webkit.org/show_bug.cgi?id=132192
1775 Reviewed by Carlos Garcia Campos.
1777 Add the removed get and set methods as deprecated API to keep
1778 backwards compatibility.
1780 * bindings/gobject/WebKitDOMDeprecated.cpp:
1781 (webkit_dom_processing_instruction_set_data):
1782 (webkit_dom_html_iframe_element_get_seamless):
1783 (webkit_dom_html_iframe_element_set_seamless):
1784 * bindings/gobject/WebKitDOMDeprecated.h:
1785 * bindings/gobject/WebKitDOMDeprecated.symbols:
1787 2014-04-25 Philippe Normand <pnormand@igalia.com>
1789 [GTK] HTMLInputElement webkitdirectory property was removed in r163483
1790 https://bugs.webkit.org/show_bug.cgi?id=132191
1792 Reviewed by Carlos Garcia Campos.
1794 Add the removed get and set methods as deprecated API to keep
1795 backwards compatibility.
1797 * bindings/gobject/WebKitDOMDeprecated.cpp:
1798 (webkit_dom_html_input_element_get_webkitdirectory):
1799 (webkit_dom_html_input_element_set_webkitdirectory):
1800 * bindings/gobject/WebKitDOMDeprecated.h:
1801 * bindings/gobject/WebKitDOMDeprecated.symbols:
1803 2014-04-25 Javier Fernandez <jfernandez@igalia.com>
1805 [CSS Grid Layout] Implementation of the grid-template shorthand.
1806 https://bugs.webkit.org/show_bug.cgi?id=128980
1808 Reviewed by Darin Adler.
1810 This shorthand sets the values for the grid-template-columns,
1811 grid-template-rows and grid-template-areas, so the implementation
1812 tries to reuse as much available parsing functions as possible.
1814 The "parsingGridTrackList" was refactored to return a CSSValue and
1815 let the "parseValue" function to assign the property value. The
1816 "forwardSlash" operator is now valid when the track-list clause is
1817 part of a shorthand. The "parseValue" function checkouts that only
1818 additional clauses are allowed when processing shorthands; the
1819 grid-columns-rows-get-set.html tests was modified to verify this.
1821 The "parseGridTemplateAreas" was refactored too, in order to
1822 process single areas's rows. This is very useful for the
1823 gris-template secondary syntax, which mixes areas and rows values.
1825 Finally, the "parseGirdLineNames" function was modified as well by
1826 defining an new argument to concatenate head/tail custom-ident
1827 elements and ensure the identList is at the heading index, since
1828 it's now possible the parseList was rewound.
1830 The implementation of the grid-template shorthand tries first to
1831 match the <grid-template-columns> / <grid-template-rows> syntax,
1832 failing back to the secondary syntax if needed. This approach
1833 requires to rewind the parseList but it produces a clearer code.
1835 Test: fast/css-grid-layout/grid-template-shorthand-get-set.html
1837 * css/CSSComputedStyleDeclaration.cpp:
1838 (WebCore::ComputedStyleExtractor::propertyValue):
1839 * css/CSSParser.cpp:
1840 (WebCore::CSSParser::parseValue):
1841 (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
1842 (WebCore::CSSParser::parseGridTemplateShorthand):
1843 (WebCore::CSSParser::parseGridLineNames):
1844 (WebCore::CSSParser::parseGridTrackList):
1845 (WebCore::CSSParser::parseGridTemplateAreasRow):
1846 (WebCore::CSSParser::parseGridTemplateAreas):
1848 * css/CSSParserValues.h:
1849 (WebCore::CSSParserValueList::setCurrentIndex):
1850 * css/CSSPropertyNames.in:
1851 * css/StylePropertyShorthand.cpp:
1852 (WebCore::webkitGridTemplateShorthand):
1853 * css/StylePropertyShorthand.h:
1855 2014-04-25 Andreas Kling <akling@apple.com>
1857 Remove two unused SVGDocument functions.
1858 <https://webkit.org/b/132178>
1860 Reviewed by Antti Koivisto.
1862 * svg/SVGDocument.cpp:
1863 (WebCore::SVGDocument::dispatchZoomEvent): Deleted.
1864 (WebCore::SVGDocument::dispatchScrollEvent): Deleted.
1865 * svg/SVGDocument.h:
1867 2014-04-25 Ion Rosca <rosca@adobe.com>
1869 Incomplete body painting when using blend modes
1870 https://bugs.webkit.org/show_bug.cgi?id=131889
1872 The incomplete painting was caused by the transparency layer created for
1873 the root renderer. We can safely skip creating this transparency layer at
1874 the root level, as there is nothing else being painted behind this layer that
1875 could be used erroneously as a backdrop.
1877 Reviewed by Simon Fraser.
1879 Test: css3/compositing/blend-mode-with-body.html
1881 * rendering/RenderLayer.h:
1882 Changing RenderLayer::paintsWithTransparency so that it will not
1883 return true when the root renderer needs to isolate blending.
1885 2014-04-25 Darin Adler <darin@apple.com>
1887 ASSERTION FAILED: "!m_isolatedWorld->isNormal() || m_wrapper || !m_jsFunction" in svg/custom/use-instanceRoot-event-listeners.xhtml
1888 https://bugs.webkit.org/show_bug.cgi?id=132148
1890 Reviewed by Andreas Kling.
1892 Changed how JSCustomMarkFunction generation works. Instead of leaving out
1893 the generated visitChildren function, just generate a call to visitAdditionalChildren.
1894 This eliminates the need to repeat boilerplate.
1896 The fix for the above bug was to correct mistaken logic where JSSVGElementInstance
1897 had a visitChildren that did not properly mark event listeners because it explicitly
1898 did not call through to the base class visitChildren. The new arrangement makes that
1901 * bindings/js/JSAttrCustom.cpp:
1902 (WebCore::JSAttr::visitAdditionalChildren): Use this instead of visitChildren.
1903 * bindings/js/JSAudioTrackCustom.cpp:
1904 (WebCore::JSAudioTrack::visitAdditionalChildren): Ditto.
1905 * bindings/js/JSAudioTrackListCustom.cpp:
1906 (WebCore::JSAudioTrackList::visitAdditionalChildren): Ditto.
1907 * bindings/js/JSCSSRuleCustom.cpp:
1908 (WebCore::JSCSSRule::visitAdditionalChildren): Ditto.
1909 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1910 (WebCore::JSCSSStyleDeclaration::visitAdditionalChildren): Ditto.
1911 * bindings/js/JSCanvasRenderingContextCustom.cpp:
1912 (WebCore::JSCanvasRenderingContext::visitAdditionalChildren): Ditto.
1913 * bindings/js/JSCryptoKeyPairCustom.cpp:
1914 (WebCore::JSCryptoKeyPair::visitAdditionalChildren): Ditto.
1915 * bindings/js/JSDOMWindowCustom.cpp:
1916 (WebCore::JSDOMWindow::visitAdditionalChildren): Ditto.
1917 * bindings/js/JSMessageChannelCustom.cpp:
1918 (WebCore::JSMessageChannel::visitAdditionalChildren): Ditto.
1919 * bindings/js/JSMessagePortCustom.cpp:
1920 (WebCore::JSMessagePort::visitAdditionalChildren): Ditto.
1921 * bindings/js/JSNodeCustom.cpp:
1922 (WebCore::JSNode::visitAdditionalChildren): Ditto.
1923 * bindings/js/JSNodeFilterCustom.cpp:
1924 (WebCore::JSNodeFilter::visitAdditionalChildren): Ditto.
1925 * bindings/js/JSNodeIteratorCustom.cpp:
1926 (WebCore::JSNodeIterator::visitAdditionalChildren): Ditto.
1927 * bindings/js/JSSVGElementInstanceCustom.cpp:
1928 (WebCore::JSSVGElementInstance::visitAdditionalChildren): Ditto.
1929 * bindings/js/JSSharedWorkerCustom.cpp:
1930 (WebCore::JSSharedWorker::visitAdditionalChildren): Ditto.
1931 * bindings/js/JSStyleSheetCustom.cpp:
1932 (WebCore::JSStyleSheet::visitAdditionalChildren): Ditto.
1933 * bindings/js/JSTextTrackCueCustom.cpp:
1934 (WebCore::JSTextTrackCue::visitAdditionalChildren): Ditto.
1935 * bindings/js/JSTextTrackCustom.cpp:
1936 (WebCore::JSTextTrack::visitAdditionalChildren): Ditto.
1937 * bindings/js/JSTextTrackListCustom.cpp:
1938 (WebCore::JSTextTrackList::visitAdditionalChildren): Ditto.
1939 * bindings/js/JSTreeWalkerCustom.cpp:
1940 (WebCore::JSTreeWalker::visitAdditionalChildren): Ditto.
1941 * bindings/js/JSVideoTrackCustom.cpp:
1942 (WebCore::JSVideoTrack::visitAdditionalChildren): Ditto.
1943 * bindings/js/JSVideoTrackListCustom.cpp:
1944 (WebCore::JSVideoTrackList::visitAdditionalChildren): Ditto.
1945 * bindings/js/JSWebGLRenderingContextCustom.cpp:
1946 (WebCore::JSWebGLRenderingContext::visitAdditionalChildren): Ditto.
1947 * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1948 (WebCore::JSWorkerGlobalScope::visitAdditionalChildren): Ditto.
1949 * bindings/js/JSXMLHttpRequestCustom.cpp:
1950 (WebCore::JSXMLHttpRequest::visitAdditionalChildren): Ditto.
1951 * bindings/js/JSXPathResultCustom.cpp:
1952 (WebCore::JSXPathResult::visitAdditionalChildren): Ditto.
1954 * bindings/js/JSDOMGlobalObject.cpp:
1955 (WebCore::JSDOMGlobalObject::visitChildren): Rewrote to use modern for loops.
1957 * bindings/scripts/CodeGeneratorJS.pm:
1958 (GenerateHeader): Generate declaration of visitAdditionalChildren.
1959 (GenerateImplementation): Generate call to visitAdditionalChildren.
1961 2014-04-24 Andreas Kling <akling@apple.com>
1963 [iOS WebKit2] Enable optimization to mmap downloaded resources once they become file-backed.
1964 <https://webkit.org/b/132171>
1965 <rdar://problem/16720733>
1967 Add a missing export for the USE(CFNETWORK) + WebKit2 combo.
1969 Reviewed by Antti Koivisto.
1973 2014-04-24 Darin Adler <darin@apple.com>
1975 FrameLoader::checkCompleted can hit the "ref'ing while destroyed" assertion
1976 https://bugs.webkit.org/show_bug.cgi?id=132163
1977 rdar://problem/16720640
1979 Reviewed by Brady Eidson.
1981 Couldn't find a way to test this yet. Would be nice to have a test.
1983 * loader/FrameLoader.cpp:
1984 (WebCore::FrameLoader::checkCompleted): Move protector until after we check
1985 if the frame is already complete. That can happen in practice when this is
1986 called from within the frame's destructor. All the code that runs before the
1987 protector simply checks state and does not require protection.
1989 2014-04-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1991 Mark Supplement instead of RefCountedSupplement in NavigatorContentUtils
1992 https://bugs.webkit.org/show_bug.cgi?id=132151
1994 Reviewed by Darin Adler.
1996 Though Original goal was to make it sharable across navigator instances, the NavigatorContentUtils
1997 has used RefCountedSupplement<Page> instead of RefCountedSupplement<Navigator>. This patch makes it
1998 use Supplement<Page> because there is no scenario which needs to be shared across navigator instances.
2000 Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=171403.
2002 No new tests, no behavior changes.
2004 * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
2005 (WebCore::NavigatorContentUtils::from):
2006 (WebCore::NavigatorContentUtils::create):
2007 (WebCore::provideNavigatorContentUtilsTo):
2008 * Modules/navigatorcontentutils/NavigatorContentUtils.h:
2010 2014-04-24 Commit Queue <commit-queue@webkit.org>
2012 Unreviewed, rolling out r167700.
2013 https://bugs.webkit.org/show_bug.cgi?id=132142
2015 Incorrectly reverted the change in r167547 for
2016 webkit.org/b/131898 (Requested by rniwa on #webkit).
2020 "Cursor doesn't change back to pointer when leaving the Safari
2022 https://bugs.webkit.org/show_bug.cgi?id=132038
2023 http://trac.webkit.org/changeset/167700
2025 2014-04-24 Brady Eidson <beidson@apple.com>
2027 Rename "IMAGE_CONTROLS" feature to "SERVICE_CONTROLS"
2028 https://bugs.webkit.org/show_bug.cgi?id=132155
2030 Reviewed by Tim Horton.
2032 No new tests (No change in behavior).
2034 * Configurations/FeatureDefines.xcconfig:
2035 * DerivedSources.make:
2037 * css/CSSDefaultStyleSheets.cpp:
2038 (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2039 * css/CSSPrimitiveValueMappings.h:
2040 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2041 * css/CSSValueKeywords.in:
2043 * html/HTMLImageElement.cpp:
2044 (WebCore::HTMLImageElement::HTMLImageElement):
2045 (WebCore::HTMLImageElement::parseAttribute):
2046 (WebCore::HTMLImageElement::didAttachRenderers):
2047 * html/HTMLImageElement.h:
2048 * html/shadow/ImageControlsRootElement.cpp:
2049 * html/shadow/ImageControlsRootElement.h:
2050 * html/shadow/mac/ImageControlsButtonElementMac.cpp:
2051 * html/shadow/mac/ImageControlsButtonElementMac.h:
2052 * html/shadow/mac/ImageControlsRootElementMac.cpp:
2053 * html/shadow/mac/ImageControlsRootElementMac.h:
2054 * page/ContextMenuContext.cpp:
2055 (WebCore::ContextMenuContext::ContextMenuContext):
2056 * page/ContextMenuContext.h:
2057 * page/ContextMenuController.cpp:
2058 (WebCore::ContextMenuController::maybeCreateContextMenu):
2059 (WebCore::ContextMenuController::populate):
2060 * page/ContextMenuController.h:
2062 * platform/ThemeTypes.h:
2063 * rendering/RenderImage.cpp:
2064 (WebCore::RenderImage::canHaveChildren):
2065 * rendering/RenderTheme.cpp:
2066 (WebCore::RenderTheme::adjustStyle):
2067 (WebCore::RenderTheme::paint):
2068 (WebCore::RenderTheme::paintBorderOnly):
2069 (WebCore::RenderTheme::paintDecorations):
2070 * rendering/RenderTheme.h:
2071 * rendering/RenderThemeMac.h:
2072 * rendering/RenderThemeMac.mm:
2073 (WebCore::RenderThemeMac::servicesRolloverButtonCell):
2074 (WebCore::RenderThemeMac::paintImageControlsButton):
2075 (WebCore::RenderThemeMac::imageControlsButtonSize):
2077 2014-04-24 Timothy Hatcher <timothy@apple.com>
2079 Web Inspector: Restore PageDebuggerAgent::enable / disable
2080 https://bugs.webkit.org/show_bug.cgi?id=132156
2082 Restore functions that were eroniously removed in r167530.
2084 Reviewed by Joseph Pecoraro.
2086 * inspector/PageDebuggerAgent.cpp:
2087 (WebCore::PageDebuggerAgent::enable): Added.
2088 (WebCore::PageDebuggerAgent::disable): Added.
2089 * inspector/PageDebuggerAgent.h:
2091 2014-04-24 Alexey Proskuryakov <ap@apple.com>
2093 Dropzone effects don't work in non-file documents
2094 https://bugs.webkit.org/show_bug.cgi?id=131770
2096 Reviewed by Darin Adler.
2098 File documents have two quirks that were making dropzone work in these before:
2099 1. An ancient hack for Dashboard allows pasteboard access from JS.
2100 2. On Mac, sandbox doesn't prevent File object creation, as we already have the access.
2102 * dom/DataTransfer.cpp:
2103 (WebCore::DataTransfer::hasFileOfType):
2104 (WebCore::DataTransfer::hasStringOfType):
2105 * dom/DataTransfer.h:
2106 Moved these functions from EventHandler to DataTransfer. We can't create a DataTransfer
2107 with Files while dragging, security doesn't permit us to. But we can get the file name.
2110 (WebCore::createBlobDataForFile):
2111 (WebCore::createBlobDataForFileWithName):
2112 (WebCore::File::contentTypeFromFilePath):
2113 (WebCore::getContentTypeFromFileName): Deleted.
2115 Exposed a function to get file type from path without creating a File first.
2116 This is much cheaper than creating a File, and works even when sandbox disallows
2117 read access to content, such as when dragging over a target.
2119 * page/EventHandler.cpp:
2120 (WebCore::hasDropZoneType):
2121 (WebCore::hasFileOfType): Deleted.
2122 (WebCore::hasStringOfType): Deleted.
2124 2014-04-24 Commit Queue <commit-queue@webkit.org>
2126 Unreviewed, rolling out r167441.
2127 https://bugs.webkit.org/show_bug.cgi?id=132152
2129 Caused full screen regressions on vimeo, youtube, and others.
2130 (Requested by jernoble on #webkit).
2134 "Fullscreen media controls are unusable in pagination mode"
2135 https://bugs.webkit.org/show_bug.cgi?id=131705
2136 http://trac.webkit.org/changeset/167441
2138 2014-04-24 Adenilson Cavalcanti <cavalcantii@gmail.com>
2140 Unused class forward declarations in Page
2141 https://bugs.webkit.org/show_bug.cgi?id=132141
2143 Reviewed by Benjamin Poulain.
2145 No new tests, no change on behavior.
2149 2014-04-24 Eric Carlson <eric.carlson@apple.com>
2151 [Mac] don't ask for AVAssetTrack properties before they are available
2152 https://bugs.webkit.org/show_bug.cgi?id=131902
2153 <rdar://problem/16505076>
2155 Reviewed by Brent Fulgham.
2157 No new tests, the behavior this changes can not be tested with a layout test.
2159 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2160 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2161 (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
2163 (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): Don't report that
2164 metadata has been loaded until the track properties we need have been loaded too.
2165 (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes): Cache totalBytes instead
2166 of recalculating it every time.
2167 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Invalidate cached
2169 (WebCore::assetTrackMetadataKeyNames): Array of AVAssetTrack properties we use.
2171 2014-04-24 Myles C. Maxfield <mmaxfield@apple.com>
2173 Unify platformWidthForGlyph across OS X and iOS
2174 https://bugs.webkit.org/show_bug.cgi?id=132036
2176 Reviewed by Darin Adler.
2178 This patch creates on shared SimpleFontData::platformWidthForGlyph() function for both OS X and iOS.
2180 No new tests are necessary because there should be no behavior changes.
2182 * platform/graphics/SimpleFontData.h: Signatures for two helper functions
2183 * platform/graphics/ios/SimpleFontDataIOS.mm: Replace iOS implementation of platformWidthForGlyph() with
2184 implementations of only the two helper functions
2185 (WebCore::SimpleFontData::getRenderingStyle): Compute style argument to CGFontGetGlyphAdvancesForStyle()
2186 (WebCore::SimpleFontData::advanceForColorBitmapFont): iOS doesn't have color bitmap fonts
2187 (WebCore::SimpleFontData::platformWidthForGlyph): Deleted.
2188 * platform/graphics/mac/SimpleFontDataMac.mm:
2189 (WebCore::SimpleFontData::getRenderingStyle): Compute style argument to CGFontGetGlyphAdvancesForStyle()
2190 (WebCore::SimpleFontData::advanceForColorBitmapFont): Use [NSFont advancementForGlyph] to compute the advance
2191 (WebCore::hasCustomTracking): Removed #if
2192 (WebCore::isEmoji): Only relevant on iOS
2193 (WebCore::SimpleFontData::platformWidthForGlyph): Shared implementation. Calls helper functions.
2195 2014-04-24 Zalan Bujtas <zalan@apple.com>
2197 Subpixel rendering: Clipping on text areas when shifted by one device pixel.
2198 https://bugs.webkit.org/show_bug.cgi?id=132008
2200 Reviewed by Darin Adler.
2202 Make RenderTheme paint* functions LayoutRect aware. Textarea is device pixel snapped, while
2203 other theme controls are still on integral size/positions.
2205 Test: fast/forms/hidpi-textarea-on-subpixel-position.html
2207 * rendering/RenderBox.cpp:
2208 (WebCore::RenderBox::paintBoxDecorations):
2209 * rendering/RenderTheme.cpp:
2210 (WebCore::RenderTheme::paint):
2211 (WebCore::RenderTheme::paintBorderOnly):
2212 (WebCore::RenderTheme::paintDecorations):
2213 * rendering/RenderTheme.h:
2214 (WebCore::RenderTheme::paintTextField):
2215 (WebCore::RenderTheme::paintTextFieldDecorations):
2216 (WebCore::RenderTheme::paintTextArea):
2217 (WebCore::RenderTheme::paintTextAreaDecorations):
2218 * rendering/RenderThemeIOS.h:
2219 * rendering/RenderThemeIOS.mm:
2220 (WebCore::RenderThemeIOS::paintTextFieldDecorations):
2221 (WebCore::RenderThemeIOS::paintTextAreaDecorations):
2222 * rendering/RenderThemeMac.h:
2223 * rendering/RenderThemeMac.mm:
2224 (WebCore::RenderThemeMac::paintTextField):
2225 (WebCore::RenderThemeMac::paintTextArea):
2227 2014-04-24 Myles C. Maxfield <mmaxfield@apple.com>
2229 FontCache::fontCache() never returns nullptr so it can be made to return a reference instead
2230 https://bugs.webkit.org/show_bug.cgi?id=132110
2232 Reviewed by Tim Horton.
2234 Updates callers to use '.' instead of '->'.
2236 No new tests are necessary because there should be no behavior change.
2238 * css/CSSFontFaceSource.cpp:
2239 (WebCore::CSSFontFaceSource::getFontData):
2240 * css/CSSFontSelector.cpp:
2241 (WebCore::CSSFontSelector::CSSFontSelector):
2242 (WebCore::CSSFontSelector::~CSSFontSelector):
2243 (WebCore::CSSFontSelector::addFontFaceRule):
2244 (WebCore::fontDataForGenericFamily):
2245 (WebCore::CSSFontSelector::getFallbackFontData):
2246 * platform/MemoryPressureHandler.cpp:
2247 (WebCore::MemoryPressureHandler::releaseMemory):
2248 * platform/graphics/FontCache.cpp:
2249 (WebCore::fontCache): Return a reference
2250 * platform/graphics/FontCache.h:
2251 (WebCore::FontCachePurgePreventer::FontCachePurgePreventer):
2252 (WebCore::FontCachePurgePreventer::~FontCachePurgePreventer):
2253 * platform/graphics/FontGlyphs.cpp:
2254 (WebCore::FontGlyphs::FontGlyphs):
2255 (WebCore::FontGlyphs::releaseFontData):
2256 (WebCore::FontGlyphs::realizeFontDataAt):
2257 (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
2258 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2259 (WebCore::FontPlatformData::verticalData):
2260 * platform/graphics/ios/SimpleFontDataIOS.mm:
2261 (WebCore::SimpleFontData::platformCreateScaledFontData):
2262 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2263 (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2264 * platform/graphics/mac/FontCacheMac.mm:
2265 (WebCore::invalidateFontCache):
2266 (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
2267 * platform/graphics/mac/SimpleFontDataMac.mm:
2268 (WebCore::SimpleFontData::platformDestroy):
2269 (WebCore::SimpleFontData::platformCreateScaledFontData):
2270 * platform/graphics/win/FontCacheWin.cpp:
2271 (WebCore::getCJKCodePageMasks):
2272 * platform/graphics/win/SimpleFontDataWin.cpp:
2273 (WebCore::SimpleFontData::containsCharacters):
2274 * platform/graphics/wince/FontCacheWinCE.cpp:
2275 (WebCore::getCJKCodePageMasks):
2276 * platform/graphics/wince/FontPlatformData.cpp:
2277 (WebCore::FontFamilyCodePageInfo::codePages):
2278 (WebCore::FixedSizeFontData::create):
2279 * platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp:
2280 (WebCore::GlyphPage::fill):
2281 * platform/graphics/wince/SimpleFontDataWinCE.cpp:
2282 (WebCore::SimpleFontData::platformCreateScaledFontData):
2283 (WebCore::SimpleFontData::containsCharacters):
2285 2014-04-24 Eric Carlson <eric.carlson@apple.com>
2287 [iOS] Manage AudioSession category according to media type
2288 https://bugs.webkit.org/show_bug.cgi?id=132096
2290 Reviewed by Jer Noble.
2292 * WebCore.exp.in: Export setting.
2294 * html/HTMLMediaSession.cpp:
2295 (WebCore::HTMLMediaSession::HTMLMediaSession):
2296 (WebCore::initializeAudioSession): Deleted.
2298 * page/Settings.cpp:
2300 (WebCore::Settings::setShouldManageAudioSession): New.
2301 (WebCore::Settings::shouldManageAudioSession): Ditto.
2303 * platform/audio/ios/AudioDestinationIOS.cpp:
2304 (WebCore::AudioDestinationIOS::AudioDestinationIOS): Use a MediaSession instead of inheriting
2305 from AudioListener and calling the AudioSession directly.
2306 (WebCore::AudioDestinationIOS::~AudioDestinationIOS): Ditto.
2307 (WebCore::AudioDestinationIOS::start): Notify session.
2308 (WebCore::AudioDestinationIOS::stop): Ditto.
2309 (WebCore::AudioDestinationIOS::beganAudioInterruption): Deleted.
2310 (WebCore::AudioDestinationIOS::endedAudioInterruption): Deleted.
2311 * platform/audio/ios/AudioDestinationIOS.h:
2312 (WebCore::AudioDestinationIOS::mediaType):
2313 (WebCore::AudioDestinationIOS::canReceiveRemoteControlCommands):
2314 (WebCore::AudioDestinationIOS::didReceiveRemoteControlCommand):
2315 (WebCore::AudioDestinationIOS::isPlaying): Deleted.
2317 * platform/audio/ios/AudioSessionIOS.mm:
2318 (WebCore::categoryName): Debug-only logging function.
2319 (WebCore::AudioSession::setCategory): Don't stick with "media" once it is set.
2321 * platform/audio/ios/MediaSessionManagerIOS.mm:
2322 (WebCore::MediaSessionManageriOS::resetRestrictions): Set up restrictions for WebAudio.
2323 (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Don't set invalid start time.
2325 * platform/audio/mac/MediaSessionManagerMac.cpp:
2326 (MediaSessionManager::updateSessionState): Manage AudioSession.active when WebAudio clients
2327 come and go. Manage AudioSession.category according to the number of WebAudio and
2328 HTMLMediaElement clients.
2330 2014-04-24 David Hyatt <hyatt@apple.com>
2332 [New Multicolumn] Client rects don't work with column spans.
2333 https://bugs.webkit.org/show_bug.cgi?id=132131
2335 Reviewed by Dean Jackson.
2337 Don't factor in the offset of the multicolumn set from the top
2338 of the multicolumn block. This was added already, and it doesn't
2339 need to be a part of columnTranslationForOffset.
2341 Added fast/multicol/client-rects-spanners.html
2343 * rendering/RenderMultiColumnSet.cpp:
2344 (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
2346 2014-04-24 Praveen R Jadhav <praveen.j@samsung.com>
2348 [EFL] WebKit build fails when MEDIA_SOURCE is enabled
2349 https://bugs.webkit.org/show_bug.cgi?id=132118
2351 Reviewed by Brent Fulgham.
2353 Files MediaSourceGStreamer.cpp, SourceBufferPrivateGStreamer.cpp and
2354 WebKitMediaSourceGStreamer.cpp are included for EFL port build.
2356 No new tests. No change in behaviour.
2358 * PlatformEfl.cmake: MediaSourceGStreamer.cpp, SourceBufferPrivateGStreamer.cpp
2359 and WebKitMediaSourceGStreamer.cpp are included for compilation.
2361 2014-04-24 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
2363 ASSERTION FAILED: !begin.isIndefinite() in WebCore::SVGSMILElement::resolveFirstInterval.
2364 https://bugs.webkit.org/show_bug.cgi?id=131097
2366 Reviewed by Darin Adler.
2368 According to smil animation reference, max attribute cannot be 0.
2370 Test: svg/animations/smil-animation-max-attribute-zero-crash.svg
2372 * svg/animation/SVGSMILElement.cpp:
2373 (WebCore::SVGSMILElement::maxValue):
2374 changed (result < 0) to (result <= 0)
2376 2014-04-24 Ryuan Choi <ryuan.choi@samsung.com>
2378 Remove screenColorProfile()
2379 https://bugs.webkit.org/show_bug.cgi?id=132035
2381 Reviewed by Darin Adler.
2383 Only chromium used screenColorProfile() since r120789.
2385 * platform/PlatformScreen.h:
2386 * platform/efl/PlatformScreenEfl.cpp:
2387 (WebCore::screenColorProfile): Deleted.
2388 * platform/gtk/PlatformScreenGtk.cpp:
2389 (WebCore::screenColorProfile): Deleted.
2390 * platform/image-decoders/ImageDecoder.h:
2391 (WebCore::ImageDecoder::qcmsOutputDeviceProfile):
2392 * platform/ios/PlatformScreenIOS.mm:
2393 (WebCore::screenColorProfile): Deleted.
2394 * platform/mac/PlatformScreenMac.mm:
2395 (WebCore::screenColorProfile): Deleted.
2396 * platform/win/PlatformScreenWin.cpp:
2397 (WebCore::screenColorProfile): Deleted.
2399 2014-04-24 Zalan Bujtas <zalan@apple.com>
2401 One more unreviewed build fix after r167755.
2403 * html/shadow/mac/ImageControlsButtonElementMac.cpp:
2404 (WebCore::RenderImageControlsButton::updateLogicalWidth):
2405 (WebCore::RenderImageControlsButton::computeLogicalHeight):
2407 2014-04-24 Zalan Bujtas <zalan@apple.com>
2409 Unreviewed build fix after r167755.
2411 * rendering/RenderThemeMac.h:
2413 2014-04-24 Zalan Bujtas <zalan@apple.com>
2415 Transition RenderTheme API from RenderObject* to const RenderObject&
2416 https://bugs.webkit.org/show_bug.cgi?id=132037
2418 Reviewed by Andreas Kling.
2420 Using const references provides better encapsulation and improve security.
2422 No change in behavior.
2424 * accessibility/AccessibilityObject.cpp:
2425 (WebCore::AccessibilityObject::boundingBoxForQuads):
2427 (WebCore::Element::setActive):
2428 (WebCore::Element::setHovered):
2429 * editing/FrameSelection.cpp:
2430 (WebCore::FrameSelection::focusedOrActiveStateChanged):
2431 * html/HTMLFormControlElement.cpp:
2432 (WebCore::HTMLFormControlElement::disabledStateChanged):
2433 (WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
2434 * html/HTMLInputElement.cpp:
2435 (WebCore::HTMLInputElement::setChecked):
2436 (WebCore::HTMLInputElement::setIndeterminate):
2437 * html/HTMLOptionElement.cpp:
2438 (WebCore::HTMLOptionElement::parseAttribute):
2439 * rendering/RenderBlock.cpp:
2440 (WebCore::RenderBlock::addVisualOverflowFromTheme):
2441 (WebCore::RenderBlock::baselinePosition):
2442 * rendering/RenderBox.cpp:
2443 (WebCore::RenderBox::paintBoxDecorations):
2444 * rendering/RenderButton.cpp:
2445 (WebCore::RenderButton::styleDidChange):
2446 * rendering/RenderFileUploadControl.cpp:
2447 (WebCore::RenderFileUploadControl::paintObject):
2448 * rendering/RenderFlowThread.cpp:
2449 (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
2450 * rendering/RenderObject.cpp:
2451 (WebCore::RenderObject::drawLineForBoxSide):
2452 * rendering/RenderObject.h:
2453 * rendering/RenderProgress.cpp:
2454 (WebCore::RenderProgress::computeLogicalHeight):
2455 * rendering/RenderTextControlSingleLine.cpp:
2456 (WebCore::RenderTextControlSingleLine::paint):
2457 * rendering/RenderTheme.cpp:
2458 (WebCore::RenderTheme::paint):
2459 (WebCore::RenderTheme::paintBorderOnly):
2460 (WebCore::RenderTheme::paintDecorations):
2461 (WebCore::RenderTheme::baselinePosition):
2462 (WebCore::RenderTheme::adjustRepaintRect):
2463 (WebCore::RenderTheme::stateChanged):
2464 (WebCore::RenderTheme::updateControlStatesForRenderer):
2465 (WebCore::RenderTheme::extractControlStatesForRenderer):
2466 (WebCore::RenderTheme::isActive):
2467 (WebCore::RenderTheme::isChecked):
2468 (WebCore::RenderTheme::isIndeterminate):
2469 (WebCore::RenderTheme::isEnabled):
2470 (WebCore::RenderTheme::isFocused):
2471 (WebCore::RenderTheme::isPressed):
2472 (WebCore::RenderTheme::isSpinUpButtonPartPressed):
2473 (WebCore::RenderTheme::isReadOnlyControl):
2474 (WebCore::RenderTheme::isHovered):
2475 (WebCore::RenderTheme::isSpinUpButtonPartHovered):
2476 (WebCore::RenderTheme::isDefault):
2477 (WebCore::RenderTheme::paintInputFieldSpeechButton):
2478 (WebCore::RenderTheme::paintMeter):
2479 (WebCore::RenderTheme::paintSliderTicks):
2480 (WebCore::RenderTheme::progressBarRectForBounds):
2481 * rendering/RenderTheme.h:
2482 (WebCore::RenderTheme::controlSupportsTints):
2483 (WebCore::RenderTheme::paintCapsLockIndicator):
2484 (WebCore::RenderTheme::paintFileUploadIconDecorations):
2485 (WebCore::RenderTheme::imageControlsButtonSize):
2486 (WebCore::RenderTheme::paintCheckbox):
2487 (WebCore::RenderTheme::paintRadio):
2488 (WebCore::RenderTheme::paintButton):
2489 (WebCore::RenderTheme::paintInnerSpinButton):
2490 (WebCore::RenderTheme::paintCheckboxDecorations):
2491 (WebCore::RenderTheme::paintRadioDecorations):
2492 (WebCore::RenderTheme::paintButtonDecorations):
2493 (WebCore::RenderTheme::paintTextField):
2494 (WebCore::RenderTheme::paintTextFieldDecorations):
2495 (WebCore::RenderTheme::paintTextArea):
2496 (WebCore::RenderTheme::paintTextAreaDecorations):
2497 (WebCore::RenderTheme::paintMenuList):
2498 (WebCore::RenderTheme::paintMenuListDecorations):
2499 (WebCore::RenderTheme::paintMenuListButtonDecorations):
2500 (WebCore::RenderTheme::paintPushButtonDecorations):
2501 (WebCore::RenderTheme::paintSquareButtonDecorations):
2502 (WebCore::RenderTheme::paintProgressBar):
2503 (WebCore::RenderTheme::paintSliderTrack):
2504 (WebCore::RenderTheme::paintSliderThumb):
2505 (WebCore::RenderTheme::paintSliderThumbDecorations):
2506 (WebCore::RenderTheme::paintSearchField):
2507 (WebCore::RenderTheme::paintSearchFieldDecorations):
2508 (WebCore::RenderTheme::paintSearchFieldCancelButton):
2509 (WebCore::RenderTheme::paintSearchFieldDecorationPart):
2510 (WebCore::RenderTheme::paintSearchFieldResultsDecorationPart):
2511 (WebCore::RenderTheme::paintSearchFieldResultsButton):
2512 (WebCore::RenderTheme::paintMediaFullscreenButton):
2513 (WebCore::RenderTheme::paintMediaPlayButton):
2514 (WebCore::RenderTheme::paintMediaOverlayPlayButton):
2515 (WebCore::RenderTheme::paintMediaMuteButton):
2516 (WebCore::RenderTheme::paintMediaSeekBackButton):
2517 (WebCore::RenderTheme::paintMediaSeekForwardButton):
2518 (WebCore::RenderTheme::paintMediaSliderTrack):
2519 (WebCore::RenderTheme::paintMediaSliderThumb):
2520 (WebCore::RenderTheme::paintMediaVolumeSliderContainer):
2521 (WebCore::RenderTheme::paintMediaVolumeSliderTrack):
2522 (WebCore::RenderTheme::paintMediaVolumeSliderThumb):
2523 (WebCore::RenderTheme::paintMediaRewindButton):
2524 (WebCore::RenderTheme::paintMediaReturnToRealtimeButton):
2525 (WebCore::RenderTheme::paintMediaToggleClosedCaptionsButton):
2526 (WebCore::RenderTheme::paintMediaControlsBackground):
2527 (WebCore::RenderTheme::paintMediaCurrentTime):
2528 (WebCore::RenderTheme::paintMediaTimeRemaining):
2529 (WebCore::RenderTheme::paintMediaFullScreenVolumeSliderTrack):
2530 (WebCore::RenderTheme::paintMediaFullScreenVolumeSliderThumb):
2531 (WebCore::RenderTheme::paintSnapshottedPluginOverlay):
2532 (WebCore::RenderTheme::paintImageControlsButton):
2533 * rendering/RenderThemeIOS.h:
2534 * rendering/RenderThemeIOS.mm:
2535 (WebCore::RenderThemeIOS::addRoundedBorderClip):
2536 (WebCore::RenderThemeIOS::paintCheckboxDecorations):
2537 (WebCore::RenderThemeIOS::baselinePosition):
2538 (WebCore::RenderThemeIOS::paintRadioDecorations):
2539 (WebCore::RenderThemeIOS::paintTextFieldDecorations):
2540 (WebCore::RenderThemeIOS::paintTextAreaDecorations):
2541 (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
2542 (WebCore::RenderThemeIOS::paintSliderTrack):
2543 (WebCore::RenderThemeIOS::paintSliderThumbDecorations):
2544 (WebCore::RenderThemeIOS::paintProgressBar):
2545 (WebCore::RenderThemeIOS::paintSearchFieldDecorations):
2546 (WebCore::RenderThemeIOS::paintButtonDecorations):
2547 (WebCore::RenderThemeIOS::paintPushButtonDecorations):
2548 (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
2549 * rendering/RenderThemeMac.h:
2550 (WebCore::RenderThemeMac::updateActiveState):
2551 * rendering/RenderThemeMac.mm:
2552 (WebCore::RenderThemeMac::documentViewFor):
2553 (WebCore::RenderThemeMac::adjustRepaintRect):
2554 (WebCore::RenderThemeMac::convertToPaintingRect):
2555 (WebCore::RenderThemeMac::updateCheckedState):
2556 (WebCore::RenderThemeMac::updateEnabledState):
2557 (WebCore::RenderThemeMac::updateFocusedState):
2558 (WebCore::RenderThemeMac::updatePressedState):
2559 (WebCore::RenderThemeMac::controlSupportsTints):
2560 (WebCore::RenderThemeMac::paintTextField):
2561 (WebCore::RenderThemeMac::paintCapsLockIndicator):
2562 (WebCore::RenderThemeMac::paintTextArea):
2563 (WebCore::RenderThemeMac::paintMenuList):
2564 (WebCore::RenderThemeMac::paintMeter):
2565 (WebCore::RenderThemeMac::progressBarRectForBounds):
2566 (WebCore::RenderThemeMac::paintProgressBar):
2567 (WebCore::RenderThemeMac::paintMenuListButtonGradients):
2568 (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
2569 (WebCore::RenderThemeMac::setPopupButtonCellState):
2570 (WebCore::RenderThemeMac::paintSliderTrack):
2571 (WebCore::RenderThemeMac::paintSliderThumb):
2572 (WebCore::RenderThemeMac::paintSearchField):
2573 (WebCore::RenderThemeMac::setSearchCellState):
2574 (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2575 (WebCore::RenderThemeMac::paintSearchFieldDecorationPart):
2576 (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
2577 (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
2578 (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
2579 (WebCore::RenderThemeMac::paintImageControlsButton):
2580 (WebCore::RenderThemeMac::imageControlsButtonSize):
2582 2014-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
2584 [GTK] HTML Media capture attribute is a boolean since r163958
2585 https://bugs.webkit.org/show_bug.cgi?id=132061
2587 Reviewed by Gustavo Noronha Silva.
2589 Add new methods webkit_dom_html_input_element_get_capture_enabled
2590 and webkit_dom_html_input_element_set_capture_enabled using a
2591 boolean and deprecate the old methods.
2593 * bindings/gobject/WebKitDOMDeprecated.cpp:
2594 (webkit_dom_html_input_element_get_capture):
2595 (webkit_dom_html_input_element_set_capture):
2596 * bindings/gobject/WebKitDOMDeprecated.h:
2597 * bindings/gobject/WebKitDOMDeprecated.symbols:
2598 * bindings/gobject/webkitdom.symbols:
2599 * bindings/scripts/CodeGeneratorGObject.pm:
2600 (GetEffectiveFunctionName): Helper function to rename API methods
2602 (GenerateFunction): Use GetEffectiveFunctionName().
2604 2014-04-23 Praveen R Jadhav <praveen.j@samsung.com>
2606 [MediaStream] Implement MediaStream active attribute
2607 https://bugs.webkit.org/show_bug.cgi?id=131973
2609 Reviewed by Eric Carlson.
2611 MediaStream .active attribute are introduced which will replace
2612 .ended attribute. This patch implements the newly introduced attributes.
2614 MediaStream-add-remove-tracks.html is updated to handle this scenario.
2616 * Modules/mediastream/MediaStream.cpp:
2617 (WebCore::MediaStream::active): Added.
2618 (WebCore::MediaStream::setActive): Added.
2619 (WebCore::MediaStream::addTrack): Propagates 'onactive' event when required.
2620 (WebCore::MediaStream::removeTrack): Propagates 'oninactive' event when required.
2621 (WebCore::MediaStream::trackDidEnd): Propagates 'oninactive' event when required.
2622 (WebCore::MediaStream::streamDidEnd):
2623 (WebCore::MediaStream::setStreamIsActive): Added.
2624 * Modules/mediastream/MediaStream.h:
2625 * Modules/mediastream/MediaStream.idl:
2627 * platform/mediastream/MediaStreamPrivate.cpp:
2628 (WebCore::MediaStreamPrivate::MediaStreamPrivate): Initialize .active attribute
2629 (WebCore::MediaStreamPrivate::setEnded):
2630 (WebCore::MediaStreamPrivate::setActive): Added.
2631 * platform/mediastream/MediaStreamPrivate.h:
2632 (WebCore::MediaStreamPrivate::active): Added.
2634 2014-04-23 Darin Adler <darin@apple.com>
2636 [Cocoa] fix CF leaks found by code inspection
2637 https://bugs.webkit.org/show_bug.cgi?id=132106
2639 Reviewed by Andreas Kling.
2641 * page/CaptionUserPreferencesMediaAF.cpp:
2642 (WebCore::trackDisplayName): Added a missing adoptCF.
2644 * platform/Language.cpp:
2645 (WebCore::displayNameForLanguageLocale): Added a missing adoptCF.
2647 * platform/graphics/FontPlatformData.cpp:
2648 (WebCore::FontPlatformData::openTypeTable): Added a missing adoptCF.
2650 * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
2651 (WebCore::InbandTextTrackPrivateAVCF::label): Added two missing adoptCF.
2653 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2654 (WebCore::AVFWrapper::createImageForTimeInRect): Added two missing adoptCF.
2656 * platform/graphics/cg/PDFDocumentImage.cpp:
2657 (WebCore::PDFDocumentImage::createPDFDocument): Added missing adoptCF.
2659 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2660 (WebCore::cascadeToLastResortFontDescriptor): Added two missing adoptCF.
2662 * platform/graphics/mac/FontMac.mm:
2663 (WebCore::Font::primaryFontDataIsSystemFont): Added missing adoptCF.
2665 * platform/graphics/mac/SimpleFontDataMac.mm:
2666 (WebCore::hasCustomTracking): Added missing adoptCF.
2668 * platform/image-decoders/ImageDecoder.h:
2669 (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Added CFRelease.
2671 * plugins/mac/PluginPackageMac.cpp:
2672 (WebCore::readPListFile): Added two missing adoptCF.
2674 2014-04-23 Ryosuke Niwa <rniwa@webkit.org>
2676 REGRESSION (r157328): popover to check into flight ba.com dismisses instantly when focusing form
2677 https://bugs.webkit.org/show_bug.cgi?id=131949
2679 Address the review comment.
2681 * dom/EventDispatcher.cpp:
2682 (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope):
2684 2014-04-23 Andreas Kling <akling@apple.com>
2686 CachedResourceLoader hoards URLs indefinitely for no good reason.
2687 <https://webkit.org/b/132102>
2688 <rdar://problem/16708265>
2690 Since we don't care about CachedResourceLoader::m_validatedURL's after
2691 the Document has finished dispatching its initial load event, clear the
2692 set at that point, and don't add any new URLs to it.
2694 Reviewed by Anders Carlsson.
2697 (WebCore::Document::dispatchWindowLoadEvent):
2698 * loader/cache/CachedResourceLoader.cpp:
2699 (WebCore::CachedResourceLoader::requestResource):
2700 (WebCore::CachedResourceLoader::documentDidFinishLoadEvent):
2701 * loader/cache/CachedResourceLoader.h:
2703 2014-04-23 Andreas Kling <akling@apple.com>
2705 Canvas cache of clean URLs can grow without bounds.
2706 <https://webkit.org/b/132091>
2707 <rdar://problem/16695665>
2709 Remove a silly "optimization" that kept a cache of clean URLs
2710 that can be drawn into a canvas without tainting it, all to avoid
2711 the "expensive" checks to determine whether it would taint.
2713 Reviewed by Benjamin Poulain.
2715 * html/canvas/CanvasRenderingContext.cpp:
2716 (WebCore::CanvasRenderingContext::wouldTaintOrigin):
2717 * html/canvas/CanvasRenderingContext.h:
2719 2014-04-23 Benjamin Poulain <bpoulain@apple.com>
2721 [iOS][WK2] Fix a few mistakes affecting the initial layout and the initial unobscured rect
2722 https://bugs.webkit.org/show_bug.cgi?id=132093
2724 Reviewed by Tim Horton.
2726 Change the minimum layout size to float point values to account for size defined on retina displays.
2727 The minimum layout size supports half-pixels, the value is rounded later when computing the layout size
2728 in document coordinates.
2731 * page/ViewportConfiguration.cpp:
2732 (WebCore::ViewportConfiguration::ViewportConfiguration):
2733 Setting the initial content size is incorrect. The layout size computation already take into account
2734 empty size for the first layout.
2736 Setting the content size upfront make the first computation incorrect when the viewport arguments specify
2739 (WebCore::ViewportConfiguration::setMinimumLayoutSize):
2740 * page/ViewportConfiguration.h:
2741 (WebCore::ViewportConfiguration::minimumLayoutSize):
2743 2014-04-23 Brent Fulgham <bfulgham@apple.com>
2745 [Mac, iOS] Stop buffering media when on an inactive tab.
2746 https://bugs.webkit.org/show_bug.cgi?id=132077
2748 Reviewed by Eric Carlson.
2750 * html/HTMLMediaElement.cpp: Rename 'm_isDisplaySleepDisablingSuspended'
2751 to 'm_elementIsHidden'.
2752 (WebCore::HTMLMediaElement::HTMLMediaElement):
2753 (WebCore::HTMLMediaElement::visibilityStatusChanged): Notify the
2754 media session that the element is (or is not) hidden.
2755 (WebCore::HTMLMediaElement::setShouldBufferData): Added.
2756 * html/HTMLMediaElement.h:
2757 * platform/audio/MediaSession.cpp:
2758 (WebCore::MediaSession::clientWillBeginPlayback): Tell media to
2759 buffer if not hidden or playing.
2760 (WebCore::MediaSession::clientWillPausePlayback): Ditto.
2761 (WebCore::MediaSession::visibilityChanged): Added. Client API, just relays call
2762 to updateClientDataBuffering.
2763 (WebCore::MediaSession::updateClientDataBuffering): Tell client it should only
2764 buffer data if it's currently playing, or not hidden.
2765 * platform/audio/MediaSession.h:
2766 * platform/graphics/MediaPlayer.cpp:
2767 (WebCore::MediaPlayer::setShouldBufferData): Added: Just relays to
2768 MediaPlayerPrivate object.
2769 * platform/graphics/MediaPlayer.h:
2770 * platform/graphics/MediaPlayerPrivate.h:
2771 (WebCore::MediaPlayerPrivateInterface::setShouldBufferData):
2772 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2773 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2774 (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
2775 (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData): Added.
2776 Detach the player item from the player if we don't want to continue
2777 buffering or other background tasks.
2779 2014-04-23 Alexey Proskuryakov <ap@apple.com>
2781 Eliminate internals.setMockScrollbarsEnabled()
2782 https://bugs.webkit.org/show_bug.cgi?id=132085
2784 Reviewed by Tim Horton.
2786 This was essentially unused, and also didnt work.
2788 * testing/InternalSettings.cpp:
2789 (WebCore::InternalSettings::Backup::restoreTo):
2790 (WebCore::InternalSettings::setMockScrollbarsEnabled): Deleted.
2791 * testing/InternalSettings.h:
2792 * testing/InternalSettings.idl:
2794 2014-04-23 Anders Carlsson <andersca@apple.com>
2796 Don't migrate the WKView.h header from WebCore to WebKit
2797 https://bugs.webkit.org/show_bug.cgi?id=132086
2799 Reviewed by Dan Bernstein.
2801 * WebCore.xcodeproj/project.pbxproj:
2802 Add WAKViewInternal.h.
2804 * platform/WAKViewInternal.h: Added.
2806 * platform/ios/wak/WAKClipView.m:
2807 Import WAKViewInternal.h instead of WAKViewPrivate.h.
2809 * platform/ios/wak/WAKScrollView.mm:
2810 Import WAKViewInternal.h instead of WAKViewPrivate.h.
2812 * platform/ios/wak/WAKView.h:
2813 Move ivars to a class extension in WAKViewInternal.h and remove WKView.h import.
2815 * platform/ios/wak/WAKView.mm:
2816 Import WAKViewInternal.h instead of WAKViewPrivate.h.
2818 * platform/ios/wak/WAKViewPrivate.h:
2819 Import WKViewPrivate.h.
2821 2014-04-23 David Hyatt <hyatt@apple.com>
2823 [New Multicolumn] fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode.html fails
2824 https://bugs.webkit.org/show_bug.cgi?id=132078
2826 Reviewed by Anders Carlsson.
2828 * rendering/RenderBox.cpp:
2829 (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
2830 Add a parameter to test for orthogonal writing modes. If we're perpendicular,
2831 then we should not skip the flow thread, since we resolve relative to the column width,
2832 and that is always set.
2834 (WebCore::RenderBox::computePercentageLogicalHeight):
2835 Patched to pass in whether or not the box and the ancestor block are perpendicular.
2837 * rendering/RenderBox.h:
2838 Patched the signature of skipContainingBlockForPercentHeightCalculation
2840 2014-04-23 Myles C. Maxfield <mmaxfield@apple.com>
2842 [OS X] Make checking if a font is the system font more robust
2843 https://bugs.webkit.org/show_bug.cgi?id=132030
2845 Reviewed by Dean Jackson.
2847 Instead of inspecting a font's name to determine if it is a system font,
2848 on OS X we can ask the system directly.
2850 This patch also moves a platform-specific check into platform-specific
2851 code, so that other platforms don't check for OS X-specific behavior.
2853 Covered by existing tests.
2855 * platform/graphics/Font.cpp:
2856 (WebCore::Font::hasValidAverageCharWidth):
2857 * platform/graphics/Font.h:
2858 * platform/graphics/mac/FontMac.mm:
2859 (WebCore::Font::primaryFontDataIsSystemFont):
2861 2014-04-23 David Hyatt <hyatt@apple.com>
2863 [New Multicolumn] Assertion failure in huge-column-count.html
2864 https://bugs.webkit.org/show_bug.cgi?id=132071
2866 Reviewed by Dean Jackson.
2868 * rendering/RenderBlock.cpp:
2869 (WebCore::RenderBlock::regionAtBlockOffset):
2870 Back out this change, since it wasn't general enough.
2872 * rendering/RenderFlowThread.cpp:
2873 (WebCore::RenderFlowThread::getRegionRangeForBox):
2874 The real issue was that this loop needed to consider the actual box
2875 rather than starting from the parent. This was a non-issue for normal
2876 regions (which cannot have nested flow threads), but for columns, you
2877 have to consider the fact that the box could itself be a flow thread.
2879 2014-04-23 Andreas Kling <akling@apple.com>
2881 [iOS] Memory pressure notification should fire on main thread.
2882 <https://webkit.org/b/132074>
2884 Rejig the memory pressure notification to fire on the main queue
2885 directly instead of rerouting it manually.
2887 Reviewed by Mark Rowe.
2889 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2890 (WebCore::MemoryPressureHandler::install):
2892 2014-04-23 Commit Queue <commit-queue@webkit.org>
2894 Unreviewed, rolling out r167720.
2895 https://bugs.webkit.org/show_bug.cgi?id=132075
2897 broke eight newmulticol tests (Requested by thorton on
2902 "[New Multicolumn] Assertion failure in huge-column-
2904 https://bugs.webkit.org/show_bug.cgi?id=132071
2905 http://trac.webkit.org/changeset/167720
2907 2014-04-23 David Hyatt <hyatt@apple.com>
2909 [New Multicolumn] Assertion failure in huge-column-count.html
2910 https://bugs.webkit.org/show_bug.cgi?id=132071
2912 Reviewed by Dean Jackson.
2914 * rendering/RenderBlock.cpp:
2915 (WebCore::RenderBlock::regionAtBlockOffset):
2916 Remove the code that returned 0 here, since we're going to patch a lower-level
2917 function to catch all cases.
2919 * rendering/RenderFlowThread.cpp:
2920 (WebCore::RenderFlowThread::getRegionRangeForBox):
2921 Don't allow in-flow RenderFlowThreads to ever have a region range. The sets
2922 are what should have ranges... the flow thread needs to just be ignored.
2924 2014-04-23 David Hyatt <hyatt@apple.com>
2926 [New Multicolumn] Crasher when clearing out a flow thread in multicolumn layout.
2927 https://bugs.webkit.org/show_bug.cgi?id=132069
2929 Reviewed by Dean Jackson.
2931 This is imported from a patch Morten did for Blink, but I had to change it a fair
2932 bit. deleteLines() is used to handle simple line box layout instead of just calling
2935 I also had to disable the layout state to stop asserts on repaint when the children
2936 get moved. Not sure why Blink didn't hit this, but it's simple enough to add a
2937 LayoutStateDisabler to stop the assert.
2939 Added fast/multicol/inline-children-crash.html
2941 * rendering/RenderMultiColumnFlowThread.cpp:
2942 (WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
2944 2014-04-23 Andreas Kling <akling@apple.com>
2946 [iOS WebKit2] IOSurfacePool should force CA to actually garbage collect surfaces.
2947 <https://webkit.org/b/132065>
2948 <rdar://problem/16110687>
2950 Add a platformGarbageCollectNow() helper function to IOSurfacePool that
2951 triggers a sweep of the IOSurfaces. Call this from collectionTimerFired()
2952 and discardAllSurfaces().
2954 This lets us drop all otherwise-unused 420f surfaces on memory pressure.
2956 Reviewed by Tim Horton.
2958 * WebCore.xcodeproj/project.pbxproj:
2959 * platform/graphics/cg/IOSurfacePool.cpp:
2960 (WebCore::IOSurfacePool::collectionTimerFired):
2961 (WebCore::IOSurfacePool::discardAllSurfaces):
2962 * platform/graphics/cg/IOSurfacePool.h:
2963 * platform/graphics/cocoa/IOSurfacePoolCocoa.mm: Added.
2964 (WebCore::IOSurfacePool::platformGarbageCollectNow):
2966 2014-04-23 Morten Stenshorne <mstensho@opera.com>
2968 REGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
2969 https://bugs.webkit.org/show_bug.cgi?id=113058
2971 Reviewed by David Hyatt.
2973 Before sharing CSS properties with an element in the cache, we need to
2974 check that the new element is suitable for this, just like we check
2975 elements before inserting them into the cache.
2977 Test: fast/css/identical-logical-height-decl.html
2979 * css/StyleResolver.cpp:
2980 (WebCore::StyleResolver::applyMatchedProperties):
2982 2014-04-23 Commit Queue <commit-queue@webkit.org>
2984 Unreviewed, rolling out r167713.
2985 https://bugs.webkit.org/show_bug.cgi?id=132070
2987 broke hundreds of tests (Requested by thorton on #webkit).
2991 "[OS X] Make checking if a font is the system font more
2993 https://bugs.webkit.org/show_bug.cgi?id=132030
2994 http://trac.webkit.org/changeset/167713
2996 2014-04-22 David Hyatt <hyatt@apple.com>
2998 [New Multicolumn] Nested columns not working at all.
2999 https://bugs.webkit.org/show_bug.cgi?id=131805
3001 Reviewed by Dean Jackson.
3003 Add support for nested pagination contexts, allowing for an arbitrary level
3004 of nesting of multicolumn layouts. There were a number of things that had to
3005 be patched in order for this to work.
3007 * rendering/RenderBlock.cpp:
3008 (WebCore::RenderBlock::regionAtBlockOffset):
3009 Make sure RenderMultiColumnFlowThreads just return null for regions at any
3010 block offset. Individual region sets will be created as you cross ancestor
3011 regions eventually, so this is just getting in the way.
3013 * rendering/RenderLayer.cpp:
3014 (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
3015 Add a new helper method for obtaining an enclosingPaginationLayer when
3016 constrained by some root. This function ensures you don't accidentally
3017 cross your subtree root when looking for enclosing pagination layers.
3019 (WebCore::RenderLayer::collectFragments):
3020 Patch collectFragments to know how to recur to collect ancestor fragments
3021 in order to apply nested splitting as you cross pagination boundaries.
3023 (WebCore::RenderLayer::updatePaintingInfoForFragments):
3024 (WebCore::RenderLayer::calculateClipRects):
3025 * rendering/RenderLayer.h:
3026 (WebCore::LayerFragment::LayerFragment):
3027 (WebCore::LayerFragment::setRects):
3028 (WebCore::LayerFragment::moveBy):
3029 (WebCore::LayerFragment::intersect):
3030 Improve the LayerFragment so that it caches transformed bounding boxes as
3031 well. This is needed to fix intersectsDamageRect so that it doesn't grab
3032 the wrong bounding box when checking inline layers that are paginated.
3034 * rendering/RenderMultiColumnFlowThread.cpp:
3035 (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
3036 Ignore inserted flow threads inside an ancestor flow thread, since we only
3037 care about what the sets do.
3039 * rendering/RenderObject.cpp:
3040 (WebCore::RenderObject::insertedIntoTree):
3041 Make sure that nested flow thread layers return themselves when a child
3042 is inserted directly under them.
3044 2014-04-22 Myles C. Maxfield <mmaxfield@apple.com>
3046 [OS X] Make checking if a font is the system font more robust
3047 https://bugs.webkit.org/show_bug.cgi?id=132030
3049 Reviewed by Dean Jackson.
3051 Instead of inspecting a font's name to determine if it is a system font,
3052 on OS X we can ask the system directly.
3054 This patch also moves a platform-specific check into platform-specific
3055 code, so that other platforms don't check for OS X-specific behavior.
3057 Covered by existing tests.
3059 * platform/graphics/Font.cpp:
3060 (WebCore::Font::hasValidAverageCharWidth):
3061 * platform/graphics/Font.h:
3062 * platform/graphics/mac/FontMac.mm:
3063 (WebCore::Font::primaryFontDataIsSystemFont):
3065 2014-04-23 Philippe Normand <pnormand@igalia.com>
3067 [GTK] Focus management API was moved from HTMLDocument to Document in r166668
3068 https://bugs.webkit.org/show_bug.cgi?id=132060
3070 Reviewed by Carlos Garcia Campos.
3072 Deprecate the removed methods in WebKitDOMHTMLDocument to keep API compatibility.
3074 * bindings/gobject/WebKitDOMDeprecated.cpp:
3075 (webkit_dom_html_document_get_active_element):
3076 (webkit_dom_html_document_has_focus):
3077 * bindings/gobject/WebKitDOMDeprecated.h:
3078 * bindings/gobject/WebKitDOMDeprecated.symbols:
3079 * bindings/gobject/webkitdom.symbols:
3081 2014-04-22 Andreas Kling <akling@apple.com>
3083 [iOS WebKit1] MemoryPressureHandler::respondToMemoryPressure called on wrong thread.
3084 <https://webkit.org/b/132041>
3085 <rdar://problem/16687238>
3087 Always dispatch the memory pressure relief code on the main queue.
3088 This is really only needed for iOS/WK1, but we might as well share the code.
3090 Reviewed by Michael Saboff.
3092 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3093 (WebCore::MemoryPressureHandler::install):
3095 2014-04-23 Philippe Normand <pnormand@igalia.com>
3097 [GTK] ShadowRoot API was removed in r164131
3098 https://bugs.webkit.org/show_bug.cgi?id=132059
3100 Reviewed by Gustavo Noronha Silva.
3102 Add ShadowRoot removed API to WebKitDOMDeprecated to keep API/ABI compatibility.
3104 * bindings/gobject/WebKitDOMDeprecated.cpp:
3105 (webkit_dom_shadow_root_class_init):
3106 (webkit_dom_shadow_root_init):
3107 (webkit_dom_shadow_root_element_from_point):
3108 (webkit_dom_shadow_root_get_active_element):
3109 (webkit_dom_shadow_root_get_apply_author_styles):
3110 (webkit_dom_shadow_root_get_element_by_id):
3111 (webkit_dom_shadow_root_get_elements_by_class_name):
3112 (webkit_dom_shadow_root_get_elements_by_tag_name):
3113 (webkit_dom_shadow_root_get_elements_by_tag_name_ns):
3114 (webkit_dom_shadow_root_get_inner_html):
3115 (webkit_dom_shadow_root_get_reset_style_inheritance):
3116 (webkit_dom_shadow_root_get_selection):
3117 (webkit_dom_shadow_root_set_apply_author_styles):
3118 (webkit_dom_shadow_root_set_inner_html):
3119 (webkit_dom_shadow_root_set_reset_style_inheritance):
3120 * bindings/gobject/WebKitDOMDeprecated.h:
3121 * bindings/gobject/WebKitDOMDeprecated.symbols:
3123 2014-04-23 Morten Stenshorne <mstensho@opera.com>
3125 [New Multicolumn] fast/multicol/overflow-content.html displays red
3126 https://bugs.webkit.org/show_bug.cgi?id=131809
3128 Reviewed by David Hyatt.
3130 Insert a break at end of content on our own in the multicol code, to make sure
3131 that overflow is accounted for, and also to make sure that we account for all
3132 content in non-final sets (i.e. those preceding spanners).
3134 In other words, this will additionally fix balancing issues in sets preceding
3135 a spanner. Added a test for that.
3137 Tests: fast/multicol/break-in-columns-before-spanner.html
3138 fast/multicol/newmulticol/compare-with-old-impl/overflow-content.html
3140 * rendering/RenderFlowThread.cpp:
3141 (WebCore::RenderFlowThread::regionInRange): Deleted.
3142 * rendering/RenderFlowThread.h:
3143 * rendering/RenderMultiColumnSet.cpp:
3144 (WebCore::RenderMultiColumnSet::distributeImplicitBreaks):
3145 * rendering/RenderNamedFlowThread.cpp:
3146 (WebCore::RenderNamedFlowThread::applyBreakAfterContent):
3147 * rendering/RenderNamedFlowThread.h:
3149 2014-04-23 Morten Stenshorne <mstensho@opera.com>
3151 Overflow propagation broken in BTT and RTL writing-modes
3152 https://bugs.webkit.org/show_bug.cgi?id=113781
3154 Reviewed by David Hyatt.
3156 Overflow rectangles are not quite physical, not quite logical. This
3157 means that we cannot use clientBoxRect() directly to represent a
3158 rectangle that expresses exactly no overflow. This rectangle is the
3159 padding box (relative to the border box) in vertical-lr and
3160 horizontal-tb, but the block-direction borders need to be flipped in
3161 vertical-rl and horizontal-bt.
3163 Tests: fast/css/overflow-btt-border-after.html
3164 fast/css/overflow-rtl-border-after.html
3167 * rendering/RenderBlock.cpp:
3168 (WebCore::RenderBlock::computeOverflow):
3169 * rendering/RenderBox.cpp:
3170 (WebCore::RenderBox::addLayoutOverflow):
3171 (WebCore::RenderBox::addVisualOverflow):
3172 (WebCore::RenderBox::layoutOverflowRectForPropagation):
3173 * rendering/RenderBox.h:
3174 (WebCore::RenderBox::layoutOverflowRect):
3176 2014-04-23 Andrei Bucur <abucur@adobe.com>
3178 [CSS Regions] Improve the debugging infrastructure
3179 https://bugs.webkit.org/show_bug.cgi?id=132042
3181 Reviewed by Mihnea Ovidenie.
3183 This patch improves the debugging code for CSS Regions.
3185 Tests: No function change. No new tests.
3187 * rendering/RenderObject.cpp:
3188 (WebCore::RenderObject::showRegionsInformation): Print brackets around the region range when dumping
3189 the render tree to the console.
3190 * rendering/RootInlineBox.cpp:
3191 (WebCore::RootInlineBox::containingRegion): Convert the ASSERT to an ASSERT_WITH_SECURITY_IMPLICATION.
3193 2014-04-22 Ryosuke Niwa <rniwa@webkit.org>
3195 Cursor doesn't change back to pointer when leaving the Safari window
3196 https://bugs.webkit.org/show_bug.cgi?id=132038
3198 Reviewed by Alexey Proskuryakov.
3200 r147739 incorrectly added an early exit in EventHandler::selectCursor when hit test result didn't have
3201 any node associated with it. Since we will hit this code when the cursor is outside of the WebView,
3202 we still need to take the CURSOR_AUTO path as did the code before r147739.
3204 No new test is added since this behavior can't be tested in DRT or WTR.
3206 * page/EventHandler.cpp:
3207 (WebCore::EventHandler::selectCursor):
3209 2014-04-22 Zalan Bujtas <zalan@apple.com>
3211 Do not paint border image when the border rect is empty.
3212 https://bugs.webkit.org/show_bug.cgi?id=131988
3214 Reviewed by Darin Adler.
3216 http://trac.webkit.org/changeset/167351 introduced an early return when border
3217 rect is empty. This patch ensures that border image is not painted either in that case.
3219 Modified padding-margin-negative-border.html to cover border-image case.
3221 * rendering/RenderBoxModelObject.cpp:
3222 (WebCore::RenderBoxModelObject::paintBorder):
3224 2014-04-22 Tim Horton <timothy_horton@apple.com>
3226 ASSERTION FAILED: scrollerImp == scrollbarPainterForScrollbar(_scrollbar) on two API tests
3227 https://bugs.webkit.org/show_bug.cgi?id=132034
3228 <rdar://problem/16624332>
3230 Reviewed by Simon Fraser.
3232 * platform/mac/ScrollAnimatorMac.mm:
3233 (-[WebScrollbarPainterDelegate shouldUseLayerPerPartForScrollerImp:]):
3234 scrollerImpWithStyle:controlSize:horizontal:replacingScrollerImp: moves the delegate
3235 from the old scrollerImp to the new one, and also happens to call shouldUseLayerPerPartForScrollerImp.
3236 Since scrollerImpWithStyle: has not returned yet, the scrollbarPainterForScrollbar still returns the old scrollerImp,
3237 so this assertion fires. It's safe to remove this because supportsUpdateOnSecondaryThread doesn't make use of the imp.
3239 2014-04-22 Ryosuke Niwa <rniwa@webkit.org>
3241 REGRESSION (r157328): popover to check into flight ba.com dismisses instantly when focusing form
3242 https://bugs.webkit.org/show_bug.cgi?id=131949
3244 Reviewed by Darin Adler.
3246 The regression was caused by two bugs:
3247 1. The event didn't stop propagating itself even when it should.
3248 If the related target is same as the event origin, the event propagation should stop when the event reaches
3249 the root of the related target's tree scope. Otherwise, it should stop when it reaches the related target.
3251 2. Mouse event's related target exposed nodes inside a user-agent shadow DOM when the related target appeared
3254 Fixed the bugs by re-introducing path shrinkage algorithm removed in r157328 into EventPath::setRelatedTarget
3255 and adding an algorithm to determine the least common ancestor of the related target and the current target
3256 in moveToParentOrShadowHost. The latter algorithm doesn't match the shadow DOM specification:
3257 http://www.w3.org/TR/2013/WD-shadow-dom-20130514/
3258 but it's good enough in terms of the Web exposed behavior as we don't support author defined insertion points.
3260 Test: fast/events/shadow-event-path.html
3262 * dom/EventDispatcher.cpp:
3263 (WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
3264 (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope): Added.
3265 (WebCore::EventDispatcher::dispatchEvent):
3266 (WebCore::EventPath::setRelatedTarget):
3268 2014-04-22 Ryosuke Niwa <rniwa@webkit.org>
3270 Rollout r156635 since the old behavior was intentional.
3272 * page/EventHandler.cpp:
3273 (WebCore::EventHandler::selectCursor):
3275 2014-04-22 Commit Queue <commit-queue@webkit.org>
3277 Unreviewed, rolling out r167674.
3278 https://bugs.webkit.org/show_bug.cgi?id=132025
3280 Going a different way with this (Requested by bradee-oh on
3285 "Change Image Controls replacement to use selection and paste"
3286 https://bugs.webkit.org/show_bug.cgi?id=131992
3287 http://trac.webkit.org/changeset/167674
3289 2014-04-22 Brent Fulgham <bfulgham@apple.com>
3291 [Win] Support Python 2.7 in Cygwin
3292 https://bugs.webkit.org/show_bug.cgi?id=132023
3294 Reviewed by Michael Saboff.
3296 * DerivedSources.make: Use proper path to Cygwin on
3299 2014-04-22 Andreas Kling <akling@apple.com>
3301 REGRESSION (r151839): Subframe keeps getting mousemove events with the same coordinates after hiding a hovered element.
3302 <https://webkit.org/b/131974>
3303 <rdar://problem/15907469>
3305 When the currently hovered element disappears as a result of style recalc,
3306 we send a fake mousemove event to the page, to see if anything newly added
3307 should become hovered.
3309 The faking mechanism lives in EventHandler and simply synthesizes a new
3310 mousemove event using the last seen mouse location.
3312 The problem here is that we were sending this fake mousemove event to the
3313 subframe where the hovered element lived. Since subframes aren't kept up
3314 to date on recent mouse locations, this could cause some strange behavior
3315 where a subframe would dispatch mousemove events with stale coordinates.
3317 The solution is to always dispatch fake mousemove events from the main
3318 frame's event handler. This is how real event delivery happens, and hit
3319 testing will then find the appropriate subframe, if any.
3321 Reviewed by Benjamin Poulain.
3323 Test: fast/events/ghostly-mousemoves-in-subframe.html
3326 (WebCore::Document::recalcStyle):
3328 2014-04-22 Myles C. Maxfield <mmaxfield@apple.com>
3330 [OS X] Glyph spacing for system fonts may be incorrect
3331 https://bugs.webkit.org/show_bug.cgi?id=131967
3333 Unreviewed iOS build fix after r167679.
3335 * platform/graphics/mac/SimpleFontDataMac.mm:
3337 2014-04-22 Myles C. Maxfield <mmaxfield@apple.com>
3339 [OS X] Glyph spacing for system fonts may be incorrect
3340 https://bugs.webkit.org/show_bug.cgi?id=131967
3342 Unreviewed build fix after r167679.
3344 * platform/graphics/mac/SimpleFontDataMac.mm:
3345 (WebCore::hasCustomTracking):
3347 2014-04-21 Myles C. Maxfield <mmaxfield@apple.com>
3349 [OS X] Glyph spacing for system fonts may be incorrect
3350 https://bugs.webkit.org/show_bug.cgi?id=131967
3352 Reviewed by Simon Fraser.
3354 Covered by existing tests.
3356 * platform/graphics/mac/SimpleFontDataMac.mm:
3357 (WebCore::SimpleFontData::platformWidthForGlyph): Update to use CTFontGetAdvancesForGlyphs() for system fonts
3358 (WebCore::hasCustomTracking):
3360 2014-04-22 David Hyatt <hyatt@apple.com>
3362 [New Multicolumn] widows/orphans cause assertion failures.
3363 https://bugs.webkit.org/show_bug.cgi?id=131233
3365 Reviewed by Dean Jackson.
3367 * rendering/RenderMultiColumnSet.cpp:
3368 (WebCore::RenderMultiColumnSet::recordSpaceShortage):
3369 Fix an obvious bug where the space shortage is recorded twice (and the
3370 if statement that kept it from being negative is accidentally ignored).
3372 2014-04-22 David Hyatt <hyatt@apple.com>
3374 [New Multicolumn] Make sure columnTranslationForOffset has the same column-span-aware
3375 translation that fragment collection does.
3376 https://bugs.webkit.org/show_bug.cgi?id=131738
3378 Reviewed by Anders Carlsson.
3380 * rendering/RenderMultiColumnSet.cpp:
3381 (WebCore::RenderMultiColumnSet::collectLayerFragments):
3382 Remove a FIXME that is no longer needed, since the translation offset of the
3383 column set did get patched.
3385 (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
3386 Add the exact same fix to columnTranslationForOffset that was applied to collectLayerFragments.
3388 2014-04-22 Mark Lam <mark.lam@apple.com>
3390 WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript() needs to acquire the JSLock before calling into JS.
3391 <https://webkit.org/b/132021>
3393 Reviewed by Mark Hahnenberg.
3395 Covered by existing layout test.
3397 * html/HTMLMediaElement.cpp:
3398 (WebCore::HTMLMediaElement::parseAttribute):
3400 2014-04-22 Manuel Rego Casasnovas <rego@igalia.com>
3402 REGRESSION (r167652): Broke fast/regions/cssom/region-range-for-box-crash.html in debug mode
3403 https://bugs.webkit.org/show_bug.cgi?id=131982
3405 Reviewed by David Hyatt.
3407 The problem was creating the Range from the arguments received at RenderView::setSelection(). Specifically
3408 in this test endPos is 1 when the element has not children which creates an invalid Range.
3410 * rendering/RenderView.cpp:
3411 (WebCore::RenderView::splitSelectionBetweenSubtrees): Pass 0 as startPos and endPos to Range::create() as we are
3412 not interested in the positions at this point.
3414 2014-04-22 Brady Eidson <beidson@apple.com>
3416 Change Image Controls replacement to use selection and paste
3417 <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
3419 Reviewed by Tim Horton.
3421 * WebCore.exp.in: Remove deleted symbol.
3423 * html/shadow/mac/ImageControlsButtonElementMac.cpp:
3424 (WebCore::ImageControlsButtonElementMac::defaultEventHandler):
3426 * page/ContextMenuController.cpp:
3427 (WebCore::ContextMenuController::showImageControlsMenu): Select the image element
3428 before showing the menu.
3429 (WebCore::ContextMenuController::replaceControlledImage): Deleted.
3430 * page/ContextMenuController.h:
3432 2014-04-22 David Hyatt <hyatt@apple.com>
3434 REGRESSION: Hitting asserts in new flow thread selection code.
3435 https://bugs.webkit.org/show_bug.cgi?id=132019
3437 Reviewed by Anders Carlsson.
3439 Null checking flowThreadController is not enough. The list of threads
3440 can be null even when the flowThreadController is not. That's why you
3441 use hasRenderNamedFlowThreads. I patched the two bad places in the code
3442 to use hasRenderNamedFlowThreads to stop the crashes.
3444 * rendering/RenderView.cpp:
3445 (WebCore::RenderView::selectionBounds):
3446 (WebCore::RenderView::repaintSelection):
3448 2014-04-22 Brent Fulgham <bfulgham@apple.com>
3450 Check (rather than assume) element is a RenderTableSection before using it
3451 https://bugs.webkit.org/show_bug.cgi?id=121858
3453 Reviewed by David Kilzer.
3455 Test: fast/table/table-insert-object-before-td-crash.html
3457 * rendering/RenderTable.cpp:
3458 (WebCore::RenderTable::addChild): Check that lastBox is a table section before