a7ea312ad6374b1962b8efdb3cb467d34e982456
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-05-26  Tim Horton  <timothy_horton@apple.com>
2
3         [wk2] RemoteLayerBackingStore front buffers should be purgeable when unparented
4         https://bugs.webkit.org/show_bug.cgi?id=133020
5         <rdar://problem/16521736>
6
7         Reviewed by Simon Fraser.
8
9         * WebCore.exp.in:
10         * platform/graphics/cg/IOSurfacePool.cpp:
11         (WebCore::IOSurfacePool::willAddSurface):
12         * platform/graphics/cocoa/IOSurface.h:
13         * platform/graphics/cocoa/IOSurface.mm:
14         (IOSurface::releaseGraphicsContext):
15         Rename clearGraphicsContext to releaseGraphicsContext for clarity.
16
17 2014-05-26  Philip Rogers  <pdr@google.com>
18
19         Remove special case for transparent SVG root layers
20         https://bugs.webkit.org/show_bug.cgi?id=116856
21
22         Reviewed by Dirk Schulze.
23
24         This patch removes a special case from RenderLayer for root SVG layers
25         with opacity. Instead of checking whether a composited layer exists in
26         SVGRenderingContext::prepareToRenderSVGContent we now exclude the root
27         SVG renderobject from the opacity checks in prepareToRenderSVGContent.
28
29         This is a merge of https://src.chromium.org/viewvc/blink?view=rev&revision=174102
30         by Philip Rogers <pdr@chromium.org>.
31
32         No new tests as this is covered by svg/custom/composited-svg-with-opacity.html.
33
34         * rendering/RenderLayer.cpp:
35         (WebCore::RenderLayer::isTransparent): Deleted.
36         * rendering/RenderLayer.h:
37         * rendering/svg/SVGRenderingContext.cpp:
38         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
39             The opacity case for root svg renderers is now handled by
40             RenderLayer.
41
42 2014-05-26  Yusuke Suzuki  <utatane.tea@gmail.com>
43
44         CSS JIT: Fix build error raised when CSS_SELECTOR_JIT_DEBUGGING is 1
45         https://bugs.webkit.org/show_bug.cgi?id=133266
46
47         Reviewed by Benjamin Poulain.
48
49         When CSS_SELECTOR_JIT_DEBUGGING is 1, build erros occur on x86_64.
50
51         * cssjit/SelectorCompiler.cpp:
52         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
53         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
54
55 2014-05-26  Benjamin Poulain  <benjamin@webkit.org>
56
57         Fix the quirks mode selector matching of the pseudo classes :hover and :active
58         https://bugs.webkit.org/show_bug.cgi?id=133063
59
60         Reviewed by Antti Koivisto.
61
62         Our implementation of the quirks mode of :active and :hover was very wrong. The only
63         thing it was doing is verify the pseudo class is not the first selector of a fragment
64         (which was conveniently the only thing that was tested :)).
65
66         Since those pseudo class were only checking for the order of the filters, something like
67             #target:hover
68         would succeed because :hover is not the first simple selector, while
69             :hover#target
70         would fail.
71
72         That behavior is also a problem for the CSS JIT as it is an implementation detail of SelectorChecker
73         and compiling something like that with our out-of-order matching would be nonsense.
74
75         This patch update the implementation to follow http://quirks.spec.whatwg.org/#the-:active-and-:hover-quirk
76         Basically, the only cases that do not work in quirks mode are selectors composed only of "*, :hover and :active".
77
78         To implement this behavior, I needed to be able to inspect a complete selector fragment, including
79         what is before and after :hover/:active.
80         To do that, I replaced the boolean isSubSelector by a pointer to the first selector of the fragment.
81         When we need to match :active/:hover in quirks mode, we just go over all the selectors in the fragment
82         to find one of the qualifying match type.
83
84         Tests: fast/selectors/active-hover-quirks.html
85                fast/selectors/active-quirks.html
86                fast/selectors/hover-quirks.html
87
88         * css/SelectorChecker.cpp:
89         (WebCore::SelectorChecker::matchRecursively):
90         (WebCore::canMatchHoverOrActiveInQuirksMode):
91         (WebCore::SelectorChecker::checkOne):
92         * css/SelectorChecker.h:
93         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
94
95 2014-05-26  Zalan Bujtas  <zalan@apple.com>
96
97         Split the call to adjustForLocalZoom out into a separate expression.
98         https://bugs.webkit.org/show_bug.cgi?id=133286
99
100         Reviewed by Darin Adler.
101
102         This patch ensures that adjustForLocalZoom() always gets called before we look at
103         zoomFactor's value. (and not rely on the undefined behavior of the order of function argument evaluation)
104
105         * dom/Element.cpp:
106         (WebCore::Element::offsetLeft):
107         (WebCore::Element::offsetTop):
108
109 2014-05-26  Darin Adler  <darin@apple.com>
110
111         Class name matching should use ASCII case-insensitive matching, not Unicode case folding
112         https://bugs.webkit.org/show_bug.cgi?id=133292
113
114         Reviewed by Anders Carlsson.
115
116         Tests: fast/dom/getElementsByClassName/ASCII-case-insensitive.html
117                fast/dom/getElementsByClassName/case-sensitive.html
118
119         * dom/SpaceSplitString.cpp:
120         (WebCore::hasNonASCIIOrUpper): Deleted.
121         (WebCore::tokenizeSpaceSplitString): Use a for loop instead of while.
122         (WebCore::spaceSplitStringTable): Renamed from sharedDataMap; the new name is supposed
123         to help us see the analogy with the atomic string table.
124         (WebCore::SpaceSplitString::set): Removed unneeded special case for null and preflight
125         since AtomicString::convertToASCIILowercase now handles both of those. Changed to call
126         convertToASCIILowercase instead of foldCase, since we don't want to fold non-ASCII.
127         (WebCore::SpaceSplitString::spaceSplitStringContainsValue): Ditto.
128         (WebCore::SpaceSplitStringData::create): Marked this inline since it's only called in
129         one place and that place is in this file. Also used auto a bit and used get instead of
130         find since the value type is a simple pointer.
131         (WebCore::SpaceSplitStringData::destroy): Removed unneeded check for null. We never
132         create any SpaceSplitStringData with empty strings, and a null is a kind of empty string.
133
134         * dom/SpaceSplitString.h: Removed some unneeded includes and some unneeded uses of the
135         inline keyword. Changed types from size_t to unsigned in a couple places; we had a mix
136         of the types and there was no reason to use size_t there.
137
138 2014-05-26  Javier Fernandez  <jfernandez@igalia.com>
139
140         [CSS Grid Layout] Implementation of the "grid" shorthand.
141         https://bugs.webkit.org/show_bug.cgi?id=132122
142
143         Reviewed by Darin Adler.
144
145         The grid property is a shorthand that sets all of the explicit
146         grid properties (grid-template-rows, grid-template-columns, and
147         grid-template-areas) as well as all the implicit grid properties
148         (grid-auto-rows, grid-auto-columns, and grid-auto-flow) in a
149         single declaration
150
151         Notice that either explicit or implicit grid can be specified,
152         assigning the initial values to the omitted properties.
153
154         Test: fast/css-grid-layout/grid-shorthand-get-set.html
155
156         * css/CSSComputedStyleDeclaration.cpp:
157         (WebCore::ComputedStyleExtractor::propertyValue):
158         * css/CSSParser.cpp:
159         (WebCore::CSSParser::parseValue):
160         (WebCore::CSSParser::parseGridShorthand):
161         * css/CSSParser.h:
162         * css/CSSPropertyNames.in:
163         * css/StylePropertyShorthand.cpp:
164         (WebCore::webkitGridShorthand):
165         * css/StylePropertyShorthand.h:
166
167 2014-05-26  Zalan Bujtas  <zalan@apple.com>
168
169         Subpixel layout: Legacy Element.offset* client* return values are invalid in certain cases.
170         https://bugs.webkit.org/show_bug.cgi?id=133272
171
172         Reviewed by Simon Fraser.
173
174         Element.offset* client* functions applied various rounding strategies on the return values before r168868.
175         (for example, offsetLeft/Top either floored through implicit integer arithmetics or rounded explicitly depending
176         whether the zoom scale was 1. see http://trac.webkit.org/changeset/168868/trunk/Source/WebCore/dom/Element.cpp for details)
177         This patch mimics the legacy behavior by either rounding or flooring the return value.
178
179         Not testable (legacy switch is not exposed)
180
181         * dom/Element.cpp:
182         (WebCore::adjustForLocalZoom):
183         (WebCore::convertToNonSubpixelValueIfNeeded):
184         (WebCore::Element::offsetLeft):
185         (WebCore::Element::offsetTop):
186
187 2014-05-26  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
188
189         [EFL] Input fields and text areas are not rendered correctly after r167771
190         https://bugs.webkit.org/show_bug.cgi?id=133181
191
192         Reviewed by Gyuyoung Kim.
193
194         r167771 changed arguments of RenderTheme two virtual method arguments which were not reflected
195         in changes in derived classes, which caused parent method to be called. Arguments in derived class
196         were updated, also 'override' specifiers were added to all virtual methods to prevent similar errors.
197
198         Already covered by fast/forms/textarea-placeholder-wrapping.html
199
200         * platform/efl/RenderThemeEfl.cpp:
201         (WebCore::RenderThemeEfl::paintTextField):
202         (WebCore::RenderThemeEfl::paintTextArea):
203         * platform/efl/RenderThemeEfl.h:
204         (WebCore::RenderThemeEfl::supportsHover):
205         (WebCore::RenderThemeEfl::supportsControlTints):
206
207 2014-05-20  Sergio Villar Senin  <svillar@igalia.com>
208
209         [CSS Grid Layout] Children of grid containers must be turned into grid items
210         https://bugs.webkit.org/show_bug.cgi?id=132991
211
212         Reviewed by Darin Adler.
213
214         From Blink r150472 by <jchaffraix@chromium.org>
215
216         According to specs each child of a grid container must become a
217         grid item meaning that grid items are grid level boxes and thus,
218         do not participate in the block formatting context but in the grid
219         formatting one.
220
221         This change updates the grid items' 'display' property after style
222         resolution so that we match the specification (see section 4. Grid
223         Items). The spec basically instructs us to compute the value of
224         'display' by applying the table in CSS2.1 Chapter 9.7
225         http://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo
226
227         Test: fast/css-grid-layout/grid-item-display.html
228
229         * css/StyleResolver.cpp:
230         (WebCore::isDisplayGridBox):
231         (WebCore::StyleResolver::adjustRenderStyle):
232
233 2014-05-26  Zan Dobersek  <zdobersek@igalia.com>
234
235         Remove Vector copies in ShorthandPropertyWrapper implementation and use
236         https://bugs.webkit.org/show_bug.cgi?id=133265
237
238         Reviewed by Simon Fraser.
239
240         * page/animation/CSSPropertyAnimation.cpp:
241         (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): Move the passed-in Vector
242         into the member variable instead of using Vector<>::swap().
243         (WebCore::ShorthandPropertyWrapper::propertyWrappers): Return a const reference of the member
244         variable instead of a const value.
245         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Move the Vector
246         object into the ShorthandProperthyWrapper constructor.
247         (WebCore::gatherEnclosingShorthandProperties): Deploy a range-based for-loop.
248
249 2014-05-26  Tanay C  <tanay.c@samsung.com>
250
251         [EFL] Fix build error in blob.cpp after r168435
252         https://bugs.webkit.org/show_bug.cgi?id=132678
253
254         Reviewed by Alexey Proskuryakov.
255
256         * fileapi/Blob.cpp:
257         (WebCore::Blob::size): Using isInBound to check range of local var
258         actualsize to resolve build error
259
260 2014-05-25  Ryuan Choi  <ryuan.choi@samsung.com>
261
262         [EFL] Remove TileCairo and TiledBackingStoreBackendCairo
263         https://bugs.webkit.org/show_bug.cgi?id=133274
264
265         Reviewed by Gyuyoung Kim.
266
267         Now, TiledBackingStore is only used for CoordinatedGraphics and the EFL port.
268         CoordinatedGraphics does not use TileCairo and TiledBackingStoreBackendCairo.
269
270         This patch removed them and refactored related files.
271
272         * PlatformEfl.cmake:
273         * PlatformGTK.cmake:
274         * WebCore.vcxproj/WebCore.vcxproj:
275         * WebCore.vcxproj/WebCore.vcxproj.filters:
276         * platform/graphics/TiledBackingStore.cpp:
277         (WebCore::TiledBackingStore::TiledBackingStore): Deleted.
278         * platform/graphics/TiledBackingStore.h:
279         * platform/graphics/TiledBackingStoreBackend.h:
280         * platform/graphics/cairo/TileCairo.cpp: Removed.
281         * platform/graphics/cairo/TiledBackingStoreBackendCairo.cpp: Removed.
282
283 2014-05-25  Jinwoo Song  <jinwoo7.song@samsung.com>
284
285         setData() of DataTransfer has a void return type
286         https://bugs.webkit.org/show_bug.cgi?id=133108
287
288         Reviewed by Alexey Proskuryakov.
289
290         According to HTML5 spec, setData() of DataTranfer interface does not return value.
291         http://www.w3.org/TR/html/editing.html#the-datatransfer-interface
292
293         Test: editing/pasteboard/set_data_typeof_return.html
294
295         * dom/DataTransfer.cpp:
296         (WebCore::DataTransfer::setData):
297         * dom/DataTransfer.h:
298         * dom/DataTransfer.idl:
299         * platform/Pasteboard.h:
300         * platform/efl/PasteboardEfl.cpp:
301         (WebCore::Pasteboard::writeString):
302         * platform/gtk/PasteboardGtk.cpp:
303         (WebCore::Pasteboard::writeString):
304         * platform/ios/PasteboardIOS.mm:
305         (WebCore::Pasteboard::writeString):
306         * platform/mac/PasteboardMac.mm:
307         (WebCore::Pasteboard::writeString):
308         * platform/win/PasteboardWin.cpp:
309         (WebCore::Pasteboard::writeString):
310
311 2014-05-25  Benjamin Poulain  <bpoulain@apple.com>
312
313         [iOS][WK2] Use ScrollView's scrollOffset as the unobscuredContentRect
314         https://bugs.webkit.org/show_bug.cgi?id=133262
315
316         Reviewed by Simon Fraser.
317
318         Since VisibleContentRect was fixed, we were no longer sending scroll events when updating the scrollOffset
319         when updating the visible content rects. The reason is that the scrollOffset was defined as the top left of the
320         VisibleContentRect, and as such was already at the end position after updating the unobscured rect.
321
322         This patch split the unobscuredContentRect in unobscuredContentSize (updated live on zoom) and the position defined
323         by the ScrollView's scrollOffset (updated when scrolling).
324
325         * WebCore.exp.in:
326         * platform/ScrollView.h:
327         * platform/ios/ScrollViewIOS.mm:
328         (WebCore::ScrollView::unobscuredContentRect):
329         (WebCore::ScrollView::setUnobscuredContentSize):
330         (WebCore::ScrollView::setUnobscuredContentRect): Deleted.
331
332 2014-05-25  David Kilzer  <ddkilzer@apple.com>
333
334         Add type-checked casts for TransformOperations
335         <http://webkit.org/b/133217>
336
337         Reviewed by Simon Fraser.
338
339         * platform/graphics/GraphicsLayer.cpp:
340         (WebCore::GraphicsLayer::validateTransformOperations):
341         * platform/graphics/ca/GraphicsLayerCA.cpp:
342         (WebCore::getTransformFunctionValue):
343         - Switch to type-checked casts.
344
345         * platform/graphics/transforms/IdentityTransformOperation.h:
346         * platform/graphics/transforms/Matrix3DTransformOperation.h:
347         * platform/graphics/transforms/MatrixTransformOperation.h:
348         * platform/graphics/transforms/PerspectiveTransformOperation.h:
349         * platform/graphics/transforms/RotateTransformOperation.h:
350         * platform/graphics/transforms/ScaleTransformOperation.h:
351         * platform/graphics/transforms/SkewTransformOperation.h:
352         * platform/graphics/transforms/TranslateTransformOperation.h:
353         - Add 'final' to class declaration.
354         - Add 'override' to overridden methods.
355         - Add type-checked cast via TRANSFORMOPERATION_TYPE_CASTS macro.
356         - Move implementation of operator==(const TransformOperation&)
357           from header to source file so it is able to use a type-checked
358           cast, and switch back to using a reference instead of a
359           pointer.
360         - Add or update ASSERT in private constructor to check for
361           correct OperationType in classes that represent multiple
362           types.
363
364         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
365         (WebCore::Matrix3DTransformOperation::operator==): Added.
366
367         * platform/graphics/transforms/MatrixTransformOperation.cpp:
368         (WebCore::Matrix3DTransformOperation::operator==): Added.
369         (WebCore::MatrixTransformOperation::blend):
370         - Switch to type-checked casts and use a reference.
371
372         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
373         (WebCore::Matrix3DTransformOperation::operator==): Added.
374         (WebCore::PerspectiveTransformOperation::blend):
375         * platform/graphics/transforms/RotateTransformOperation.cpp:
376         (WebCore::Matrix3DTransformOperation::operator==): Added.
377         (WebCore::RotateTransformOperation::blend):
378         * platform/graphics/transforms/ScaleTransformOperation.cpp:
379         (WebCore::Matrix3DTransformOperation::operator==): Added.
380         (WebCore::ScaleTransformOperation::blend):
381         * platform/graphics/transforms/SkewTransformOperation.cpp:
382         (WebCore::Matrix3DTransformOperation::operator==): Added.
383         (WebCore::SkewTransformOperation::blend):
384         * platform/graphics/transforms/TranslateTransformOperation.cpp:
385         (WebCore::Matrix3DTransformOperation::operator==): Added.
386         (WebCore::TranslateTransformOperation::blend):
387         - Switch to type-checked casts.
388
389         * platform/graphics/transforms/TransformOperation.h:
390         (WebCore::TransformOperation::isRotateTransformOperationType):
391         (WebCore::TransformOperation::isScaleTransformOperationType):
392         (WebCore::TransformOperation::isSkewTransformOperationType):
393         (WebCore::TransformOperation::isTranslateTransformOperationType):
394         - Add type-checking methods used in constructors and type-checked
395           casts.
396         - Define TRANSFORMOPERATION_TYPE_CASTS macro used by subclasses.
397
398 2014-05-25  David Kilzer  <ddkilzer@apple.com>
399
400         Crash in WebCore::TextResourceDecoder::checkForCSSCharset
401         <http://webkit.org/b/133257>
402         <rdar://problem/17027109>
403
404         Reviewed by Alexey Proskuryakov.
405
406         Test: fast/encoding/css-charset-missing-semi-colon-and-newline.html
407
408         * loader/TextResourceDecoder.cpp:
409         (WebCore::TextResourceDecoder::checkForCSSCharset): Add early
410         return.
411
412 2014-05-24  Eric Carlson  <eric.carlson@apple.com>
413
414         [Mac] preload AVAssetTrack properties before asking for them
415         https://bugs.webkit.org/show_bug.cgi?id=133240
416
417         Reviewed by Jer Noble.
418
419         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
420         (WebCore::assetTrackMetadataKeyNames): Add preferredTransform and naturalSize to the list
421             of properties we preload.
422
423 2014-05-24  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
424
425         Remove one of the CSSProperty constructor
426         https://bugs.webkit.org/show_bug.cgi?id=131094
427
428         Reviewed by Darin Adler.
429
430         Remove one of the CSSProperty constructor, because it is obsolete.
431
432         * css/CSSProperty.h:
433         (WebCore::CSSProperty::CSSProperty): Deleted.
434         * css/StyleProperties.h:
435         (WebCore::StyleProperties::PropertyReference::toCSSProperty):
436
437 2014-05-23  Simon Fraser  <simon.fraser@apple.com>
438
439         Rename ScrollingTreeScrollingNode's m_scrollPosition to make it clear that it's the value committed from the state tree
440         https://bugs.webkit.org/show_bug.cgi?id=133254
441
442         Reviewed by Tim Horton.
443
444         Make ScrollingTreeScrollingNode::scrollPosition() pure virtual, and rename
445         the member variable and associated getter to make it clear that they relate
446         to the last committed scroll position.
447
448         * page/scrolling/ScrollingTreeScrollingNode.cpp:
449         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
450         * page/scrolling/ScrollingTreeScrollingNode.h:
451         (WebCore::ScrollingTreeScrollingNode::lastCommittedScrollPosition):
452         (WebCore::ScrollingTreeScrollingNode::scrollPosition): Deleted.
453
454 2014-05-23  Simon Fraser  <simon.fraser@apple.com>
455
456         Share some more ScrollingTreeScrollingNode code
457         https://bugs.webkit.org/show_bug.cgi?id=133248
458
459         Reviewed by Sam Weinig.
460
461         Push scrollBy(), scrollByWithoutContentEdgeConstraints() and setScrollPosition()
462         down to ScrollingTreeFrameScrollingNode.
463         
464         This requires that scrollPosition() return the right thing for each class, so make
465         it virtual. Future patches will reduce the confusion between the committed scroll
466         position and the one derived from layers.
467
468         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
469         (WebCore::ScrollingTreeFrameScrollingNode::scrollBy):
470         (WebCore::ScrollingTreeFrameScrollingNode::scrollByWithoutContentEdgeConstraints):
471         (WebCore::ScrollingTreeFrameScrollingNode::setScrollPosition):
472         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
473         * page/scrolling/ScrollingTreeScrollingNode.h:
474         (WebCore::ScrollingTreeScrollingNode::scrollPosition):
475         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
476         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
477         (WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPosition): Deleted.
478         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollBy): Deleted.
479         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollByWithoutContentEdgeConstraints): Deleted.
480         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
481         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
482         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
483         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollBy):
484         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollByWithoutContentEdgeConstraints):
485         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollPosition):
486         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):
487         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollBy): Deleted.
488         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollByWithoutContentEdgeConstraints): Deleted.
489
490 2014-05-24  Chris Fleizach  <cfleizach@apple.com>
491
492         AX: fix coordinate mapping for iOS accessibility
493         https://bugs.webkit.org/show_bug.cgi?id=133188
494
495         Reviewed by Sam Weinig.
496
497         Make WebCore aware of the accessibility point/rect conversion methods.
498
499         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
500         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
501         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
502         * loader/EmptyClients.h:
503         * page/Chrome.cpp:
504         (WebCore::Chrome::accessibilityScreenToRootView):
505         (WebCore::Chrome::rootViewToAccessibilityScreen):
506         * page/Chrome.h:
507         * page/ChromeClient.h:
508         * platform/HostWindow.h:
509
510 2014-05-24  Zalan Bujtas  <zalan@apple.com>
511
512         Subpixel rendering: Non-compositing transforms with subpixel coordinates paint to wrong position.
513         https://bugs.webkit.org/show_bug.cgi?id=133184
514         <rdar://problem/16745606>
515
516         Reviewed by Simon Fraser.
517
518         Snapping relative negative coordinate values should produce the same position as if they were
519         positive absolute coordinates.
520         When a child box gets positioned off of its containers towards top/left, its relative coordinates
521         become negative. Pixel snapping those negative values should produce the same
522         final painting position as if the child box was fixed positioned with positive coordinates.
523         Since halfway values always round away from zero, negative and positive halfway values
524         produce opposite rounding direction.
525         This patch ensures that negative halfway values round to the direction as if they were positive.  
526
527         Test: fast/layers/hidpi-floor-negative-coordinate-values-to-maintain-rounding-direction.html
528
529         * platform/LayoutUnit.h:
530         (WebCore::roundToDevicePixel):
531         * rendering/RenderLayer.cpp:
532         (WebCore::RenderLayer::paintLayerByApplyingTransform):
533
534 2014-05-24  Frédéric Wang  <fred.wang@free.fr>
535
536         Use size variants and glyph assembly from the MATH data.
537         https://bugs.webkit.org/show_bug.cgi?id=130322
538
539         Reviewed by Chris Fleizach.
540
541         This patch modifies the RenderMathMLOperator code to use the MATH table
542         when one is provided in the current font on the <math> tag. More
543         precisely, the MathVariants table is used to draw a size variant or
544         a glyph assembly. The displaystyle attribute is not supported yet, so
545         for now large operators are always assumed to be in display style. The
546         MATH support does not work well with all platforms+fonts, so at the
547         moment the default font-family on the <math> is not changed.
548
549         Tests: mathml/opentype/large-operators-LatinModern.html
550                mathml/opentype/opentype-stretchy.html
551                mathml/opentype/vertical-LatinModern.html
552
553         * css/mathml.css: We only specify the default font-family on the math root, so that people can easily style the mathematics.
554         For now, old fonts without the MATH table are still used as the default.
555         (math):
556         (math, mfenced > *): Deleted.
557         (mo, mfenced): Deleted.
558         * platform/graphics/SimpleFontData.cpp: don't return the math data if the font is loading.
559         (WebCore::SimpleFontData::mathData):
560         * platform/graphics/opentype/OpenTypeMathData.cpp: update #ifdef so that disabling ENABLE_OPENTYPE_MATH won't lead to errors with unused parameters.
561         (WebCore::OpenTypeMathData::OpenTypeMathData):
562         (WebCore::OpenTypeMathData::getMathConstant):
563         (WebCore::OpenTypeMathData::getItalicCorrection):
564         (WebCore::OpenTypeMathData::getMathVariants):
565         * rendering/mathml/RenderMathMLOperator.cpp:
566         (WebCore::RenderMathMLOperator::boundsForGlyph):
567         (WebCore::RenderMathMLOperator::heightForGlyph):
568         (WebCore::RenderMathMLOperator::advanceForGlyph):
569         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): We handle preferred width of size variants.
570         (WebCore::RenderMathMLOperator::shouldAllowStretching): This function now only returns whether the operator will stretch and no longer has side effect.
571         (WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack): We add a function to convert from the MathVariant table data to the format supported by RenderMathMLOperator.
572         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator): We add a function to get the glyph that will be used for large operators in display style.
573         (WebCore::RenderMathMLOperator::findStretchyData): We make this function handle size variants.
574         (WebCore::RenderMathMLOperator::updateStyle): We handle size variants.
575         (WebCore::RenderMathMLOperator::paint): We handle size variants.
576         * rendering/mathml/RenderMathMLOperator.h:
577
578 2014-05-23  Tim Horton  <timothy_horton@apple.com>
579
580         REGRESSION (iOS WebKit2): requestAnimationFrame fires more than once between layer tree commits
581         https://bugs.webkit.org/show_bug.cgi?id=132794
582         <rdar://problem/16877909>
583
584         Reviewed by Simon Fraser.
585
586         Virtualize DisplayRefreshMonitor so that WebKit2 can implement its own DisplayRefreshMonitor for UI-side compositing views.
587         This allows the synchronization of requestAnimationFrame callbacks with UI-side compositing painting.
588
589         * WebCore.exp.in:
590         * WebCore.xcodeproj/project.pbxproj:
591         
592         * page/ChromeClient.h:
593         (WebCore::ChromeClient::graphicsLayerFactory):
594         (WebCore::ChromeClient::createDisplayRefreshMonitor):
595         * platform/graphics/DisplayRefreshMonitorFactory.h: Added.
596         * platform/graphics/GraphicsLayerUpdater.cpp:
597         (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
598         * platform/graphics/GraphicsLayerUpdater.h:
599         * rendering/RenderLayerCompositor.cpp:
600         (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
601         * rendering/RenderLayerCompositor.h:
602         Give the ChromeClient a chance to provide us with a custom DisplayRefreshMonitor.
603         If it does not, we'll fall back to making a DisplayRefreshMonitorMac or
604         DisplayRefreshMonitorIOS depending on the platform.
605
606         * dom/ScriptedAnimationController.cpp:
607         * dom/ScriptedAnimationController.h:
608         * platform/graphics/DisplayRefreshMonitor.cpp:
609         * platform/graphics/DisplayRefreshMonitor.h:
610         * platform/graphics/DisplayRefreshMonitorClient.cpp: Added.
611         * platform/graphics/DisplayRefreshMonitorClient.h: Added.
612         * platform/graphics/DisplayRefreshMonitorManager.cpp: Added.
613         * platform/graphics/DisplayRefreshMonitorManager.h: Added.
614         Split DisplayRefreshMonitor.cpp into one file per class.
615         Use references in a few places.
616         Remove some useless comments.
617
618         * platform/graphics/DisplayRefreshMonitor.cpp:
619         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
620         Use takeAny() and remove a FIXME about it not existing.
621
622         * platform/graphics/DisplayRefreshMonitorClient.cpp: Added.
623         (WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded):
624         Use an early return instead of having the whole function body in an if().
625
626         * platform/graphics/ios/DisplayRefreshMonitorIOS.h: Added.
627         * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
628         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
629         * platform/graphics/mac/DisplayRefreshMonitorMac.h: Added.
630         Virtualize DisplayRefreshMonitorIOS and DisplayRefreshMonitorMac,
631         and move things specific to each of them out of DisplayRefreshMonitor itself.
632
633 2014-05-23  Yusuke Suzuki  <utatane.tea@gmail.com>
634
635         CSS JIT: Apply backtracking optimization to adjacent backtracking
636         https://bugs.webkit.org/show_bug.cgi?id=132951
637
638         Reviewed by Benjamin Poulain.
639
640         Apply the backtracking optimization to the adjacent backtracking.
641         This optimization is already done for the descendant backtracking.
642         We apply this to the adjacent backtracking similarly.
643
644         Test: fast/selectors/backtracking-adjacent-optimized.html
645
646         * cssjit/SelectorCompiler.cpp:
647         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
648         (WebCore::SelectorCompiler::solveAdjacentBacktrackingActionForDirectAdjacent):
649         (WebCore::SelectorCompiler::solveBacktrackingAction):
650         (WebCore::SelectorCompiler::computeBacktrackingStartOffsetInChain):
651         (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
652         (WebCore::SelectorCompiler::computeBacktrackingWidthFromIndirectAdjacent):
653         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
654         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
655         (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
656         (WebCore::SelectorCompiler::computeBacktrackingStartHeightFromDescendant): Deleted.
657
658 2014-05-23  Alex Christensen  <achristensen@webkit.org>
659
660         Make CSS JIT run on ARM64.
661         https://bugs.webkit.org/show_bug.cgi?id=133156
662
663         Reviewed by Benjamin Poulain.
664
665         * cssjit/FunctionCall.h:
666         (WebCore::FunctionCall::saveAllocatedRegisters):
667         (WebCore::FunctionCall::restoreAllocatedRegisters):
668         Use StackAllocator's new push and pop functions to push and pop a vector instead of iterating it.
669         * cssjit/RegisterAllocator.h:
670         (WebCore::RegisterAllocator::reserveCalleeSavedRegisters):
671         (WebCore::RegisterAllocator::restoreCalleeSavedRegisters):
672         Return a vector of registers to allocate instead of doing the allocation to make the RegisterAllocator
673         not need to know about the StackAllocator and to use the new vector push and pop functions.
674         (WebCore::RegisterAllocator::~RegisterAllocator):
675         Store RegisterIDs instead of StackReferences to avoid needing to know about the stack.
676         * cssjit/SelectorCompiler.cpp:
677         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
678         Removed the requirement for assert to be disabled to print disassembly when debugging css jit.
679         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
680         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
681         Added to correctly push the link register and frame pointer.
682         This is required if the jit code calls a function on arm64 and helpful for debugging tools on x86_64.
683         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
684         Generate the prologue and epilogue which respectively push and pop
685         the link register, frame pointer, and callee saved registers if needed.
686         * cssjit/StackAllocator.h:
687         (WebCore::StackAllocator::push):
688         (WebCore::StackAllocator::pop):
689         Added new vector push and pop functions to use stp and ldb instructions on arm64.
690
691 2014-05-23  Jeremy Jones  <jeremyj@apple.com>
692
693         Hide fullscreen immediately when switching tabs.
694         https://bugs.webkit.org/show_bug.cgi?id=133239
695
696         Reviewed by Eric Carlson.
697
698         This change allows fullscreen to disappear immediately while still cleaning
699         up fullscreen normally.
700
701         * WebCore.exp.in:
702         * platform/ios/WebVideoFullscreenControllerAVKit.h:
703         renamed function to requestHideAndExitFullscreen
704
705         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
706         renamed function to requestHideAndExitFullscreen
707
708         (-[WebVideoFullscreenController requestHideAndExitFullscreen]):
709         rename of requestExitFullscreen that also hides.
710
711         (-[WebVideoFullscreenController requestExitFullscreen]): Deleted.
712         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: declare requestHideAndExitFullscreen()
713         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
714         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
715         this hides the window before requesting exitfullscreen from the model.
716
717 2014-05-23  Tim Horton  <timothy_horton@apple.com>
718
719         [iOS] WKPDFView should have a page indicator
720         https://bugs.webkit.org/show_bug.cgi?id=133109
721         <rdar://problem/16383003>
722
723         Reviewed by Anders Carlsson.
724
725         * English.lproj/Localizable.strings:
726
727 2014-05-23  Enrica Casucci  <enrica@apple.com>
728
729         Remove invalid ASSERT in wordRangeForPosition.
730         https://bugs.webkit.org/show_bug.cgi?id=133232
731
732         Reviewed by Ryosuke Niwa.
733
734         In WK2 for iOS this function is called on every selection change.
735         The selection could be set by Javascript in an element that is not visible.
736         In that case we won't be able to create a VisiblePosition therefore wordRangeForPosition
737         should not ASSERT that the VisiblePosition is not null, but rather
738         perform an early return if it is null.
739
740         * editing/VisibleUnits.cpp:
741         (WebCore::wordRangeFromPosition):
742
743 2014-05-23  Manuel Rego Casasnovas  <rego@igalia.com>
744
745         [CSS Grid Layout] Use gridRowCount() and gridColumnCount() when possible
746         https://bugs.webkit.org/show_bug.cgi?id=133213
747
748         Reviewed by Sergio Villar Senin.
749
750         Use gridRowCount() and gridColumnCount() instead of m_grid.size() and
751         m_grid[0].size() to make the code more descriptive and easier to
752         understand.
753
754         No new tests (No change in behavior).
755
756         * rendering/RenderGrid.cpp:
757         (WebCore::RenderGrid::growGrid):
758         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
759
760 2014-05-23  Alexey Proskuryakov  <ap@apple.com>
761
762         REGRESSION (r153917): Chart for the Category Explorer within Quicken Essentials
763         does not draw until you force a redraw
764         https://bugs.webkit.org/show_bug.cgi?id=133228
765         <rdar://problem/15221231>
766
767         Reviewed by Simon Fraser.
768
769         * platform/RuntimeApplicationChecks.cpp: (WebCore::applicationIsQuickenEssentials):
770         * platform/RuntimeApplicationChecks.h:
771         Added a check for Quicken Essentials.
772
773         * platform/mac/WidgetMac.mm: (WebCore::Widget::paint): Don't do an early return
774         for Quicken Essentials, it depends on drawing to update its layer.
775
776 2014-05-23  Mihnea Ovidenie  <mihnea@adobe.com>
777
778         REGRESSION(r169105): fast/regions/cssom/region-range-for-box-crash.html is more crashy than before
779         https://bugs.webkit.org/show_bug.cgi?id=133124
780
781         Reviewed by David Hyatt.
782
783         When adjusting the end points of a subtree selection in the case of a document
784         with named flows, we have to make sure that we pass the computed end
785         points to the visible selection algorithm only if the end points are
786         part of the same subtree, otherwise assume a selection clear behavior.
787
788         The test fast/regions/cssom/region-range-for-box-crash.html is used to
789         test this behavior.
790
791         * rendering/SelectionSubtreeRoot.cpp:
792         (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
793         (WebCore::SelectionSubtreeRoot::selectionStartEndPositions): Moved to header file.
794         * rendering/SelectionSubtreeRoot.h:
795         (WebCore::SelectionSubtreeRoot::selectionStartEndPositions):
796
797 2014-05-23  Jeremy Jones  <jeremyj@apple.com>
798
799         reset m_havePreparedToPlay when changing media engines.
800         https://bugs.webkit.org/show_bug.cgi?id=133199
801
802         Reviewed by Eric Carlson.
803
804         If a play request comes in before the media player is created, m_havePreparedToPlay
805         is set to true. But when the player is created, this prevents the new player from
806         getting the prepare call.
807
808         * html/HTMLMediaElement.cpp:
809         (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): set m_havePreparedToPlay false.
810
811 2014-05-23  Oliver Hunt  <oliver@apple.com>
812
813         Navigator object needs to have properties directly on the instance object
814         https://bugs.webkit.org/show_bug.cgi?id=133221
815
816         Reviewed by Mark Lam.
817
818         Flag the Navigator object as requiring properties to be on the instance
819         as there were a few compatibility issues when on the prototype.
820
821         * bindings/scripts/CodeGeneratorJS.pm:
822         (InterfaceRequiresAttributesOnInstance):
823
824 2014-05-23  Simon Fraser  <simon.fraser@apple.com>
825
826         Switch CSSGradientValue to use more references
827         https://bugs.webkit.org/show_bug.cgi?id=133206
828
829         Reviewed by Andreas Kling.
830
831         Switch from pointers to references in various places.
832
833         * css/CSSGradientValue.cpp:
834         (WebCore::CSSGradientValue::image):
835         (WebCore::CSSGradientValue::addStops):
836         (WebCore::positionFromValue):
837         (WebCore::CSSGradientValue::computeEndPoint):
838         (WebCore::CSSLinearGradientValue::createGradient):
839         (WebCore::CSSRadialGradientValue::resolveRadius):
840         (WebCore::CSSRadialGradientValue::createGradient):
841         * css/CSSGradientValue.h:
842
843 2014-05-23  Zalan Bujtas  <zalan@apple.com>
844
845         Subpixel rendering: Make webkit-box-shadow painting subpixel aware.
846         https://bugs.webkit.org/show_bug.cgi?id=133201
847         <rdar://problem/16072830>
848
849         Reviewed by Simon Fraser.
850
851         This patch enables webkit-box-shadow to be painted on a subpixel position. However, we
852         still truncate -webkit-box-shadow property values. Tracked here: http://webkit.org/b/133202
853
854         Test: fast/box-shadow/hidpi-webkit-box-shadow-subpixel-position.html
855
856         * platform/graphics/FloatRoundedRect.cpp:
857         (WebCore::FloatRoundedRect::inflateWithRadii): same as in from RoundedRect.
858         (WebCore::FloatRoundedRect::adjustRadii): same as in from RoundedRect.
859         * platform/graphics/FloatRoundedRect.h:
860         * rendering/RenderBoxModelObject.cpp:
861         (WebCore::RenderBoxModelObject::paintBoxShadow):
862
863 2014-05-22  peavo@outlook.com  <peavo@outlook.com>
864
865         [Curl] Crash when exceeding maximum cache limit.
866         https://bugs.webkit.org/show_bug.cgi?id=133185
867
868         Reviewed by Brent Fulgham.
869
870         When the maximum cache limit is exceeded, I get a crash.
871         This happens when deleting cache entries, because a reference to the url string object in the LRU list
872         is used as a parameter to invalidateCacheEntry(), when called from makeRoomForNewEntry().
873         When the string is removed from the LRU list in makeRoomForNewEntry(), the string is deleted.
874         Next, the string is accessed again to remove the url from the index, and we crash.
875
876         This can be fixed by removing the string from the LRU list after it is removed from the index.
877
878         Fixing the crash also revealed an infinite loop problem.
879         If the url for some reason only exist in the LRU list, and not in the index,
880         we will inifitely loop in makeRoomForNewEntry(), trying to remove this url from the cache, but never succeeding.
881         This can be fixed by removing the url from the LRU list, also when it's not in the index.
882
883         * platform/network/curl/CurlCacheManager.cpp:
884         (WebCore::CurlCacheManager::makeRoomForNewEntry): Avoid infinite loop by checking if there are more cache entries to remove.
885         (WebCore::CurlCacheManager::invalidateCacheEntry): Avoid crash and infinite loop by removing url from LRU list last.
886
887 2014-05-22  Simon Fraser  <simon.fraser@apple.com>
888
889         Make viewport units work in CSS gradients
890         https://bugs.webkit.org/show_bug.cgi?id=133204
891         <rdar://problem/17012259>
892         
893         Reviewed by Tim Horton.
894         
895         Make viewport percentage lengths work in gradients.
896
897         Test: fast/gradients/viewport-units-gradient.html
898
899         * css/CSSGradientValue.cpp:
900         (WebCore::CSSGradientValue::addStops):
901         (WebCore::CSSLinearGradientValue::createGradient):
902         (WebCore::CSSRadialGradientValue::createGradient):
903         * css/CSSGradientValue.h:
904
905 2014-05-22  Benjamin Poulain  <bpoulain@apple.com>
906
907         [iOS][WK2] Add support for minimal-ui viewports
908         https://bugs.webkit.org/show_bug.cgi?id=133162
909
910         Reviewed by Simon Fraser.
911
912         Add support for minimal-ui directly into the Viewport configuration.
913
914         ViewportConfiguration knows about two kinds of layout size in scrollview coordinates:
915         -normal size
916         -minimal ui size.
917
918         Initially, the page is initialized with resetMinimalUI() and starts with a normal layout.
919
920         At any time before the main resource is loaded, the Web page can update its viewport meta tag
921         to include minimal-ui. The viewport configuration is updated immediately to reflect the minimal-ui
922         layout size. Any layout after that takes minimal-ui into account.
923
924         * WebCore.exp.in:
925         * css/LengthFunctions.cpp:
926         (WebCore::minimumValueForLength):
927         (WebCore::floatValueForLength):
928         * css/StyleResolver.cpp:
929         (WebCore::StyleResolver::viewportPercentageValue):
930         * dom/ViewportArguments.h:
931         (WebCore::ViewportArguments::operator==):
932         * page/FrameView.cpp:
933         (WebCore::FrameView::setViewportSizeForCSSViewportUnits):
934         (WebCore::FrameView::viewportSizeForCSSViewportUnits):
935         (WebCore::FrameView::setViewportSize): Deleted.
936         (WebCore::FrameView::viewportSize): Deleted.
937         * page/FrameView.h:
938         * page/ViewportConfiguration.cpp:
939         (WebCore::ViewportConfiguration::ViewportConfiguration):
940         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
941         (WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI):
942         (WebCore::ViewportConfiguration::activeMinimumLayoutSizeInScrollViewCoordinates):
943         (WebCore::ViewportConfiguration::resetMinimalUI):
944         (WebCore::ViewportConfiguration::pageWillRenderFirstFrame):
945         (WebCore::ViewportConfiguration::initialScale):
946         (WebCore::ViewportConfiguration::minimumScale):
947         (WebCore::ViewportConfiguration::updateConfiguration):
948         (WebCore::ViewportConfiguration::layoutWidth):
949         (WebCore::ViewportConfiguration::layoutHeight):
950         (WebCore::ViewportConfiguration::description):
951         * page/ViewportConfiguration.h:
952         (WebCore::ViewportConfiguration::minimumLayoutSizeForMinimalUI):
953         (WebCore::ViewportConfiguration::usesMinimalUI):
954         * rendering/RenderView.cpp:
955         (WebCore::RenderView::viewportSizeForCSSViewportUnits):
956         (WebCore::RenderView::viewportSize): Deleted.
957         * rendering/RenderView.h:
958
959 2014-05-22  Ryosuke Niwa  <rniwa@webkit.org>
960
961         Can't type in status in facebook.com on iOS Safari because keyboard disappears
962         https://bugs.webkit.org/show_bug.cgi?id=133196
963
964         Reviewed by Geoffrey Garen.
965
966         Fixed the bug by rolling out r156252.
967
968         When the user taps on the status on facebook.com, the page focuses a textarea,
969         which is then made momentarily invisible by setting display:none.
970         The page then removes display:none later and expects the textarea to be still focused.
971
972         With r156252, the focus is removed after the page sets display:none and the keyboard disappears.
973         Since the focus is never reset on the textarea, the user can never type in anything.
974
975         The specification may need to change here given that this (rather odd) behavior/expectation exists
976         on one of the most popular websites on the Web.
977
978         * dom/Document.cpp:
979         (WebCore::Document::Document):
980         (WebCore::Document::recalcStyle):
981         (WebCore::Document::updateLayout):
982         (WebCore::Document::resetHiddenFocusElementSoon): Deleted.
983         (WebCore::Document::resetHiddenFocusElementTimer): Deleted.
984         * dom/Document.h:
985
986 2014-05-22  Myles C. Maxfield  <mmaxfield@apple.com>
987
988         http/tests/security/xss-DENIED-xsl-document-redirect.xml fails with NetworkProcess
989         https://bugs.webkit.org/show_bug.cgi?id=132523
990
991         Reviewed by Alexey Proskuryakov.
992
993         We should not manufacture a response in the event of an error during a
994         synchronous XHR. In addition, this test removes two places that are
995         sensitive to such a manufactured response.
996
997         Updates test expectations.
998
999         * loader/DocumentThreadableLoader.cpp:
1000         (WebCore::DocumentThreadableLoader::loadRequest): Don't inspect a
1001         loader response if there is an error
1002         * platform/network/cf/ResourceHandleCFNet.cpp:
1003         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
1004         manufacture a response
1005         * platform/network/mac/ResourceHandleMac.mm:
1006         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
1007         manufacture a response
1008         * xml/XSLTProcessorLibxslt.cpp:
1009         (WebCore::docLoaderFunc): Only use the response's URL if no error
1010         occurred.
1011
1012 2014-05-22  Myles C. Maxfield  <litherum@gmail.com>
1013
1014         Unreviewed typo fix.
1015
1016         Reviewed by NOBODY.
1017
1018         No new tests.
1019
1020         * platform/graphics/mac/FontMac.mm:
1021         (WebCore::Font::dashesForIntersectionsWithRect): Accidentally said run.length() instead of glyphBuffer.size().
1022
1023 2014-05-22  Andreas Kling  <akling@apple.com>
1024
1025         [iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
1026         <https://webkit.org/b/133197>
1027         <rdar://problem/17011561>
1028
1029         Make releaseMemory() public so we can call it from the process-will-suspend callback.
1030
1031         Reviewed by Gavin Barraclough.
1032
1033         * WebCore.exp.in:
1034         * platform/MemoryPressureHandler.h:
1035
1036 2014-05-22  Andreas Kling  <akling@apple.com>
1037
1038         Hook up a setting for showing detailed logging during memory pressure relief.
1039         <https://webkit.org/b/133194>
1040
1041         Make the pressure relief logger opt-in. Also make it flush memory back to the
1042         OS (for both malloc and FastMalloc) to get more accurate numbers at each step.
1043
1044         Reviewed by Gavin Barraclough.
1045
1046         * WebCore.exp.in:
1047         * platform/MemoryPressureHandler.cpp:
1048         * platform/MemoryPressureHandler.h:
1049         (WebCore::MemoryPressureHandler::ReliefLogger::ReliefLogger):
1050         (WebCore::MemoryPressureHandler::ReliefLogger::~ReliefLogger):
1051         (WebCore::MemoryPressureHandler::ReliefLogger::setLoggingEnabled):
1052         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1053         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
1054
1055 2014-05-22  Brady Eidson  <beidson@apple.com>
1056
1057         Don't scan for phone numbers in editable regions
1058         <rdar://problem/16949846> and https://bugs.webkit.org/show_bug.cgi?id=133192
1059
1060         Reviewed by Enrica Casucci.
1061
1062         No new tests (Currently untested WK2-only feature)
1063
1064         * editing/Editor.cpp:
1065         (WebCore::Editor::scanRangeForTelephoneNumbers): Skip the range if the Node is editable.
1066
1067 2014-05-22  Jeremy Jones  <jeremyj@apple.com>
1068
1069         Captions layout incorrectly in fullscreen.
1070         https://bugs.webkit.org/show_bug.cgi?id=133175
1071
1072         Reviewed by Eric Carlson.
1073
1074         When doing layout for fullscreen, geometry should be absolute so it is not influenced
1075         by the rest of the page. This change adds style for CSSPropertyPosition, CSSPropertyLeft,
1076         and CSSPropertyTop.
1077
1078         * html/shadow/MediaControlElements.cpp:
1079         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1080         Refactor style changes into updateStyleForTextTrackRepresentation().
1081         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
1082         Refactor style changes into updateStyleForTextTrackRepresentation().
1083         (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation):
1084         Refactor style changes into updateStyleForTextTrackRepresentation().
1085         (WebCore::MediaControlTextTrackContainerElement::updateStyleForTextTrackRepresentation):
1086         Consolidate style changes here. Include the two existing and three new style changes.
1087         * html/shadow/MediaControlElements.h:
1088         Declare updateStyleForTextTrackRepresentation().
1089
1090 2014-05-22  Simon Fraser  <simon.fraser@apple.com>
1091
1092         REGRESSION (r155977): Very stuttery 3D css animation on jtechcommunications.com
1093         https://bugs.webkit.org/show_bug.cgi?id=133179
1094         <rdar://problem/16864666>
1095
1096         Reviewed by Dean Jackson.
1097
1098         Revert code added in r155977 to try to pick a good contentsScale for layers
1099         based on a root-relative transform. This resulted in pages with too much 
1100         backing store, and too many cases where layers repainted during animations,
1101         causing stutter.
1102
1103         * platform/graphics/ca/GraphicsLayerCA.cpp:
1104         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1105         (WebCore::GraphicsLayerCA::flushCompositingState):
1106         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
1107         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1108         (WebCore::GraphicsLayerCA::updateContentsOpaque):
1109         (WebCore::GraphicsLayerCA::updateAnimations):
1110         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
1111         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
1112         (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
1113         (WebCore::GraphicsLayerCA::updateContentsScale):
1114         (WebCore::clampedContentsScaleForScale): Deleted.
1115         (WebCore::maxScaleFromTransform): Deleted.
1116         (WebCore::GraphicsLayerCA::updateRootRelativeScale): Deleted.
1117         (WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact): Deleted.
1118         * platform/graphics/ca/GraphicsLayerCA.h:
1119
1120 2014-05-22  Martin Hock  <mhock@apple.com>
1121
1122         [iOS] Enable -apple-system- styled elements to respond to system font size changes.
1123         https://bugs.webkit.org/show_bug.cgi?id=133186
1124         <rdar://problem/16583782>
1125
1126         Reviewed by Enrica Casucci.
1127
1128         * WebCore.exp.in:
1129         * WebCore.xcodeproj/project.pbxproj:
1130         * rendering/RenderThemeIOS.h:
1131         * rendering/RenderThemeIOS.mm:
1132         (WebCore::_contentSizeCategory):
1133         (WebCore::RenderThemeIOS::contentSizeCategory):
1134         (WebCore::RenderThemeIOS::setContentSizeCategory):
1135
1136 2014-05-22  Jer Noble  <jer.noble@apple.com>
1137
1138         [MSE] Stored samples are not freed when SourceBuffer is removed from MediaSource
1139         https://bugs.webkit.org/show_bug.cgi?id=133174
1140
1141         Reviewed by Eric Carlson.
1142
1143         Clear out stored MediaSamples from SourceBuffer's TrackBuffer storage when
1144         aborting loading. Also, report the memory cost of those samples, so that the
1145         SourceBuffer will be GCd more readily.
1146
1147         Add a mechanism for reporting the size of a MediaSample:
1148         * Modules/mediasource/SourceBuffer.h:
1149         * platform/MediaSample.h:
1150         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1151         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
1152
1153         Track the memory usage of a SampleMap when adding and removing samples, as well
1154         as allowing the SampleMap to be cleared wholesale:
1155         * Modules/mediasource/SampleMap.cpp:
1156         (WebCore::SampleMap::clear): Release all stored MediaSamples.
1157         (WebCore::SampleMap::addSample): Update m_totalSize.
1158         (WebCore::SampleMap::removeSample): Ditto.
1159         * Modules/mediasource/SampleMap.h:
1160         (WebCore::SampleMap::SampleMap): Initialize m_totalSize.
1161         (WebCore::SampleMap::sizeInBytes): Simple accessor.
1162
1163         Clear the stored samples when loading is aborted, and report the extra memory
1164         cost
1165         * Modules/mediasource/SourceBuffer.cpp:
1166         (WebCore::SourceBuffer::SourceBuffer): Initialize m_reportedExtraMemoryCost.
1167         (WebCore::SourceBuffer::removedFromMediaSource): Clear all stored samples.
1168         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Call reportExtraMemoryCost().
1169         (WebCore::SourceBuffer::reportExtraMemoryCost): Inform the vm of the new
1170             extra memory cost incurred by the object.
1171
1172 2014-05-22  Enrica Casucci  <enrica@apple.com>
1173
1174         REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com.
1175         https://bugs.webkit.org/show_bug.cgi?id=133183
1176         <rdar://problem/17004207>
1177
1178         Reviewed by Geoff Garen.
1179
1180         Adding new export.
1181
1182         * WebCore.exp.in:
1183
1184 2014-05-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1185
1186         REGRESSION(r163712): [GTK] Misspelling and grammar underline marks are no longer drawn
1187         https://bugs.webkit.org/show_bug.cgi?id=133047
1188
1189         Reviewed by Darin Adler.
1190
1191         Change two conditions changed by mistake in r163712.
1192
1193         * editing/TextCheckingHelper.cpp:
1194         (WebCore::findMisspellings): Enter the loop also when wordStart is 0.
1195         (WebCore::TextCheckingHelper::findFirstMisspelling): Skip the work
1196         when the text is a single character. Also reworked it to use a for
1197         loop to improve the readability.
1198
1199 2014-05-22  Piotr Grad  <p.grad@samsung.com>
1200
1201         Video is resumed with old playback rate.
1202         https://bugs.webkit.org/show_bug.cgi?id=132905
1203
1204         Reviewed by Philippe Normand.
1205
1206         Setting '0' playback rate is causing pipeline to pause.
1207         GStreamer player impl. exposed this information to upper layers but it should not.
1208         Solution is to hidden such situation behind m_playbackRatePause flag.
1209
1210         Test: media/video-paused-0-rate.html
1211
1212         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1213         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1214         (WebCore::MediaPlayerPrivateGStreamer::play):
1215         (WebCore::MediaPlayerPrivateGStreamer::pause):
1216         (WebCore::MediaPlayerPrivateGStreamer::doSeek):
1217         (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
1218         (WebCore::MediaPlayerPrivateGStreamer::paused):
1219         (WebCore::MediaPlayerPrivateGStreamer::setRate):
1220         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
1221         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1222
1223 2014-05-22  Antti Koivisto  <antti@apple.com>
1224
1225         Text markers don't paint on simple lines
1226         https://bugs.webkit.org/show_bug.cgi?id=133177
1227
1228         Reviewed by Anders Carlsson.
1229         
1230         Marker painting code does not yet support simple lines.
1231
1232         Tests: fast/text/mark-matches-rendering-simple-lines.html
1233                fast/text/mark-matches-rendering.html
1234
1235         * dom/DocumentMarkerController.cpp:
1236         (WebCore::DocumentMarkerController::addMarker):
1237         
1238             Force text blocks with markers to use line boxes.
1239
1240         * testing/Internals.cpp:
1241         (WebCore::Internals::setMarkedTextMatchesAreHighlighted):
1242         
1243             Expose this so we can make reftests for marker rendering.
1244
1245         * testing/Internals.h:
1246         * testing/Internals.idl:
1247
1248 2014-05-22  Manuel Rego Casasnovas  <rego@igalia.com>
1249
1250         [CSS Grid Layout] Guard RenderObject::isRenderGrid() method
1251         https://bugs.webkit.org/show_bug.cgi?id=132380
1252
1253         Reviewed by Benjamin Poulain.
1254
1255         Guard RenderObject::isRenderGrid() method under ENABLE_CSS_GRID_LAYOUT compilation flag.
1256
1257         * rendering/RenderBox.cpp:
1258         (WebCore::RenderBox::computeLogicalWidthInRegion):
1259         * rendering/RenderObject.h:
1260
1261 2014-05-21  Antti Koivisto  <antti@apple.com>
1262
1263         REGRESSION(r167870): Crash in simple line layout code with :after
1264         https://bugs.webkit.org/show_bug.cgi?id=133155
1265         <rdar://problem/16977696>
1266
1267         Reviewed by Darin Adler.
1268         
1269         Fix https://bugs.webkit.org/show_bug.cgi?id=132241 in a safer way.
1270         The underline behavior is tested by the existing fast/text/simple-lines-hover-underline.html
1271
1272         Test: fast/text/simple-lines-hover-after.html
1273
1274         * rendering/RenderBlock.cpp:
1275         (WebCore::RenderBlock::invalidateLineLayoutPath): Deleted.
1276
1277             Move to RenderBlockFlow.
1278
1279         * rendering/RenderBlock.h:
1280         (WebCore::RenderBlock::invalidateLineLayoutPath):
1281         * rendering/RenderBlockFlow.cpp:
1282         (WebCore::RenderBlockFlow::styleDidChange):
1283         
1284             Invalidate layout if style changes in a manner that makes us ineligible to use the simple line layout path.
1285
1286         (WebCore::RenderBlockFlow::invalidateLineLayoutPath):
1287         
1288             Drop the simple line layout on path invalidation if it exists. It may not be valid anymore.
1289             Also invalidate the layout if this happens so we'll reconstruct the lines later.
1290
1291         (WebCore::RenderBlockFlow::simpleLineLayout): Deleted.
1292         (WebCore::RenderBlockFlow::ensureLineBoxes):
1293         (WebCore::RenderBlockFlow::createLineBoxes): Deleted.
1294                 
1295             Revert some of the changes made it r167870.
1296
1297         * rendering/RenderBlockFlow.h:
1298         (WebCore::RenderBlockFlow::simpleLineLayout):
1299         
1300             Add strong validity assert.
1301
1302 2014-05-21  Eric Carlson  <eric.carlson@apple.com>
1303
1304         [iOS] two media control button strings are not localized
1305         https://bugs.webkit.org/show_bug.cgi?id=133160
1306
1307         Reviewed by Geoffrey Garen.
1308
1309         * English.lproj/mediaControlsLocalizedStrings.js:
1310
1311 2014-05-21  Dean Jackson  <dino@apple.com>
1312
1313         [iOS] Update some of the media controls buttons to be bigger
1314         https://bugs.webkit.org/show_bug.cgi?id=133158
1315         <rdar://problem/16475828>
1316
1317         Reviewed by Simon Fraser.
1318
1319         The buttons in the media controls on iOS are too small
1320         to be comfortably pressed. Make them the size of the controls
1321         panel and the expected iOS button size (44x44px).
1322
1323         The artwork for the buttons now includes the padding. I've
1324         added a file from which you can edit the artwork, then
1325         copy it into the CSS (because editing directly in CSS is
1326         a huge pain).
1327
1328         So far just the play/pause and fullscreen button have been
1329         updated. There will be a follow-up patch to fix the remaining
1330         buttons and the scrubber.
1331
1332         * Modules/mediacontrols/assets-apple-iOS.svg: Added.
1333         * Modules/mediacontrols/mediaControlsiOS.css:
1334         (audio::-webkit-media-controls-panel):
1335         (audio::-webkit-media-controls-fullscreen-button):
1336         (audio::-webkit-media-controls-play-button):
1337         (audio::-webkit-media-controls-play-button:active):
1338         (audio::-webkit-media-controls-play-button.paused):
1339         (audio::-webkit-media-controls-fullscreen-button:active):
1340         (@media only screen and (-webkit-min-device-pixel-ratio: 2)): Deleted.
1341
1342 2014-05-21  Zalan Bujtas  <zalan@apple.com>
1343
1344         Garbage when rubber-banding at the right edge of a page zoomed to non-integral scale.
1345         https://bugs.webkit.org/show_bug.cgi?id=133139
1346         <rdar://problem/16503353>
1347
1348         Reviewed by Simon Fraser.
1349
1350         Do not pixel align the root content layer. The alignment code expands the graphics's layer size
1351         which makes the right and bottom tiles bigger than the content.
1352         Painting the body's background color produces pixel cracks, because the content can not
1353         fill the expanded tiles completely.
1354
1355         Not testable.
1356
1357         * platform/graphics/GraphicsLayerClient.h:
1358         (WebCore::GraphicsLayerClient::needsPixelAligment):
1359         * platform/graphics/ca/GraphicsLayerCA.cpp:
1360         (WebCore::GraphicsLayerCA::updateGeometry):
1361         (WebCore::GraphicsLayerCA::computePixelAlignment):
1362         * platform/graphics/ca/mac/TileGrid.mm:
1363         (WebCore::TileGrid::rectForTileIndex):
1364         * rendering/RenderLayerBacking.cpp:
1365         (WebCore::RenderLayerBacking::needsPixelAligment):
1366         * rendering/RenderLayerBacking.h:
1367
1368 2014-05-21  Radu Stavila  <stavila@adobe.com>
1369
1370         REGRESSION (r168046): Invalid layout in WebCore::RenderBox::containingBlockLogicalWidthForPositioned
1371         https://bugs.webkit.org/show_bug.cgi?id=132933
1372
1373         Reviewed by Darin Adler.
1374
1375         Invalid layout is performed when calling containingBlockLogicalWidthForPositioned for a RenderTableSection object.
1376
1377         Test: fast/multicol/newmulticol/table-section-crash.html
1378
1379         * rendering/RenderBox.cpp:
1380         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
1381
1382 2014-05-21  Simon Pena  <simon.pena@samsung.com>
1383
1384         [EFL] Ensure EGLOffScreenContext::initialize calls platformMakeCurrent on the surface
1385         https://bugs.webkit.org/show_bug.cgi?id=124832
1386
1387         Reviewed by Antonio Gomes.
1388
1389         The original code was only calling platformMakeCurrent when the
1390         GL_EXT_robustness extension is supported: the alternate code path
1391         would only create a context, but it wouldn't make that context
1392         current. This patch ensures platformMakeCurrent is also called for
1393         the alternate code path, and, if it fails to make the context
1394         current, will destroy the context. Effectively, this makes both
1395         code paths behave in the same way.
1396
1397         * platform/graphics/surfaces/egl/EGLContext.cpp:
1398         (WebCore::EGLOffScreenContext::initialize):
1399
1400 2014-05-20  Brent Fulgham  <bfulgham@apple.com>
1401
1402         [Mac] DataCues do not work properly when rewinding video
1403         https://bugs.webkit.org/show_bug.cgi?id=133138
1404         <rdar://problem/16979086>
1405
1406         Reviewed by Eric Carlson.
1407
1408         Make the TrackPrivateBase responsible for knowing if a type of track needs a non-zero
1409         startTimeVariance value.
1410
1411         Also, correct a bug in the equality test for DataCue objects.
1412
1413         * html/track/DataCue.cpp:
1414         (WebCore::DataCue::isEqual): Handle the JSValue data types consistently, so that we don't attempt
1415         to compare a JSNull against a default JSValue object.
1416         * html/track/InbandTextTrack.cpp:
1417         (WebCore::InbandTextTrack::startTimeVariance): Added.
1418         * html/track/InbandTextTrack.h:
1419         * html/track/TextTrack.cpp:
1420         (WebCore::TextTrack::hasCue): Use new startTimeVariance method location.
1421         * html/track/TextTrack.h:
1422         (WebCore::TextTrack::startTimeVariance): Added.
1423         * html/track/TextTrackCue.cpp:
1424         (WebCore::TextTrackCue::hasEquivalentStartTime): Use new startTimeVariance location.
1425         * html/track/TextTrackCue.h:
1426         (WebCore::TextTrackCue::startTimeVariance): Deleted.
1427         * html/track/TextTrackCueGeneric.h:
1428         * platform/graphics/TrackPrivateBase.h:
1429         (WebCore::TrackPrivateBase::startTimeVariance): Added.
1430         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
1431
1432 2014-05-20  Mark Hahnenberg  <mhahnenberg@apple.com>
1433
1434         Watchdog timer should be lazily allocated
1435         https://bugs.webkit.org/show_bug.cgi?id=133135
1436
1437         Reviewed by Geoffrey Garen.
1438
1439         No new tests.
1440
1441         We incur a noticeable amount of overhead on some benchmarks due to checking if the Watchdog ever fired. 
1442         There is no reason to do this checking if we never activated the Watchdog, which can only be done through 
1443         JSContextGroupSetExecutionTimeLimit or JSContextGroupClearExecutionTimeLimit. 
1444
1445         By allocating the Watchdog lazily on the VM we can avoid all of the associated overhead when we don't use 
1446         these two API functions (which is true of most clients).
1447
1448         * bindings/js/JSEventListener.cpp:
1449         (WebCore::JSEventListener::handleEvent):
1450         * bindings/js/WorkerScriptController.cpp:
1451         (WebCore::WorkerScriptController::evaluate):
1452         (WebCore::WorkerScriptController::scheduleExecutionTermination):
1453         (WebCore::WorkerScriptController::isExecutionTerminating):
1454
1455 2014-05-20  Dean Jackson  <dino@apple.com>
1456
1457         [Mac] Allow popup menus to override default appearance
1458         https://bugs.webkit.org/show_bug.cgi?id=133129
1459
1460         Reviewed by Tim Horton.
1461
1462         WebKitSystemInterface's WKPopupMenu has a flag to hide
1463         the arrows at the end of a popup-menu (e.g. <select>).
1464         Expose that via adding a hasDefaultAppearance flag to
1465         PopupMenuStyle, which then passes it on to WKSI.
1466
1467         * platform/PopupMenuStyle.h:
1468         (WebCore::PopupMenuStyle::PopupMenuStyle): New flag in constructor.
1469         (WebCore::PopupMenuStyle::hasDefaultAppearance): New flag.
1470         * platform/mac/WebCoreSystemInterface.h: wkPopupMenu signature has changed to accept
1471         the new flag.
1472         * platform/mac/WebCoreSystemInterface.mm: Ditto.
1473         * rendering/RenderMenuList.cpp:
1474         (RenderMenuList::itemStyle): Pass in true as default appearance when creating
1475         the PopupMenuStyle. We don't need it.
1476         (RenderMenuList::menuStyle): In this case we pass in the negated value of
1477         style().hasAppearance(), which indicates if we are overriding the built-in drawing.
1478         * rendering/RenderSearchField.cpp:
1479         (WebCore::RenderSearchField::menuStyle): Use true as the default value.
1480
1481 2014-05-20  Eric Carlson  <eric.carlson@apple.com>
1482
1483         [Mac] do not deactivate an audio session that has running I/O
1484         https://bugs.webkit.org/show_bug.cgi?id=133127
1485
1486         Reviewed by Jer Noble.
1487
1488         * page/Settings.h:
1489         (WebCore::Settings::setShouldManageAudioSessionCategory): Renamed from setShouldManageAudioSession.
1490         (WebCore::Settings::shouldManageAudioSessionCategory): Renamed from shouldManageAudioSession.
1491         (WebCore::Settings::setShouldManageAudioSession): Deleted.
1492         (WebCore::Settings::shouldManageAudioSession): Deleted.
1493
1494         * platform/audio/mac/MediaSessionManagerMac.cpp:
1495         (MediaSessionManager::updateSessionState): Don't deactivate the session if there are any
1496             Video or Audio sessions.
1497
1498         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1499         (WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus): Drive-by change to log errors 
1500             returned by -statusOfValueForKey:error: in debug builds.
1501
1502 2014-05-20  Beth Dakin  <bdakin@apple.com>
1503
1504         REGRESSION: All non-mainframe scrollbars don't paint after r169065
1505         https://bugs.webkit.org/show_bug.cgi?id=133132
1506         -and corresponding-
1507         <rdar://problem/16968850>
1508
1509         Reviewed by Geoff Garen.
1510
1511         We should not universally return true here. This feature will only work for 
1512         scrollbars with layers.
1513         * platform/ScrollableArea.h:
1514         * platform/Scrollbar.cpp:
1515         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
1516
1517 2014-05-20  Daniel Bates  <dabates@apple.com>
1518
1519         Element within flattened frame may update its scroll state during the layout phase of the wrong RenderView
1520         https://bugs.webkit.org/show_bug.cgi?id=133013
1521         <rdar://problem/16760154>
1522
1523         Reviewed by David Hyatt.
1524
1525         Fixes an issue where the scroll state of an element may be updated during the layout of the wrong
1526         RenderView. In particular, the scroll state of an element inside a CSS flex box in a flattened
1527         frame f is updated during the layout of the RenderView associated with the parent frame of f instead
1528         of during the layout of the RenderView associated with f.
1529
1530         The layout machinery assumes that the scroll state of each scrollable element is updated before the
1531         completion of layout for its associated RenderView. Currently we have logic to defer updating the scroll
1532         state of a scrollable element until completion of recursive layout. For a page with a flattened frame, we
1533         defer such updates until completion of layout for all RenderViews along the ancestor frame hierarchy of
1534         each flattened frame regardless of the RenderView associated with the element that originated the
1535         deferred scroll state request. Instead, only the RenderView associated with the element that deferred its
1536         scroll state update should dispatch the scroll state update.
1537
1538         Tests: fast/frames/flattening/scrollable-flexbox-inside-iframe-with-zero-height-and-needs-full-repaint-crash.html
1539                fast/frames/flattening/scrollable-flexbox-inside-iframe-with-zero-height-assertion-failure.html
1540
1541         * rendering/RenderBlock.cpp: Removed WTF::-prefix in typedef definition for ContinuationOutlineTableMap.
1542         (WebCore::UpdateScrollInfoAfterLayoutTransaction::UpdateScrollInfoAfterLayoutTransaction): Added; a struct
1543         that represents a RenderView v, nested transaction count, and a list of RenderBlocks in v that will need
1544         to have their scroll state updated.
1545         (WebCore::updateScrollInfoAfterLayoutTransactionStack): Added; returns the global stack of transactions.
1546         (WebCore::RenderBlock::willBeDestroyed): Call removeFromUpdateScrollInfoAfterLayoutTransaction(), which
1547         was formerly named as removeFromDelayedUpdateScrollInfoSet.
1548         (WebCore::currentUpdateScrollInfoAfterLayoutTransaction): Added; returns the top-most transaction in the
1549         global stack.
1550         (WebCore::RenderBlock::beginUpdateScrollInfoAfterLayoutTransaction): Modified as appropriate to make use
1551         of the global stack of transactions; formerly named startDelayUpdateScrollInfo.
1552         (WebCore::RenderBlock::endAndCommitUpdateScrollInfoAfterLayoutTransaction): Modified as appropriate to
1553         make use of the global stack of transactions; formerly named finishDelayUpdateScrollInfo.
1554         (WebCore::RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction): Modified as appropriate to make
1555         use of the global stack of transactions; formerly named removeFromDelayedUpdateScrollInfoSet.
1556         (WebCore::RenderBlock::updateScrollInfoAfterLayout): Modified as appropriate to make use of the global
1557         stack of transactions.
1558         (WebCore::RenderBlock::layout): Ditto.
1559         (WebCore::RenderBlock::startDelayUpdateScrollInfo): Deleted.
1560         (WebCore::RenderBlock::finishDelayUpdateScrollInfo): Deleted.
1561         (WebCore::RenderBlock::removeFromDelayedUpdateScrollInfoSet): Deleted.
1562         * rendering/RenderBlock.h:
1563         * rendering/RenderBlockFlow.cpp:
1564         (WebCore::RenderBlockFlow::willBeDestroyed): Call removeFromUpdateScrollInfoAfterLayoutTransaction(), which
1565         was formerly named removeFromDelayedUpdateScrollInfoSet.
1566         * rendering/RenderDeprecatedFlexibleBox.cpp:
1567         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): Call {begin, end}UpdateScrollInfoAfterLayoutTransaction(),
1568         which was formerly named {start, end}DelayUpdateScrollInfo.
1569         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): Ditto.
1570         * rendering/RenderFlexibleBox.cpp:
1571         (WebCore::RenderFlexibleBox::layoutBlock): Ditto.
1572
1573 2014-05-20  Beth Dakin  <bdakin@apple.com>
1574
1575         REGRESSION (r169065): Mountain Lion run-api-tests failures: ASSERTION FAILED: 
1576         Uncaught exception - -[NSRegularLegacyScrollerImp setPresentationValue:]: 
1577         unrecognized selector sent to instance 0x7ff51aa38000
1578         https://bugs.webkit.org/show_bug.cgi?id=133121
1579
1580         Reviewed by Tim Horton.
1581
1582         * platform/mac/ScrollbarThemeMac.mm:
1583         (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
1584
1585 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
1586
1587         REGRESSION (r169063) Fixed and sticky nodes misplaced on scrolling sometimes
1588         https://bugs.webkit.org/show_bug.cgi?id=133106
1589         <rdar://problem/16967648>
1590
1591         Reviewed by Sam Weinig.
1592
1593         Fix regression from r169063. That commit removed scrolledContentsLayers from 
1594         frame scrolling nodes, but they do actually use them.
1595         
1596         So put them back; not in the base class, because they have a somewhat different
1597         meaning for overflow scrolling and frame scrolling.
1598
1599         * WebCore.exp.in:
1600         * page/scrolling/AsyncScrollingCoordinator.cpp:
1601         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
1602         (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
1603         * page/scrolling/AsyncScrollingCoordinator.h:
1604         * page/scrolling/ScrollingCoordinator.h:
1605         (WebCore::ScrollingCoordinator::updateFrameScrollingNode):
1606         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
1607         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
1608         (WebCore::ScrollingStateFrameScrollingNode::setScrolledContentsLayer):
1609         * page/scrolling/ScrollingStateFrameScrollingNode.h:
1610         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1611         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
1612         * rendering/RenderLayerCompositor.cpp:
1613         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1614
1615 2014-05-20  Radu Stavila  <stavila@adobe.com>
1616
1617         REGRESSION: [CSS Regions] Content flowed directly into the flow thread that ends up in the second region is not properly repainted
1618         https://bugs.webkit.org/show_bug.cgi?id=133111
1619
1620         Reviewed by David Hyatt.
1621
1622         When computing the repaint rect of an element flowed into a flow thread, if the element is flowed directly into
1623         the flow thread (meaning its containing block is the flow thread itself), the region's position within the flow
1624         must no longer be taken into consideration, because its already included in the element's |topLeft|.
1625
1626         Test: fast/regions/hover-element-flowed-second-region.html
1627
1628         * rendering/RenderBox.cpp:
1629         (WebCore::RenderBox::computeRectForRepaint):
1630
1631 2014-05-20  Alex Christensen  <achristensen@webkit.org>
1632
1633         Fix web timing assertion failure.
1634         https://bugs.webkit.org/show_bug.cgi?id=133094
1635         <rdar://problem/16966032>
1636
1637         Reviewed by Alexey Proskuryakov.
1638
1639         * platform/network/mac/ResourceHandleMac.mm:
1640         (WebCore::ResourceHandle::getConnectionTimingData):
1641         Set requestStart and responseStart to 0 instead of -1 to match the 
1642         ResourceLoadTiming constructor and prevent the assertion failure in
1643         PerformanceTiming::responseStart.
1644
1645 2014-05-20  Prashant Hiremath  <hiremathprashants@gmail.com>
1646
1647         Only set title on SVG documents
1648         https://bugs.webkit.org/show_bug.cgi?id=133068
1649
1650         Reviewed by Dirk Schulze.
1651
1652         Test: svg/custom/html_document_set_title.html
1653
1654         * svg/SVGTitleElement.cpp:
1655         (WebCore::SVGTitleElement::insertedInto):
1656         (WebCore::SVGTitleElement::removedFrom):
1657         (WebCore::SVGTitleElement::childrenChanged):
1658
1659 2014-05-20  peavo@outlook.com  <peavo@outlook.com>
1660
1661         [Curl] Invalid content in cache file, causes broken rendering.
1662         https://bugs.webkit.org/show_bug.cgi?id=133069
1663
1664         Reviewed by Brent Fulgham.
1665
1666         When data for a url is received as multiple parts, the cache file for the url is truncated when opened for writing,
1667         and will only contain the last part of data received.
1668         This is fixed by only opening the file once, and close it after all data has been received.
1669
1670         * platform/network/curl/CurlCacheEntry.cpp:
1671         (WebCore::CurlCacheEntry::CurlCacheEntry): Initialize cache file handle member.
1672         (WebCore::CurlCacheEntry::~CurlCacheEntry): Close cache file.
1673         (WebCore::CurlCacheEntry::saveCachedData): Only open cache file once to avoid truncating.
1674         (WebCore::CurlCacheEntry::didFail): Close cache file.
1675         (WebCore::CurlCacheEntry::didFinishLoading): Ditto.
1676         (WebCore::CurlCacheEntry::openContentFile): Added method to open cache file.
1677         (WebCore::CurlCacheEntry::closeContentFile): Added method to close cache file.
1678         * platform/network/curl/CurlCacheEntry.h: Added file handle member, and methods to open and close cache file.
1679
1680 2014-05-20  Radu Stavila  <stavila@adobe.com>
1681
1682         [CSS Regions] Block incorrectly sized when containing an unsplittable box
1683         https://bugs.webkit.org/show_bug.cgi?id=132601
1684
1685         Reviewed by Antti Koivisto.
1686
1687         When laying out elements in a region, when an inline element is encountered
1688         the size of its parent must not be increased beyond the bottom of the current region,
1689         unless if its the last region. This will ensure that the next sibling of the
1690         inline element is correctly laid out at the top of the next region, instead
1691         of leaving an empty space equal to the height of the overflow, as it did until now.
1692
1693         Tests: fast/regions/inline-block-inside-anonymous-overflow.html
1694                fast/regions/inline-block-overflow.html
1695
1696         * rendering/RenderBlockFlow.cpp:
1697         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
1698         (WebCore::RenderBlockFlow::hasNextPage):
1699         * rendering/RenderBlockFlow.h:
1700         * rendering/RenderBlockLineLayout.cpp:
1701         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
1702         (WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
1703         (WebCore::RenderBlockFlow::determineStartPosition):
1704         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
1705
1706 2014-05-20  Mihnea Ovidenie  <mihnea@adobe.com>
1707
1708         [CSS Regions] Crash while painting block selection gaps in regions
1709         https://bugs.webkit.org/show_bug.cgi?id=132720
1710
1711         Reviewed by David Hyatt.
1712
1713         The fix for WebKit bug https://bugs.webkit.org/show_bug.cgi?id=131511
1714         allowed selection highlight to match the DOM selection when the start
1715         and end point of the selection were in different flow threads. In order
1716         to enable that, the selection was performed separately on view and
1717         render flow threads, considered selection subtrees.
1718
1719         However, the start and end points for each selection subtree were computed
1720         by means of Range class but it is not always possible to construct a valid
1721         Range from two pairs of RenderObjects and offsets.
1722
1723         This patch keeps the substrees approach but instead of storing the endpoints
1724         for each subtree in a Range and continuously extending the Range, it stores them
1725         using the already available SelectionSubtreeRoot class. After the end points are
1726         computed for each subtree and before processing the subtree selection, the end points
1727         are adjusted in a similar fashion as the one used in FrameSelection::updateAppearance(),
1728         to make sure we are passing the same expected information to the method implementing
1729         the visible selection processing.
1730
1731         Test: fast/regions/selection-gaps-paint-crash.html
1732
1733         * rendering/RenderView.cpp:
1734         (WebCore::RenderView::splitSelectionBetweenSubtrees):
1735         * rendering/SelectionSubtreeRoot.cpp:
1736         (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
1737         * rendering/SelectionSubtreeRoot.h:
1738         (WebCore::SelectionSubtreeRoot::selectionClear):
1739
1740 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
1741
1742         Scrolling pages with large TiledBacking content layers creates way too many tiles
1743         https://bugs.webkit.org/show_bug.cgi?id=133101
1744
1745         Reviewed by Tim Horton.
1746
1747         Fix the GraphicsLayerCA::adjustTiledLayerVisibleRect() logic to avoid making giant rects if the old
1748         and new visible rects don't overlap.
1749
1750         * platform/graphics/TiledBacking.h:
1751         * platform/graphics/ca/GraphicsLayerCA.cpp:
1752         (WebCore::GraphicsLayerCA::adjustTiledLayerVisibleRect):
1753         * platform/graphics/ca/mac/TileController.h:
1754
1755 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
1756
1757         Correctly maintain the "isInWindow" state for all TiledBackings
1758         https://bugs.webkit.org/show_bug.cgi?id=133095
1759
1760         Reviewed by Tim Horton.
1761         
1762         We never updated the "isInWindow" state for TiledBacking that wasn't the RenderView's
1763         backing. Fix it by having RenderLayerCompositor::setIsInWindow() recurse through all
1764         layers (if necessary), updating their state. Also set the state on newly created
1765         TiledBackings.
1766
1767         * rendering/RenderLayerCompositor.cpp:
1768         (WebCore::RenderLayerCompositor::layerTiledBackingUsageChanged):
1769         (WebCore::RenderLayerCompositor::setIsInWindowForLayerIncludingDescendants):
1770         (WebCore::RenderLayerCompositor::setIsInWindow):
1771         (WebCore::RenderLayerCompositor::pageTiledBacking): Deleted.
1772         * rendering/RenderLayerCompositor.h:
1773
1774 2014-05-19  Dean Jackson  <dino@apple.com>
1775
1776         [iOS] Use status display for live streams
1777         https://bugs.webkit.org/show_bug.cgi?id=133097
1778
1779         Reviewed by Sam Weinig.
1780
1781         Follow-on from https://bugs.webkit.org/show_bug.cgi?id=131390
1782         Allow the iOS controls to use the status display field.
1783
1784         * Modules/mediacontrols/mediaControlsiOS.js:
1785         (ControllerIOS.prototype.configureInlineControls): Live streams should
1786         not have a timeline or rewind button.
1787
1788 2014-05-19  Myles C. Maxfield  <litherum@gmail.com>
1789
1790         Text decorations do not contribute to visual overflow
1791         https://bugs.webkit.org/show_bug.cgi?id=132773
1792
1793         Reviewed by Antti Koivisto.
1794
1795         This patch creates a function, visualOverflowForDecorations, which computes
1796         how much visual overflow to add around a text box due to text decorations. Most of the time,
1797         text decorations are fully contained within the text box, so the result is usually 0.
1798
1799         This function exists within style/InlineTextBoxStyle.cpp, which is an added file. This is
1800         so that it can be called from setLogicalWidthForTextRun() inside RenderBlockLineLayout.cpp
1801         and from RenderStyle::changeAffectsVisualOverflow(). The former case passes in the full
1802         InlineTextBox and the latter case just passes in a RenderStyle (because the InlineTextBox
1803         is unavailable.)
1804
1805         This patch also modifies RenderTableSection::spannedColumns() to fix an off-by-one error
1806         that was causing table borders to not be drawn when they existed right on the edge of
1807         a repaint rect.
1808
1809         Tests: fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect.html
1810         Tests: fast/repaint/border-collapse-table-off-by-one-expected.html
1811
1812         * WebCore.vcxproj/WebCore.vcxproj: Adding reference to new InlineTextBoxStyle.cpp file
1813         * WebCore.vcxproj/WebCore.vcxproj.filters: Adding reference to new InlineTextBoxStyle files
1814         * WebCore.xcodeproj/project.pbxproj: Adding reference to new InlineTextBoxStyle files
1815         * rendering/InlineTextBox.cpp:
1816         (WebCore::computeUnderlineOffset): Moved to InlineTextBox.cpp
1817         (WebCore::getWavyStrokeParameters): Moved to InlineTextBox.cpp
1818         (WebCore::InlineTextBox::paintDecoration): Update to use newly refactored functions
1819         * rendering/RenderBlockLineLayout.cpp:
1820         (WebCore::setLogicalWidthForTextRun): Call visualOverflowForDecorations()
1821         * rendering/RenderTableSection.cpp:
1822         * rendering/RenderTableSelection.cpp: Fix off-by-one error when the boundary of a repaint
1823         rect lies exactly on top of a table column position
1824         * rendering/style/RenderStyle.cpp:
1825         (WebCore::RenderStyle::changeAffectsVisualOverflow): Inspects shadows and text decorations
1826         (WebCore::RenderStyle::changeRequiresLayout): Calls changeAffectsVisualOverflow()
1827         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline): Moved code from here
1828         to changeAffectsVisualOverflow().
1829         * rendering/style/RenderStyle.h: Function signature
1830         * style/InlineTextBoxStyle.cpp: Added.
1831         (WebCore::computeUnderlineOffset): Moved from InlineTextBox.cpp
1832         (WebCore::getWavyStrokeParameters): Moved from InlineTextBox.cpp
1833         (WebCore::extendIntToFloat): Convenience function for dealing with the fact that
1834         underline bounding boxes use floats and GlyphOverflow uses ints
1835         (WebCore::visualOverflowForDecorations): Given
1836         vertical overflow bounds, possibly extend those to include location of
1837         decorations.
1838         * style/InlineTextBoxStyle.h: Added. Function signatures.
1839         (WebCore::textDecorationStrokeThickness): Refactored from InlineTextBox.cpp
1840         (WebCore::wavyOffsetFromDecoration): Refactored from InlineTextBox.cpp
1841         * platform/graphics/Font.h:
1842         (WebCore::GlyphOverflow::isEmpty): Convenience function
1843         (WebCore::GlyphOverflow::extendTo): Convenience function
1844
1845 2014-05-19  Alex Christensen  <achristensen@webkit.org>
1846
1847         Unreviewed build fix after r169082
1848
1849         * platform/network/ResourceHandle.h:
1850         Added NSDictionary declaration.
1851
1852 2014-05-19  Beth Dakin  <bdakin@apple.com>
1853
1854         REGRESSION: Standalone images need to take topContentInset into account
1855         https://bugs.webkit.org/show_bug.cgi?id=133092
1856         -and corresponding-
1857         <rdar://problem/16945791>
1858
1859         Reviewed by Darin Adler.
1860
1861         The FrameView’s size is accurate in terms of the NSWindow size, but that is not 
1862         really what the ImageDocument code is looking for here. The ImageDocument wants to 
1863         know the size of the unobscured viewport area. We should use visibleSize() for 
1864         that.
1865         * html/ImageDocument.cpp:
1866         (WebCore::ImageDocument::scale):
1867         (WebCore::ImageDocument::imageFitsInWindow):
1868         (WebCore::ImageDocument::imageClicked):
1869
1870 2014-05-19  Alex Christensen  <achristensen@webkit.org>
1871
1872         Collect web timing data on iOS.
1873         https://bugs.webkit.org/show_bug.cgi?id=133075
1874
1875         Reviewed by Sam Weinig.
1876
1877         * platform/network/ResourceHandle.h:
1878         Added setCollectsTimingData wrapper and getConnectionTimingData declarations.
1879         getConnectionTimingData with a dictionary parameter is a private helper function.
1880         * platform/network/cf/ResourceHandleCFNet.cpp:
1881         (WebCore::ResourceHandle::start):
1882         Call setCollectsTimingData wrapper when creating a connection to ensure that timing data is collected.
1883         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
1884         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveResponseCallback):
1885         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
1886         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1887         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
1888         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
1889         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
1890         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
1891         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
1892         Pass the CFURLConnectionRef to didReceiveResponse to get timing data from.
1893         * platform/network/mac/ResourceHandleMac.mm:
1894         (WebCore::ResourceHandle::getConnectionTimingData):
1895         Moved from getTimingData to compile regardless of using CFNetwork and added wrapper with CFDictionaryRef.
1896         (WebCore::ResourceHandle::setCollectsTimingData):
1897         Added wrapper to call objc function from c++.
1898         (WebCore::ResourceHandle::getTimingData):
1899         Renamed to getConnectionTimingData.
1900         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
1901         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
1902         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1903         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
1904         Updated function name from getTimingData to getConnectionTimingData.
1905
1906 2014-05-19  Chris Fleizach  <cfleizach@apple.com>
1907
1908         AX: VoiceOver sees the WebArea out of order when topContentInset is used
1909         https://bugs.webkit.org/show_bug.cgi?id=133091
1910
1911         Reviewed by Simon Fraser.
1912
1913         Modify the scroll view's frame so that it recognizes the content inset.
1914         This is needed so that when VoiceOver sorts elements to create an ordering,
1915         the web area is not ordered at the top of the screen.
1916
1917         Test: platform/mac-wk2/accessibility/content-inset-scrollview-frame.html
1918
1919         * accessibility/AccessibilityScrollView.cpp:
1920         (WebCore::AccessibilityScrollView::elementRect):
1921
1922 2014-05-19  Beth Dakin  <bdakin@apple.com>
1923
1924         Scrollbars display incorrectly after switching between fast and slow scrolling 
1925         mode, affects Find and real sites
1926         https://bugs.webkit.org/show_bug.cgi?id=133077
1927         -and corresponding-
1928         <rdar://problem/16888608>
1929
1930         Reviewed by Tim Horton.
1931
1932         We should always return true here when updating on the secondary thread is 
1933         supported. It does not need to be gated on whether we are actively taking 
1934         advantage of that support at this moment.
1935         * platform/Scrollbar.cpp:
1936         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
1937
1938         Always update the presentationValue whenever we update the doubleValue just to 
1939         keep them in sync.
1940         * platform/mac/ScrollbarThemeMac.mm:
1941         (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
1942
1943 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
1944
1945         Split scrolling tree ScrollingNodes into FrameScrollingNodes and OverflowScrollingNodes
1946         https://bugs.webkit.org/show_bug.cgi?id=133022
1947
1948         Reviewed by Sam Weinig.
1949
1950         In both the scrolling state tree and the scrolling tree, split the "scrolling nodes"
1951         into FrameScrolling and OverflowScrolling nodes.
1952         
1953         Move what was the "viewportSize" property onto the base class for the scrolling
1954         nodes, calling it "scrollableAreaSize".
1955         
1956         Make minimum/maximumScrollPosition() virtual so we can share more code (and there
1957         is more code sharing to be done in future).
1958
1959         * Configurations/WebCore.xcconfig: Remove ScrollingStateScrollingNodeMac.mm and ScrollingTreeScrollingNodeMac.mm
1960         from the list, using #ifdefs in the file instead.
1961         * WebCore.exp.in: Lots of exports.
1962         * WebCore.xcodeproj/project.pbxproj: New files.
1963         * page/scrolling/AsyncScrollingCoordinator.cpp:
1964         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
1965         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
1966         (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
1967         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
1968         (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
1969         (WebCore::AsyncScrollingCoordinator::updateScrollingNode): Deleted.
1970         (WebCore::AsyncScrollingCoordinator::setScrollbarPaintersFromScrollbarsForNode): Deleted.
1971         This tiny function didn't need to exist.
1972         * page/scrolling/AsyncScrollingCoordinator.h:
1973         * page/scrolling/ScrollingCoordinator.h:
1974         (WebCore::ScrollingCoordinator::updateFrameScrollingNode):
1975         (WebCore::ScrollingCoordinator::updateOverflowScrollingNode):
1976         (WebCore::ScrollingCoordinator::updateScrollingNode): Deleted.
1977         * page/scrolling/ScrollingStateFrameScrollingNode.cpp: Copied from Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp.
1978         (WebCore::ScrollingStateFrameScrollingNode::create):
1979         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
1980         (WebCore::ScrollingStateFrameScrollingNode::~ScrollingStateFrameScrollingNode):
1981         (WebCore::ScrollingStateFrameScrollingNode::clone):
1982         (WebCore::ScrollingStateFrameScrollingNode::setFrameScaleFactor):
1983         (WebCore::ScrollingStateFrameScrollingNode::setNonFastScrollableRegion):
1984         (WebCore::ScrollingStateFrameScrollingNode::setWheelEventHandlerCount):
1985         (WebCore::ScrollingStateFrameScrollingNode::setSynchronousScrollingReasons):
1986         (WebCore::ScrollingStateFrameScrollingNode::setScrollBehaviorForFixedElements):
1987         (WebCore::ScrollingStateFrameScrollingNode::setHeaderHeight):
1988         (WebCore::ScrollingStateFrameScrollingNode::setFooterHeight):
1989         (WebCore::ScrollingStateFrameScrollingNode::setTopContentInset):
1990         (WebCore::ScrollingStateFrameScrollingNode::setCounterScrollingLayer):
1991         (WebCore::ScrollingStateFrameScrollingNode::setInsetClipLayer):
1992         (WebCore::ScrollingStateFrameScrollingNode::setContentShadowLayer):
1993         (WebCore::ScrollingStateFrameScrollingNode::setHeaderLayer):
1994         (WebCore::ScrollingStateFrameScrollingNode::setFooterLayer):
1995         (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars):
1996         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
1997         * page/scrolling/ScrollingStateFrameScrollingNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h.
1998         * page/scrolling/ScrollingStateNode.h:
1999         (WebCore::LayerRepresentation::layerID):
2000         (WebCore::ScrollingStateNode::isFrameScrollingNode):
2001         (WebCore::ScrollingStateNode::isOverflowScrollingNode):
2002         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp: Added.
2003         (WebCore::ScrollingStateOverflowScrollingNode::create):
2004         (WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
2005         (WebCore::ScrollingStateOverflowScrollingNode::~ScrollingStateOverflowScrollingNode):
2006         (WebCore::ScrollingStateOverflowScrollingNode::clone):
2007         (WebCore::ScrollingStateOverflowScrollingNode::setScrolledContentsLayer):
2008         (WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):
2009         * page/scrolling/ScrollingStateOverflowScrollingNode.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingStateScrollingNodeMac.mm.
2010         (WebCore::ScrollingStateOverflowScrollingNode::scrolledContentsLayer):
2011         * page/scrolling/ScrollingStateScrollingNode.cpp:
2012         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2013         (WebCore::ScrollingStateScrollingNode::setScrollableAreaSize):
2014         (WebCore::ScrollingStateScrollingNode::setTotalContentsSize):
2015         (WebCore::ScrollingStateScrollingNode::dumpProperties):
2016         (WebCore::ScrollingStateScrollingNode::create): Deleted.
2017         (WebCore::ScrollingStateScrollingNode::clone): Deleted.
2018         (WebCore::ScrollingStateScrollingNode::setViewportSize): Deleted.
2019         (WebCore::ScrollingStateScrollingNode::setFrameScaleFactor): Deleted.
2020         (WebCore::ScrollingStateScrollingNode::setNonFastScrollableRegion): Deleted.
2021         (WebCore::ScrollingStateScrollingNode::setWheelEventHandlerCount): Deleted.
2022         (WebCore::ScrollingStateScrollingNode::setSynchronousScrollingReasons): Deleted.
2023         (WebCore::ScrollingStateScrollingNode::setScrollBehaviorForFixedElements): Deleted.
2024         (WebCore::ScrollingStateScrollingNode::setHeaderHeight): Deleted.
2025         (WebCore::ScrollingStateScrollingNode::setFooterHeight): Deleted.
2026         (WebCore::ScrollingStateScrollingNode::setTopContentInset): Deleted.
2027         (WebCore::ScrollingStateScrollingNode::setScrolledContentsLayer): Deleted.
2028         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer): Deleted.
2029         (WebCore::ScrollingStateScrollingNode::setInsetClipLayer): Deleted.
2030         (WebCore::ScrollingStateScrollingNode::setContentShadowLayer): Deleted.
2031         (WebCore::ScrollingStateScrollingNode::setHeaderLayer): Deleted.
2032         (WebCore::ScrollingStateScrollingNode::setFooterLayer): Deleted.
2033         (WebCore::ScrollingStateScrollingNode::setScrollbarPaintersFromScrollbars): Deleted.
2034         * page/scrolling/ScrollingStateScrollingNode.h:
2035         (WebCore::ScrollingStateScrollingNode::scrollableAreaSize):
2036         (WebCore::ScrollingStateScrollingNode::totalContentsSize):
2037         * page/scrolling/ScrollingStateTree.cpp:
2038         (WebCore::ScrollingStateTree::attachNode):
2039         (WebCore::ScrollingStateTree::commit):
2040         * page/scrolling/ScrollingStateTree.h:
2041         (WebCore::ScrollingStateTree::rootStateNode):
2042         (WebCore::ScrollingStateTree::setRootStateNode):
2043         * page/scrolling/ScrollingTree.cpp:
2044         (WebCore::ScrollingTree::commitNewTreeState):
2045         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp: Added.
2046         (WebCore::ScrollingTreeFrameScrollingNode::ScrollingTreeFrameScrollingNode):
2047         (WebCore::ScrollingTreeFrameScrollingNode::~ScrollingTreeFrameScrollingNode):
2048         (WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren):
2049         * page/scrolling/ScrollingTreeFrameScrollingNode.h: Copied from Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h.
2050         (WebCore::ScrollingTreeFrameScrollingNode::updateLayersAfterDelegatedScroll):
2051         (WebCore::ScrollingTreeFrameScrollingNode::synchronousScrollingReasons):
2052         (WebCore::ScrollingTreeFrameScrollingNode::shouldUpdateScrollLayerPositionSynchronously):
2053         (WebCore::ScrollingTreeFrameScrollingNode::frameScaleFactor):
2054         (WebCore::ScrollingTreeFrameScrollingNode::headerHeight):
2055         (WebCore::ScrollingTreeFrameScrollingNode::footerHeight):
2056         (WebCore::ScrollingTreeFrameScrollingNode::topContentInset):
2057         (WebCore::ScrollingTreeFrameScrollingNode::scrollBehaviorForFixedElements):
2058         * page/scrolling/ScrollingTreeNode.h:
2059         (WebCore::ScrollingTreeNode::isFrameScrollingNode):
2060         (WebCore::ScrollingTreeNode::isOverflowScrollingNode):
2061         * page/scrolling/ScrollingTreeOverflowScrollingNode.cpp: Copied from Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h.
2062         (WebCore::ScrollingTreeOverflowScrollingNode::ScrollingTreeOverflowScrollingNode):
2063         (WebCore::ScrollingTreeOverflowScrollingNode::~ScrollingTreeOverflowScrollingNode):
2064         * page/scrolling/ScrollingTreeOverflowScrollingNode.h: Copied from Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h.
2065         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2066         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
2067         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
2068         (WebCore::ScrollingTreeScrollingNode::updateAfterChildren):
2069         (WebCore::ScrollingTreeScrollingNode::setScrollPosition):
2070         (WebCore::ScrollingTreeScrollingNode::setScrollPositionWithoutContentEdgeConstraints):
2071         (WebCore::ScrollingTreeScrollingNode::minimumScrollPosition):
2072         (WebCore::ScrollingTreeScrollingNode::maximumScrollPosition):
2073         * page/scrolling/ScrollingTreeScrollingNode.h:
2074         (WebCore::ScrollingTreeScrollingNode::scrollableAreaSize):
2075         (WebCore::ScrollingTreeScrollingNode::totalContentsSize):
2076         (WebCore::ScrollingTreeScrollingNode::totalContentsSizeForRubberBand):
2077         (WebCore::ScrollingTreeScrollingNode::setTotalContentsSizeForRubberBand):
2078         (WebCore::ScrollingTreeScrollingNode::synchronousScrollingReasons): Deleted.
2079         (WebCore::ScrollingTreeScrollingNode::shouldUpdateScrollLayerPositionSynchronously): Deleted.
2080         (WebCore::ScrollingTreeScrollingNode::viewportSize): Deleted.
2081         (WebCore::ScrollingTreeScrollingNode::frameScaleFactor): Deleted.
2082         (WebCore::ScrollingTreeScrollingNode::headerHeight): Deleted.
2083         (WebCore::ScrollingTreeScrollingNode::footerHeight): Deleted.
2084         (WebCore::ScrollingTreeScrollingNode::scrollBehaviorForFixedElements): Deleted.
2085         (WebCore::ScrollingTreeScrollingNode::topContentInset): Deleted.
2086         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
2087         (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode):
2088         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h: Renamed from Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h.
2089         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollLayer):
2090         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: Renamed from Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm.
2091         (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
2092         (WebCore::ScrollingTreeFrameScrollingNodeIOS::ScrollingTreeFrameScrollingNodeIOS):
2093         (WebCore::ScrollingTreeFrameScrollingNodeIOS::~ScrollingTreeFrameScrollingNodeIOS):
2094         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateBeforeChildren):
2095         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateAfterChildren):
2096         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollPosition):
2097         (WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPosition):
2098         (WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):
2099         (WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollLayerPosition):
2100         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterViewportChange):
2101         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterDelegatedScroll):
2102         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
2103         (WebCore::ScrollingTreeFrameScrollingNodeIOS::minimumScrollPosition):
2104         (WebCore::ScrollingTreeFrameScrollingNodeIOS::maximumScrollPosition):
2105         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollBy):
2106         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollByWithoutContentEdgeConstraints):
2107         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2108         (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode):
2109         * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm: Renamed from Source/WebCore/page/scrolling/mac/ScrollingStateScrollingNodeMac.mm.
2110         (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars):
2111         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Renamed from Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.h.
2112         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: Renamed from Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm.
2113         (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
2114         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
2115         (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac):
2116         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
2117         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateAfterChildren):
2118         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
2119         (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsHorizontalStretching):
2120         (WebCore::ScrollingTreeFrameScrollingNodeMac::allowsVerticalStretching):
2121         (WebCore::ScrollingTreeFrameScrollingNodeMac::stretchAmount):
2122         (WebCore::ScrollingTreeFrameScrollingNodeMac::pinnedInDirection):
2123         (WebCore::ScrollingTreeFrameScrollingNodeMac::canScrollHorizontally):
2124         (WebCore::ScrollingTreeFrameScrollingNodeMac::canScrollVertically):
2125         (WebCore::ScrollingTreeFrameScrollingNodeMac::shouldRubberBandInDirection):
2126         (WebCore::ScrollingTreeFrameScrollingNodeMac::absoluteScrollPosition):
2127         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollBy):
2128         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollByWithoutContentEdgeConstraints):
2129         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer):
2130         (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer):
2131         (WebCore::ScrollingTreeFrameScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary):
2132         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollPosition):
2133         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):
2134         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
2135         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
2136         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateLayersAfterViewportChange):
2137         (WebCore::ScrollingTreeFrameScrollingNodeMac::minimumScrollPosition):
2138         (WebCore::ScrollingTreeFrameScrollingNodeMac::maximumScrollPosition):
2139         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollBy):
2140         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollByWithoutContentEdgeConstraints):
2141         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateMainFramePinState):
2142         (WebCore::ScrollingTreeFrameScrollingNodeMac::logExposedUnfilledArea):
2143         (WebCore::logThreadedScrollingMode):
2144         (WebCore::logWheelEventHandlerCountChanged):
2145         * rendering/RenderLayerCompositor.cpp:
2146         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
2147
2148 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
2149
2150         Images missing sometimes with composited clipping layers
2151         https://bugs.webkit.org/show_bug.cgi?id=133065
2152         <rdar://problem/15224559>
2153
2154         Reviewed by Beth Dakin.
2155         
2156         When support for solid colors on layers was added, a layer was considered a candidate
2157         for the solid color optimization without regard to whether it had descendent layers
2158         with "paintsIntoCompositedAncestor" requirements.
2159         
2160         Fix hasVisibleNonCompositingDescendantLayers(), renaming it to isPaintDestinationForDescendentLayers()
2161         and having it take into account whether descendent layers need to paint into an
2162         ancestor.
2163         
2164         Also, this test has to happen after those descendent layers have had their
2165         compositing state updated, so move the isSimpleContainerCompositingLayer() to
2166         a new updateAfterDescendents() function which is called from the various
2167         places we do compositing-udpate-tree-walks.
2168
2169         Test: compositing/backing/solid-color-with-paints-into-ancestor.html
2170
2171         * rendering/RenderLayerBacking.cpp:
2172         (WebCore::RenderLayerBacking::updateGeometry):
2173         (WebCore::RenderLayerBacking::updateAfterDescendents):
2174         (WebCore::RenderLayerBacking::paintsChildren):
2175         (WebCore::compositedWithOwnBackingStore):
2176         (WebCore::descendentLayerPaintsIntoAncestor):
2177         (WebCore::RenderLayerBacking::isPaintDestinationForDescendentLayers):
2178         (WebCore::hasVisibleNonCompositingDescendant): Deleted.
2179         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers): Deleted.
2180         * rendering/RenderLayerBacking.h:
2181         * rendering/RenderLayerCompositor.cpp:
2182         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2183         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
2184         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
2185
2186 2014-05-19  Zalan Bujtas  <zalan@apple.com>
2187
2188         REGRESSION (r133351, sub-pixel layout): Right-to-left block with text-overflow: ellipsis truncates prematurely (breaks facebook.com Hebrew UI)
2189         https://bugs.webkit.org/show_bug.cgi?id=112227
2190
2191         Reviewed by Maciej Stachowiak.
2192
2193         This patch removes unnecessary integral snapping of inlines at layout time.
2194
2195         The general rule of thumb of using round/floor/ceil at layout time is to not use them.
2196  
2197         When some computed values (x, y, width, height) get snapped during layout, while others don't,
2198         intersecting/measuring mismatches could occur and they could end up producing visual artifacts such as truncations.
2199         This patch also enables iframe content to be positioned on odd device pixel positions on retina displays.
2200         
2201         Tests: fast/frames/hidpi-position-iframe-on-device-pixel.html
2202                fast/inline/hidpi-rtl-text-does-not-fit-line-and-gets-cut-off.html
2203
2204         * rendering/RenderBlock.h:
2205         (WebCore::RenderBlock::logicalLeftOffsetForLine):
2206         (WebCore::RenderBlock::pixelSnappedLogicalLeftOffsetForLine): Deleted.
2207         (WebCore::RenderBlock::pixelSnappedLogicalRightOffsetForLine): Deleted.
2208         * rendering/RenderBlockLineLayout.cpp:
2209         (WebCore::updateLogicalInlinePositions):
2210         (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
2211         (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
2212
2213 2014-05-18  Chris Fleizach  <cfleizach@apple.com>
2214
2215         AX: iOS: using AXAttributeCacheEnabler is too slow for every accessibilityElementAtIndex:
2216         https://bugs.webkit.org/show_bug.cgi?id=133043
2217
2218         Reviewed by Mario Sanchez Prada.
2219
2220         iOS Accessibility code tries to improve performance by caching attributes when accessing
2221         elements through the platform API. However, those API calls can be used very frequently when 
2222         iterating elements. Creating the AXAttributeCacheEnabler object and tearing it down is proving
2223         to be the hottest code path in samples for accessibility access.
2224
2225         We need to move the logic for enabling/disabling the attribute cache to a level that can make
2226         a more informed decision about when to enable/disable.
2227
2228         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2229         (-[WebAccessibilityObjectWrapper enableAttributeCaching]):
2230         (-[WebAccessibilityObjectWrapper disableAttributeCaching]):
2231         (-[WebAccessibilityObjectWrapper accessibilityElementCount]):
2232         (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
2233         (-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
2234
2235 2014-05-18  Simon Fraser  <simon.fraser@apple.com>
2236
2237         Use RenderStyle& in more places in RenderLayerBacking
2238         https://bugs.webkit.org/show_bug.cgi?id=133061
2239
2240         Reviewed by Andreas Kling.
2241
2242         Convert several member functions to use references to RenderStyle rather
2243         than pointers. Move canCreateTiledImage() higher in the file (no code
2244         changes). Other minor cleanup.
2245
2246         * rendering/RenderLayerBacking.cpp:
2247         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2248         (WebCore::RenderLayerBacking::updateOpacity):
2249         (WebCore::RenderLayerBacking::updateTransform):
2250         (WebCore::RenderLayerBacking::updateFilters):
2251         (WebCore::RenderLayerBacking::updateBlendMode):
2252         (WebCore::RenderLayerBacking::updateGeometry):
2253         (WebCore::hasBoxDecorations):
2254         (WebCore::canCreateTiledImage):
2255         (WebCore::hasBoxDecorationsOrBackgroundImage):
2256         (WebCore::hasPerspectiveOrPreserves3D):
2257         (WebCore::supportsDirectBoxDecorationsComposition):
2258         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
2259         (WebCore::RenderLayerBacking::contentChanged):
2260         (WebCore::RenderLayerBacking::startTransition):
2261         * rendering/RenderLayerBacking.h:
2262
2263 2014-05-17  Simon Fraser  <simon.fraser@apple.com>
2264
2265         Rename some RenderLayerBacking member functions
2266         https://bugs.webkit.org/show_bug.cgi?id=133030
2267
2268         Reviewed by Sam Weinig.
2269
2270         Remove "GraphicsLayer" from some member function names on RenderLayerBacking.
2271         
2272         No behavior change.
2273
2274         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2275         (WebCore::AVFWrapper::createAVCFVideoLayer):
2276         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2277         (WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
2278         * rendering/RenderLayer.cpp:
2279         (WebCore::RenderLayer::calculateClipRects):
2280         * rendering/RenderLayerBacking.cpp:
2281         (WebCore::RenderLayerBacking::updateAfterLayout):
2282         (WebCore::RenderLayerBacking::updateConfiguration):
2283         (WebCore::RenderLayerBacking::updateGeometry):
2284         (WebCore::RenderLayerBacking::contentChanged):
2285         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
2286         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Deleted.
2287         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Deleted.
2288         * rendering/RenderLayerBacking.h:
2289         * rendering/RenderLayerCompositor.cpp:
2290         (WebCore::RenderLayerCompositor::updateLayerCompositingState):
2291         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2292         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
2293         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
2294         (WebCore::RenderLayerCompositor::attachRootLayer):
2295
2296 2014-05-19  Antti Koivisto  <antti@apple.com>
2297
2298         Fix assertion failure with simple line layout debug borders enabled.
2299
2300         Rubber-stamped by Andreas Kling.
2301
2302         * rendering/SimpleLineLayoutFunctions.cpp:
2303         (WebCore::SimpleLineLayout::paintDebugBorders): We shoudn't try to paint empty rects.
2304
2305 2014-05-18  Andreas Kling  <akling@apple.com>
2306
2307         Reduce constructor copypasta in RenderText and RenderElement.
2308         <https://webkit.org/b/133056>
2309
2310         Use delegating constructors to remove duplicated initializer lists
2311         from the constructors of RenderText and RenderElement.
2312
2313         Reviewed by Anders Carlsson.
2314
2315         * rendering/RenderElement.cpp:
2316         (WebCore::RenderElement::RenderElement):
2317         * rendering/RenderElement.h:
2318         * rendering/RenderText.cpp:
2319         (WebCore::RenderText::RenderText):
2320         * rendering/RenderText.h:
2321
2322 2014-05-18  Brent Fulgham  <bfulgham@apple.com>
2323
2324         Crash during scroll when latched
2325         https://bugs.webkit.org/show_bug.cgi?id=133064
2326
2327         Reviewed by Simon Fraser.
2328
2329         * page/mac/EventHandlerMac.mm:
2330         (WebCore::EventHandler::platformPrepareForWheelEvents): Prevent dereference of NULL
2331         wheelEventTarget argument.
2332
2333 2014-05-18  Svetlana Redchenko  <redchenko@yandex-team.ru>
2334
2335         Input ::selection pseudo class does not work leading to hidden selection
2336         https://bugs.webkit.org/show_bug.cgi?id=38943
2337
2338         Reviewed by Darin Adler.
2339
2340         Test: fast/selectors/input-with-selection-pseudo-element.html
2341
2342         When text is selected inside input element, it should change the
2343         color and background color according to the ::selection pseudo element.
2344
2345         * rendering/RenderObject.cpp:
2346         (WebCore::RenderObject::selectionBackgroundColor):
2347         (WebCore::RenderObject::selectionColor):
2348         (WebCore::RenderObject::selectionPseudoStyle):
2349         * rendering/RenderObject.h:
2350
2351 2014-05-18  Sam Weinig  <sam@webkit.org>
2352
2353         [WebKit2] Implement ScriptMessageHandlers
2354         https://bugs.webkit.org/show_bug.cgi?id=133053
2355
2356         Reviewed by Anders Carlsson.
2357
2358         * DerivedSources.make:
2359         * WebCore.exp.in:
2360         * WebCore.xcodeproj/project.pbxproj:
2361         * bindings/js/JSDOMWindowBase.cpp:
2362         (WebCore::JSDOMWindowBase::finishCreation):
2363         * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp: Added.
2364         (WebCore::JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate):
2365         * page/DOMWindow.cpp:
2366         (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
2367         (WebCore::DOMWindow::webkitNamespace):
2368         * page/DOMWindow.h:
2369         * page/UserContentController.cpp:
2370         (WebCore::UserContentController::addUserMessageHandlerDescriptor):
2371         (WebCore::UserContentController::removeUserMessageHandlerDescriptor):
2372         * page/UserContentController.h:
2373         (WebCore::UserContentController::userMessageHandlerDescriptors):
2374         * page/UserMessageHandler.cpp: Added.
2375         (WebCore::UserMessageHandler::UserMessageHandler):
2376         (WebCore::UserMessageHandler::~UserMessageHandler):
2377         (WebCore::UserMessageHandler::postMessage):
2378         (WebCore::UserMessageHandler::name):
2379         (WebCore::UserMessageHandler::world):
2380         * page/UserMessageHandler.h: Added.
2381         (WebCore::UserMessageHandler::create):
2382         * page/UserMessageHandler.idl: Added.
2383         * page/UserMessageHandlerDescriptor.cpp: Added.
2384         (WebCore::UserMessageHandlerDescriptor::UserMessageHandlerDescriptor):
2385         (WebCore::UserMessageHandlerDescriptor::~UserMessageHandlerDescriptor):
2386         (WebCore::UserMessageHandlerDescriptor::name):
2387         (WebCore::UserMessageHandlerDescriptor::world):
2388         * page/UserMessageHandlerDescriptor.h: Added.
2389         (WebCore::UserMessageHandlerDescriptor::Client::~Client):
2390         (WebCore::UserMessageHandlerDescriptor::create):
2391         (WebCore::UserMessageHandlerDescriptor::client):
2392         * page/UserMessageHandlerDescriptorTypes.h: Added.
2393         * page/UserMessageHandlersNamespace.cpp: Added.
2394         (WebCore::UserMessageHandlersNamespace::UserMessageHandlersNamespace):
2395         (WebCore::UserMessageHandlersNamespace::~UserMessageHandlersNamespace):
2396         (WebCore::UserMessageHandlersNamespace::handler):
2397         * page/UserMessageHandlersNamespace.h: Added.
2398         (WebCore::UserMessageHandlersNamespace::create):
2399         * page/UserMessageHandlersNamespace.idl: Added.
2400         * page/WebKitNamespace.cpp: Added.
2401         (WebCore::WebKitNamespace::WebKitNamespace):
2402         (WebCore::WebKitNamespace::~WebKitNamespace):
2403         (WebCore::WebKitNamespace::messageHandlers):
2404         * page/WebKitNamespace.h: Added.
2405         (WebCore::WebKitNamespace::create):
2406         * page/WebKitNamespace.idl: Added.
2407
2408 2014-05-18  Maciej Stachowiak  <mjs@apple.com>
2409
2410         REGRESSION (r156546): Default media controls are laid out incorrectly when media element is styled with direction:rtl
2411         https://bugs.webkit.org/show_bug.cgi?id=132531
2412         <rdar://problem/16806267>
2413         
2414         Reviewed by Mark Rowe.
2415
2416         This was already tested by the media/video-rtl.htm reftest, now unskipped.
2417
2418         * Modules/mediacontrols/mediaControlsApple.css:
2419         (audio::-webkit-media-controls-panel): Add missing direction: ltr
2420
2421 2014-05-18  Rik Cabanier  <cabanier@adobe.com>
2422
2423         support for navigator.hardwareConcurrency
2424         https://bugs.webkit.org/show_bug.cgi?id=132588
2425
2426         Reviewed by Filip Pizlo.
2427
2428         Added a new API that returns the number of CPU cores up to 8.
2429
2430         Test: fast/dom/navigator-hardwareConcurrency.html
2431
2432         * Configurations/FeatureDefines.xcconfig:
2433         * page/Navigator.cpp:
2434         (WebCore::Navigator::hardwareConcurrency):
2435         * page/Navigator.h:
2436         * page/Navigator.idl:
2437
2438 2014-05-18  Anders Carlsson  <andersca@apple.com>
2439
2440         Fix iOS build.
2441
2442         * WebCore.exp.in:
2443         Move UserContentController symbols to the right place.
2444
2445 2014-05-18  Jon Lee  <jonlee@apple.com>
2446
2447         Build fix for r169006.
2448
2449         Unreviewed.
2450
2451         * loader/ResourceLoader.h: Return didCreateQuickLookHandle() to public.
2452
2453 2014-05-18  Antti Koivisto  <antti@apple.com>
2454
2455         REGRESSION (r160259): text-combine glyphs are not rendered
2456         https://bugs.webkit.org/show_bug.cgi?id=127324
2457
2458         Reviewed by Andreas Kling.
2459         
2460         The original text gets overwritten by a change that is supposed to affect rendered text only.
2461         Fixed by giving the text update functions well-defined purposes.
2462
2463         Test: fast/text/text-combine-rendering.html
2464
2465         * rendering/RenderCombineText.cpp:
2466         (WebCore::RenderCombineText::styleDidChange):
2467         (WebCore::RenderCombineText::setRenderedText):
2468         (WebCore::RenderCombineText::combineText):
2469         (WebCore::RenderCombineText::setTextInternal): Deleted.
2470         * rendering/RenderCombineText.h:
2471         * rendering/RenderCounter.cpp:
2472         (WebCore::RenderCounter::computePreferredLogicalWidths):
2473         * rendering/RenderText.cpp:
2474         (WebCore::RenderText::setRenderedText):
2475         
2476             This function now updates the rendered text but does not change the original.
2477             Get the original text by calling originalText().
2478
2479         (WebCore::RenderText::setText):
2480         
2481             This the only place original text now changes.
2482
2483         (WebCore::RenderText::setTextInternal): Deleted.
2484         
2485             Renamed to setRenderedText.
2486
2487         * rendering/RenderText.h:
2488         * rendering/svg/RenderSVGInlineText.cpp:
2489         (WebCore::RenderSVGInlineText::setRenderedText):
2490         (WebCore::RenderSVGInlineText::setTextInternal): Deleted.
2491         * rendering/svg/RenderSVGInlineText.h:
2492
2493 2014-05-17  Maciej Stachowiak  <mjs@apple.com>
2494
2495         Don't attempt to update id or name for nodes that are already removed
2496         https://bugs.webkit.org/show_bug.cgi?id=133041
2497
2498         Reviewed by Sam Weinig.
2499
2500         Tests: fast/dom/remove-element-with-id-that-was-inserted-on-DOMNodeRemoved.html
2501                fast/dom/remove-element-with-name-that-was-inserted-on-DOMNodeRemoved.html
2502
2503         * dom/Element.cpp:
2504         (WebCore::Element::removedFrom): Skip updating ids and names for an element not
2505         in a treescope, as we already do for elements not in a document.
2506
2507 2014-05-17  Alexey Proskuryakov  <ap@apple.com>
2508
2509         REGRESSION (NetworkProcess): Trying to use appcache fallback crashes in ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
2510         https://bugs.webkit.org/show_bug.cgi?id=133007
2511         <rdar://problem/13702706>
2512
2513         appcache tests often fail on the Mac WebKit2 bot
2514         https://bugs.webkit.org/show_bug.cgi?id=82061
2515
2516         Reviewed by Maciej Stachowiak.
2517
2518         Covered by existing tests, which this patch enables.
2519
2520         * WebCore.exp.in: Export ResourceLoader::cancel(const ResourceError&). It used
2521         to be virtual, but marking subclasses final has resulted in the compiler calling
2522         it directly from WebKitLegacy framework. Seeing that no subclass overrides it,
2523         I then made it non-virtual.
2524         Also export ApplicationCacheHost functions that are now used from WebKit2.
2525
2526         * loader/ResourceLoader.h: Made the class abstract (as I didn't realize at first
2527         that it's always either a SubresourceLoader or a NetscapePlugInStreamLoader).
2528         Made ResourceHandleClient functions private, as they should never be called other
2529         than via a ResourceHandleClient pointer.
2530
2531         * loader/NetscapePlugInStreamLoader.h:
2532         * loader/SubresourceLoader.h:
2533         Marked these final.
2534
2535         * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSwitchToSubstituteResource):
2536         Added a function to be called when switching to a substitute resource. We still
2537         need a ResourceLoader at this point, as substitute resource will be delivered through
2538         it, but we don't want it to continue its current load.
2539
2540         * loader/appcache/ApplicationCacheHost.cpp:
2541         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
2542         Call the ResourceLoader function instead of using handle, which is null when
2543         using out of process networking.
2544
2545 2014-05-17  Andreas Kling  <akling@apple.com>
2546
2547         We shouldn't make a ScrollingThread on iOS.
2548         <https://webkit.org/b/133038>
2549         <rdar://problem/16947589>
2550
2551         Don't call ScrollingThred::dispatch() from the pressure relief
2552         code on iOS since that will end up instantiating a scrolling thread
2553         which we'd otherwise never have.
2554
2555         Reviewed by Sam Weinig.
2556
2557         * platform/MemoryPressureHandler.cpp:
2558         (WebCore::MemoryPressureHandler::releaseMemory):
2559
2560 2014-05-17  Piotr Grad  <p.grad@samsung.com>
2561
2562         Setting playback rate on video with media controller is not ignored.
2563         https://bugs.webkit.org/show_bug.cgi?id=129048
2564
2565         Reviewed by Jer Noble.
2566
2567         Replaced queries for m_playbackRate with effectivePlaybackRate()
2568         which includes media controller playback rate.
2569
2570         Test: media/video-controller-child-rate.html
2571
2572         * html/HTMLMediaElement.cpp:
2573         (WebCore::HTMLMediaElement::parseAttribute):
2574         * html/HTMLMediaElement.h:
2575
2576 2014-05-16  Anders Carlsson  <andersca@apple.com>
2577
2578         Expose WKUserScript as API
2579         https://bugs.webkit.org/show_bug.cgi?id=133017
2580         <rdar://problem/16948059>
2581
2582         Reviewed by Sam Weinig.
2583
2584         * WebCore.exp.in:
2585         Export symbols.
2586
2587         * WebCore.xcodeproj/project.pbxproj:
2588         Change UserContentController.h to be a private header.
2589
2590         * page/Page.cpp:
2591         (WebCore::Page::Page):
2592         Set m_userContentController from the page configuration and add it if it's not null.
2593
2594         * page/Page.h:
2595         Add UserContentController to PageClients.
2596
2597         * page/PageGroup.cpp:
2598         (WebCore::PageGroup::addPage):
2599         Only try to add a user content controller if the page doesn't already have one.
2600
2601         (WebCore::PageGroup::removePage):
2602         Only try to remove the user content controller if it's the group one.
2603
2604 2014-05-17  Andreas Kling  <akling@apple.com>
2605
2606         REGRESSION (r166422): All RenderBox objects grew 104 bytes from adding repaint timers.
2607         <https://webkit.org/b/133027>
2608         <rdar://problem/16867410>
2609
2610         Instead of storing a rarely-used repaint timer on every RenderBox, store one
2611         on the RenderView, and keep a hash set of renderers needing repaint.
2612
2613         Renderers get a flag tracking whether they have a pending lazy repaint.
2614         This way we can avoid hash lookups in the common case.
2615
2616         Also added a static assertion to catch RenderBox growing in the future.
2617
2618         Reviewed by Antti Koivisto.
2619
2620         * rendering/RenderBox.cpp:
2621         (WebCore::SameSizeAsRenderBox::~SameSizeAsRenderBox):
2622         (WebCore::RenderBox::RenderBox):
2623         (WebCore::RenderBox::~RenderBox):
2624         (WebCore::RenderBox::paintBoxDecorations):
2625         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2626         * rendering/RenderBox.h:
2627         * rendering/RenderElement.cpp:
2628         (WebCore::RenderElement::RenderElement):
2629         * rendering/RenderElement.h:
2630         (WebCore::RenderElement::setRenderBoxNeedsLazyRepaint):
2631         (WebCore::RenderElement::renderBoxNeedsLazyRepaint):
2632         * rendering/RenderView.cpp:
2633         (WebCore::RenderView::RenderView):
2634         (WebCore::RenderView::scheduleLazyRepaint):
2635         (WebCore::RenderView::unscheduleLazyRepaint):
2636         (WebCore::RenderView::lazyRepaintTimerFired):
2637         * rendering/RenderView.h:
2638
2639 2014-05-16  Jer Noble  <jer.noble@apple.com>
2640
2641         [Mac][MSE] setCurrentTime() goes down fastSeek path in MediaPlayerPrivateMediaSourceAVFObjC.
2642         https://bugs.webkit.org/show_bug.cgi?id=133023
2643
2644         Reviewed by Eric Carlson.
2645
2646         When seeking a MSE video, do not go down the fastSeekForMediaTime() path if the
2647         seek resulted from a setCurrentTime() call. The logic can lead to attempted seeks
2648         before buffered ranges.
2649
2650         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2651         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
2652         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
2653         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2654         (WebCore::MediaSourcePrivateAVFObjC::seekToTime):
2655
2656 2014-05-16  Benjamin Poulain  <bpoulain@apple.com>
2657
2658         [iOS] ScrollView::visibleContentRectInternal is bypassing the iOS code for unobscuredContentRect
2659         https://bugs.webkit.org/show_bug.cgi?id=133008
2660
2661         Reviewed by Simon Fraser.
2662
2663         * platform/ScrollView.cpp:
2664         (WebCore::ScrollView::visibleContentRectInternal):
2665         ScrollView::visibleContentRectInternal() was calling the internal implementation of visibleContentRect().
2666         That was skipping the iOS implementation and getting the framerect directly. That size is invalid on iOS
2667         when the exposed rect and unobscured rect are not the same.
2668
2669 2014-05-16  Jer Noble  <jer.noble@apple.com>
2670
2671         [Mac] naturalSize not updated when preload=metadata
2672         https://bugs.webkit.org/show_bug.cgi?id=132994
2673
2674         Reviewed by Eric Carlson.
2675
2676         Test: media/video-load-preload-metadata-naturalsize.html
2677
2678         When preload=metadata, we never create an AVPlayerItem, and therefore never receive a
2679         presentationSize KVO. When an AVAsset informs us that its tracks have changed, and there
2680         is no AVPlayerItem, recalculate presentation size based on the first video track's natural
2681         size.
2682
2683         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2684         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
2685         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2686         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
2687
2688 2014-05-16  Simon Fraser  <simon.fraser@apple.com>
2689
2690         Remove "region-based columns" prefs
2691         https://bugs.webkit.org/show_bug.cgi?id=133006
2692         <rdar://problem/16945824>
2693
2694         Reviewed by Dave Hyatt.
2695
2696         Remove "region-based columns" prefs and related code, since this is only
2697         way to render columns now.
2698
2699         * page/Settings.in:
2700
2701 2014-05-16  Antti Koivisto  <antti@apple.com>
2702
2703         Link search area for touch events is too large in some cases
2704         https://bugs.webkit.org/show_bug.cgi?id=132988
2705         <rdar://problem/16917843>
2706
2707         Reviewed by Simon Fraser.
2708
2709         * page/ios/FrameIOS.mm:
2710         (WebCore::Frame::qualifyingNodeAtViewportLocation):
2711         
2712             - Adjust the search area to screen ppi.
2713             - Remove cut-off at scale 1. This made us pick physically far-away elements when zoomed in.
2714             
2715         * platform/PlatformScreen.h:
2716         * platform/ios/PlatformScreenIOS.mm:
2717         (WebCore::mobileGestaltFloatValue):
2718         (WebCore::screenPPIFactor):
2719
2720             Figure out screens physical PPI relative to a base.
2721
2722 2014-05-16  Jer Noble  <jer.noble@apple.com>
2723
2724         [MSE] Crash at  WebCore::SourceBuffer::~SourceBuffer + 110
2725         https://bugs.webkit.org/show_bug.cgi?id=132973
2726
2727         Reviewed by Eric Carlson.
2728
2729         Change SourceBuffer::m_private into a Ref<>, and add an assertion to
2730         SourceBufferPrivateAVFObjC's destructor if its client has not been cleared.
2731
2732         Eliminate unnecessary churn in MediaSourcePrivateAVFObjC by having the predicate
2733         functor take bare pointers, rather than a PassRefPtr.
2734
2735         The underlying problem seems to be in WebAVStreamDataParserListener. RefPtrs were
2736         being created off the main thread to a non-thread safe ref counted class. In some
2737         situations, this would result in double decrementing the ref, which would cause an
2738         early destruction of the underlying object. Instead replace these RefPtr strong
2739         pointers with explicit weak ones. Ensure the parser and its delegate are not freed
2740         before the append operation completes by passing strong pointers into the async
2741         append operation lambda.
2742
2743         There were a few places where we weren't null checking m_mediaSource before using it,
2744         and at least one place where we weren't clearing m_mediaSource.
2745
2746         * Modules/mediasource/SourceBuffer.cpp:
2747         (WebCore::SourceBuffer::SourceBuffer): Use Ref instead of RefPtr.
2748         (WebCore::SourceBuffer::appendBufferTimerFired): Ditto.
2749         * Modules/mediasource/SourceBuffer.h:
2750         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2751         (WebCore::MediaSourcePrivateAVFObjCHasAudio): Take a bare pointer, instead of a PassRefPtr.
2752         (WebCore::MediaSourcePrivateAVFObjCHasVideo): Ditto.
2753         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2754         (WebCore::MediaSourcePrivateAVFObjC::removeSourceBuffer): Clear the back pointer when removing a buffer.
2755         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2756         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2757         (-[WebAVStreamDataParserListener initWithParser:parent:WebCore::]): Use WeakPtr instead of RefPtr.
2758         (-[WebAVStreamDataParserListener invalidate]): Ditto.
2759         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]): Ditto.
2760         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]): Ditto.
2761         (-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]): Ditto.
2762         (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]): Ditto.
2763         (-[WebAVStreamDataParserListener streamDataParser:didReachEndOfTrackWithTrackID:mediaType:]): Ditto.
2764         (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]): Ditto.
2765         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
2766         (WebCore::SourceBufferPrivateAVFObjC::append): Ditto.
2767
2768 2014-05-16  Zalan Bujtas  <zalan@apple.com>
2769
2770         Subpixel rendering: Push named flows in region to device pixel when painting.
2771         https://bugs.webkit.org/show_bug.cgi?id=132986
2772
2773         Reviewed by Simon Fraser.
2774
2775         Remove integral rounding when named flow sets the painting offset on the graphics context.
2776         Use device pixel snapping instead to ensure that we can paint on odd device pixel positions on retina displays. 
2777
2778         Test: fast/regions/hidpi-region-with-auto-margin-on-subpixel-position.html
2779
2780         * rendering/RenderLayer.cpp:
2781         (WebCore::RenderLayer::calculateClipRects):
2782
2783 2014-05-16  Radu Stavila  <stavila@adobe.com>
2784
2785         [CSS Regions] Add ASSERT to make sure using the flowThread cache does not return incorrect results
2786         https://bugs.webkit.org/show_bug.cgi?id=132906
2787
2788         Reviewed by Simon Fraser.
2789
2790         If flowThreadContainingBlock() is called on an object which is in a different
2791         flow thread than the one currently being laid out, this method will return an incorrect
2792         result. I added an assertion for that to make sure we catch and treat any such scenarios.
2793         For the moment, this assertion is only validated for regions, as multicol still has some issues.
2794
2795         No new tests required.
2796
2797         * rendering/RenderObject.cpp:
2798         (WebCore::RenderObject::locateFlowThreadContainingBlockNoCache):
2799         (WebCore::RenderObject::locateFlowThreadContainingBlock):
2800         * rendering/RenderObject.h:
2801
2802 2014-05-16  Martin Hock  <mhock@apple.com>
2803
2804         MemoryCache::addImageToCache should return the result of add().
2805         https://bugs.webkit.org/show_bug.cgi?id=132928
2806         <rdar://problem/16651547>
2807
2808         Reviewed by Alexey Proskuryakov.
2809
2810         API test: WebKit1.MemoryCacheADdImageToCache (MemoryCacheAddImageToCacheIOS.mm)
2811
2812         * loader/cache/MemoryCache.cpp:
2813         (WebCore::MemoryCache::addImageToCache):
2814
2815 2014-05-16  Andrei Bucur  <abucur@adobe.com>
2816
2817         [CSS Regions] Reduce the RenderRegion invasiveness in rendering code
2818         https://bugs.webkit.org/show_bug.cgi?id=132121
2819
2820         Reviewed by Antti Koivisto.
2821
2822         Remove the RenderRegion / RenderNamedFlowFragment parameters and fields from
2823         the painting / hit testing data structures and use a stateful approach to
2824         correctly handle regions.
2825
2826         When painting or hit testing, the current flow thread is saved along the current
2827         region. They are accessed through the |currentRenderNamedFlowFragment| helper
2828         method on RenderObject or RenderLayer.
2829
2830         The patch also changes a bunch of 0s to nullptrs.
2831
2832         Tests: No new tests, no functional change.
2833
2834         * html/shadow/MediaControlElements.cpp:
2835         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
2836         * rendering/HitTestLocation.cpp:
2837         (WebCore::HitTestLocation::HitTestLocation):
2838         (WebCore::HitTestLocation::operator=):
2839         * rendering/HitTestLocation.h:
2840         (WebCore::HitTestLocation::region): Deleted.
2841         * rendering/HitTestResult.h:
2842         * rendering/PaintInfo.h:
2843         (WebCore::PaintInfo::PaintInfo):
2844         * rendering/RenderBlock.cpp:
2845         (WebCore::RenderBlock::paint):
2846         (WebCore::RenderBlock::paintObject):
2847         (WebCore::RenderBlock::selectionGaps):
2848         (WebCore::RenderBlock::nodeAtPoint):
2849         * rendering/RenderBox.cpp:
2850         (WebCore::RenderBox::nodeAtPoint):
2851         (WebCore::RenderBox::paintBoxDecorations):
2852         (WebCore::RenderBox::pushContentsClip):
2853         * rendering/RenderBoxModelObject.cpp:
2854         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
2855         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2856         * rendering/RenderBoxModelObject.h:
2857         * rendering/RenderLayer.cpp:
2858         (WebCore::RenderLayer::paint):
2859         (WebCore::RenderLayer::paintLayer):
2860         (WebCore::RenderLayer::paintLayerContents):
2861         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2862         (WebCore::RenderLayer::collectFragments):
2863         (WebCore::RenderLayer::updatePaintingInfoForFragments):
2864         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
2865         (WebCore::RenderLayer::paintBackgroundForFragments):
2866         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
2867         (WebCore::RenderLayer::paintOutlineForFragments):
2868         (WebCore::RenderLayer::paintMaskForFragments):
2869         (WebCore::RenderLayer::hitTest):
2870         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
2871         (WebCore::RenderLayer::hitTestLayer):
2872         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
2873         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
2874         (WebCore::RenderLayer::calculateClipRects):
2875         * rendering/RenderLayer.h:
2876         * rendering/RenderLayerBacking.cpp:
2877         (WebCore::RenderLayerBacking::updateCompositedBounds):
2878         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2879         * rendering/RenderLayerCompositor.cpp:
2880         (WebCore::RenderLayerCompositor::addToOverlapMap):
2881         (WebCore::RenderLayerCompositor::clippedByAncestor):
2882         * rendering/RenderObject.cpp:
2883         (WebCore::RenderObject::currentRenderNamedFlowFragment):
2884         * rendering/RenderObject.h:
2885         * rendering/RenderReplaced.cpp:
2886         (WebCore::RenderReplaced::shouldPaint):
2887         * rendering/RenderReplica.cpp:
2888         (WebCore::RenderReplica::paint):
2889         * rendering/RenderTable.cpp:
2890         (WebCore::RenderTable::nodeAtPoint):
2891         * rendering/RenderTableSection.cpp:
2892         (WebCore::RenderTableSection::nodeAtPoint):
2893         * rendering/RenderTreeAsText.cpp:
2894         (WebCore::writeLayers):
2895         * rendering/RootInlineBox.cpp:
2896         (WebCore::RootInlineBox::paint):
2897         * rendering/svg/RenderSVGRoot.cpp:
2898         (WebCore::RenderSVGRoot::paintReplaced):
2899
2900 2014-05-16  Kiran  <kiran.guduru@samsung.com>
2901
2902         RTCDtmfSender default values need to be updated.
2903         https://bugs.webkit.org/show_bug.cgi?id=132952
2904
2905         Reviewed by Eric Carlson.
2906
2907         The default ToneDuration and ToneGap values are modified in the updated spec.
2908         So these values need to be updated.
2909
2910         Test: fast/mediastream/RTCPeerConnection-dtmf.html.
2911
2912         * Modules/mediastream/RTCDTMFSender.cpp:
2913
2914 2014-05-15  Daniel Bates  <dabates@apple.com>
2915
2916         Attempt to fix the Apple Mavericks Release, Apple MountainLion Release,
2917         Apple MountainLion Release (32-bit Build), EFL, and GTK builds following
2918         <http://trac.webkit.org/changeset/168921> (https://bugs.webkit.org/show_bug.cgi?id=132669)
2919
2920         * dom/ContainerNode.cpp: Include SVGElement.h for the definition of Node::hasTagName(const SVGQualifiedName&).
2921
2922 2014-05-15  Daniel Bates  <dabates@apple.com>
2923
2924         ASSERT_NOT_REACHED() in DocumentOrderedMap::get() when removing SVG subtree
2925         https://bugs.webkit.org/show_bug.cgi?id=132669
2926         <rdar://problem/14931432>
2927
2928         Reviewed by Brent Fulgham and Ryosuke Niwa.
2929
2930         Fixes an assertion failure when removing an SVG element with a duplicate id.
2931
2932         When removing an SVG element with id A we synchronously instruct each element that references A
2933         to find the first element with id A, call this N, from the document root and register itself to
2934         either receive subsequent notifications from N (say, there is another element with id A) or as
2935         waiting for an element with id A (say, N = nullptr; => we removed the last element with id A from
2936         the document). Because the elements that reference A perform this operation synchronously when
2937         removing an element they consult an transient state of the DocumentOrderedMap when querying for the
2938         element with id A.
2939     
2940         Without loss of generality, let E, E_1, E_2, and E_3 be elements, where E_1, E_2, E_3 are children
2941         of E in that order and E_1.id = E_2.id = A and E_3.href = #A (that is, it references an element
2942         with id A). Suppose we remove E then we remove E_1, update DocumentOrderedMap to decrement its count
2943         for id A, and notify E_3 to look for an element with id A. This leads to an assertion failure since
2944         DocumentOrderedMap expects to find an element with id A, E_2, but cannot find such an element when
2945         traversing from the document root because E was unlinked from the document root (i.e. E_2 is in a
2946         disjoint subtree).
2947
2948         Tests: svg/custom/change-id-of-use-during-removal.html
2949                svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath.html
2950                svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref.html
2951                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use.html
2952                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate.html
2953                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage.html
2954                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath.html
2955                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use.html
2956                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2.html
2957                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree.html
2958                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree.html
2959                svg/custom/remove-use-with-duplicate-id-referenced-by-later-use.html
2960
2961         * dom/ContainerNode.cpp:
2962         (WebCore::ContainerNode::removeChild): Call SVGDocumentExtensions::rebuildElements() after we remove
2963         a DOM subtree so that applicable SVG elements can update their referenced element when the DocumentOrderedMap
2964         is in a stable-state.
2965         (WebCore::ContainerNode::removeChildren): Ditto.
2966         * svg/SVGDocumentExtensions.cpp:
2967         (WebCore::SVGDocumentExtensions::rebuildElements): Added; notifies SVG elements that their href attribute
2968         changed so that they query the DocumentOrderedMap for the element they reference by id in their href attribute.
2969         (WebCore::SVGDocumentExtensions::clearTargetDependencies): Added; Called from removing
2970         an SVG element S from the DOM. Appends all elements that reference the id of S to the end of a Vector of
2971         elements to be rebuilt (when SVGDocumentExtensions::rebuildElements() is called) and notifies these elements
2972         that have been marked to be rebuilt so that they can invalidate their state (e.g. stop animating).
2973         (WebCore::SVGDocumentExtensions::rebuildAllElementReferencesForTarget): Changed to take its argument by reference
2974         (since it's always non-null) and simplified logic to synchronously notify SVG updates that their referenced element
2975         may have changed. Calling SVGElement::svgAttributeChanged() on an element E should at most remove the dependencies
2976         of E.
2977         * svg/SVGDocumentExtensions.h:
2978         * svg/SVGElement.cpp:
2979         (WebCore::SVGElement::~SVGElement): Substitute "*this" for "this" as SVGDocumentExtensions::rebuildAllElementReferencesForTarget()
2980         now takes a reference instead of a pointer.
2981         (WebCore::SVGElement::removedFrom): Modified to call SVGDocumentExtensions::clearTargetDependencies().
2982         (WebCore::SVGElement::attributeChanged): Substitute "*this" for "this" as SVGDocumentExtensions::rebuildAllElementReferencesForTarget()
2983         now takes a reference instead of a pointer.
2984         * svg/SVGElement.h:
2985         (WebCore::SVGElement::callClearTarget): Added; calls through to private virtual SVGElement::clearTarget().
2986         (WebCore::SVGElement::clearTarget): Added.
2987         * svg/SVGTRefElement.cpp:
2988         (WebCore::SVGTRefElement::clearTarget): Added.
2989         * svg/SVGTRefElement.h:
2990         * svg/animation/SVGSMILElement.cpp:
2991         (WebCore::SVGSMILElement::clearTarget): Added.
2992         * svg/animation/SVGSMILElement.h:
2993
2994 2014-05-15  Simon Fraser  <simon.fraser@apple.com>
2995
2996         [iOS WK2] When zoomed, fixed elements jump at the start of a scroll, and jump back at the end.
2997         https://bugs.webkit.org/show_bug.cgi?id=132978
2998         <rdar://problem/16894428>
2999
3000         Reviewed by Benjamin Poulain.
3001
3002         This was the actual cause of the bug; r168560 changed the rect passed in here
3003         to be the customFixedPositionRect rather than the unobscured rect, but we
3004         used it to call FrameView::rectForViewportConstrainedObjects() which gave back
3005         another bogus rect. So just use the rect passed in.
3006
3007         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
3008         (WebCore::ScrollingTreeScrollingNodeIOS::updateLayersAfterViewportChange):
3009
3010 2014-05-15  Daniel Bates  <dabates@apple.com>
3011
3012         SVG element may reference arbitrary DOM element before running its insertion logic
3013         https://bugs.webkit.org/show_bug.cgi?id=132757
3014         <rdar://problem/15703817>
3015
3016         Reviewed by Ryosuke Niwa.
3017
3018         Fixes an issue where an SVG element may reference an arbitrary DOM element e before e finished being
3019         inserted in the tree.
3020
3021         Currently when an SVG element A is inserted into a document we use document.getElementById() to find the
3022         element B it references (if any). If A is inserted before B and B has the same id as a later element in
3023         the document then A can find B before B is notified that its been inserted into the document (i.e. before
3024         Element::insertedFrom() is called on B). Instead, A should call document.getElementById() only after
3025         cessation of the insertion operation that inserted it to ensure that all inserted nodes (including B)
3026         processed their insertion-specific logic.
3027
3028         Tests: svg/custom/reparent-animate-element.html
3029                svg/custom/reparent-feimage-element.html
3030                svg/custom/reparent-mpath-element.html
3031                svg/custom/reparent-textpath-element.html
3032                svg/custom/reparent-tref-element.html
3033                svg/custom/reparent-use-element.html
3034
3035         * svg/SVGFEImageElement.cpp:
3036         (WebCore::SVGFEImageElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
3037         we are called back to resolve our target element (i.e. call SVGFEImageElement::buildPendingResources())
3038         after the subtree we're in is inserted.
3039         (WebCore::SVGFEImageElement::didNotifySubtreeInsertions): Added; turns around and calls SVGFEImageElement::buildPendingResources().
3040         * svg/SVGFEImageElement.h:
3041         * svg/SVGMPathElement.cpp:
3042         (WebCore::SVGMPathElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
3043         we are called back to resolve our target element (i.e. call SVGMPathElement::buildPendingResources())
3044         after the subtree we're in is inserted.
3045         (WebCore::SVGMPathElement::didNotifySubtreeInsertions): Added; turns around and calls SVGMPathElement::buildPendingResources().
3046         * svg/SVGMPathElement.h:
3047         * svg/SVGTRefElement.cpp:
3048         (WebCore::SVGTRefElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
3049         we are called back to resolve our target element (i.e. call SVGTRefElement::buildPendingResources())
3050         after the subtree we're in is inserted.
3051         (WebCore::SVGTRefElement::didNotifySubtreeInsertions): Added; turns around and calls SVGTRefElement::buildPendingResources().
3052         * svg/SVGTRefElement.h:
3053         * svg/SVGTextPathElement.cpp:
3054         (WebCore::SVGTextPathElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
3055         we are called back to resolve our target element (i.e. call SVGTextPathElement::buildPendingResources())
3056         after the subtree we're in is inserted.
3057         (WebCore::SVGTextPathElement::didNotifySubtreeInsertions): Added; turns around and calls SVGTextPathElement::buildPendingResources().
3058         * svg/SVGTextPathElement.h:
3059         * svg/SVGUseElement.cpp:
3060         (WebCore::SVGUseElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
3061         we are called back to resolve our target element (i.e. call SVGUseElement::buildPendingResources()) after its subtree is
3062         inserted.
3063         (WebCore::SVGUseElement::didNotifySubtreeInsertions): Added; turns around and calls SVGUseElement::buildPendingResources().
3064         * svg/SVGUseElement.h:
3065         * svg/animation/SVGSMILElement.cpp:
3066         (WebCore::SVGSMILElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
3067         we are called back to resolve our target element (i.e. call SVGSMILElement::buildPendingResources())
3068         after the subtree we're in is inserted.
3069         (WebCore::SVGSMILElement::didNotifySubtreeInsertions): Added; turns around and calls SVGSMILElement::buildPendingResources().
3070         * svg/animation/SVGSMILElement.h:
3071
3072 2014-05-15  Mark Hahnenberg  <mhahnenberg@apple.com>
3073
3074         JSDOMWindow should not claim HasImpureGetOwnPropertySlot
3075         https://bugs.webkit.org/show_bug.cgi?id=132918
3076
3077         Reviewed by Geoffrey Garen.
3078
3079         Tests: js/cached-window-properties.html
3080                js/cached-window-prototype-properties.html
3081
3082         We now correctly handle the impurity of JSDOMWindow's custom getOwnPropertySlot without needing the 
3083         blanket HasImpureGetOwnPropertySlot. We do this through the use of watchpoints and by explicitly forbidding
3084         any caching beyond a certain point using PropertySlot::disableCaching. Getting rid of this flag will allow 
3085         us to cache many properties/methods on both the JSDOMWindow and its prototype, which are very commonly used 
3086         across the web.
3087
3088         * bindings/js/JSDOMWindowCustom.cpp:
3089         (WebCore::JSDOMWindow::getOwnPropertySlot):
3090         * bindings/scripts/CodeGeneratorJS.pm:
3091         (HasComplexGetOwnProperty):
3092         (InterfaceRequiresAttributesOnInstance):
3093         (InstanceOverridesGetOwnPropertySlot):
3094         (GenerateHeader):
3095
3096 2014-05-15  Alexey Proskuryakov  <ap@apple.com>
3097
3098         NetworkProcess crashes at ResourceHandle::continueDidReceiveResponse
3099         https://bugs.webkit.org/show_bug.cgi?id=132966
3100         <rdar://problem/16373694>
3101
3102         Reviewed by Brady Eidson.
3103
3104         Covered by many fast/files tests.
3105
3106         * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::continueDidReceiveResponse):
3107         * platform/network/BlobResourceHandle.h:
3108         * platform/network/ResourceHandle.h:
3109         Don't call delegate's continueDidReceiveResponse when loading a blob:// URL,
3110         the delegate is null. On the Mac, we used to lazily create it, which was also wrong,
3111         but at least not observable.
3112
3113 2014-05-15  Commit Queue  <commit-queue@webkit.org>
3114
3115         Unreviewed, rolling out r168899.
3116         https://bugs.webkit.org/show_bug.cgi?id=132965
3117
3118         Broke some compositing regions tests on Mavericks (Requested
3119         by mihnea___ on #webkit).
3120
3121         Reverted changeset:
3122
3123         "[CSS Regions] Reduce the RenderRegion invasiveness in
3124         rendering code"
3125         https://bugs.webkit.org/show_bug.cgi?id=132121
3126         http://trac.webkit.org/changeset/168899
3127
3128 2014-05-15  Alex Christensen  <achristensen@webkit.org>
3129
3130         Add pointer lock to features without enabling it.
3131         https://bugs.webkit.org/show_bug.cgi?id=132961
3132
3133         Reviewed by Sam Weinig.
3134
3135         * Configurations/FeatureDefines.xcconfig:
3136         Added ENABLE_POINTER_LOCK to list of features.
3137         * WebCore.exp.in:
3138         Added linker symbols which differ with pointer lock enabled.
3139         * WebCore.xcodeproj/project.pbxproj:
3140         Added PointerLockController.cpp to build.
3141
3142 2014-05-15  Mark Hahnenberg  <mhahnenberg@apple.com>
3143
3144         Move subframe name getter lookup later in JSDOMWindow::getOwnPropertySlot
3145         https://bugs.webkit.org/show_bug.cgi?id=132922
3146
3147         Reviewed by Geoffrey Garen.
3148
3149         No new tests.
3150
3151         In JSDOMWindow::getOwnPropertySlot, we currently look for the property on the JSDOMWindow, 
3152         then we search the window's subframes for name getters, then we look in the window's prototype 
3153         chain. Apparently we were doing the lookup in this order to be compatible with Mozilla, but 
3154         Mozilla no longer implements this behavior. Instead, they do the lookup on the prototype before 
3155         looking for subframe name getters. We should change this to match Mozilla. This has the convenient 
3156         side effect of allowing us to cache lookups in the window's prototype chain.
3157
3158         * bindings/js/JSDOMWindowCustom.cpp:
3159         (WebCore::JSDOMWindow::getOwnPropertySlot):
3160
3161 2014-05-15  Simon Fraser  <simon.fraser@apple.com>
3162
3163         [UI-side compositing] Fix copying animations between layers, and pausing them
3164         https://bugs.webkit.org/show_bug.cgi?id=132943
3165         <rdar://problem/16906369&16906541>
3166
3167         Reviewed by Tim Horton.
3168
3169         Pass the animation key back to animationStarted(), though this isn't used
3170         when animations are running in-process.
3171
3172         * platform/graphics/ca/PlatformCALayer.h:
3173         * platform/graphics/ca/mac/PlatformCALayerMac.h:
3174         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3175         (-[WebAnimationDelegate animationDidStart:]):
3176         (PlatformCALayerMac::animationStarted):
3177         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3178         (PlatformCALayerWin::animationStarted):
3179         * platform/graphics/ca/win/PlatformCALayerWin.h:
3180
3181 2014-05-15  Andrei Bucur  <abucur@adobe.com>
3182
3183         [CSS Regions] Reduce the RenderRegion invasiveness in rendering code
3184         https://bugs.webkit.org/show_bug.cgi?id=132121
3185
3186         Reviewed by Antti Koivisto.
3187
3188         Remove the RenderRegion / RenderNamedFlowFragment parameters and fields from
3189         the painting / hit testing data structures and use a stateful approach to
3190         correctly handle regions.
3191
3192         When painting or hit testing, the current flow thread is saved along the current
3193         region. They are accessed through the |currentRenderNamedFlowFragment| helper
3194         method on RenderObject or RenderLayer.
3195
3196         The patch also changes a bunch of 0s to nullptrs.
3197
3198         Tests: No new tests, no functional change.
3199
3200         * html/shadow/MediaControlElements.cpp:
3201         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
3202         * rendering/HitTestLocation.cpp:
3203         (WebCore::HitTestLocation::HitTestLocation):
3204         (WebCore::HitTestLocation::operator=):
3205         * rendering/HitTestLocation.h:
3206         (WebCore::HitTestLocation::region): Deleted.
3207         * rendering/HitTestResult.h:
3208         * rendering/PaintInfo.h:
3209         (WebCore::PaintInfo::PaintInfo):
3210         * rendering/RenderBlock.cpp:
3211         (WebCore::RenderBlock::paint):
3212         (WebCore::RenderBlock::paintObject):
3213         (WebCore::RenderBlock::selectionGaps):
3214         (WebCore::RenderBlock::nodeAtPoint):
3215         * rendering/RenderBox.cpp:
3216         (WebCore::RenderBox::nodeAtPoint):
3217         (WebCore::RenderBox::paintBoxDecorations):
3218         (WebCore::RenderBox::pushContentsClip):
3219         * rendering/RenderBoxModelObject.cpp:
3220         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
3221         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3222         * rendering/RenderBoxModelObject.h:
3223         * rendering/RenderLayer.cpp:
3224         (WebCore::RenderLayer::paint):
3225         (WebCore::RenderLayer::paintLayer):
3226         (WebCore::RenderLayer::paintLayerContents):
3227         (WebCore::RenderLayer::paintLayerByApplyingTransform):
3228         (WebCore::RenderLayer::collectFragments):
3229         (WebCore::RenderLayer::updatePaintingInfoForFragments):
3230         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
3231         (WebCore::RenderLayer::paintBackgroundForFragments):
3232         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
3233         (WebCore::RenderLayer::paintOutlineForFragments):
3234         (WebCore::RenderLayer::paintMaskForFragments):
3235         (WebCore::RenderLayer::hitTest):
3236         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
3237         (WebCore::RenderLayer::hitTestLayer):
3238         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
3239         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
3240         (WebCore::RenderLayer::calculateClipRects):
3241         * rendering/RenderLayer.h:
3242         * rendering/RenderLayerBacking.cpp:
3243         (WebCore::RenderLayerBacking::updateCompositedBounds):
3244         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3245         * rendering/RenderLayerCompositor.cpp:
3246         (WebCore::RenderLayerCompositor::addToOverlapMap):
3247         (WebCore::RenderLayerCompositor::clippedByAncestor):
3248         * rendering/RenderObject.cpp:
3249         (WebCore::RenderObject::currentRenderNamedFlowFragment):
3250         * rendering/RenderObject.h:
3251         * rendering/RenderReplaced.cpp:
3252         (WebCore::RenderReplaced::shouldPaint):
3253         * rendering/RenderReplica.cpp:
3254         (WebCore::RenderReplica::paint):
3255         * rendering/RenderTable.cpp:
3256         (WebCore::RenderTable::nodeAtPoint):
3257         * rendering/RenderTableSection.cpp:
3258         (WebCore::RenderTableSection::nodeAtPoint):
3259         * rendering/RenderTreeAsText.cpp:
3260         (WebCore::writeLayers):
3261         * rendering/RootInlineBox.cpp:
3262         (WebCore::RootInlineBox::paint):
3263         * rendering/svg/RenderSVGRoot.cpp:
3264         (WebCore::RenderSVGRoot::paintReplaced):
3265
3266 2014-05-14  Simon Fraser  <simon.fraser@apple.com>
3267
3268         Clean up "has non-zero begin time" terminology in animations
3269         https://bugs.webkit.org/show_bug.cgi?id=132942
3270
3271         Reviewed by Tim Horton.
3272
3273         Change the "non-zero beginTime" terminology in the platform CA animations
3274         code to "explicit beginTime": this flag really means that we explicitly set
3275         the beginTime of the animation, rather than let CA set the beginTime when
3276         committing the animation. This flag is used for animations with negative
3277         delay, and when pausing.
3278         
3279         The WKNonZeroBeginTimeFlag key was spread across PlatformCALayerMac and PlatformCAAnimationMac,
3280         so hide it behind getter/setter functions.
3281         
3282         Remove lots of m_layer.get() in PlatformCAAnimationMac.
3283
3284         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
3285         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
3286         (WebCore::hasExplicitBeginTime):
3287         (WebCore::setHasExplicitBeginTime):
3288         (PlatformCAAnimationMac::copy):
3289         (PlatformCAAnimationMac::keyPath):
3290         (PlatformCAAnimationMac::beginTime):
3291         (PlatformCAAnimationMac::setBeginTime):
3292         (PlatformCAAnimationMac::duration):
3293         (PlatformCAAnimationMac::setDuration):
3294         (PlatformCAAnimationMac::speed):
3295         (PlatformCAAnimationMac::setSpeed):
3296         (PlatformCAAnimationMac::timeOffset):
3297         (PlatformCAAnimationMac::setTimeOffset):
3298         (PlatformCAAnimationMac::repeatCount):
3299         (PlatformCAAnimationMac::setRepeatCount):
3300         (PlatformCAAnimationMac::autoreverses):
3301         (PlatformCAAnimationMac::setAutoreverses):
3302         (PlatformCAAnimationMac::fillMode):
3303         (PlatformCAAnimationMac::setFillMode):
3304         (PlatformCAAnimationMac::setTimingFunction):
3305         (PlatformCAAnimationMac::copyTimingFunctionFrom):
3306         (PlatformCAAnimationMac::isRemovedOnCompletion):
3307         (PlatformCAAnimationMac::setRemovedOnCompletion):
3308         (PlatformCAAnimationMac::isAdditive):
3309         (PlatformCAAnimationMac::setAdditive):
3310         (PlatformCAAnimationMac::valueFunction):
3311         (PlatformCAAnimationMac::setValueFunction):
3312         (hasNonZeroBeginTimeFlag): Deleted.
3313         (setNonZeroBeginTimeFlag): Deleted.
3314         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3315         (-[WebAnimationDelegate animationDidStart:]):
3316
3317 2014-05-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3318
3319         [GTK] Compile all installed resources as GResources
3320         https://bugs.webkit.org/show_bug.cgi?id=131099
3321
3322         Reviewed by Philippe Normand.
3323
3324         * PlatformGTK.cmake: Do not install the resources.
3325         * platform/audio/gtk/AudioBusGtk.cpp:
3326         (WebCore::AudioBus::loadPlatformResource): Load the audio resource
3327         from GResources and use createBusFromInMemoryAudioFile().
3328         * platform/graphics/Image.h: Remove unsued function loadPlatformThemeIcon.
3329         * platform/graphics/gtk/ImageGtk.cpp:
3330         (WebCore::loadImageFromGResource): Load the given icon name from GResources.
3331         (WebCore::loadResourceSharedBuffer): Use char* instead of CString.
3332         (WebCore::loadMissingImageIconFromTheme): Try to load the missing
3333         icon from the current GTK icon theme.
3334         (WebCore::Image::loadPlatformResource): Call
3335         loadMissingImageIconFromTheme for missing icon or
3336         loadImageFromGResource for any other icon name.
3337         (WebCore::getPathToImageResource): Deleted.
3338         (WebCore::getThemeIconFileName): Deleted.
3339         (WebCore::loadImageFromFile): Deleted.
3340         (WebCore::Image::loadPlatformThemeIcon): Deleted.
3341
3342 2014-05-14  Beth Dakin  <bdakin@apple.com>
3343
3344         Tiled scrolling indicator needs to take topContentInset into account
3345         https://bugs.webkit.org/show_bug.cgi?id=132940
3346
3347         Reviewed by Simon Fraser.
3348
3349         The tiled scrolling indicator needs to move down by the value of the 
3350         topContentInset. This patch makes that happen by caching the topContentInset in 
3351         the TileController. This does feel a little silly since there is already a 
3352         function called setTiledScrollingIndicatorPosition() on TiledBacking. However, it 
3353         was often the case that calling that function had no effect because m_coverageMap 
3354         had not yet been created, and then the information was lost. So instead, we cache 
3355         the value.
3356
3357         Set TiledBacking’s copy of topContentInset whenever it changes for the FrameView.
3358         * page/FrameView.cpp:
3359         (WebCore::FrameView::topContentInsetDidChange):
3360
3361         New function to set the inset. Use the inset to position the coverage map.
3362         * platform/graphics/TiledBacking.h:
3363         * platform/graphics/ca/mac/TileController.h:
3364         * platform/graphics/ca/mac/TileController.mm:
3365         (WebCore::TileController::TileController):
3366         (WebCore::TileController::setTopContentInset):
3367
3368         When the coverage map is created, consult the value of the inset.
3369         * platform/graphics/ca/mac/TileCoverageMap.mm:
3370         (WebCore::TileCoverageMap::TileCoverageMap):
3371
3372         Once the backing has been ensured, set the inset.
3373         * rendering/RenderLayerCompositor.cpp:
3374         (WebCore::RenderLayerCompositor::updateBacking):
3375
3376 2014-05-14  Brent Fulgham  <bfulgham@apple.com>
3377
3378         Merge r1267628 from branch.
3379         <rdar://problem/15751219>
3380
3381             Pratik Solanki  <psolanki@apple.com>
3382
3383             Reviewed by Simon Fraser.",
3384
3385             TileController relied on the tiling mode in TileCache to determine if it should use low-res
3386             tiles when zooming. Unfortunately, sometimes the tiling mode gets set to Zooming even though
3387             it's actually a pan. Thus we can end up with blurry tiles. Fix this by adding a new flag on
3388             TileCache that controls this behavior and have UIKit set it only when we have an actual zoom
3389             operation.
3390  
3391         * platform/ios/LegacyTileCache.h:
3392         (WebCore::LegacyTileCache::tileControllerShouldUseLowScaleTiles):
3393         (WebCore::LegacyTileCache::setTileControllerShouldUseLowScaleTiles):
3394         * platform/ios/LegacyTileCache.mm:
3395         (WebCore::LegacyTileCache::LegacyTileCache):
3396         * platform/ios/wak/WAKWindow.h:
3397         * platform/ios/wak/WAKWindow.mm:
3398         (-[WAKWindow setTileControllerShouldUseLowScaleTiles:]):
3399         * rendering/RenderLayerCompositor.cpp:
3400         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
3401
3402 2014-05-14  Commit Queue  <commit-queue@webkit.org>
3403
3404         Unreviewed, rolling out r168750.
3405         https://bugs.webkit.org/show_bug.cgi?id=132935
3406
3407         Caused repaint bugs (Requested by weinig on #webkit).
3408
3409         Reverted changeset:
3410
3411         "Text decorations do not contribute to visual overflow"
3412         https://bugs.webkit.org/show_bug.cgi?id=132773
3413         http://trac.webkit.org/changeset/168750
3414
3415 2014-05-14  Simon Fraser  <simon.fraser@apple.com>
3416
3417         [New multicolumn] Spin in RenderMultiColumnSet::repaintFlowThreadContent()
3418         https://bugs.webkit.org/show_bug.cgi?id=132884
3419
3420         Reviewed by Beth Dakin.
3421
3422         On iOS, wikipedia pages can hang under RenderMultiColumnSet::repaintFlowThreadContent().
3423         It appears that computedColumnHeight is set to 0 in prepareForLayout, but layout never happens
3424         on the RenderMultiColumnSet in some cases, leaving the column height set to zero.
3425         This caused columnIndexAtOffset() to return bad values, which resulted in very long loops
3426         in repaintFlowThreadContent().
3427         
3428         This fix is a stop-gap.
3429
3430         * rendering/RenderMultiColumnSet.cpp:
3431         (WebCore::RenderMultiColumnSet::columnIndexAtOffset):
3432
3433 2014-05-14  Benjamin Poulain  <bpoulain@apple.com>
3434
3435         Remove FrameView::viewportConstrainedExtentRect, it is unused
3436         https://bugs.webkit.org/show_bug.cgi?id=132927
3437
3438         Reviewed by Simon Fraser.
3439
3440         * page/FrameView.cpp:
3441         (WebCore::FrameView::viewportConstrainedExtentRect): Deleted.
3442         * page/FrameView.h:
3443         Simon replaced this by viewportConstrainedVisibleContentRect, remove the old code.
3444
3445 2014-05-14  Matthew Hanson  <matthew_hanson@apple.com>
3446
3447         Only define MAX_GRID_TRACK_REPETITIONS if CSS_GRID_LAYOUT is enabled.
3448
3449         Reviewed by Dean Jackson.
3450
3451         This was causing -Wunused-const-variable errors.
3452
3453         * css/CSSParser.cpp: Add include guard.
3454
3455 2014-05-14  Beth Dakin  <bdakin@apple.com>
3456
3457         Tile cache has way too many tiles when pinch-zoomed in
3458         https://bugs.webkit.org/show_bug.cgi?id=132929
3459         -and corresponding-
3460         <rdar://problem/16527172>
3461
3462         Reviewed by Benjamin Poulain.
3463
3464         This patch makes the margin sizing functions return the set margin size scaled by 
3465         the TileGrid's scale. We also need to get rid of the old notion we used to have
3466         that margin tiles might be allowed to have a different size than the other tiles. 
3467         We don't want that. They should have the normal margin size, but they should
3468         affect the overall coverage area.
3469
3470         Scale by the TileGrid's scale.
3471         * platform/graphics/ca/mac/TileController.mm:
3472         (WebCore::TileController::topMarginHeight):
3473         (WebCore::TileController::bottomMarginHeight):
3474         (WebCore::TileController::leftMarginWidth):
3475         (WebCore::TileController::rightMarginWidth):
3476
3477         Get rid of adjustRectAtTileIndexForMargin() since we do not want to ever do this 
3478         adjustment. Use tileSize instead of margin size for all sizing computations.
3479         * platform/graphics/ca/mac/TileGrid.h:
3480         * platform/graphics/ca/mac/TileGrid.mm:
3481         (WebCore::TileGrid::rectForTileIndex):
3482         (WebCore::TileGrid::getTileIndexRangeForRect):
3483         (WebCore::TileGrid::adjustRectAtTileIndexForMargin): Deleted.
3484
3485 2014-05-14  Dean Jackson  <dino@apple.com>
3486
3487         [Mac] Search fields should not use centered look
3488         https://bugs.webkit.org/show_bug.cgi?id=132930
3489         <rdar://problem/16825842>
3490
3491         Reviewed by Beth Dakin.
3492
3493         We need to explicitly set the centeredLook property
3494         to NO on modern releases of Mac.
3495
3496         * rendering/RenderThemeMac.mm: Declare a new private property and set it to NO.
3497         (WebCore::RenderThemeMac::search):
3498
3499 2014-05-14  Zalan Bujtas  <zalan@apple.com>
3500
3501         Subpixel layout: Change Element.offset* client* scroll* return type to double.
3502         https://bugs.webkit.org/show_bug.cgi?id=132895
3503
3504         Reviewed by Simon Fraser.
3505
3506         This patch changes Element.offset*, Element.client* and Element.scroll* APIs return
3507         type from long to double to match the latest CSSOM View Module spec[1].
3508         Element.offset* and Element.client* do return subpixel values from now on.
3509         Element.scroll* still return integral values as the scrolling code hasn't adopted to subpixel rendering yet.
3510
3511         subpixelCSSOMElementMetricsEnabled setting is added to be able to turn this feature on/off
3512         from WK2 preferences. It toggles the return value from subpixel to floored integral.
3513         It does not change layout/rendering behavior.
3514
3515         Reference list of what other browsers do:
3516         IE: http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx
3517         Blink: http://www.chromestatus.com/features/5497402177880064
3518         Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=825607
3519
3520         [1] http://www.w3.org/TR/2013/WD-cssom-view-20131217/
3521
3522         Test: cssom/subpixel-offsetleft-top-width-height-values.html
3523
3524         * dom/Element.cpp:
3525         (WebCore::localZoomForRenderer):
3526         (WebCore::adjustForLocalZoom):
3527         (WebCore::convertToNonSubpixelValueIfNeeded):
3528         (WebCore::Element::offsetLeft):
3529         (WebCore::Element::offsetTop):
3530         (WebCore::Element::offsetWidth):
3531         (WebCore::Element::offsetHeight):
3532         (WebCore::Element::clientLeft):
3533         (WebCore::Element::clientTop):
3534         (WebCore::Element::clientWidth):
3535         (WebCore::Element::clientHeight):
3536         (WebCore::Element::scrollLeft):
3537         (WebCore::Element::scrollTop):
3538         (WebCore::Element::setScrollLeft):
3539         (WebCore::Element::setScrollTop):
3540         (WebCore::Element::scrollWidth):
3541         (WebCore::Element::scrollHeight):
3542         * dom/Element.h:
3543         * dom/Element.idl:
3544         * html/HTMLBodyElement.cpp:
3545         (WebCore::adjustForZoom):
3546         (WebCore::HTMLBodyElement::scrollLeft):
3547         (WebCore::HTMLBodyElement::setScrollLeft):
3548         (WebCore::HTMLBodyElement::scrollTop):
3549         (WebCore::HTMLBodyElement::setScrollTop):
3550         (WebCore::HTMLBodyElement::scrollHeight):
3551         (WebCore::HTMLBodyElement::scrollWidth):
3552         * html/HTMLBodyElement.h:
3553         * page/Settings.in:
3554
3555 2014-05-14  Brady Eidson  <beidson@apple.com>
3556
3557         Implement NSSharingServiceDelegate method "transitionImageForShareItem"
3558         <rdar://problem/16878020> and https://bugs.webkit.org/show_bug.cgi?id=132911
3559
3560         Reviewed by Tim Horton.
3561
3562         * WebCore.exp.in:
3563         * WebCore.xcodeproj/project.pbxproj:
3564
3565 2014-05-14  Alex Christensen  <achristensen@webkit.org>
3566
3567         Another unreviewed build fix.
3568
3569         * platform/network/mac/ResourceHandleMac.mm:
3570         (WebCore::ResourceHandle::getTimingData):
3571         Added necessary UNUSED_PARAMs.
3572
3573 2014-05-14  Alex Christensen  <achristensen@webkit.org>
3574
3575         Unreviewed build fix after r168849.
3576
3577         * platform/network/mac/ResourceHandleMac.mm:
3578         (WebCore::ResourceHandle::getTimingData):
3579         Protect use of timing data with ENABLE(WEB_TIMING).
3580
3581 2014-05-14  Alex Christensen  <achristensen@webkit.org>
3582
3583         Refactor duplicate code in web timing.
3584         https://bugs.webkit.org/show_bug.cgi?id=132917
3585
3586         Reviewed by Alexey Proskuryakov.
3587
3588         * platform/network/ResourceHandle.h:
3589         Added getTimingData declaration.
3590         * platform/network/mac/ResourceHandleMac.mm:
3591         (WebCore::ResourceHandle::getTimingData):
3592         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
3593         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
3594         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3595         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
3596         Moved duplicate code to ResourceHandle.
3597
3598 2014-05-14  Alex Christensen  <achristensen@webkit.org>
3599
3600         Use references instead of pointers with ResourceLoadTiming.
3601         https://bugs.webkit.org/show_bug.cgi?id=132846
3602
3603         Reviewed by Alexey Proskuryakov.
3604
3605         * WebCore.exp.in:
3606         Removed ResourceResponseBase::setResourceLoadTiming linker symbol.
3607         * inspector/InspectorResourceAgent.cpp:
3608         (WebCore::buildObjectForResourceResponse):
3609         * page/PerformanceResourceTiming.cpp:
3610         (WebCore::PerformanceResourceTiming::domainLookupStart):
3611         (WebCore::PerformanceResourceTiming::domainLookupEnd):
3612         (WebCore::PerformanceResourceTiming::connectStart):
3613         (WebCore::PerformanceResourceTiming::connectEnd):
3614         (WebCore::PerformanceResourceTiming::secureConnectionStart):
3615         (WebCore::PerformanceResourceTiming::requestStart):
3616         Use references instead of pointers.
3617         * page/PerformanceResourceTiming.h:
3618         Make an instance instead of a RefPtr.
3619         * page/PerformanceTiming.cpp:
3620         (WebCore::PerformanceTiming::domainLookupStart):
3621         (WebCore::PerformanceTiming::domainLookupEnd):
3622         (WebCore::PerformanceTiming::connectStart):
3623         (WebCore::PerformanceTiming::connectEnd):
3624         (WebCore::PerformanceTiming::secureConnectionStart):
3625         (WebCore::PerformanceTiming::requestStart):
3626         (WebCore::PerformanceTiming::responseStart):
3627         Check to see if the loader exists, then use ResourceLoadTiming reference.
3628         (WebCore::PerformanceTiming::resourceLoadTiming): Deleted.
3629         * page/PerformanceTiming.h:
3630         Removed resourceLoadTiming declaration.
3631         * platform/network/ResourceLoadTiming.h:
3632         (WebCore::ResourceLoadTiming::ResourceLoadTiming):
3633         (WebCore::ResourceLoadTiming::operator=):
3634         Replaced reference counting with copy constructors.
3635         (WebCore::ResourceLoadTiming::create): Deleted.
3636         (WebCore::ResourceLoadTiming::deepCopy): Deleted.
3637         * platform/network/ResourceResponseBase.cpp:
3638         (WebCore::ResourceResponseBase::adopt):
3639         (WebCore::ResourceResponseBase::copyData):
3640         (WebCore::ResourceResponseBase::resourceLoadTiming):
3641         (WebCore::ResourceResponseBase::setResourceLoadTiming):
3642         (WebCore::ResourceResponseBase::compare):
3643         * platform/network/ResourceResponseBase.h:
3644         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
3645         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
3646         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3647         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
3648         * platform/network/soup/ResourceHandleSoup.cpp:
3649         (WebCore::ResourceHandle::didStartRequest):
3650         (WebCore::networkEventCallback):
3651         Use references instead of pointers.
3652
3653 2014-05-14  Commit Queue  <commit-queue@webkit.org>
3654
3655         Unreviewed, rolling out r168837.
3656         https://bugs.webkit.org/show_bug.cgi?id=132913
3657
3658         The patch added an assertion which fires on 6 tests (Requested
3659         by ap on #webkit).
3660
3661         Reverted changeset:
3662
3663         "[CSS Regions] Add ASSERT to make sure using the flowThread
3664         cache does not return incorrect results"
3665         https://bugs.webkit.org/show_bug.cgi?id=132906
3666         http://trac.webkit.org/changeset/168837
3667
3668 2014-05-13  Jon Honeycutt  <jhoneycutt@apple.com>
3669
3670         Revert "Don't dispatch 'beforeload' event inside FrameView::layout()",
3671         commit 84fe8cf6fbe8b5de9a06300ca3ef6d0ffc96948c, and associated
3672         follow-up fixes:
3673
3674             "platform/mac/plugins/testplugin-onnew-onpaint.html failing after
3675                 r168668", commit c17be3bf5127baf94310af4b4b9bf5a57d29aaf4
3676             "[Win] Unreviewed build fix after r168668.", commit
3677                 4fa470ad12c38ee7d4c114541b6dd321181a8bc9
3678
3679         The original merged patch appears to have caused a regression in
3680         fast/dom/HTMLObjectElement/object-as-frame.html.
3681
3682         <https://bugs.webkit.org/show_bug.cgi?id=132886>
3683
3684         Reviewed by Alexey Proskuryakov.
3685
3686         * WebCore.exp.in:
3687         * dom/Document.cpp:
3688         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
3689         * dom/Document.h:
3690         * html/HTMLAppletElement.cpp:
3691         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
3692         * html/HTMLEmbedElement.cpp:
3693         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
3694         * html/HTMLObjectElement.cpp:
3695         (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
3696         * page/FrameView.cpp:
3697         (WebCore::FrameView::FrameView):
3698         (WebCore::FrameView::reset):
3699         (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
3700         (WebCore::FrameView::performPostLayoutTasks):
3701         (WebCore::FrameView::updateEmbeddedObjectsTimerFired): Deleted.
3702         * page/FrameView.h:
3703         * testing/Internals.cpp:
3704         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Deleted.
3705         * testing/Internals.h:
3706         * testing/Internals.idl:
3707
3708 2014-05-14  Kiran  <kiran.guduru@samsung.com>
3709
3710         alidation for getUserMedia() errorCallback is missing.
3711         https://bugs.webkit.org/show_bug.cgi?id=132901
3712
3713         Reviewed by Darin Adler.
3714
3715         The patch adds the validation for getUserMedia errorCallBack
3716         and throws TypeMismatchError.
3717
3718         Test: fast/mediastream/getusermedia.html 
3719
3720         * Modules/mediastream/NavigatorUserMedia.cpp:
3721         (WebCore::NavigatorUserMedia::webkitGetUserMedia):
3722
3723 2014-05-14  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
3724
3725         Remove CSS_STICKY_POSITION guards
3726         https://bugs.webkit.org/show_bug.cgi?id=132676
3727
3728         Reviewed by Simon Fraser.
3729
3730         * Configurations/FeatureDefines.xcconfig:
3731         * css/CSSParser.cpp:
3732         (WebCore::isValidKeywordPropertyAndValue):
3733         * css/CSSPrimitiveValueMappings.h:
3734         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3735         (WebCore::CSSPrimitiveValue::operator EPosition):
3736         * css/CSSValueKeywords.in:
3737         * editing/EditingStyle.cpp:
3738         (WebCore::EditingStyle::convertPositionStyle):
3739
3740 2014-05-14  Radu Stavila  <stavila@adobe.com>
3741
3742         [CSS Regions] Add ASSERT to make sure using the flowThread cache does not return incorrect results
3743         https://bugs.webkit.org/show_bug.cgi?id=132906
3744
3745         Reviewed by Andrei Bucur.
3746
3747         If flowThreadContainingBlock() is called on an object which is in a different
3748         flow thread than the one currently being laid out, this method will return an incorrect
3749         result. I added an assertion for that to make sure we catch and treat any such scenarios.
3750
3751         No new tests required.
3752
3753         * rendering/RenderObject.cpp:
3754         (WebCore::RenderObject::locateFlowThreadContainingBlockNoCache):
3755         (WebCore::RenderObject::locateFlowThreadContainingBlock):
3756         * rendering/RenderObject.h:
3757
3758 2014-05-14  Andrei Bucur  <abucur@adobe.com>
3759
3760         [CSS Regions] Don't relayout when updating the region range unless necessary
3761         https://bugs.webkit.org/show_bug.cgi?id=132120
3762
3763         Reviewed by Antti Koivisto.
3764
3765         The patch reduces the cases when a relayout is made for boxes that change the region range.
3766         This lowers the amount of nested layouts in most cases and produces big layout speedups for trees
3767         without overhanging floats.
3768
3769         Tests: Major performance improvement with speedups of 50-60% on:
3770         Layout/RegionsAuto.html, Layout/RegionsAutoMaxHeight.html and Layout/RegionsFixed.html
3771
3772         * rendering/RenderBlock.cpp:
3773         (WebCore::RenderBlock::updateRegionRangeForBoxChild): Ask the child box if it needs a relayout
3774         in case its region range changes.
3775         * rendering/RenderBlockFlow.cpp:
3776         (WebCore::RenderBlockFlow::layoutBlockChild): It's not necessary to do two layouts here because
3777         there's no block direction position change between them for the child.
3778         (WebCore::RenderBlockFlow::needsLayoutAfterRegionRangeChange): If the block doesn't have floats
3779         or if it expands to enclose the floats it doesn't need to relayout after a region range chage.
3780         It's not possible for it to have a float inside overflow that must be repositioned using the new
3781         range.
3782         * rendering/RenderBlockFlow.h:
3783         * rendering/RenderBox.h:
3784         (WebCore::RenderBox::needsLayoutAfterRegionRangeChange): By default don't relayout after a region
3785         range change.
3786
3787 2014-05-14  Antti Koivisto  <antti@apple.com>
3788
3789         RuleData should ref the StyleRule
3790         https://bugs.webkit.org/show_bug.cgi?id=132865
3791
3792         Reviewed by Andreas Kling.
3793
3794         As a defensive move make RuleData ref the StyleRule. 
3795         This adds some ref churn but the overall performance impact should be minimal.
3796
3797         * css/RuleSet.h:
3798         (WebCore::RuleData::rule):
3799
3800 2014-05-14  Antti Koivisto  <antti@apple.com>
3801
3802         GIF animations don't restart after scrolling on iOS WebKit1
3803         https://bugs.webkit.org/show_bug.cgi?id=132900
3804
3805         Reviewed by Andreas Kling.
3806
3807         * WebCore.exp.in:
3808
3809 2014-05-13  Andrei Bucur  <abucur@adobe.com>
3810
3811         [CSS Regions] Assertion failure in some cases with inline blocks
3812         https://bugs.webkit.org/show_bug.cgi?id=132859
3813
3814         Reviewed by Mihnea Ovidenie.
3815
3816         The patch hardens the conditions when the region range caches are
3817         populated to avoid desynchronizations when objects move during layout.
3818         This is true especially in the case of the boxes found inside
3819         inline blocks, that get their range from the containing line.
3820
3821         There is a new function |computedRegionRangeForBox| that will always
3822         return a region range for a box using a best effort algorithm. This should
3823         be used only when there's no need to cache region information.
3824
3825         This change also allows better control over the lifecycle of the
3826         |RenderBoxRegionInfo| objects stored on the regions. We can now iterate
3827         over the full range of the box when cleaning up the region box info. The
3828         same applies for the width change detection function.
3829
3830         Test: fast/regions/inline-block-shifted-region.html
3831
3832         * rendering/RenderBlockLineLayout.cpp:
3833         (WebCore::RenderBlockFlow::updateRegionForLine): Don't set the containing
3834         region if the block doesn't have a range. The returned value would not
3835         be correctly clamped.
3836         * rendering/RenderBox.cpp:
3837         (WebCore::RenderBlock::hasRegionRangeInFlowThread):
3838         * rendering/RenderBox.h:
3839         * rendering/RenderFlowThread.cpp:
3840         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo): Iterate only over
3841         the range of the box, not from the start of the region chain.
3842         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock): Same as
3843         above.
3844         (WebCore::RenderFlowThread::hasCachedRegionRangeForBox):
3845         (WebCore::RenderFlowThread::getRegionRangeForBoxFromCachedInfo):
3846         (WebCore::RenderFlowThread::getRegionRangeForBox):
3847         (WebCore::RenderFlowThread::computedRegionRangeForBox): Best effort function
3848         to determine the range of a box. It will always return something as long
3849         as the flow thread has regions.
3850         (WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion): Use the new function
3851         to determine the range.
3852         * rendering/RenderFlowThread.h:
3853         * rendering/RenderNamedFlowThread.cpp:
3854         (WebCore::RenderNamedFlowThread::absoluteQuadsForBox): Use the new function to determine
3855         the range.
3856
3857 2014-05-13  Simon Fraser  <simon.fraser@apple.com>
3858
3859         Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
3860         https://bugs.webkit.org/show_bug.cgi?id=132899
3861
3862         Reviewed by Beth Dakin.
3863
3864         Export some things
3865
3866         * WebCore.exp.in:
3867
3868 2014-05-13  Hans Muller  <hmuller@adobe.com>
3869
3870         [CSS Shapes] line height grows around polygon and incorrectly causes text to wrap to next line
3871         https://bugs.webkit.org/show_bug.cgi?id=131622
3872
3873         Reviewed by Bem Jones-Bey.
3874
3875         Corrected an earlier PolygonShape fix https://bugs.webkit.org/show_bug.cgi?id=132132
3876         When the top or bottom of a layout line is coincident with a polygon edge vertex, we
3877         only consider it an intersection if the edge extends into the line.
3878
3879         Test: fast/shapes/shape-outside-floats/shape-outside-edge-case.html
3880
3881         * rendering/shapes/PolygonShape.cpp:
3882         (WebCore::OffsetPolygonEdge::clippedEdgeXRange):
3883
3884 2014-05-13  Beth Dakin  <bdakin@apple.com>
3885
3886         m_layerForOverhangAreas is sometimes not positioned correctly when topContentInset 
3887         has changed
3888         https://bugs.webkit.org/show_bug.cgi?id=132898
3889         -and corresponding-
3890         <rdar://problem/16644710>
3891
3892         Reviewed by Anders Carlsson.
3893
3894         This function is called whenever the topContentInset changes, so use it as an 
3895         opportunity to ensure that m_layerForOverhangAreas has been positioned correctly.
3896         * rendering/RenderLayerCompositor.cpp:
3897         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
3898
3899         Everyone gets an anchor point!
3900         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
3901
3902 2014-05-13  Dean Jackson  <dino@apple.com>
3903
3904         Attempted build fix after https://bugs.webkit.org/show_bug.cgi?id=132891
3905
3906         * page/PageDebuggable.cpp:
3907
3908 2014-05-13  Timothy Hatcher  <timothy@apple.com>
3909
3910         Force developerExtrasEnabled when a remote Inspector client connects.
3911
3912         https://bugs.webkit.org/show_bug.cgi?id=132891
3913
3914         Reviewed by Joseph Pecoraro.
3915
3916         * page/PageDebuggable.cpp:
3917         (WebCore::PageDebuggable::PageDebuggable): Initialize m_forcedDeveloperExtrasEnabled to false.
3918         (WebCore::PageDebuggable::connect): Set m_forcedDeveloperExtrasEnabled if the setting is changed.
3919         (WebCore::PageDebuggable::disconnect): Switch developerExtrasEnabled back to false
3920         if m_forcedDeveloperExtrasEnabled is true.
3921         * page/PageDebuggable.h: Added m_forcedDeveloperExtrasEnabled.
3922
3923 2014-05-13  Beth Dakin  <bdakin@apple.com>
3924
3925         REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes 
3926         scrolling in News Feed
3927         https://bugs.webkit.org/show_bug.cgi?id=132889
3928         -and corresponding-
3929         <rdar://problem/16715716>
3930
3931         Reviewed by Simon Fraser.
3932
3933         First of all, scrollOffsetRelativeToDocument() was very poorly named. This patch 
3934         re-names it to the much more accurate documentScrollOffsetRelativeToViewOrigin(). 
3935         Re-naming it makes it clear that ONE call site was not getting the right offset. 
3936         That call site does not want to know the document’s position relative to the view 
3937         origin, but rather it wants to know the Document’s position relative to the 
3938         scrolling origin.
3939
3940         Export new name.
3941         * WebCore.exp.in:
3942
3943         Use newly re-named documentScrollPositionRelativeToViewOrigin().
3944         * page/FrameView.cpp:
3945         (WebCore::FrameView::convertToRenderer):
3946         * platform/ScrollView.cpp:
3947         (WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
3948         (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
3949         (WebCore::ScrollView::documentScrollOffsetRelativeToScrollableAreaOrigin):
3950         (WebCore::ScrollView::rootViewToContents):
3951         (WebCore::ScrollView::windowToContents):
3952         (WebCore::ScrollView::scrollOffsetRelativeToDocument): Deleted.
3953         (WebCore::ScrollView::scrollPositionRelativeToDocument): Deleted.
3954         * platform/ScrollView.h:
3955
3956         THIS is the spot that needs the new function, 
3957         documentScrollOffsetRelativeToScrollableAreaOrigin()()
3958         * rendering/RenderLayer.cpp:
3959         (WebCore::RenderLayer::scrollRectToVisible):
3960
3961 2014-05-13  Dean Jackson  <dino@apple.com>
3962
3963         [iOS] Page scale update messages for media controls should only fire at the end of zooming
3964         https://bugs.webkit.org/show_bug.cgi?id=132857
3965         <rdar://problem/16631009>
3966
3967         Reviewed by Simon Fraser.
3968