[EFL][WK2] Extract the control of page background out of color_set
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-03-31  Ryuan Choi  <ryuan.choi@samsung.com>
2
3         [EFL][WK2] Extract the control of page background out of color_set
4         https://bugs.webkit.org/show_bug.cgi?id=127539
5
6         Reviewed by Gyuyoung Kim.
7
8         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
9         Added m_viewBackgroundColor to clear when m_setDrawsBackground is false.
10         (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
11         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
12         (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
13         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
14         (WebCore::CoordinatedGraphicsScene::setViewBackgroundColor):
15         (WebCore::CoordinatedGraphicsScene::viewBackgroundColor):
16         * rendering/RenderLayerBacking.cpp:
17         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
18         Added EFL guard not to set opaque as a default for MainFrameRenderViewLayer.
19         * rendering/RenderLayerCompositor.cpp:
20         (WebCore::RenderLayerCompositor::ensureRootLayer):
21         Added EFL guard to apply page scale on RenderView like IOS.
22
23 2014-03-31  Byungseon Shin  <sun.shin@lge.com>
24
25         [WebGL][OpenGLES] Enable MSAA support for WebGL Canvas
26         https://bugs.webkit.org/show_bug.cgi?id=130955
27
28         Reviewed by Dean Jackson.
29
30         To avoid aliasing issues when we render content to WebGL canvas,
31          we need to implement MSAA support.
32         - Imagination OpenGLES GPU Driver already support MSAA, so we
33          need a separate code path to enable it.
34
35         * platform/graphics/Extensions3D.h:
36         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
37         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
38         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
39         (WebCore::Extensions3DOpenGLCommon::isImagination):
40         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
41         (WebCore::GraphicsContext3D::reshapeFBOs):
42
43 2014-03-31  Alexey Proskuryakov  <ap@apple.com>
44
45         Crashes in PageConsole::addMessage
46         https://bugs.webkit.org/show_bug.cgi?id=130991
47         <rdar://problem/14795232>
48
49         Reviewed by Geoffrey Garen.
50
51         Test: http/tests/misc/detached-frame-console.html
52
53         * page/DOMWindow.cpp: (WebCore::DOMWindow::printErrorMessage): Added a null check.
54         It's legitimate for this to be called for a window that is not currently displayed
55         in a frame.
56
57 2014-03-31  Simon Fraser  <simon.fraser@apple.com>
58
59         [UI-side compositing] Proxy animations to the UI process
60         https://bugs.webkit.org/show_bug.cgi?id=130946
61
62         Reviewed by Tim Horton.
63         
64         To proxy CA animations, make PlatformCAAnimation a pure virtual base class
65         and subclass for Mac, Windows, and Remote (just like PlatformCALayer).
66         
67         Add coding support for TimingFunctions.
68         
69         Do some minor #include tidyup.
70         
71         Minor refactor in GraphicsLayerCA to share some animations code.
72
73         * WebCore.exp.in:
74         * WebCore.xcodeproj/project.pbxproj:
75         * platform/animation/TimingFunction.h: Add setters need for encode/decode.
76         (WebCore::CubicBezierTimingFunction::setValues):
77         (WebCore::CubicBezierTimingFunction::setTimingFunctionPreset):
78         (WebCore::StepsTimingFunction::create):
79         (WebCore::StepsTimingFunction::setNumberOfSteps):
80         (WebCore::StepsTimingFunction::setStepAtStart):
81         * platform/graphics/ca/GraphicsLayerCA.cpp:
82         (WebCore::GraphicsLayerCA::createPlatformCAAnimation):
83         (WebCore::GraphicsLayerCA::animationCanBeAccelerated): Minor refactor so we can share
84         code with GraphicsLayerCARemote.
85         (WebCore::GraphicsLayerCA::addAnimation):
86         (WebCore::GraphicsLayerCA::createBasicAnimation):
87         (WebCore::PassRefPtr<PlatformCAAnimation>GraphicsLayerCA::createKeyframeAnimation):
88         * platform/graphics/ca/GraphicsLayerCA.h:
89         * platform/graphics/ca/PlatformCAAnimation.h:
90         (WebCore::PlatformCAAnimation::~PlatformCAAnimation):
91         (WebCore::PlatformCAAnimation::isPlatformCAAnimationMac):
92         (WebCore::PlatformCAAnimation::isPlatformCAAnimationWin):
93         (WebCore::PlatformCAAnimation::isPlatformCAAnimationRemote):
94         (WebCore::PlatformCAAnimation::PlatformCAAnimation):
95         (WebCore::PlatformCAAnimation::setType):
96         * platform/graphics/ca/PlatformCALayer.h:
97         * platform/graphics/ca/mac/PlatformCAAnimationMac.h: Added.
98         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
99         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
100         (PlatformCALayerMac::addAnimationForKey):
101         (PlatformCALayerMac::animationForKey):
102         * platform/graphics/ca/mac/TileController.mm:
103         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
104         * platform/graphics/ca/win/PlatformCAAnimationWin.h: Added.
105
106 2014-03-31  Benjamin Poulain  <benjamin@webkit.org>
107
108         CSS JIT: compile the first-child pseudo class
109         https://bugs.webkit.org/show_bug.cgi?id=130954
110
111         Reviewed by Andreas Kling.
112
113         * css/ElementRuleCollector.cpp:
114         (WebCore::ElementRuleCollector::collectMatchingRules):
115         The compiler use the context's style directly when resolving style. An error introduced
116         in the rule collector would cause a crash in the compiled code which would be hard to debug.
117         Add an assertion early in the stack to catch errors where it is easier to debug them.
118
119         * css/StyleResolver.cpp:
120         (WebCore::StyleResolver::State::initForStyleResolve):
121         * cssjit/SelectorCompiler.cpp:
122         (WebCore::SelectorCompiler::addPseudoType):
123         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
124         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToPreviousAdjacentElement):
125         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToPreviousAdjacent):
126         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
127         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
128         Refactor those to be able to reuse the code getting a sibling element preceding the current element.
129
130         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNotResolvingStyle):
131         Extract the code checking the current mode from SelectorCodeGenerator::markParentElementIfResolvingStyle()
132         in a separate function. This will be useful for all the pseudo class with marking.
133
134         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
135         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
136         (WebCore::SelectorCompiler::setFirstChildState):
137         This is the slow path for when the first-child pseudo class is on a fragment that is not
138         the rightmost.
139         The reason to use a slow path is accessing renderStyle() is not trivial and this case isn't not
140         as common. We should improve this later.
141
142         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
143         This is just implementing the test for first-child plus the tree marking. Nothing fancy,
144         this is basically the same thing as SelectorChecker.
145
146         * dom/Element.cpp:
147         (WebCore::Element::setChildrenAffectedByFirstChildRules):
148         * dom/Element.h:
149         C++ fallback to set the flag, to be improved later with the other flags.
150
151         * rendering/style/RenderStyle.h:
152         I accidentaly put noninheritedFlagsMemoryOffset() as private in the RenderStyle refactoring.
153
154         Also update the flags accessor to make them easier to work with from the compiler. In particular,
155         setFirstChildStateFlags() sets both isUnique and firstChild. Currently the JIT does not need to access
156         the value so individual flags are made private.
157
158 2014-03-31  Dean Jackson  <dino@apple.com>
159
160         Remove WEB_ANIMATIONS
161         https://bugs.webkit.org/show_bug.cgi?id=130989
162
163         Reviewed by Simon Fraser.
164
165         Remove this feature flag until we plan to implement.
166
167         * Configurations/FeatureDefines.xcconfig:
168
169 2014-03-31  Simon Fraser  <simon.fraser@apple.com>
170
171         Fix iOS build.
172
173         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
174         (WebCore::ScrollingTreeScrollingNodeIOS::updateLayersAfterDelegatedScroll):
175
176 2014-03-31  Pratik Solanki  <psolanki@apple.com>
177
178         Unreviewed. iOS build fix after r166532. Add missing comma.
179
180         * dom/DocumentMarker.h:
181
182 2014-03-31  Brady Eidson  <beidson@apple.com>
183
184         Add variant of phone number parsing that use DocumentMarker in the current selection
185         <rdar://problem/16379566> and https://bugs.webkit.org/show_bug.cgi?id=130917
186
187         Reviewed by Darin Adler.
188
189         * dom/DocumentMarker.h:
190         (WebCore::DocumentMarker::AllMarkers::AllMarkers): Add a new TelephoneNumber document marker type.
191
192         * editing/Editor.cpp:
193         (WebCore::Editor::respondToChangedSelection):
194         (WebCore::Editor::scanSelectionForTelephoneNumbers): TextIterate over the selected range looking for numbers.
195         (WebCore::Editor::scanRangeForTelephoneNumbers): Scan the given range for a telephone number,
196           adding the DocumentMarker to any that are found.
197         (WebCore::Editor::clearDataDetectedTelephoneNumbers):
198         * editing/Editor.h:
199
200         * html/parser/HTMLTreeBuilder.cpp:
201         (WebCore::HTMLTreeBuilder::processCharacterBufferForInBody): Only linkify on iOS.
202
203         * rendering/InlineTextBox.cpp:
204         (WebCore::InlineTextBox::paintTelephoneNumberMarker): Placeholder UI while the feature is developed.
205         (WebCore::InlineTextBox::paintDocumentMarkers):
206         * rendering/InlineTextBox.h:
207
208         * testing/Internals.cpp:
209         (WebCore::markerTypesFrom):
210
211 2014-03-31  Simon Fraser  <simon.fraser@apple.com>
212
213         [iOS WK2] Hook up scroll events for accelerated overflow:scroll
214         https://bugs.webkit.org/show_bug.cgi?id=130976
215
216         Reviewed by Tim Horton.
217
218         When an accelerated overflow:scroll is scrolled in the UI process,
219         tell the WebProcess that the scroll happened to update RenderLayer
220         state and fire events.
221         
222         In the WebProcess, RemoteScrollingCoordinator gets a message from the
223         UI process and calls AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll().
224         Fixed that function to handle scrolling nodes other than the root, which
225         required storing a map of ScrollingNodeID->RenderLayer* on RenderLayerCompositor,
226         accessible through FrameView::scrollableAreaForScrollLayerID().
227
228         * WebCore.exp.in:
229         * page/FrameView.cpp:
230         (WebCore::FrameView::scrollableAreaForScrollLayerID):
231         * page/FrameView.h:
232         * page/scrolling/AsyncScrollingCoordinator.cpp:
233         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): Handle
234         overflow as well as main frame scrolling nodes.
235         * page/scrolling/ScrollingTree.cpp:
236         (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling): Use isScrollingNode().
237         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling): When an overflow
238         scroll node was scrolled externally, we have to update layers in decendant nodes,
239         and then call scrollingTreeNodeDidScroll() which tells the ScrollingCoordinator that
240         we scrolled.
241         * page/scrolling/ScrollingTree.h: Try to reduce confusion between the roles played
242         by these various functions, some of which happen in the UI process with UI-side
243         compositing.
244         * page/scrolling/ScrollingTreeScrollingNode.h:
245         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h: Need some functions to be
246         callable by subclasses.
247         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
248         (WebCore::ScrollingTreeScrollingNodeIOS::updateLayersAfterDelegatedScroll):
249         * rendering/RenderLayerCompositor.cpp:
250         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Add
251         scrolling layers to the m_scrollingNodeToLayerMap
252         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): Remove
253         layer from the m_scrollingNodeToLayerMap.
254         (WebCore::RenderLayerCompositor::scrollableAreaForScrollLayerID):
255         * rendering/RenderLayerCompositor.h:
256
257 2014-03-31  Antti Koivisto  <antti@apple.com>
258
259         Rename TileCache to LegacyTileCache
260         https://bugs.webkit.org/show_bug.cgi?id=130986
261
262         Reviewed by Simon Fraser.
263
264         Rename iOS WebKit1 tile cache classes to reflect its status.
265         This also frees some good type names.
266
267         TileCache -> LegacyTileCache
268         TileGrid -> LegacyTileGrid
269         TileGridTile -> LegacyTileGridTile
270         etc.
271
272 2014-03-31  Tim Horton  <timothy_horton@apple.com>
273
274         Small adjustments to WebCore::IOSurface
275         https://bugs.webkit.org/show_bug.cgi?id=130981
276
277         Reviewed by Simon Fraser.
278
279         * WebCore.exp.in:
280         Export some more things.
281
282         * platform/graphics/cocoa/IOSurface.h:
283         createImage() can't be const because it calls ensurePlatformContext().
284
285         * platform/graphics/cocoa/IOSurface.mm:
286         (IOSurface::createImage):
287         We should be able to create an image even if the CGContext has been cleared (or never created).
288
289         (IOSurface::isInUse):
290         Rename inUse() to isInUse().
291
292         (IOSurface::clearGraphicsContext):
293         Add clearGraphicsContext().
294
295 2014-03-31  Tim Horton  <timothy_horton@apple.com>
296
297         Allocate IOSurfaces with the same cache mode that CoreAnimation uses
298         https://bugs.webkit.org/show_bug.cgi?id=130982
299
300         Reviewed by Simon Fraser.
301
302         * platform/graphics/cocoa/IOSurface.mm:
303         (IOSurface::IOSurface):
304         CA uses kIOMapWriteCombineCache for IOSurfaces allocated on iOS.
305
306 2014-03-31  Ion Rosca  <rosca@adobe.com>
307
308         [CSS Blending] Blend mode property is propagated to multiple GraphicLayers
309         https://bugs.webkit.org/show_bug.cgi?id=130337
310
311         Reviewed by Dean Jackson.
312
313         Resets the blend mode for graphicsLayer when it has an ancestorClippingLayer.
314
315         Test: css3/compositing/blend-mode-ancestor-clipping-layer.html
316
317         * rendering/RenderLayer.cpp:
318         (WebCore::RenderLayer::updateBlendMode):
319         (WebCore::RenderLayer::calculateClipRects):
320         * rendering/RenderLayerBacking.cpp:
321         (WebCore::RenderLayerBacking::updateBlendMode):
322         * rendering/RenderLayerBacking.h:
323
324 2014-03-31  Ion Rosca  <rosca@adobe.com>
325
326         [CSS Blending] showLayerTree should dump layer's blend mode and isolation properties
327         https://bugs.webkit.org/show_bug.cgi?id=130922
328
329         Reviewed by Simon Fraser.
330
331         This change only updates existing tests involving blending. No new test required,
332         as there is no new or changed functionality.
333
334         * rendering/RenderLayer.h: adding blendMode() getter.
335         * rendering/RenderTreeAsText.cpp:
336         (WebCore::write):
337         adding blendMode property and layer's isolation status (does layer isolate blending descendants or not?).
338
339 2014-03-31  Benjamin Poulain  <benjamin@webkit.org>
340
341         CSS JIT: clean up the functions ending when generating a checker with context
342         https://bugs.webkit.org/show_bug.cgi?id=130959
343
344         Reviewed by Andreas Kling.
345
346         This code got refactored over time and now both branches do the exact same action
347         on the stack.
348         This patch removes the stack split and move the stack cleanup in the common ending
349         just before restoring the callee saved registers.
350
351         * cssjit/SelectorCompiler.cpp:
352         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
353
354 2014-03-31  Beth Dakin  <bdakin@apple.com>
355
356         ThemeMac should use std::array instead of IntSize* for control sizes
357         https://bugs.webkit.org/show_bug.cgi?id=130985
358
359         Reviewed by Darin Adler.
360
361         Replace uses of const IntSize* with const std::array<IntSize, 3>
362         * platform/mac/ThemeMac.mm:
363         (WebCore::sizeFromNSControlSize):
364         (WebCore::sizeFromFont):
365         (WebCore::controlSizeFromPixelSize):
366         (WebCore::setControlSize):
367         (WebCore::checkboxSizes):
368         (WebCore::radioSizes):
369         (WebCore::buttonSizes):
370         (WebCore::setUpButtonCell):
371         (WebCore::stepperSizes):
372
373 2014-03-31  Hans Muller  <hmuller@adobe.com>
374
375         [CSS Shapes] Simplify RasterShape implementation
376         https://bugs.webkit.org/show_bug.cgi?id=130916
377
378         Reviewed by Dean Jackson.
379
380         Since only floats can specify shape-outside, the RasterShapeIntervals
381         class only needs to track the first and last above threshold pixel column
382         (x1 and x2 in the implementation) for each row. Removed code for dealing with
383         multiple "runs" per row as well as shape-inside internals.
384
385         No new tests, since functionality was only removed.
386
387         * rendering/shapes/RasterShape.cpp:
388         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals):
389         (WebCore::RasterShapeIntervals::initializeBounds):
390         (WebCore::RasterShapeIntervals::buildBoundsPath):
391         (WebCore::RasterShape::getExcludedIntervals):
392         * rendering/shapes/RasterShape.h:
393         (WebCore::RasterShapeIntervals::RasterShapeIntervals):
394         (WebCore::RasterShapeIntervals::intervalAt):
395         (WebCore::RasterShape::RasterShape):
396         * rendering/shapes/Shape.cpp:
397         (WebCore::Shape::createRasterShape):
398         * rendering/shapes/ShapeInterval.h:
399         (WebCore::ShapeInterval::unite):
400
401 2014-03-31  Andreas Kling  <akling@apple.com>
402
403         Always inline toJS() for NodeList.
404         <https://webkit.org/b/130974>
405
406         This is a pretty cheesy optimization, but it's a 3% progression on
407         Dromaeo/dom-query.html on my MBP.
408
409         Reviewed by Benjamin Poulain.
410
411         * WebCore.exp.in:
412         * WebCore.xcodeproj/project.pbxproj:
413         * bindings/js/JSNodeListCustom.h: Added.
414         (WebCore::toJS):
415         * dom/NodeList.idl:
416
417 2014-03-31  Benjamin Poulain  <bpoulain@apple.com>
418
419         Attempt to fix the 32bits debug builds
420
421         The additional debug flags in RefCounted cause the structure to have different alignment
422         with the 64bits flags.
423
424         * rendering/style/RenderStyle.cpp:
425
426 2014-03-29  Simon Fraser  <simon.fraser@apple.com>
427
428         Clarify some scrolling tree terminology
429         https://bugs.webkit.org/show_bug.cgi?id=130929
430
431         Reviewed by Tim Horton.
432
433         Attempt to reduce some ambiguity in scrolling tree terminology.
434         When async scrolling occurs, there are two tasks we have to perform:
435         1. Layers need to be updated to reflect the scroll
436         2. WebCore state has to be updated.
437         The "updateForViewport" name didn't clearly reflect which of these
438         tasks was being performed, so rename it to updateLayersAfterViewportChange()
439         to reflect the fact that it only does the first.
440         
441         Remove the Mac implementation of updateLayersAfterViewportChange(), since
442         it was confsued about this, and was never called anyway.
443
444         * WebCore.exp.in:
445         * page/scrolling/ScrollingTree.cpp:
446         (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
447         * page/scrolling/ScrollingTreeScrollingNode.h:
448         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
449         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
450         (WebCore::ScrollingTreeScrollingNodeIOS::updateLayersAfterViewportChange):
451         (WebCore::ScrollingTreeScrollingNodeIOS::updateForViewport): Deleted.
452         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
453         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
454         (WebCore::ScrollingTreeScrollingNodeMac::updateLayersAfterViewportChange):
455         (WebCore::ScrollingTreeScrollingNodeMac::updateForViewport): Deleted.
456
457 2014-03-31  Tim Horton  <timothy_horton@apple.com>
458
459         [iOS WebKit2] Disable tile cohort retention for now
460         https://bugs.webkit.org/show_bug.cgi?id=130926
461         <rdar://problem/16465413>
462
463         Reviewed by Simon Fraser.
464
465         * WebCore.exp.in:
466         * page/Settings.cpp:
467         (WebCore::Settings::Settings):
468         (WebCore::Settings::setScrollingPerformanceLoggingEnabled):
469         (WebCore::Settings::setAggressiveTileRetentionEnabled): Deleted.
470         * page/Settings.h:
471         (WebCore::Settings::aggressiveTileRetentionEnabled): Deleted.
472         * page/Settings.in:
473         Use Settings.in for these simple settings.
474
475         * platform/graphics/GraphicsLayerClient.h:
476         (WebCore::GraphicsLayerClient::shouldAggressivelyRetainTiles):
477         (WebCore::GraphicsLayerClient::shouldTemporarilyRetainTileCohorts):
478         * platform/graphics/TiledBacking.h:
479         * platform/graphics/ca/GraphicsLayerCA.cpp:
480         (WebCore::GraphicsLayerCA::platformCALayerShouldAggressivelyRetainTiles):
481         (WebCore::GraphicsLayerCA::platformCALayerShouldTemporarilyRetainTileCohorts):
482         * platform/graphics/ca/GraphicsLayerCA.h:
483         * platform/graphics/ca/PlatformCALayerClient.h:
484         (WebCore::PlatformCALayerClient::platformCALayerShouldAggressivelyRetainTiles):
485         (WebCore::PlatformCALayerClient::platformCALayerShouldTemporarilyRetainTileCohorts):
486         * rendering/RenderLayerBacking.cpp:
487         (WebCore::RenderLayerBacking::shouldAggressivelyRetainTiles):
488         (WebCore::RenderLayerBacking::shouldTemporarilyRetainTileCohorts):
489         * rendering/RenderLayerBacking.h:
490         Plumb the two tile-retention settings through to TileController in a pull manner
491         instead of a push manner, as there were some cases (especially on iOS) where
492         the settings weren't always getting pushed down.
493
494         * platform/graphics/ca/mac/TileController.h:
495         * platform/graphics/ca/mac/TileController.mm:
496         (WebCore::TileController::TileController):
497         (WebCore::TileController::tileRevalidationTimerFired):
498         (WebCore::TileController::revalidateTiles):
499         (WebCore::TileController::drawTileMapContents):
500         Aggressive tile retention wins over temporary retention. If we aren't
501         using temporary (cohort) retention, throw away the cohort as soon as it
502         is created.
503
504 2014-03-31  Beth Dakin  <bdakin@apple.com>
505
506         Radio buttons and checkboxes should share code
507         https://bugs.webkit.org/show_bug.cgi?id=130915
508
509         Reviewed by Sam Weinig.
510
511         Radio buttons and checkboxes now share a lot of code. The common term for both is 
512         toggle buttons.
513
514         Move these radio-sizing functions up in the file to be next to the checkbox sizing 
515         functions.
516         * platform/mac/ThemeMac.mm:
517         (WebCore::radioSizes):
518         (WebCore::radioMargins):
519         (WebCore::radioSize):
520
521         Configures a radio button or a checkbox.
522         (WebCore::configureToggleButton):
523
524         Creates a radio button or a checkbox.
525         (WebCore::createToggleButtonCell):
526
527         Still have a shared cell for each.
528         (WebCore::sharedRadioCell):
529         (WebCore::sharedCheckboxCell):
530
531         Does the work of the old paintRadio() and paintCheckbox().
532         (WebCore::paintToggleButton):
533
534         Use sharedRadioCell() here.
535         (WebCore::ThemeMac::inflateControlPaintRect):
536
537         Call paintToggleButton() for radio buttons and checkboxes.
538         (WebCore::ThemeMac::paint):
539
540         All gone.
541         (WebCore::configureCheckbox): Deleted.
542         (WebCore::createCheckboxCell): Deleted.
543         (WebCore::paintCheckbox): Deleted.
544         (WebCore::radio): Deleted.
545         (WebCore::paintRadio): Deleted.
546
547 2014-03-31  Samuel White  <samuel_white@apple.com>
548
549         AX: Need ability to get line range for text marker.
550         https://bugs.webkit.org/show_bug.cgi?id=130906
551
552         Reviewed by Chris Fleizach.
553
554         Added ability to get line range from any marker on that line. This matches the functionality of existing
555         attributes such as AXParagraphTextMarkerRangeForTextMarker and AXSentenceTextMarkerRangeForTextMarker.
556
557         Test: platform/mac/accessibility/line-range-for-text-marker.html
558
559         * accessibility/AccessibilityObject.cpp:
560         (WebCore::AccessibilityObject::visiblePositionRangeForRange):
561         (WebCore::AccessibilityObject::lineRangeForPosition):
562         * accessibility/AccessibilityObject.h:
563         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
564         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
565         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
566
567 2014-03-31  Anders Carlsson  <andersca@apple.com>
568
569         Fix iOS build.
570
571         * page/ChromeClient.h:
572         (WebCore::ChromeClient::updateViewportConstrainedLayers):
573
574 2014-03-31  Jer Noble  <jer.noble@apple.com>
575
576         [MSE][Mac] Support lease-renewal.
577         https://bugs.webkit.org/show_bug.cgi?id=130919
578
579         Reviewed by Eric Carlson.
580
581         Trigger a new key request when receiving an update message containting "renew".
582
583         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
584         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest): Drive-by fix; generate a UTF-8
585             based array.
586         (WebCore::CDMSessionMediaSourceAVFObjC::update):
587
588 2014-03-31  Alexey Proskuryakov  <ap@apple.com>
589
590         Remove special handling of soft hyphens in search code
591         https://bugs.webkit.org/show_bug.cgi?id=130940
592
593         Reviewed by Anders Carlsson.
594
595         ICU knows to ignore soft hyphens, so we don't need to replace them before searching.
596
597         Covered by existing tests.
598
599         * editing/TextIterator.cpp:
600         (WebCore::foldQuoteMark):
601         (WebCore::foldQuoteMarks):
602         (WebCore::SearchBuffer::SearchBuffer):
603         (WebCore::SearchBuffer::append):
604         (WebCore::foldQuoteMarkOrSoftHyphen): Deleted.
605         (WebCore::foldQuoteMarksAndSoftHyphens): Deleted.
606
607 2014-03-31  Alex Christensen  <achristensen@webkit.org>
608
609         Preparation for using Soup on Windows.
610         https://bugs.webkit.org/show_bug.cgi?id=130615
611
612         Reviewed by Carlos Garcia Campos.
613
614         * WebCore.vcxproj/WebCore.vcxproj:
615         * WebCore.vcxproj/WebCore.vcxproj.filters:
616         Added Soup source files in WinCairo build.
617         * loader/soup/CachedRawResourceSoup.cpp:
618         * loader/soup/SubresourceLoaderSoup.cpp:
619         * platform/soup/SharedBufferSoup.cpp:
620         * platform/soup/URLSoup.cpp:
621         * platform/network/NetworkStorageSessionStub.cpp:
622         Only build if USE(SOUP) to prevent building when USE(CURL) is true.
623         * platform/network/soup/ResourceHandleSoup.cpp:
624         Only include unistd.h in non-Visual Studio builds.
625         This would normally be done with a HAVE_UNISTD_H macro when compiling glib and Soup,
626         but that would need to be left undefined for Visual Studio.
627
628 2014-03-31  Zan Dobersek  <zdobersek@igalia.com>
629
630         Unreviewed. Addressing reviewing comments for r166491 that I forgot
631         to address before landing.
632
633         * html/FormController.cpp:
634         (WebCore::SavedFormState::deserialize): No need to move the std::unique_ptr
635         object on the way out.
636         (WebCore::FormController::createSavedFormStateMap): FormKeyGenerator can be
637         allocated on the stack.
638         (WebCore::FormController::formStatesFromStateVector): Use auto.
639
640 2014-03-20  Carlos Garcia Campos  <cgarcia@igalia.com>
641
642         [GTK] Use GMainLoopSource for idle and timeout sources in WebCore
643         https://bugs.webkit.org/show_bug.cgi?id=130078
644
645         Reviewed by Philippe Normand.
646
647         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
648         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
649         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
650         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
651         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
652         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
653         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
654         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
655         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
656         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
657         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
658         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
659         * platform/gtk/GtkDragAndDropHelper.cpp:
660         * platform/gtk/SharedTimerGtk.cpp:
661
662 2014-03-31  Andrei Bucur  <abucur@adobe.com>
663
664         Wrong layout while animating content in regions
665         https://bugs.webkit.org/show_bug.cgi?id=125086
666
667         Reviewed by David Hyatt.
668
669         The region to layer and regions to layer mappings should be cleared when the region chain changes.
670
671         Test: fast/regions/layers/region-removed-during-animation.html
672
673         * rendering/RenderFlowThread.cpp:
674         (WebCore::RenderFlowThread::invalidateRegions): Clear the two maps and flag them for recomputation.
675         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer): Assert that the returned region exists.
676
677 2014-03-31  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
678
679         Remove hostThisRegister() and hostThisValue()
680         https://bugs.webkit.org/show_bug.cgi?id=130895
681
682         Reviewed by Geoffrey Garen.
683
684         Removed hostThisRegister() and hostThisValue() and instead use thisArgumentOffset() and thisValue() respectively.
685
686         No new tests, no behavior changes.
687
688         * bindings/js/JSNavigatorCustom.cpp:
689         (WebCore::JSNavigator::webkitGetUserMedia):
690         * bindings/js/JSPluginElementFunctions.cpp:
691         (WebCore::callPlugin):
692         * bindings/scripts/CodeGeneratorJS.pm:
693         (GenerateImplementation):
694         * bindings/scripts/test/JS/JSFloat64Array.cpp:
695         (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
696         (WebCore::jsFloat64ArrayPrototypeFunctionSet):
697         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
698         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
699         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
700         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
701         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
702         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
703         (WebCore::jsTestEventTargetPrototypeFunctionItem):
704         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
705         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
706         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
707         * bindings/scripts/test/JS/JSTestInterface.cpp:
708         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
709         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
710         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
711         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
712         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
713         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3):
714         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
715         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
716         * bindings/scripts/test/JS/JSTestObj.cpp:
717         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
718         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
719         (WebCore::jsTestObjPrototypeFunctionByteMethod):
720         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
721         (WebCore::jsTestObjPrototypeFunctionOctetMethod):
722         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
723         (WebCore::jsTestObjPrototypeFunctionLongMethod):
724         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
725         (WebCore::jsTestObjPrototypeFunctionObjMethod):
726         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
727         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
728         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
729         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
730         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
731         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
732         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
733         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
734         (WebCore::jsTestObjPrototypeFunctionCustomMethod):
735         (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
736         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
737         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
738         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
739         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
740         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
741         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
742         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
743         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
744         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
745         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
746         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
747         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
748         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
749         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
750         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
751         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
752         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
753         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
754         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
755         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
756         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
757         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
758         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
759         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
760         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
761         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
762         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
763         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
764         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
765         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
766         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
767         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
768         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
769         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
770         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
771         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
772         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
773         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
774         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
775         (WebCore::jsTestObjPrototypeFunctionConvert1):
776         (WebCore::jsTestObjPrototypeFunctionConvert2):
777         (WebCore::jsTestObjPrototypeFunctionConvert4):
778         (WebCore::jsTestObjPrototypeFunctionConvert5):
779         (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
780         (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
781         (WebCore::jsTestObjPrototypeFunctionOrange):
782         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
783         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
784         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
785         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
786         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
787         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
788         (WebCore::jsTestObjPrototypeFunctionAny):
789         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
790         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
791         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
792         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
793         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
794         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
795         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
796         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
797         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
798         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
799         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
800         * bridge/objc/objc_runtime.mm:
801         (JSC::Bindings::callObjCFallbackObject):
802         * bridge/runtime_method.cpp:
803         (JSC::callRuntimeMethod):
804
805 2014-03-31  Zan Dobersek  <zdobersek@igalia.com>
806
807         Move the rest of Source/WebCore/html/ code to std::unique_ptr
808         https://bugs.webkit.org/show_bug.cgi?id=129669
809
810         Reviewed by Anders Carlsson.
811
812         Replace the remaining uses of OwnPtr, PassOwnPtr under Source/WebCore/html/ with std::unique_ptr.
813
814         * html/FormController.cpp:
815         (WebCore::SavedFormState::SavedFormState):
816         (WebCore::SavedFormState::deserialize):
817         (WebCore::FormController::createSavedFormStateMap):
818         (WebCore::FormController::formElementsState):
819         (WebCore::FormController::takeStateForFormElement):
820         (WebCore::FormController::formStatesFromStateVector):
821         * html/FormController.h:
822         * html/HTMLAreaElement.cpp:
823         (WebCore::HTMLAreaElement::mapMouseEvent):
824         * html/HTMLAreaElement.h:
825         * html/HTMLCanvasElement.cpp:
826         (WebCore::HTMLCanvasElement::setSurfaceSize):
827         (WebCore::HTMLCanvasElement::createImageBuffer):
828         * html/HTMLCanvasElement.h:
829         * html/HTMLCollection.h:
830         * html/HTMLEmbedElement.cpp:
831         (WebCore::HTMLEmbedElement::parseAttribute):
832         * html/HTMLFormControlElement.cpp:
833         (WebCore::HTMLFormControlElement::updateVisibleValidationMessage):
834         * html/HTMLFormControlElement.h:
835         * html/HTMLFormElement.cpp:
836         (WebCore::HTMLFormElement::addToPastNamesMap):
837         * html/HTMLFormElement.h:
838         * html/HTMLInputElement.cpp:
839         (WebCore::HTMLInputElement::imageLoader):
840         (WebCore::HTMLInputElement::resetListAttributeTargetObserver):
841         * html/HTMLInputElement.h:
842         (WebCore::HTMLInputElement::hasImageLoader):
843         * html/HTMLObjectElement.cpp:
844         (WebCore::HTMLObjectElement::parseAttribute):
845         * html/HTMLPlugInImageElement.cpp:
846         (WebCore::HTMLPlugInImageElement::startLoadingImage):
847         * html/HTMLPlugInImageElement.h:
848         * html/HTMLVideoElement.cpp:
849         (WebCore::HTMLVideoElement::didAttachRenderers):
850         (WebCore::HTMLVideoElement::parseAttribute):
851         * html/HTMLVideoElement.h:
852         * html/ValidationMessage.cpp:
853         (WebCore::ValidationMessage::ValidationMessage):
854         (WebCore::ValidationMessage::setMessage):
855         (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
856         (WebCore::ValidationMessage::requestToHideMessage):
857         * html/ValidationMessage.h:
858
859 2014-03-31  Maurice van der Pot  <griffon26@kfk4ever.com>
860
861         Fix mixed use of booleans in JPEGImageDecoder.cpp
862         https://bugs.webkit.org/show_bug.cgi?id=122412
863
864         Reviewed by Darin Adler.
865
866         Trivial fix for compilation error; no new tests.
867
868         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
869         (WebCore::JPEGImageReader::decode):
870         (WebCore::fill_input_buffer):
871         Use TRUE/FALSE defined by libjpeg for libjpeg booleans
872
873 2014-03-23  Zan Dobersek  <zdobersek@igalia.com>
874
875         Move Source/WebCore/rendering/ code to std::unique_ptr
876         https://bugs.webkit.org/show_bug.cgi?id=129664
877
878         Reviewed by Anders Carlsson.
879
880         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/rendering/ with std::unique_ptr.
881
882         * platform/graphics/FloatPolygon.cpp:
883         (WebCore::FloatPolygon::FloatPolygon):
884         * platform/graphics/FloatPolygon.h:
885         * rendering/ClipPathOperation.h:
886         * rendering/FlowThreadController.cpp:
887         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
888         * rendering/FlowThreadController.h:
889         * rendering/HitTestLocation.h:
890         * rendering/HitTestResult.cpp:
891         (WebCore::HitTestResult::HitTestResult):
892         (WebCore::HitTestResult::operator=):
893         (WebCore::HitTestResult::rectBasedTestResult):
894         (WebCore::HitTestResult::mutableRectBasedTestResult):
895         * rendering/HitTestResult.h:
896         * rendering/HitTestingTransformState.cpp:
897         * rendering/ImageQualityController.h:
898         * rendering/RenderBlock.cpp:
899         (WebCore::removeBlockFromDescendantAndContainerMaps):
900         (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
901         (WebCore::RenderBlock::addContinuationWithOutline):
902         (WebCore::RenderBlock::paintContinuationOutlines):
903         (WebCore::RenderBlock::insertIntoTrackedRendererMaps):
904         (WebCore::RenderBlock::removeFromTrackedRendererMaps):
905         (WebCore::RenderBlock::setComputedColumnCountAndWidth):
906         * rendering/RenderBlock.h:
907         * rendering/RenderBlockFlow.cpp:
908         (WebCore::RenderBlockFlow::createFloatingObjects):
909         * rendering/RenderBlockFlow.h:
910         * rendering/RenderBoxRegionInfo.h:
911         * rendering/RenderButton.cpp:
912         (WebCore::RenderButton::styleDidChange):
913         * rendering/RenderButton.h:
914         * rendering/RenderCounter.cpp:
915         (WebCore::makeCounterNode):
916         * rendering/RenderFlowThread.cpp:
917         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
918         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
919         * rendering/RenderFlowThread.h:
920         * rendering/RenderGeometryMap.cpp:
921         (WebCore::RenderGeometryMap::push):
922         (WebCore::RenderGeometryMap::pushView):
923         * rendering/RenderGeometryMap.h:
924         * rendering/RenderGrid.cpp:
925         (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
926         (WebCore::RenderGrid::placeItemsOnGrid):
927         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
928         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
929         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
930         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
931         (WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition):
932         (WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition):
933         (WebCore::RenderGrid::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
934         (WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
935         * rendering/RenderGrid.h:
936         * rendering/RenderImageResource.h:
937         * rendering/RenderLayer.cpp:
938         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
939         (WebCore::RenderLayer::updateTransform):
940         (WebCore::RenderLayer::setupFilters):
941         (WebCore::RenderLayer::paintLayerContents):
942         (WebCore::RenderLayer::paintChildLayerIntoColumns):
943         (WebCore::RenderLayer::hitTestChildLayerColumns):
944         (WebCore::RenderLayer::updateClipRects):
945         (WebCore::RenderLayer::calculateClipRects):
946         * rendering/RenderLayer.h:
947         (WebCore::RenderLayer::clearZOrderLists):
948         * rendering/RenderLayerCompositor.cpp:
949         (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh):
950         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
951         * rendering/RenderLayerCompositor.h:
952         * rendering/RenderLayerFilterInfo.cpp:
953         (WebCore::RenderLayer::FilterInfo::map):
954         (WebCore::RenderLayer::FilterInfo::get):
955         * rendering/RenderLayerFilterInfo.h:
956         * rendering/RenderRegion.cpp:
957         (WebCore::RenderRegion::setRenderBoxRegionInfo):
958         (WebCore::RenderRegion::takeRenderBoxRegionInfo):
959         * rendering/RenderRegion.h:
960         * rendering/RenderTable.cpp:
961         (WebCore::RenderTable::styleDidChange):
962         * rendering/RenderTable.h:
963         * rendering/RenderView.cpp:
964         (WebCore::RenderView::selectionBounds):
965         (WebCore::RenderView::setSelection):
966         (WebCore::RenderView::compositor):
967         (WebCore::RenderView::flowThreadController):
968         (WebCore::RenderView::imageQualityController):
969         * rendering/RenderView.h:
970         * rendering/RootInlineBox.h:
971         (WebCore::RootInlineBox::appendFloat):
972         * rendering/TextAutosizer.h:
973         * rendering/shapes/PolygonShape.cpp:
974         (WebCore::computeShapePaddingBounds):
975         (WebCore::computeShapeMarginBounds):
976         * rendering/shapes/PolygonShape.h:
977         (WebCore::PolygonShape::PolygonShape):
978         * rendering/shapes/RasterShape.cpp:
979         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals):
980         * rendering/shapes/RasterShape.h:
981         (WebCore::RasterShape::RasterShape):
982         * rendering/shapes/Shape.cpp:
983         (WebCore::createInsetShape):
984         (WebCore::createRectangleShape):
985         (WebCore::createCircleShape):
986         (WebCore::createEllipseShape):
987         (WebCore::createPolygonShape):
988         (WebCore::Shape::createShape):
989         (WebCore::Shape::createRasterShape):
990         (WebCore::Shape::createLayoutBoxShape):
991         * rendering/shapes/Shape.h:
992         * rendering/shapes/ShapeInfo.h:
993         (WebCore::ShapeInfo::markShapeAsDirty):
994         (WebCore::ShapeInfo::isShapeDirty):
995         * rendering/shapes/ShapeInsideInfo.h:
996         * rendering/style/ContentData.h:
997         * rendering/style/CounterDirectives.cpp:
998         (WebCore::clone):
999         * rendering/style/CounterDirectives.h:
1000         * rendering/style/GridCoordinate.h:
1001         * rendering/style/RenderStyle.cpp:
1002         (WebCore::RenderStyle::addCachedPseudoStyle):
1003         (WebCore::RenderStyle::accessCounterDirectives):
1004         (WebCore::RenderStyle::accessAnimations):
1005         (WebCore::RenderStyle::accessTransitions):
1006         * rendering/style/RenderStyle.h:
1007         * rendering/style/StyleRareNonInheritedData.cpp:
1008         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1009         * rendering/style/StyleRareNonInheritedData.h:
1010         * rendering/svg/RenderSVGResourceGradient.cpp:
1011         (WebCore::RenderSVGResourceGradient::applyResource):
1012         * rendering/svg/RenderSVGResourceGradient.h:
1013         * rendering/svg/RenderSVGResourcePattern.cpp:
1014         (WebCore::RenderSVGResourcePattern::buildPattern):
1015         * rendering/svg/RenderSVGResourcePattern.h:
1016         * rendering/svg/RenderSVGShape.cpp:
1017         (WebCore::RenderSVGShape::updateShapeFromElement):
1018         * rendering/svg/RenderSVGShape.h:
1019         * rendering/svg/SVGResources.cpp:
1020         (WebCore::SVGResources::setClipper):
1021         (WebCore::SVGResources::setFilter):
1022         (WebCore::SVGResources::setMarkerStart):
1023         (WebCore::SVGResources::setMarkerMid):
1024         (WebCore::SVGResources::setMarkerEnd):
1025         (WebCore::SVGResources::setMasker):
1026         (WebCore::SVGResources::setFill):
1027         (WebCore::SVGResources::setStroke):
1028         * rendering/svg/SVGResources.h:
1029         * rendering/svg/SVGResourcesCache.cpp:
1030         (WebCore::SVGResourcesCache::addResourcesFromRenderer):
1031         (WebCore::SVGResourcesCache::removeResourcesFromRenderer):
1032         * rendering/svg/SVGResourcesCache.h:
1033         * rendering/svg/SVGTextMetricsBuilder.cpp:
1034         (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer):
1035         * rendering/svg/SVGTextMetricsBuilder.h:
1036
1037 2014-03-28  Sergio Villar Senin  <svillar@igalia.com>
1038
1039         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in loader
1040         https://bugs.webkit.org/show_bug.cgi?id=130893
1041
1042         Reviewed by Darin Adler.
1043
1044         * loader/ImageLoader.cpp:
1045         (WebCore::beforeLoadEventSender):
1046         (WebCore::loadEventSender):
1047         (WebCore::errorEventSender):
1048         * loader/appcache/ApplicationCacheStorage.cpp:
1049         (WebCore::cacheStorage):
1050         * loader/appcache/ApplicationCacheStorage.h:
1051         * loader/archive/ArchiveFactory.cpp:
1052         (WebCore::archiveMIMETypes):
1053         * loader/cache/CachedImage.cpp:
1054         (WebCore::CachedImage::brokenImage):
1055         * loader/cache/CachedRawResource.cpp:
1056         (WebCore::shouldIgnoreHeaderForCacheReuse):
1057         * loader/cache/MemoryCache.cpp:
1058         (WebCore::dummyCachedImageClient):
1059
1060 2014-03-28  Sergio Villar Senin  <svillar@igalia.com>
1061
1062         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in css
1063         https://bugs.webkit.org/show_bug.cgi?id=130409
1064
1065         Reviewed by Darin Adler.
1066
1067         * css/CSSComputedStyleDeclaration.cpp:
1068         (WebCore::logUnimplementedPropertyID):
1069         * css/CSSDefaultStyleSheets.cpp:
1070         (WebCore::screenEval):
1071         (WebCore::printEval):
1072         * css/CSSParser.cpp:
1073         (WebCore::strictCSSParserContext):
1074         * css/CSSPrimitiveValue.cpp:
1075         (WebCore::cssTextCache):
1076         * css/CSSProperty.cpp:
1077         (WebCore::borderDirections):
1078         * css/CSSStyleRule.cpp:
1079         (WebCore::selectorTextCache):
1080         * css/CSSValuePool.cpp:
1081         (WebCore::cssValuePool):
1082         * css/CSSValuePool.h:
1083         * css/DeprecatedStyleBuilder.cpp:
1084         (WebCore::ApplyPropertyPageSize::getPageSizeFromName):
1085         (WebCore::DeprecatedStyleBuilder::sharedStyleBuilder):
1086         * css/DeprecatedStyleBuilder.h:
1087
1088 2014-03-30  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1089
1090         [GTK] [TextureMapper] Weird brightness with some videos with acceletared compositing
1091         https://bugs.webkit.org/show_bug.cgi?id=130665
1092
1093         Reviewed by Martin Robinson.
1094
1095         When we uploaded a video texture to the mapper we were not
1096         considering that some videos could be decoded into a format
1097         without alpha component. Now we check if the video has alpha and
1098         if it does not, we remove the alpha flag when retrieving the
1099         texture from the pool. For this, the method to get the texture
1100         from the pool was modified to receive the flags, that is mapped to
1101         have alpha by default in order not to break any other existing
1102         code.
1103
1104         Though we have a problem with AC in WTR and that makes it
1105         currently not testable, no new tests are needed because once this
1106         is fixed the current test set suffices to detect a possible
1107         regression in this.
1108
1109         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1110         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Check
1111         the video format and decide if the texture shall be pulled with
1112         alpha support or not.
1113         * platform/graphics/texmap/TextureMapper.cpp:
1114         (WebCore::TextureMapper::acquireTextureFromPool): Use the flags
1115         when resetting the texture.
1116         * platform/graphics/texmap/TextureMapper.h:
1117         (WebCore::BitmapTexture::Flag::None): Added with 0x00.
1118         (WebCore::TextureMapper::acquireTextureFromPool): Added flag
1119         parameter to set up the texture with the default for including
1120         alpha channel.
1121
1122 2014-03-30  Jinwoo Song  <jinwoo7.song@samsung.com>
1123
1124         Adopt range-based for loops to TextCheckerEnchant
1125         https://bugs.webkit.org/show_bug.cgi?id=130714
1126
1127         Reviewed by Darin Adler.
1128
1129         * platform/text/enchant/TextCheckerEnchant.cpp:
1130         (WebCore::TextCheckerEnchant::ignoreWord):
1131         (WebCore::TextCheckerEnchant::learnWord):
1132         (WebCore::TextCheckerEnchant::checkSpellingOfWord):
1133         (WebCore::TextCheckerEnchant::getGuessesForWord):
1134         (WebCore::TextCheckerEnchant::updateSpellCheckingLanguages):
1135         (WebCore::TextCheckerEnchant::loadedSpellCheckingLanguages):
1136         (WebCore::TextCheckerEnchant::availableSpellCheckingLanguages):
1137         (WebCore::TextCheckerEnchant::freeEnchantBrokerDictionaries):
1138
1139 2014-03-30  Benjamin Poulain  <benjamin@webkit.org>
1140
1141         Second attempt to fix 32bits build after r166465
1142
1143         * rendering/style/RenderStyle.h:
1144         The compiler probably complain about the return value, that makes more sense.
1145
1146 2014-03-30  Benjamin Poulain  <benjamin@webkit.org>
1147
1148         Attempt to fix 32bits build after r166465
1149
1150         * rendering/style/RenderStyle.h:
1151
1152 2014-03-30  Benjamin Poulain  <benjamin@webkit.org>
1153
1154         Make RenderStyle's non inherited flags more JSC friendly
1155         https://bugs.webkit.org/show_bug.cgi?id=130939
1156
1157         Reviewed by Andreas Kling.
1158
1159         Make RenderStyle::NonInheritedFlags accessible to the JIT:
1160         -Make the struct public to give access to the offset.
1161         -Move away from a bit field to static offsets we can use
1162          with the MacroAssembler.
1163         -Reorder the field to simplify bit access of the flags we need.
1164
1165         * css/DeprecatedStyleBuilder.cpp:
1166         (WebCore::ApplyPropertyVerticalAlign::createHandler):
1167         (WebCore::ApplyPropertyDisplay::applyInitialValue):
1168         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1169         * css/StyleResolver.cpp:
1170         (WebCore::StyleResolver::adjustRenderStyle):
1171         * rendering/style/RenderStyle.cpp:
1172         (WebCore::RenderStyle::RenderStyle):
1173         (WebCore::RenderStyle::copyNonInheritedFrom):
1174         (WebCore::RenderStyle::hashForTextAutosizing):
1175         (WebCore::RenderStyle::equalForTextAutosizing):
1176         (WebCore::RenderStyle::changeRequiresLayout):
1177         * rendering/style/RenderStyle.h:
1178         (WebCore::RenderStyle::hasAnyPublicPseudoStyles):
1179         (WebCore::RenderStyle::hasPseudoStyle):
1180         (WebCore::RenderStyle::setHasPseudoStyle):
1181         * rendering/style/StyleMultiColData.cpp:
1182         (WebCore::StyleMultiColData::StyleMultiColData):
1183         * rendering/style/StyleRareNonInheritedData.cpp:
1184         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1185
1186 2014-03-30  David Kilzer  <ddkilzer@apple.com>
1187
1188         [iOS] Fix build of HTMLConverter.mm after r166454
1189
1190         Fixes the following build failures:
1191
1192             WebCore/editing/cocoa/HTMLConverter.mm:1507:13: error: value of type 'WebCore::Element' is not contextually convertible to 'bool'
1193                     if (element)
1194                         ^~~~~~~
1195             WebCore/editing/cocoa/HTMLConverter.mm:1508:49: error: no matching function for call to 'core'
1196                         _caches->floatPropertyValueForNode(*core(element), CSSPropertyVerticalAlign, verticalAlign);
1197                                                             ^~~~
1198             In file included from WebCore/editing/cocoa/HTMLConverter.mm:41:
1199             In file included from WebCore/page/Frame.h:42:
1200             In file included from WebCore/editing/VisibleSelection.h:30:
1201             In file included from WebCore/editing/VisiblePosition.h:30:
1202             In file included from WebCore/dom/Position.h:31:
1203             WebCore/editing/TextAffinity.h:54:27: note: candidate function not viable: no known conversion from 'WebCore::Element' to 'NSSelectionAffinity' (aka '_NSSelectionAffinity') for 1st argument
1204             inline WebCore::EAffinity core(NSSelectionAffinity affinity)
1205                                       ^
1206             WebCore/editing/cocoa/HTMLConverter.mm:1509:81: error: reference to non-static member function must be called; did you mean to call it with no arguments?
1207                     attachment.get().bounds = CGRectMake(0, (verticalAlign / 100) * element.clientHeight, element.clientWidth, element.clientHeight);
1208                                                                                     ~~~~~~~~^~~~~~~~~~~~
1209                                                                                                         ()
1210             WebCore/editing/cocoa/HTMLConverter.mm:1509:103: error: reference to non-static member function must be called; did you mean to call it with no arguments?
1211                     attachment.get().bounds = CGRectMake(0, (verticalAlign / 100) * element.clientHeight, element.clientWidth, element.clientHeight);
1212                                                                                                           ~~~~~~~~^~~~~~~~~~~
1213                                                                                                                              ()
1214             WebCore/editing/cocoa/HTMLConverter.mm:1509:124: error: reference to non-static member function must be called; did you mean to call it with no arguments?
1215                     attachment.get().bounds = CGRectMake(0, (verticalAlign / 100) * element.clientHeight, element.clientWidth, element.clientHeight);
1216                                                                                                                                ~~~~~~~~^~~~~~~~~~~~
1217                                                                                                                                                    ()
1218             5 errors generated.
1219
1220         * editing/cocoa/HTMLConverter.mm:
1221         (HTMLConverter::_addAttachmentForElement):
1222
1223 2014-03-30  Andreas Kling  <akling@apple.com>
1224
1225         Make NodeList and HTMLCollection caching helpers use PassRef.
1226         <https://webkit.org/b/130943>
1227
1228         Tweak the helpers in NodeListsNodeData to return PassRef instead of
1229         PassRefPtr. This knocks 2 branches off of some pretty hot code on
1230         Dromaeo/dom-query.
1231
1232         Reviewed by Antti Koivisto.
1233
1234         * dom/ChildNodeList.h:
1235         * dom/ClassNodeList.h:
1236         * dom/NameNodeList.h:
1237         * dom/NodeRareData.h:
1238         (WebCore::NodeListsNodeData::ensureChildNodeList):
1239         (WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
1240         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
1241         (WebCore::NodeListsNodeData::addCacheWithName):
1242         (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
1243         (WebCore::NodeListsNodeData::addCachedCollection):
1244         * dom/TagNodeList.h:
1245         * html/HTMLCollection.cpp:
1246         (WebCore::HTMLCollection::create):
1247         * html/HTMLCollection.h:
1248         * html/HTMLFormControlsCollection.cpp:
1249         (WebCore::HTMLFormControlsCollection::create):
1250         * html/HTMLFormControlsCollection.h:
1251         * html/RadioNodeList.h:
1252
1253 2014-03-29  Antti Koivisto  <antti@apple.com>
1254
1255         LiveNodeLists should use ElementDescendantIterator
1256         https://bugs.webkit.org/show_bug.cgi?id=130931
1257
1258         Reviewed by Andreas Kling.
1259         
1260         Make LiveNodeList traversal use the common DOM tree iterator.
1261
1262         * dom/ChildNodeList.cpp:
1263         (WebCore::ChildNodeList::ChildNodeList):
1264         (WebCore::ChildNodeList::collectionBegin):
1265         (WebCore::ChildNodeList::collectionTraverseForward):
1266         (WebCore::ChildNodeList::collectionTraverseBackward):
1267         (WebCore::ChildNodeList::invalidateCache):
1268         (WebCore::ChildNodeList::collectionFirst): Deleted.
1269         
1270             Iterator for ChildNodeList is still just Node*.
1271
1272         * dom/ChildNodeList.h:
1273         * dom/CollectionIndexCache.h:
1274         (WebCore::CollectionIndexCache::hasValidCache):
1275         (WebCore::Iterator>::CollectionIndexCache):
1276         (WebCore::Iterator>::nodeCount):
1277         (WebCore::Iterator>::computeNodeCountUpdatingListCache):
1278         (WebCore::Iterator>::traverseBackwardTo):
1279         (WebCore::Iterator>::traverseForwardTo):
1280         (WebCore::Iterator>::nodeAt):
1281         (WebCore::Iterator>::invalidate):
1282         
1283             Make CollectionIndexCache iterator based instead of using NodeType*. The iterator type may
1284             still be a Node* though.
1285
1286         (WebCore::NodeType>::CollectionIndexCache): Deleted.
1287         (WebCore::NodeType>::nodeCount): Deleted.
1288         (WebCore::NodeType>::computeNodeCountUpdatingListCache): Deleted.
1289         (WebCore::NodeType>::nodeBeforeCached): Deleted.
1290         (WebCore::NodeType>::nodeAfterCached): Deleted.
1291         (WebCore::NodeType>::nodeAt): Deleted.
1292         (WebCore::NodeType>::invalidate): Deleted.
1293         * dom/ElementDescendantIterator.h:
1294         (WebCore::ElementDescendantIterator::operator--):
1295         
1296             Add backward iteration support.
1297
1298         (WebCore::ElementDescendantIteratorAdapter::last):
1299         (WebCore::ElementDescendantConstIteratorAdapter::last):
1300         
1301             Add a way to get the last item.
1302             Provide std::iterator_traits so we can extract the type.
1303
1304         * dom/LiveNodeList.h:
1305         (WebCore::CachedLiveNodeList::collectionEnd):
1306         (WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
1307         (WebCore::CachedLiveNodeList<NodeListType>::~CachedLiveNodeList):
1308         (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
1309         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
1310         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
1311         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
1312         (WebCore::CachedLiveNodeList<NodeListType>::invalidateCache):
1313         (WebCore::CachedLiveNodeList<NodeListType>::collectionFirst): Deleted.
1314         
1315             Make LiveNodeList traversal use ElementDescendantIterator.
1316
1317         (WebCore::nextMatchingElement): Deleted.
1318         (WebCore::previousMatchingElement): Deleted.
1319         * html/HTMLCollection.cpp:
1320         (WebCore::HTMLCollection::HTMLCollection):
1321         (WebCore::HTMLCollection::~HTMLCollection):
1322         (WebCore::HTMLCollection::collectionBegin):
1323         (WebCore::HTMLCollection::collectionTraverseForward):
1324         (WebCore::HTMLCollection::collectionTraverseBackward):
1325         (WebCore::HTMLCollection::invalidateCache):
1326         (WebCore::HTMLCollection::collectionFirst): Deleted.
1327         * html/HTMLCollection.h:
1328         (WebCore::HTMLCollection::collectionEnd):
1329         
1330             HTMLCollection still uses Element* as iterator for now.
1331
1332 2014-03-29  Commit Queue  <commit-queue@webkit.org>
1333
1334         Unreviewed, rolling out r166434.
1335         https://bugs.webkit.org/show_bug.cgi?id=130938
1336
1337         Caused crashes and other failures on cache tests (Requested by
1338         ap on #webkit).
1339
1340         Reverted changeset:
1341
1342         "Web Replay: add page-level setting to bypass the MemoryCache"
1343         https://bugs.webkit.org/show_bug.cgi?id=130728
1344         http://trac.webkit.org/changeset/166434
1345
1346 2014-03-29  David Kilzer  <ddkilzer@apple.com>
1347
1348         Preserve selection end positions in directionOfSelection
1349         <http://webkit.org/b/104813>
1350         <rdar://problem/13666417>
1351
1352         Reviewed by Brent Fulgham.
1353
1354         Merged from Blink (patch by kenrb@chromium.org):
1355         https://src.chromium.org/viewvc/blink?revision=150621&view=revision
1356         http://crbug.com/164263
1357
1358             VisibleSelection::visibleStart() and VisibleSelection::visibleEnd()
1359             can both cause layouts, which has the potential to invalidate any
1360             rendertree-based objects. This was causing a problem in
1361             FrameSelection::directionOfSelection(), where a reference to a
1362             lineBox was being held across a call to visibleEnd().
1363
1364             This patch ensures that the any layout is completed before linebox
1365             references are retrieved.
1366
1367         Test: editing/selection/layout-during-move-selection-crash.html
1368
1369         * editing/FrameSelection.cpp:
1370         (WebCore::FrameSelection::directionOfSelection):
1371
1372 2014-03-29  Zalan Bujtas  <zalan@apple.com>
1373
1374         Subpixel rendering: Simple line layout should not round to integral position while painting.
1375         https://bugs.webkit.org/show_bug.cgi?id=130934
1376
1377         Reviewed by Simon Fraser.
1378
1379         Remove rounding to integral position. When RenderLayer is injected and hides subpixel positions,
1380         integral rounding produces different paint position.
1381
1382         Test: fast/flexbox/hidpi-simple-line-layout-with-flexbox-and-transition.html
1383
1384         * rendering/SimpleLineLayoutFunctions.cpp:
1385         (WebCore::SimpleLineLayout::paintFlow):
1386
1387 2014-03-29  Zalan Bujtas  <zalan@apple.com>
1388
1389         Subpixel rendering: Make GraphicsContext::drawImageBuffer* functions float based.
1390         https://bugs.webkit.org/show_bug.cgi?id=130932
1391
1392         Reviewed by Simon Fraser.
1393         
1394         This is in preparation to support device pixel based filter painting.
1395         Filter calculation is still integral based.
1396
1397         No change in behavior.
1398
1399         * platform/graphics/GraphicsContext.cpp:
1400         (WebCore::GraphicsContext::drawImageBuffer):
1401         * platform/graphics/GraphicsContext.h:
1402         * platform/graphics/filters/FilterEffect.cpp: This will eventually be fully float based.
1403         Right now, this IntRect->FloatRect change is only to ensure that we can call 
1404         the float based drawImageBuffer(). 
1405         (WebCore::FilterEffect::drawingRegionOfInputImage):
1406         * platform/graphics/filters/FilterEffect.h:
1407
1408 2014-03-27  Sam Weinig  <sam@webkit.org>
1409
1410         Convert yet more of HTMLConverter to C++
1411         https://bugs.webkit.org/show_bug.cgi?id=130850
1412
1413         Reviewed by Anders Carlsson.
1414
1415         * editing/cocoa/HTMLConverter.mm:
1416         (HTMLConverterCaches::isAncestorsOfStartToBeConverted):
1417         (HTMLConverter::HTMLConverter):
1418         (HTMLConverter::~HTMLConverter):
1419         (HTMLConverter::convert):
1420         (HTMLConverter::computedAttributesForElement):
1421         (HTMLConverter::attributesForElement):
1422         (HTMLConverter::_newParagraphForElement):
1423         (HTMLConverter::_newLineForElement):
1424         (HTMLConverter::_newTabForElement):
1425         (HTMLConverter::_addAttachmentForElement):
1426         (HTMLConverter::_addQuoteForElement):
1427         (HTMLConverter::_addValue):
1428         (HTMLConverter::_processHeadElement):
1429         (HTMLConverter::_enterElement):
1430         (HTMLConverter::_addTableCellForElement):
1431         (HTMLConverter::_processElement):
1432         (HTMLConverter::_addMarkersToList):
1433         (HTMLConverter::_exitElement):
1434         (HTMLConverter::_processText):
1435         (HTMLConverter::_traverseNode):
1436         (HTMLConverter::_traverseFooterNode):
1437         (WebCore::attributedStringFromRange):
1438         (_childrenForNode): Deleted.
1439         (HTMLConverter::_computedAttributesForElement): Deleted.
1440         (HTMLConverter::_attributesForElement): Deleted.
1441         (HTMLConverter::_loadFromDOMRange): Deleted.
1442
1443 2014-03-28  Csaba Osztrogonác  <ossy@webkit.org>
1444
1445         Unreviewed buildfix after r166441 and r166443.
1446
1447         * CMakeLists.txt: Add platform/audio/AudioHardwareListener.cpp.
1448
1449 2014-03-28  Javier Fernandez  <jfernandez@igalia.com>
1450
1451         [CSS Grid Layout] The 'auto' height must be adapted to the item's margin.
1452         https://bugs.webkit.org/show_bug.cgi?id=130920
1453
1454         Reviewed by Darin Adler.
1455
1456         Adding the grid-item's marginLogicalHeight to the used breadth when computing
1457         content based grid-track sizes.
1458
1459         Test: fast/css-grid-layout/grid-item-margin-auto-columns-rows.html
1460
1461         * rendering/RenderGrid.cpp:
1462         (WebCore::RenderGrid::logicalContentHeightForChild):
1463
1464 2014-03-28  James Craig  <jcraig@apple.com>
1465
1466         Web Inspector: AXI: support for live regions
1467         https://bugs.webkit.org/show_bug.cgi?id=130725
1468
1469         Reviewed by Timothy Hatcher.
1470
1471         Tests: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
1472                inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html
1473
1474         Initial support for @aria-live, @aria-atomic, and @aria-busy.
1475
1476         * inspector/InspectorDOMAgent.cpp:
1477         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1478         * inspector/protocol/DOM.json:
1479
1480 2014-03-28  Darin Adler  <darin@apple.com>
1481
1482         Fix recently-introduced off-by-one error in centerTruncateToBuffer
1483         https://bugs.webkit.org/show_bug.cgi?id=130889
1484         <rdar://problem/16408694>
1485
1486         Reviewed by Alexey Proskuryakov.
1487
1488         * platform/graphics/StringTruncator.cpp:
1489         (WebCore::centerTruncateToBuffer): Simplified expression that computes truncatedLength.
1490         Removed incorrect "+ 1" from computation of where to write characters.
1491
1492 2014-03-28  Benjamin Poulain  <bpoulain@apple.com>
1493
1494         Update the code related to SelectorPseudoTypeMap to reflect its new purpose
1495         https://bugs.webkit.org/show_bug.cgi?id=130620
1496
1497         Reviewed by Andreas Kling.
1498
1499         Since r166094, SelectorPseudoTypeMap only contains PseudoClass instances and the 4 compatibility PseudoElement.
1500
1501         This patch rename SelectorPseudoTypeMap to SelectorPseudoClassAndCompatibilityElementMap and update the parsing
1502         to split PseudoClass and PseudoElement.
1503
1504         * CMakeLists.txt:
1505         * DerivedSources.make:
1506         * WebCore.xcodeproj/project.pbxproj:
1507         * css/CSSGrammar.y.in:
1508         * css/CSSParserValues.cpp:
1509         (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
1510         (WebCore::CSSParserSelector::setPseudoClassValue):
1511         * css/CSSParserValues.h:
1512         * css/CSSSelector.cpp:
1513         (WebCore::appendPseudoClassFunctionTail):
1514         (WebCore::CSSSelector::selectorText):
1515         * css/SelectorPseudoClassAndCompatibilityElementMap.in: Renamed from Source/WebCore/css/SelectorPseudoTypeMap.in.
1516         * css/SelectorPseudoTypeMap.h:
1517         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py: Renamed from Source/WebCore/css/makeSelectorPseudoTypeMap.py.
1518         (enumerablePseudoType):
1519         (expand_ifdef_condition):
1520
1521 2014-03-28  Stephanie Lewis  <slewis@apple.com>
1522
1523         Unreviewed build fix.
1524
1525         * platform/audio/AudioHardwareListener.cpp:
1526         (WebCore::AudioHardwareListener::create):
1527         (WebCore::AudioHardwareListener::audioHardwareListenerIsSupported): Deleted.
1528         * platform/audio/AudioHardwareListener.h:
1529
1530 2014-03-28  Lukasz Bialek  <l.bialek@samsung.com>
1531
1532         Refactor cut and copy functions as suggested in FIXME line
1533         https://bugs.webkit.org/show_bug.cgi?id=129867
1534
1535         Reviewed by Darin Adler.
1536
1537         Cut and Copy functions in Editor.cpp use lots of common code.
1538         Those functions are merged into one to share code, several
1539         additional conditions are added to preserve Cut and Copy
1540         functionality.
1541
1542         * editing/Editor.cpp:
1543         (WebCore::Editor::cut):
1544         (WebCore::Editor::copy):
1545         (WebCore::Editor::performCutOrCopy):
1546         * editing/Editor.h:
1547
1548 2014-03-28  Stephanie Lewis  <slewis@apple.com>
1549
1550         Rename pluginDidEvaluate to better represent when it’s called.
1551         Part of <rdar://problem/16061257> PluginProcess should AppNap when no plugins on active tab.
1552
1553         Reviewed by Anders Carlsson.
1554
1555         No new test because it’s just a name change.
1556
1557         * page/PageThrottler.h:
1558         (WebCore::PageThrottler::pluginDidEvaluateWhileAudioIsPlaying):
1559
1560 2014-03-28  Stephanie Lewis  <slewis@apple.com>
1561
1562         Notification handler for telling if audio hardware is active.
1563         https://bugs.webkit.org/show_bug.cgi?id=130743
1564
1565         Reviewed by Jer Noble.
1566
1567         Not web-exposed so no easy way to test.
1568
1569         Listen to CoreAudio to see if audio hardware is active in the current process.
1570
1571         * WebCore.exp.in:
1572         * WebCore.xcodeproj/project.pbxproj:
1573         * platform/audio/AudioHardwareListener.cpp: Added.
1574         (WebCore::AudioHardwareListener::create):
1575         (WebCore::AudioHardwareListener::AudioHardwareListener):
1576         * platform/audio/AudioHardwareListener.h: Added.
1577         (WebCore::AudioHardwareListener::Client::~Client):
1578         (WebCore::AudioHardwareListener::~AudioHardwareListener):
1579         (WebCore::AudioHardwareListener::isHardwareActive):
1580         * platform/audio/mac/AudioHardwareListenerMac.cpp: Added.
1581         (WebCore::isAudioHardwareProcessRunning):
1582         (WebCore::AudioHardwareListener::create):
1583         (WebCore::AudioHardwareListenerMac::create):
1584         (WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac):
1585         (WebCore::AudioHardwareListenerMac::~AudioHardwareListenerMac):
1586         (WebCore::AudioHardwareListenerMac::setHardwareActive):
1587         * platform/audio/mac/AudioHardwareListenerMac.h: Added.
1588
1589 2014-03-28  James Craig  <jcraig@apple.com>
1590
1591         Web Inspector: AXI: expose what elements get generic "clickable" status
1592         https://bugs.webkit.org/show_bug.cgi?id=130721
1593
1594         Reviewed by Timothy Hatcher.
1595
1596         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html:
1597         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html
1598
1599         Expose ancestor element link to "Click Listener" or generic "Clickable: Yes" if current node has mouse handler.
1600
1601         Update AccessibilityNodeObject::mouseButtonListener() to optionally return body element if 
1602             requested so that Web Inspector can display body event delegate handlers.
1603
1604         * accessibility/AccessibilityNodeObject.cpp:
1605         (WebCore::AccessibilityNodeObject::mouseButtonListener):
1606         * accessibility/AccessibilityNodeObject.h:
1607         * inspector/InspectorDOMAgent.cpp:
1608         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1609         * inspector/protocol/DOM.json:
1610
1611 2014-03-28  Joseph Pecoraro  <pecoraro@apple.com>
1612
1613         Web Inspector: Really drop all locks in nested run loop on iOS if WebThread is enabled
1614         https://bugs.webkit.org/show_bug.cgi?id=130912
1615
1616         Reviewed by Geoffrey Garen.
1617
1618         Previously we were calling DropAllLocks inside of a single line if statement,
1619         so the JSLock was getting reaquired very quickly. We really want to DropAllLocks
1620         for the duration of running the nested run loop on iOS if there is a WebThread.
1621
1622         * bindings/js/PageScriptDebugServer.h:
1623         * bindings/js/PageScriptDebugServer.cpp:
1624         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
1625         (WebCore::PageScriptDebugServer::runEventLoopWhilePausedInternal):
1626
1627 2014-03-28  Brent Fulgham  <bfulgham@apple.com>
1628
1629         [Win] Enable Media Track testing features on Windows
1630         https://bugs.webkit.org/show_bug.cgi?id=130851
1631
1632         Reviewed by Eric Carlson.
1633
1634         * testing/Internals.cpp:
1635         (WebCore::Internals::resetToConsistentState): Execute code on Windows as well.
1636         (WebCore::Internals::Internals): Ditto.
1637         (WebCore::Internals::captionsStyleSheetOverride): Ditto.
1638         (WebCore::Internals::setCaptionsStyleSheetOverride): Ditto.
1639         (WebCore::Internals::setPrimaryAudioTrackLanguageOverride): Ditto.
1640         (WebCore::Internals::setCaptionDisplayMode): Ditto.
1641
1642 2014-03-28  Brian Burg  <bburg@apple.com>
1643
1644         Web Replay: add page-level setting to bypass the MemoryCache
1645         https://bugs.webkit.org/show_bug.cgi?id=130728
1646
1647         Reviewed by Timothy Hatcher.
1648
1649         When replaying a specific Page we don't want to store its cached resources in the
1650         MemoryCache. This patch adds a page setting to prevent the page's resources from
1651         being saved in the MemoryCache.
1652
1653         If Settings::usesMemoryCache() is false, page resources are given the special
1654         SessionID bypassCacheSessionID(). The cached resource loader and memory cache
1655         act as if the memory cache is disabled if the resource has this special session id.
1656
1657         Hook up ReplayController to override the memory cache setting during capture/replay.
1658
1659         Test: http/tests/cache/bypass-memory-cache-after-reload.html
1660
1661         * loader/cache/CachedResourceLoader.cpp:
1662         (WebCore::CachedResourceLoader::requestResource):
1663         (WebCore::CachedResourceLoader::revalidateResource):
1664         * loader/cache/MemoryCache.cpp:
1665         (WebCore::MemoryCache::add):
1666         * page/Page.cpp:
1667         (WebCore::Page::sessionID):
1668         * page/SessionID.h:
1669         (WebCore::SessionID::bypassCacheSessionID):
1670         * page/Settings.cpp:
1671         (WebCore::Settings::Settings):
1672         * page/Settings.h:
1673         (WebCore::Settings::setUsesMemoryCache):
1674         (WebCore::Settings::usesMemoryCache):
1675         * replay/ReplayController.cpp:
1676         (WebCore::ReplayController::setForceDeterministicSettings):
1677         * replay/ReplayController.h:
1678         * testing/InternalSettings.cpp:
1679         (WebCore::InternalSettings::Backup::Backup):
1680         (WebCore::InternalSettings::Backup::restoreTo):
1681         (WebCore::InternalSettings::setUsesMemoryCache):
1682         * testing/InternalSettings.h:
1683         * testing/InternalSettings.idl:
1684
1685 2014-03-28  Radu Stavila  <stavila@adobe.com>
1686
1687         In some situations, partial layouts of floating elements produce incorrect results.
1688         https://bugs.webkit.org/show_bug.cgi?id=122668
1689
1690         Reviewed by David Hyatt.
1691
1692         When performing partial layout of float elements and checking if other float
1693         elements are encountered, incorrect results were obtained by not checking
1694         the size of the existing floats vector.
1695
1696         Test: fast/block/float/floats-in-clean-line-crash.html
1697
1698         * rendering/RenderBlockLineLayout.cpp:
1699         (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
1700
1701 2014-03-28  Beth Dakin  <bdakin@apple.com>
1702
1703         Build fix.
1704
1705         * rendering/RenderTheme.cpp:
1706         (WebCore::RenderTheme::paint):
1707
1708 2014-03-28  Jer Noble  <jer.noble@apple.com>
1709
1710         [MSE] Implement support for SourceBuffer.remove()
1711         https://bugs.webkit.org/show_bug.cgi?id=121562
1712
1713         Reviewed by Eric Carlson.
1714
1715         Test: media/media-source/media-source-remove.html
1716
1717         Add support for SourceBuffer.remove().
1718
1719         * Modules/mediasource/SourceBuffer.cpp:
1720         (WebCore::SourceBuffer::SourceBuffer): Initialize new member variables.
1721         (WebCore::SourceBuffer::setTimestampOffset): Update comments to match spec.
1722         (WebCore::SourceBuffer::remove): Added; start removeTimer.
1723         (WebCore::SourceBuffer::abortIfUpdating): Cancel removeTimer.
1724         (WebCore::SourceBuffer::removedFromMediaSource): Call abortIfUpdating().
1725         (WebCore::SourceBuffer::stop): Cancel removeTimer.
1726         (WebCore::SourceBuffer::removeCodedFrames): Added.
1727         (WebCore::SourceBuffer::removeTimerFired): Added.
1728         * Modules/mediasource/SourceBuffer.h:
1729         * Modules/mediasource/SourceBuffer.idl:
1730
1731 2014-03-27  Dean Jackson  <dino@apple.com>
1732
1733         Support form controls that may need incremental redraw
1734         https://bugs.webkit.org/show_bug.cgi?id=130736
1735
1736         Reviewed by Beth Dakin.
1737
1738         There are some form controls that change appearance
1739         over time. Expand the ControlStates so that it can
1740         hold a little more information, including a reference
1741         to the native form control. This way the Theme implementation
1742         can repaint the existing native control if necessary. At
1743         least ThemeMac was reusing a single control for painting
1744         all instances before this change.
1745
1746         Since ControlStates is now a class, pass it around by
1747         reference.
1748
1749         The other major change is keeping a timer to trigger a
1750         repaint in RenderBox, which happens if Theme/RenderTheme
1751         update the ControlState to request one.
1752
1753         * WebCore.xcodeproj/project.pbxproj: Add ControlStates.h.
1754         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1755         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1756         * dom/Element.cpp:
1757         (WebCore::Element::setActive): States now within ControlStates.
1758         (WebCore::Element::setHovered): Ditto.
1759         * editing/FrameSelection.cpp:
1760         (WebCore::FrameSelection::focusedOrActiveStateChanged): Ditto.
1761         * html/HTMLFormControlElement.cpp:
1762         (WebCore::HTMLFormControlElement::disabledStateChanged): Ditto.
1763         (WebCore::HTMLFormControlElement::readOnlyAttributeChanged): Ditto.
1764         * html/HTMLInputElement.cpp:
1765         (WebCore::HTMLInputElement::setChecked): Ditto.
1766         (WebCore::HTMLInputElement::setIndeterminate): Ditto.
1767         * html/HTMLOptionElement.cpp:
1768         (WebCore::HTMLOptionElement::parseAttribute): Ditto.
1769         * platform/ControlStates.h: New file. Copied the old ControlStates enum,
1770         and added accessors to hold whether or not the state is dirty, and
1771         a reference to a platform control if necessary.
1772         * platform/Theme.h:
1773         (WebCore::Theme::selectionColor): Pass ControlStates pointer.
1774         (WebCore::Theme::paint): Ditto.
1775         (WebCore::Theme::inflateControlPaintRect): Ditto.
1776         * platform/ThemeTypes.h: Remove ControlStates enum.
1777         * platform/efl/RenderThemeEfl.cpp:
1778         (WebCore::RenderThemeEfl::applyEdjeStateFromForm): Pass ControlStates pointer.
1779         (WebCore::RenderThemeEfl::paintThemePart): Ditto.
1780         * platform/efl/RenderThemeEfl.h: Ditto.
1781         * platform/mac/ThemeMac.h: Ditto.
1782         * platform/mac/ThemeMac.mm:
1783         (-[WebCoreThemeView addSubview:]): New method to make sure we don't add CALayer backed
1784         views to the NSView we're using for rendering.
1785         (WebCore::updateStates): Use the private animated setters if necessary.
1786         (WebCore::convertControlStatesToThemeDrawState): Namespacing.
1787         (WebCore::configureCheckbox): Pass ControlStates pointer.
1788         (WebCore::createCheckboxCell): New helper since we're creating non-static cells.
1789         (WebCore::sharedCheckboxCell): The old static provider, renamed.
1790         (WebCore::paintCheckbox): Check if this paint was triggered by a state change
1791         or an animation. Update the ControlStates if we need to be repainted.
1792         (WebCore::radio): Parameter is now ControlStates*.
1793         (WebCore::paintRadio): Ditto.
1794         (WebCore::setUpButtonCell): Ditto.
1795         (WebCore::button): Ditto.
1796         (WebCore::paintButton): Ditto.
1797         (WebCore::paintStepper): Ditto.
1798         (WebCore::ThemeMac::ensuredView): Ditto.
1799         (WebCore::ThemeMac::inflateControlPaintRect): Ditto.
1800         (WebCore::ThemeMac::paint): Ditto.
1801         (WebCore::checkbox): Deleted.
1802         * rendering/RenderBox.cpp:
1803         (WebCore::RenderBox::RenderBox): Initialize timer.
1804         (WebCore::RenderBox::~RenderBox): Stop any pending timers and delete the ControlState if necessary.
1805         (WebCore::RenderBox::paintBoxDecorations): Create a ControlStates if needed. Paint, and start the repaint
1806         timer if the ControlStates say we should.
1807         (WebCore::RenderBox::repaintTimerFired): Call repaint when the timer fires.
1808         * rendering/RenderBox.h: Add a timer for repainting.
1809         * rendering/RenderElement.cpp:
1810         (WebCore::controlStatesRendererMap): A static HashMap that associates renderers with ControlStates.
1811         (WebCore::RenderElement::hasControlStatesForRenderer):
1812         (WebCore::RenderElement::controlStatesForRenderer):
1813         (WebCore::RenderElement::removeControlStatesForRenderer):
1814         (WebCore::RenderElement::addControlStatesForRenderer):
1815         * rendering/RenderElement.h:
1816         * rendering/RenderTheme.cpp:
1817         (WebCore::RenderTheme::paint): Use a pointer to ControlStates.
1818         (WebCore::RenderTheme::adjustRepaintRect): Ditto.
1819         (WebCore::RenderTheme::stateChanged): Ditto.
1820         (WebCore::RenderTheme::updateControlStatesForRenderer): New method that just updates the states part of ControlStates.
1821         (WebCore::RenderTheme::extractControlStatesForRenderer): New method that calculates the state.
1822         (WebCore::RenderTheme::controlStatesForRenderer): Deleted.
1823         * rendering/RenderTheme.h:
1824         * rendering/RenderThemeMac.mm:
1825         (WebCore::RenderThemeMac::documentViewFor): Use a ControlStates pointer.
1826
1827 2014-03-28  Myles C. Maxfield  <mmaxfield@apple.com>
1828
1829         Clear SVGInlineTextBox fragments when the text changes.
1830         https://bugs.webkit.org/show_bug.cgi?id=130879
1831
1832         Reviewed by Darin Adler.
1833
1834         Ported from Blink: https://src.chromium.org/viewvc/blink?revision=150456&view=revision
1835
1836         This patch modifies SVGInlineTextBox::dirtyLineBoxes to clear all
1837         following text boxes when invoked. Typically this method is called
1838         when the underlying text string changes, and that change needs to
1839         be propagated to all the boxes that use the text beyond the point
1840         where the text is first modified.
1841         
1842         Also cleans up final function keywords for SVGRootInlineBox.
1843
1844         Test: svg/custom/unicode-in-tspan-multi-svg-crash.html
1845
1846         * rendering/InlineTextBox.h: Added (non-recursive) dirtyOwnLineBoxes() function
1847         (WebCore::InlineTextBox::dirtyOwnLineBoxes): Calls dirtyLineBoxes()
1848         * rendering/svg/SVGInlineTextBox.h: Added (non-recursive) dirtyOwnLineBoxes() function
1849         (WebCore::SVGInlineTextBox::dirtyOwnLineBoxes):
1850         * rendering/svg/SVGInlineTextBox.cpp:
1851         (WebCore::SVGInlineTextBox::dirtyOwnLineBoxes): Non-recursive part of dirtyLineBoxes()
1852         (WebCore::SVGInlineTextBox::dirtyLineBoxes): Calls dirtyOwnLineBoxes() in a loop
1853         * rendering/svg/SVGRootInlineBox.h:
1854
1855 2014-03-28  Andreas Kling  <akling@apple.com>
1856
1857         Rebaseline bindings tests.
1858
1859 2014-03-28  Michael Saboff  <msaboff@apple.com>
1860
1861         Unreviewed, rolling r166248 back in.
1862
1863         Turns out r166070 didn't cause a 2% performance loss in page load times
1864
1865         Reverted changeset:
1866
1867         Unreviewed, rolling out r166126.
1868         Rollout r166126 in prepartion to roll out prerequisite r166070
1869
1870 2014-03-26  Antonio Gomes  <a1.gomes@sisa.samsung.com>
1871
1872         [Bindings] constants are always typed to 'int'
1873         https://bugs.webkit.org/show_bug.cgi?id=130775
1874
1875         Reviewed by Darin Adler.
1876
1877         Patch fixes a bug where all constant getter generated
1878         methods were returning 'integer' values due to static_cast.
1879
1880         Compilers should be smarth enough to properly infer which
1881         jsNumber class construtor to call given a literal value.
1882
1883         Patch also fixes a bug where values whose representation
1884         is bigger an integer maximum were overflowing. For instance,
1885         NodeFilter.SHOW_ALL (0xFFFFFFFF).
1886
1887         Tests:
1888         Binding tests updated.
1889         Rebaselined fast/dom/constants.html
1890
1891         * bindings/scripts/CodeGeneratorJS.pm:
1892         (GenerateImplementation):
1893         * bindings/scripts/test/JS/JSTestInterface.cpp:
1894         (WebCore::jsTestInterfaceIMPLEMENTSCONSTANT1):
1895         (WebCore::jsTestInterfaceIMPLEMENTSCONSTANT2):
1896         (WebCore::jsTestInterfaceSUPPLEMENTALCONSTANT1):
1897         (WebCore::jsTestInterfaceSUPPLEMENTALCONSTANT2):
1898         * bindings/scripts/test/JS/JSTestObj.cpp:
1899         (WebCore::jsTestObjCONDITIONAL_CONST):
1900         (WebCore::jsTestObjCONST_VALUE_0):
1901         (WebCore::jsTestObjCONST_VALUE_1):
1902         (WebCore::jsTestObjCONST_VALUE_2):
1903         (WebCore::jsTestObjCONST_VALUE_4):
1904         (WebCore::jsTestObjCONST_VALUE_8):
1905         (WebCore::jsTestObjCONST_VALUE_9):
1906         (WebCore::jsTestObjCONST_VALUE_11):
1907         (WebCore::jsTestObjCONST_VALUE_12):
1908         (WebCore::jsTestObjCONST_VALUE_13):
1909         (WebCore::jsTestObjCONST_VALUE_14):
1910         (WebCore::jsTestObjCONST_JAVASCRIPT):
1911         (WebCore::jsTestObjReadonly):
1912
1913 2014-03-28  Myles C. Maxfield  <mmaxfield@apple.com>
1914
1915         A TrailingObject's endpoint might get decremented twice
1916         https://bugs.webkit.org/show_bug.cgi?id=130874
1917
1918         Reviewed by Darin Adler.
1919
1920         There are two places where we might shave off a trailing space from the end
1921         of a line. We don't want to hit both codepaths for a single line.
1922
1923         Fixes fast/block/update-midpoints-for-trailing-boxes-crash.html after r166245.
1924
1925         * rendering/line/BreakingContextInlineHeaders.h:
1926         (WebCore::checkMidpoints):
1927         (WebCore::BreakingContext::handleEndOfLine):
1928
1929 2014-03-28  Andreas Kling  <akling@apple.com>
1930
1931         Inline JSDOMWrapper subclasses' finishCreation().
1932         <https://webkit.org/b/130890>
1933
1934         finishCreation() is really a no-op for JSDOMWrapper subclasses in
1935         release builds. None of the ancestor classes do anything but assert
1936         in their implementations.
1937
1938         Generate the function inline, reducing binary size, and removing
1939         an unnecessary call from the JSFoo::create() helpers.
1940
1941         Reviewed by Sam Weinig.
1942
1943         * bindings/scripts/CodeGeneratorJS.pm:
1944         (GenerateHeader):
1945         (GenerateImplementation):
1946
1947 2014-03-28  Jer Noble  <jer.noble@apple.com>
1948
1949         [Mac] HLS streams will report an incorrect natural size.
1950         https://bugs.webkit.org/show_bug.cgi?id=130859
1951
1952         Reviewed by Eric Carlson.
1953
1954         Some HLS streams will report incorrect naturalSizes due to the asset's preferredTransform
1955         property not being  available at the same time as the track's natural size. Given that
1956         AVFoundation only allows one video track to be selected at a time, simply use the asset's
1957         presentation size, cached in m_cachedPresentation size in all cases.
1958
1959         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1960         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
1961
1962 2014-03-28  Antti Koivisto  <antti@apple.com>
1963
1964         Remove NodeListRootType flag
1965         https://bugs.webkit.org/show_bug.cgi?id=130896
1966
1967         Reviewed by Anders Carlsson.
1968
1969         This can be handled statically (except for the RadioNodeList case) removing
1970         a branch from NodeList traversal.
1971
1972         * dom/ClassNodeList.h:
1973         * dom/Document.cpp:
1974         (WebCore::Document::registerNodeListForInvalidation):
1975         (WebCore::Document::unregisterNodeListForInvalidation):
1976         (WebCore::Document::registerNodeList): Deleted.
1977         (WebCore::Document::unregisterNodeList): Deleted.
1978         
1979             Mark document invalidation registered lists with a bit.
1980             Renamed for clarity.
1981
1982         * dom/Document.h:
1983         * dom/LiveNodeList.cpp:
1984         (WebCore::LiveNodeList::LiveNodeList):
1985         (WebCore::LiveNodeList::rootNode):
1986         
1987             Base class version that invokes virtual isRootedAtDocument. It is needed to support 
1988             LiveNodeList::namedItem.
1989
1990         * dom/LiveNodeList.h:
1991         (WebCore::LiveNodeList::isRegisteredForInvalidationAtDocument):
1992         (WebCore::LiveNodeList::setRegisteredForInvalidationAtDocument):
1993         (WebCore::LiveNodeList::document):
1994         (WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
1995         (WebCore::CachedLiveNodeList<NodeListType>::~CachedLiveNodeList):
1996         (WebCore::CachedLiveNodeList<NodeListType>::rootNode):
1997         
1998             Call isRootedAtDocument on the final leaf type. Except for RadioNodeList this
1999             resolves statically.
2000
2001         (WebCore::CachedLiveNodeList<NodeListType>::willValidateIndexCache):
2002         (WebCore::CachedLiveNodeList<NodeListType>::invalidateCache):
2003         (WebCore::LiveNodeList::isRootedAtDocument): Deleted.
2004         (WebCore::LiveNodeList::rootType): Deleted.
2005         (WebCore::LiveNodeList::rootNode): Deleted.
2006         * dom/NameNodeList.h:
2007         * dom/NodeRareData.h:
2008         (WebCore::NodeListsNodeData::adoptDocument):
2009         * dom/TagNodeList.h:
2010         * html/HTMLCollection.cpp:
2011         (WebCore::rootTypeFromCollectionType):
2012         * html/HTMLCollection.h:
2013         (WebCore::HTMLCollection::isRootedAtDocument):
2014         (WebCore::HTMLCollection::rootType):
2015         
2016             HTMLCollections still needs the flag.
2017
2018         * html/LabelsNodeList.cpp:
2019         (WebCore::LabelsNodeList::LabelsNodeList):
2020         * html/LabelsNodeList.h:
2021         * html/RadioNodeList.cpp:
2022         (WebCore::RadioNodeList::RadioNodeList):
2023         * html/RadioNodeList.h:
2024
2025 2014-03-28  Mario Sanchez Prada  <mario.prada@samsung.com>
2026
2027         [GTK] Geoclue2 providers won't work after reloading
2028         https://bugs.webkit.org/show_bug.cgi?id=130898
2029
2030         Reviewed by Martin Robinson.
2031
2032         Don't reuse the Geoclue2 client proxy between different calls to
2033         startPosition(), and create a new client proxy each time instead.
2034
2035         * platform/geoclue/GeolocationProviderGeoclue2.cpp:
2036         (GeolocationProviderGeoclue::startUpdating): Don't reuse the
2037         client proxy, by always calling geoclue_manager_call_get_client().
2038         (GeolocationProviderGeoclue::stopUpdating): Disconnect from the
2039         'location-updated' signal and dispose the client proxy.
2040
2041 2014-03-28  Diego Pino Garcia  <dpino@igalia.com>
2042
2043         [GTK] Too many redirects visiting www.globalforestwatch.org
2044         https://bugs.webkit.org/show_bug.cgi?id=129681
2045
2046         Reviewed by Martin Robinson.
2047
2048         * platform/gtk/UserAgentGtk.cpp:
2049         (WebCore::standardUserAgent): Append Safari version to UserAgent
2050         string.
2051
2052 2014-03-28  Michael Saboff  <msaboff@apple.com>
2053
2054         Unreviewed, rolling r166249 back in.
2055
2056         Turns out r166070 didn't cause a 2% performance loss in page load times
2057
2058         Reverted changeset:
2059
2060         Unreviewed, rolling out r166070.
2061         Rollout r166070 due to 2% performance loss in page load times
2062
2063 2014-03-28  James Craig  <jcraig@apple.com>
2064
2065         Web Inspector: Copy/paste error. EventListener block in DOM.json uses description from Node.
2066         https://bugs.webkit.org/show_bug.cgi?id=130158
2067
2068         Reviewed by Timothy Hatcher.
2069
2070         * inspector/protocol/DOM.json: Fixed a copy/paste annoyance.
2071
2072 2014-03-27  James Craig  <jcraig@apple.com>
2073
2074         Web Inspector: AXI: expose selectedChildNodeIds of list boxes, tree controls, etc., and reconcile UI with childNodeIds
2075         https://bugs.webkit.org/show_bug.cgi?id=130827
2076
2077         Reviewed by Timothy Hatcher.
2078
2079         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
2080
2081         Support for selectedChildNodeIds in inspector-protocol: DOM.getAccessibilityPropertiesForNode.
2082
2083         * inspector/InspectorDOMAgent.cpp:
2084         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2085         * inspector/protocol/DOM.json:
2086
2087 2014-03-27  Brent Fulgham  <bfulgham@apple.com>
2088
2089         Specify Shadow DOM Pseudo IDs in Media Element Constructors
2090         https://bugs.webkit.org/show_bug.cgi?id=130882
2091
2092         Reviewed by Eric Carlson.
2093
2094         * html/shadow/MediaControlElements.cpp:
2095         (WebCore::MediaControlPanelElement::MediaControlPanelElement): Call setPseudoId in constructor.
2096         (WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement): Ditto.
2097         (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): Ditto.
2098         (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement): Ditto.
2099         (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): Ditto.
2100         (WebCore::MediaControlPanelMuteButtonElement::MediaControlPanelMuteButtonElement): Ditto.
2101         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Ditto.
2102         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Ditto.
2103         (WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement): Ditto.
2104         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Ditto.
2105         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Ditto.
2106         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto.
2107         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto.
2108         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Ditto.
2109         (WebCore::MediaControlClosedCaptionsContainerElement::MediaControlClosedCaptionsContainerElement): Ditto.
2110         (WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement): Ditto.
2111         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Ditto.
2112         (WebCore::MediaControlPanelVolumeSliderElement::MediaControlPanelVolumeSliderElement): Ditto.
2113         (WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement): Ditto.
2114         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Ditto.
2115         (WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement): Ditto.
2116         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement): Ditto.
2117         (WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement): Ditto.
2118         (WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement): Ditto.
2119         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Ditto.
2120
2121 2014-03-27  Benjamin Poulain  <bpoulain@apple.com>
2122
2123         [iOS][WK2] Adjust the tile coverage on the scrollview's edges
2124         https://bugs.webkit.org/show_bug.cgi?id=130884
2125
2126         Reviewed by Dan Bernstein.
2127
2128         * platform/ios/ScrollViewIOS.mm:
2129         (WebCore::ScrollView::computeCoverageRect):
2130         Pull back the future rect inside the contentRect if it goes outside.
2131         There is no point in retiling for rubberbanding and the extra tiles should be always be
2132         on the opposite side to the edges.
2133
2134 2014-03-27  Joseph Pecoraro  <pecoraro@apple.com>
2135
2136         Remove unused LocaleMac::create method
2137         https://bugs.webkit.org/show_bug.cgi?id=130870
2138
2139         Reviewed by Andreas Kling.
2140
2141         * platform/text/mac/LocaleMac.h:
2142         * platform/text/mac/LocaleMac.mm:
2143         (WebCore::LocaleMac::create): Deleted.
2144         (WebCore::LocaleMac::shortDateFormatter): Deleted.
2145
2146 2014-03-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2147
2148         Clean up unneeded "mutable" keyword
2149         https://bugs.webkit.org/show_bug.cgi?id=130832
2150
2151         Reviewed by Andreas Kling.
2152
2153         As r166350, this patch cleans up unneeded "mutable" keywords.
2154         Additionally, m_validatedSelectionCache is removed because it is not used anywhere else.
2155
2156         * css/CSSFontFaceRule.h:
2157         * css/CSSStyleRule.h:
2158         * editing/FrameSelection.h:
2159
2160 2014-03-27  Enrica Casucci  <enrica@apple.com>
2161
2162         Add support for AirPlay picker in WK2 for iOS.
2163         https://bugs.webkit.org/show_bug.cgi?id=130855
2164         <rdar://problem/15349859>
2165
2166         Reviewed by Eric Carlson, Joseph Pecoraro and Benjamin Poulain.
2167
2168         Adds support in HTMLMediaSession to display the airplay picker
2169         and to monitor presence of available wireless targets.
2170
2171         * html/HTMLMediaSession.cpp:
2172         (WebCore::HTMLMediaSession::showPlaybackTargetPicker):
2173         (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
2174         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
2175         * loader/EmptyClients.h:
2176         * page/ChromeClient.h:
2177         * platform/audio/MediaSessionManager.cpp:
2178         (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged):
2179         * platform/audio/MediaSessionManager.h:
2180         (WebCore::MediaSessionManager::hasWirelessTargetsAvailable):
2181         (WebCore::MediaSessionManager::startMonitoringAirPlayRoutes):
2182         (WebCore::MediaSessionManager::stopMonitoringAirPlayRoutes):
2183         * platform/audio/ios/MediaSessionManagerIOS.h:
2184         * platform/audio/ios/MediaSessionManagerIOS.mm:
2185         (WebCore::MediaSessionManageriOS::hasWirelessTargetsAvailable):
2186         (WebCore::MediaSessionManageriOS::startMonitoringAirPlayRoutes):
2187         (WebCore::MediaSessionManageriOS::stopMonitoringAirPlayRoutes):
2188         (-[WebMediaSessionHelper initWithCallback:]):
2189         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]):
2190         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
2191         (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]):
2192         (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
2193         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2194         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled):
2195         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):
2196
2197 2014-03-27  Bem Jones-Bey  <bjonesbe@adobe.com>
2198
2199         [CSS Shapes][css clip-path] rounded corner calculation for box shapes is wrong
2200         https://bugs.webkit.org/show_bug.cgi?id=127982
2201
2202         Reviewed by Simon Fraser.
2203
2204         Calculate rounded corners for box shapes as defined in the CSS Shapes
2205         spec.
2206
2207         Tests: css3/masking/clip-path-border-radius-border-box-000.html
2208                css3/masking/clip-path-border-radius-content-box-000.html
2209                css3/masking/clip-path-border-radius-content-box-001.html
2210                css3/masking/clip-path-border-radius-padding-box-000.html
2211                css3/masking/clip-path-border-radius-padding-box-001.html
2212                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-000.html
2213                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-001.html
2214                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-002.html
2215                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-000.html
2216                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-001.html
2217                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-002.html
2218                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-003.html
2219                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-000.html
2220                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-001.html
2221                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-002.html
2222                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-003.html
2223                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-004.html
2224                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-000.html
2225                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-001.html
2226                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-002.html
2227                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-003.html
2228
2229         * platform/graphics/RoundedRect.h:
2230         (WebCore::RoundedRect::Radii::transposedRadii): Transpose radii for
2231             vertical writing modes.
2232         (WebCore::RoundedRect::moveBy): Add method for use with clip path.
2233         (WebCore::RoundedRect::transposedRect): Transpose rect for vertical
2234             writing modes.
2235         * rendering/RenderBox.h:
2236         (WebCore::RenderBox::marginBoxRect): Return the margin box rect for
2237             the RenderBox.
2238         * rendering/RenderLayer.cpp:
2239         (WebCore::RenderLayer::setupClipPath): Call the new function for the
2240             rounded corner calculation.
2241         * rendering/shapes/ShapeInfo.cpp:
2242         (WebCore::ShapeInfo<RenderType>::computedShape): Call the new function
2243             for the rounded corner calculation.
2244         * rendering/shapes/BoxShape.cpp:
2245         (WebCore::adjustRadiusForMarginBoxShape): Helper function for
2246             computeRoundedRectForLayoutBoxShape.
2247         (WebCore::computeMarginBoxShapeRadius): Ditto.
2248         (WebCore::computeMarginBoxShapeRadii): Ditto.
2249         (WebCore::computeRoundedRectForBoxShape): Utility function to do the
2250             rounded corner calculation.
2251         * rendering/shapes/BoxShape.h: Add new function.
2252         * rendering/style/RenderStyle.h:
2253         (WebCore::RenderStyle::getRoundedInnerBorderFor): Add default argument
2254             values.
2255
2256 2014-03-27  Commit Queue  <commit-queue@webkit.org>
2257
2258         Unreviewed, rolling out r166364.
2259         https://bugs.webkit.org/show_bug.cgi?id=130872
2260
2261         Caused a test assertion (Requested by smfr on #webkit).
2262
2263         Reverted changeset:
2264
2265         "Operator stretching: expose a math data API"
2266         https://bugs.webkit.org/show_bug.cgi?id=130572
2267         http://trac.webkit.org/changeset/166364
2268
2269 2014-03-27  Benjamin Poulain  <bpoulain@apple.com>
2270
2271         [iOS][WK2] Compute a good exposed rect when scaling WKContentView
2272         https://bugs.webkit.org/show_bug.cgi?id=130761
2273
2274         Reviewed by Simon Fraser.
2275
2276         * WebCore.exp.in:
2277         * platform/ScrollView.h:
2278         * platform/ios/ScrollViewIOS.mm:
2279         (WebCore::ScrollView::setScrollVelocity):
2280         (WebCore::ScrollView::computeCoverageRect):
2281         While scaling in, do not add margins tiles. When scaling out, add 1 margin tile size
2282         all around.
2283
2284 2014-03-27  Commit Queue  <commit-queue@webkit.org>
2285
2286         Unreviewed, rolling out r166360.
2287         https://bugs.webkit.org/show_bug.cgi?id=130869
2288
2289         Seems to have broken PLT (Requested by ap on #webkit).
2290
2291         Reverted changeset:
2292
2293         "Connection::dispatchOneMessage() can be re-entered while
2294         handling Cmd-key menu"
2295         https://bugs.webkit.org/show_bug.cgi?id=130767
2296         http://trac.webkit.org/changeset/166360
2297
2298 2014-03-27  Antti Koivisto  <antti@apple.com>
2299
2300         Remove LiveNodeList::Type
2301         https://bugs.webkit.org/show_bug.cgi?id=130866
2302
2303         Reviewed by Andreas Kling.
2304
2305         We don't need dynamic type information anymore.
2306
2307         * dom/ClassNodeList.cpp:
2308         (WebCore::ClassNodeList::ClassNodeList):
2309         * dom/ContainerNode.cpp:
2310         (WebCore::ContainerNode::getElementsByTagName):
2311         (WebCore::ContainerNode::getElementsByName):
2312         (WebCore::ContainerNode::getElementsByClassName):
2313         (WebCore::ContainerNode::radioNodeList):
2314         * dom/LiveNodeList.cpp:
2315         (WebCore::LiveNodeList::LiveNodeList):
2316         * dom/LiveNodeList.h:
2317         (WebCore::LiveNodeList::invalidationType):
2318         (WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
2319         (WebCore::LiveNodeList::type): Deleted.
2320         * dom/NameNodeList.cpp:
2321         (WebCore::NameNodeList::NameNodeList):
2322         (WebCore::NameNodeList::nodeMatches): Deleted.
2323         * dom/NameNodeList.h:
2324         (WebCore::NameNodeList::nodeMatches):
2325         * dom/NodeRareData.h:
2326         (WebCore::NodeListTypeIdentifier<ClassNodeList>::value):
2327         (WebCore::NodeListTypeIdentifier<NameNodeList>::value):
2328         (WebCore::NodeListTypeIdentifier<TagNodeList>::value):
2329         (WebCore::NodeListTypeIdentifier<HTMLTagNodeList>::value):
2330         (WebCore::NodeListTypeIdentifier<RadioNodeList>::value):
2331         (WebCore::NodeListTypeIdentifier<LabelsNodeList>::value):
2332         
2333             Get unique id from type for key generation purposes only.
2334
2335         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
2336         (WebCore::NodeListsNodeData::addCacheWithName):
2337         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
2338         (WebCore::NodeListsNodeData::removeCacheWithName):
2339         (WebCore::NodeListsNodeData::namedNodeListKey):
2340         * dom/TagNodeList.cpp:
2341         (WebCore::TagNodeList::TagNodeList):
2342         (WebCore::HTMLTagNodeList::HTMLTagNodeList):
2343         * dom/TagNodeList.h:
2344         * html/LabelableElement.cpp:
2345         (WebCore::LabelableElement::labels):
2346         * html/LabelsNodeList.cpp:
2347         (WebCore::LabelsNodeList::LabelsNodeList):
2348         * html/LabelsNodeList.h:
2349         * html/RadioNodeList.cpp:
2350         (WebCore::RadioNodeList::RadioNodeList):
2351         * html/RadioNodeList.h:
2352
2353 2014-03-27  Simon Fraser  <simon.fraser@apple.com>
2354
2355         Fix crash when RenderView is cleared inside of frame flattening layout
2356         https://bugs.webkit.org/show_bug.cgi?id=130864
2357
2358         Reviewed by Dan Bernstein.
2359         
2360         Navigating on http://wallstcheatsheet.com pages on iOS in WebKit1 would
2361         sometimes crash when, inside the inChildFrameLayoutWithFrameFlattening clause,
2362         our frame's RenderView would be null after doing a layout from the root frame,
2363         possibly also when WebCore was being re-entered from another thread.
2364         
2365         Add a null check to fix this.
2366         
2367         Crash was timing-dependent and hard to test.
2368
2369         * page/FrameView.cpp:
2370         (WebCore::FrameView::layout):
2371
2372 2014-03-27  Antti Koivisto  <antti@apple.com>
2373
2374         Remove some unnecessary branches from LiveNodeList traversal
2375         https://bugs.webkit.org/show_bug.cgi?id=130854
2376
2377         Reviewed by Andreas Kling.
2378
2379         Compile different traversal code paths for all NodeList subclasses.
2380
2381         * dom/ClassNodeList.cpp:
2382         (WebCore::ClassNodeList::ClassNodeList):
2383         (WebCore::ClassNodeList::~ClassNodeList):
2384         (WebCore::ClassNodeList::nodeMatches): Deleted.
2385         * dom/ClassNodeList.h:
2386         (WebCore::ClassNodeList::nodeMatches):
2387         (WebCore::ClassNodeList::nodeMatchesInlined): Deleted.
2388         
2389             Remove separate nodeMatchesInlined functions. 
2390             We now rely on exact types and marking classes final.
2391
2392         * dom/LiveNodeList.cpp:
2393         (WebCore::LiveNodeList::LiveNodeList):
2394         (WebCore::LiveNodeList::~LiveNodeList):
2395         (WebCore::LiveNodeList::namedItem):
2396         (WebCore::LiveNodeList::rootNode): Deleted.
2397         (WebCore::isMatchingElement): Deleted.
2398         (WebCore::firstMatchingElement): Deleted.
2399         (WebCore::lastMatchingElement): Deleted.
2400         (WebCore::nextMatchingElement): Deleted.
2401         (WebCore::previousMatchingElement): Deleted.
2402         (WebCore::traverseMatchingElementsForward): Deleted.
2403         (WebCore::traverseMatchingElementsBackward): Deleted.
2404         (WebCore::LiveNodeList::collectionFirst): Deleted.
2405         (WebCore::LiveNodeList::collectionLast): Deleted.
2406         (WebCore::LiveNodeList::collectionTraverseForward): Deleted.
2407         (WebCore::LiveNodeList::collectionTraverseBackward): Deleted.
2408         (WebCore::LiveNodeList::length): Deleted.
2409         (WebCore::LiveNodeList::item): Deleted.
2410         (WebCore::LiveNodeList::memoryCost): Deleted.
2411         (WebCore::LiveNodeList::invalidateCache): Deleted.
2412         * dom/LiveNodeList.h:
2413         (WebCore::LiveNodeList::invalidateCacheForAttribute):
2414         (WebCore::CachedLiveNodeList::collectionCanTraverseBackward):
2415         (WebCore::LiveNodeList::rootNode):
2416         (WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
2417         
2418             Add CachedLiveNodeList<NodeListType> utility type that interfaces with CollectionIndexCache.
2419             It is the base class for all concrete LiveNodeLists.
2420
2421         (WebCore::CachedLiveNodeList<NodeListType>::~CachedLiveNodeList):
2422         (WebCore::CachedLiveNodeList<NodeListType>::collectionFirst):
2423         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
2424         (WebCore::nextMatchingElement):
2425         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
2426         (WebCore::previousMatchingElement):
2427         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
2428         (WebCore::CachedLiveNodeList<NodeListType>::willValidateIndexCache):
2429         (WebCore::CachedLiveNodeList<NodeListType>::invalidateCache):
2430         (WebCore::CachedLiveNodeList<NodeListType>::length):
2431         (WebCore::CachedLiveNodeList<NodeListType>::item):
2432         (WebCore::CachedLiveNodeList<NodeListType>::memoryCost):
2433         
2434             Templated code moves to header.
2435
2436         (WebCore::LiveNodeList::LiveNodeList): Deleted.
2437         (WebCore::LiveNodeList::~LiveNodeList): Deleted.
2438         (WebCore::LiveNodeList::invalidateCache): Deleted.
2439         (WebCore::LiveNodeList::collectionCanTraverseBackward): Deleted.
2440         (WebCore::LiveNodeList::willValidateIndexCache): Deleted.
2441         * dom/NameNodeList.cpp:
2442         (WebCore::NameNodeList::NameNodeList):
2443         * dom/NameNodeList.h:
2444         * dom/Node.cpp:
2445         (WebCore::Document::invalidateNodeListAndCollectionCaches):
2446         (WebCore::NodeListsNodeData::invalidateCaches):
2447         * dom/TagNodeList.cpp:
2448         (WebCore::TagNodeList::TagNodeList):
2449         (WebCore::HTMLTagNodeList::HTMLTagNodeList):
2450         (WebCore::HTMLTagNodeList::~HTMLTagNodeList):
2451         (WebCore::TagNodeList::nodeMatches): Deleted.
2452         (WebCore::HTMLTagNodeList::nodeMatches): Deleted.
2453         * dom/TagNodeList.h:
2454         (WebCore::TagNodeList::nodeMatches):
2455         (WebCore::HTMLTagNodeList::nodeMatches):
2456         (WebCore::TagNodeList::create): Deleted.
2457         (WebCore::HTMLTagNodeList::nodeMatchesInlined): Deleted.
2458         * html/LabelsNodeList.cpp:
2459         (WebCore::LabelsNodeList::LabelsNodeList):
2460         * html/LabelsNodeList.h:
2461         * html/RadioNodeList.cpp:
2462         (WebCore::RadioNodeList::RadioNodeList):
2463         * html/RadioNodeList.h:
2464
2465 2014-03-27  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2466
2467         Remove comment from Filter.h
2468         https://bugs.webkit.org/show_bug.cgi?id=130848
2469
2470         Reviewed by Simon Fraser.
2471
2472         Exploring the use of consts on applyScale() methods didn't yield
2473         good results.
2474
2475         No new tests, no change on behavior.
2476
2477         * platform/graphics/filters/Filter.h:
2478
2479 2014-03-27  Frédéric Wang  <fred.wang@free.fr>
2480
2481         Operator stretching: expose a math data API
2482         https://bugs.webkit.org/show_bug.cgi?id=130572
2483
2484         Reviewed by Chris Fleizach.
2485
2486         We expose a new SimpleFontData API to give access to the data from the
2487         OpenType MATH table using a font cache. The class OpenTypeMathData will
2488         be implemented in bug 130324. On Darwin platform, we also implement the
2489         missing FontPlatformData::openTypeTable function which will be necessary
2490         to load the OpenType MATH table. The changes are intended to be used
2491         for MathML operator stretching (bug 130322) so tests are not added yet.
2492
2493         * CMakeLists.txt: add new OpenTypeMathData files.
2494         * WebCore.vcxproj/WebCore.vcxproj: ditto.
2495         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
2496         * WebCore.xcodeproj/project.pbxproj: ditto.
2497         * platform/graphics/FontCache.cpp: We add a FontCache::getMathData function to implement a cache for the math data.
2498         We make the math and vertical data share the same key for the cache.
2499         (WebCore::fontMathDataCacheInstance):
2500         (WebCore::FontCache::getMathData):
2501         (WebCore::fontVerticalDataCacheInstance):
2502         * platform/graphics/FontCache.h: We declare FontCache::getMathData and FontFileKey on all platforms.
2503         * platform/graphics/FontPlatformData.cpp:
2504         (WebCore::FontPlatformData::openTypeTable): We implement openTypeTable() on Darwin platform.
2505         * platform/graphics/FontPlatformData.h: We expose openTypeTable() on Darwin platform.
2506         * platform/graphics/SimpleFontData.cpp: We initialize m_mathData from the font cache.
2507         (WebCore::SimpleFontData::SimpleFontData):
2508         * platform/graphics/SimpleFontData.h: We expose a mathData() function to access the MATH data.
2509         * platform/graphics/opentype/OpenTypeMathData.cpp: Added. This is a new class that will be used to parse the data from the OpenType MATH table.
2510         (WebCore::OpenTypeMathData::OpenTypeMathData):
2511         * platform/graphics/opentype/OpenTypeMathData.h: Added.
2512         (WebCore::OpenTypeMathData::create):
2513         (WebCore::OpenTypeMathData::hasMathData):
2514
2515 2014-03-27  Brent Fulgham  <bfulgham@apple.com>
2516
2517         Fix a crash caused by track insertion after load()
2518         https://bugs.webkit.org/show_bug.cgi?id=130777
2519
2520         Reviewed by Eric Carlson.
2521
2522         Test: media/track/track-insert-after-load-crash.html
2523
2524         Based on the Blink change (patch by acolwell@chromium.org):
2525         https://codereview.chromium.org/211373009/
2526
2527         * html/HTMLMediaElement.cpp:
2528         (WebCore::HTMLMediaElement::parseAttribute): Remove stale LoadMediaResource flag after explicit load.
2529
2530 2014-03-27  Alexey Proskuryakov  <ap@apple.com>
2531
2532         Connection::dispatchOneMessage() can be re-entered while handling Cmd-key menu
2533         equivalents, ASSERT(!_data->_keyDownEventBeingResent)
2534         https://bugs.webkit.org/show_bug.cgi?id=130767
2535         <rdar://problem/16307487>
2536
2537         Added a wrapper for RunLoop::initializeMainThread that also adds modal run loop
2538         mode to it on Mac.
2539
2540         * CMakeLists.txt:
2541         * WebCore.exp.in:
2542         * WebCore.vcxproj/WebCore.vcxproj:
2543         * WebCore.vcxproj/WebCore.vcxproj.filters:
2544         * WebCore.xcodeproj/project.pbxproj:
2545         * platform/MainRunLoop.cpp: Added.
2546         (WebCore::initializeMainRunLoop):
2547         * platform/MainRunLoop.h: Added.
2548         * platform/mac/MainRunLoop.mm: Added.
2549         (WebCore::initializeMainRunLoop):
2550
2551 2014-03-27  Krzysztof Czech  <k.czech@samsung.com>
2552
2553         AX: Returns const reference to static string.
2554         https://bugs.webkit.org/show_bug.cgi?id=130835
2555
2556         Reviewed by Mario Sanchez Prada.
2557
2558         Avoiding some unnecessary copies by returning const reference to static string.
2559
2560         No new tests. No behaviour change.
2561
2562         * accessibility/AccessibilityMediaControls.cpp:
2563         (WebCore::AccessibilityMediaControl::controlTypeName):
2564         (WebCore::AccessibilityMediaControlsContainer::elementTypeName):
2565         * accessibility/AccessibilityMediaControls.h:
2566
2567 2014-03-27  Mihnea Ovidenie  <mihnea@adobe.com>
2568
2569         [CSSRegions] Rename inNamedFlow flag to isNamedFlowContentNode flag
2570         https://bugs.webkit.org/show_bug.cgi?id=130731
2571
2572         Reviewed by Andrei Bucur.
2573
2574         Currently, the inNamedFlow flag in Node class tells if a node is a content node, one that has a style with flow-into.
2575         Since it is used only for those nodes and not propagated through hierarchy, i want to renamed it to a more meaningful name.
2576         No new functionality, no new tests.
2577
2578         * dom/ContainerNode.cpp:
2579         (WebCore::destroyRenderTreeIfNeeded):
2580         * dom/Element.cpp:
2581         (WebCore::Element::~Element):
2582         (WebCore::Element::unregisterNamedFlowContentElement):
2583         * dom/Node.h:
2584         (WebCore::Node::isNamedFlowContentNode):
2585         (WebCore::Node::setIsNamedFlowContentNode):
2586         (WebCore::Node::clearIsNamedFlowContentNode):
2587         * rendering/RenderNamedFlowThread.cpp:
2588         (WebCore::RenderNamedFlowThread::clearContentElements):
2589         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
2590         (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
2591         (WebCore::nextNodeInsideContentElement):
2592         * style/StyleResolveTree.cpp:
2593         (WebCore::Style::attachChildren):
2594         (WebCore::Style::resolveLocal):
2595
2596 2014-03-27  Mihnea Ovidenie  <mihnea@adobe.com>
2597
2598         [CSSRegions] Crash when cloning a region child with a content node child
2599         https://bugs.webkit.org/show_bug.cgi?id=129811
2600
2601         Reviewed by David Hyatt.
2602
2603         Collecting the children of a region in another named flow will be supported
2604         again in the future and it will be revisited when we will implement the content
2605         keyword: http://dev.w3.org/csswg/css-regions-1/#the-flow-into-property.
2606         Remove the support for now as it introduces unnecessary complexity in the code
2607         and potential wrong behavior.
2608
2609         Test: fast/regions/region-content-node-child-clone-crash.html
2610
2611         * dom/Element.cpp:
2612         (WebCore::Element::shouldMoveToFlowThread):
2613         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
2614         * dom/Element.h:
2615         * dom/ElementRareData.h:
2616         (WebCore::ElementRareData::ElementRareData):
2617         * rendering/FlowThreadController.cpp:
2618         * rendering/FlowThreadController.h:
2619         * style/StyleResolveTree.cpp:
2620         (WebCore::Style::moveToFlowThreadIfNeeded):
2621         (WebCore::Style::createRendererIfNeeded):
2622
2623 2014-03-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2624
2625         Remove unneeded mutable keyword in some member variables 
2626         https://bugs.webkit.org/show_bug.cgi?id=130813
2627
2628         Reviewed by Andreas Kling.
2629
2630         Some member variables have mutable keyword though they don't used by const function.
2631         This patch removes them. 
2632
2633         No new tests, no behavior changes. Just clean up.
2634
2635         * storage/StorageAreaSync.h:
2636         * svg/animation/SVGSMILElement.h:
2637
2638 2014-03-27  Commit Queue  <commit-queue@webkit.org>
2639
2640         Unreviewed, rolling out r166296 and r166331.
2641         https://bugs.webkit.org/show_bug.cgi?id=130822
2642
2643         caused some crashes and frequent assertion failures, and the
2644         fix is going to take a little while (Requested by thorton on
2645         #webkit).
2646
2647         Reverted changesets:
2648
2649         "[iOS WebKit2] Flush all surfaces after painting into all of
2650         them, instead of after painting into each one"
2651         https://bugs.webkit.org/show_bug.cgi?id=130768
2652         http://trac.webkit.org/changeset/166296
2653
2654         "Assertion failure in RemoteLayerBackingStore::flush"
2655         https://bugs.webkit.org/show_bug.cgi?id=130810
2656         http://trac.webkit.org/changeset/166331
2657
2658 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
2659
2660         Fix failing scrolling tests by reverting to previous behavior where
2661         the scrolling geometry for the main frame scrolling node was only
2662         updated from frameViewLayoutUpdated() and no-where else.
2663
2664         * WebCore.exp.in:
2665         * page/scrolling/AsyncScrollingCoordinator.cpp:
2666         (WebCore::AsyncScrollingCoordinator::updateScrollingNode):
2667         * page/scrolling/AsyncScrollingCoordinator.h:
2668         * page/scrolling/ScrollingCoordinator.h:
2669         (WebCore::ScrollingCoordinator::updateScrollingNode):
2670         * rendering/RenderLayerCompositor.cpp:
2671         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
2672         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): Deleted.
2673
2674 2014-03-26  Ryosuke Niwa  <rniwa@webkit.org>
2675
2676         HTMLConverter::_processText is slow because it walks up ancestor elements
2677         https://bugs.webkit.org/show_bug.cgi?id=130820
2678
2679         Reviewed by Sam Weinig.
2680
2681         Avoid walking up the tree from each text node by caching the aggregated attributed strings for each element.
2682         Also compute the attributed strings top-down to avoid calling mutableCopy in every iteration. 
2683
2684         This reduces the runtime of Interactive/CopyAll.html from 15s to 13s (15%).
2685
2686         * editing/cocoa/HTMLConverter.mm:
2687         (HTMLConverter::_attributesForElement):
2688         (HTMLConverter::attributesForElement):
2689         (HTMLConverter::aggregatedAttributesForAncestors):
2690         (HTMLConverter::_processText):
2691
2692 2014-03-26  Sam Weinig  <sam@webkit.org>
2693
2694         Fix iOS build.
2695
2696         * editing/cocoa/HTMLConverter.mm:
2697         (_font):
2698
2699 2014-03-26  Ryosuke Niwa  <rniwa@webkit.org>
2700
2701         Make _processText and _traverseNode in HTMLConverter more efficient
2702         https://bugs.webkit.org/show_bug.cgi?id=130769
2703
2704         Reviewed by Sam Weinig.
2705
2706         Rewrote a bunch of code in C++ and avoided creating wrappers.
2707         This reduces the runtime of Interactive/CopyAll.html from ~16.5s to 15s.
2708
2709         * editing/cocoa/HTMLConverter.mm:
2710         (HTMLConverterCaches::isAncestorsOfStartToBeConverted):
2711         (HTMLConverter::HTMLConverter):
2712         (HTMLConverter::~HTMLConverter):
2713         (HTMLConverter::_processElement):
2714         (HTMLConverter::_processText):
2715         (HTMLConverter::_traverseNode):
2716         (HTMLConverter::_traverseFooterNode):
2717         (HTMLConverterCaches::cacheAncestorsOfStartToBeConverted):
2718         (HTMLConverter::_loadFromDOMRange):
2719
2720 2014-03-26  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2721
2722         FEGaussianBlur: unify and const-ify calculateKernelSize
2723         https://bugs.webkit.org/show_bug.cgi?id=130779
2724
2725         Some methods can benefit of using const refs as also make sense to
2726         unify the interface (i.e. parameters) in calculateKernelSize/Unscaled.
2727
2728         FilterEffect::filter() will now return a reference, which helps since
2729         its descendants were accessing methods into the pointer without testing
2730         for it.
2731
2732         Reviewed by Simon Fraser.
2733
2734         No new tests, no changes on behavior.
2735
2736         * platform/graphics/filters/FEDisplacementMap.cpp:
2737         (WebCore::FEDisplacementMap::platformApplySoftware):
2738         * platform/graphics/filters/FEDropShadow.cpp:
2739         (WebCore::FEDropShadow::determineAbsolutePaintRect):
2740         (WebCore::FEDropShadow::platformApplySoftware):
2741         * platform/graphics/filters/FEGaussianBlur.cpp:
2742         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
2743         (WebCore::FEGaussianBlur::calculateKernelSize):
2744         (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
2745         (WebCore::FEGaussianBlur::platformApplySoftware):
2746         * platform/graphics/filters/FEGaussianBlur.h:
2747         * platform/graphics/filters/FEMorphology.cpp:
2748         (WebCore::FEMorphology::determineAbsolutePaintRect):
2749         (WebCore::FEMorphology::platformApplySoftware):
2750         * platform/graphics/filters/FEOffset.cpp:
2751         (WebCore::FEOffset::determineAbsolutePaintRect):
2752         (WebCore::FEOffset::platformApplySoftware):
2753         * platform/graphics/filters/FETile.cpp:
2754         (WebCore::FETile::platformApplySoftware):
2755         * platform/graphics/filters/FETurbulence.cpp:
2756         (WebCore::FETurbulence::fillRegion):
2757         * platform/graphics/filters/Filter.h:
2758         (WebCore::Filter::applyHorizontalScale):
2759         (WebCore::Filter::applyVerticalScale):
2760         * platform/graphics/filters/FilterEffect.h:
2761         (WebCore::FilterEffect::filter):
2762         * platform/graphics/filters/SourceAlpha.cpp:
2763         (WebCore::SourceAlpha::determineAbsolutePaintRect):
2764         (WebCore::SourceAlpha::platformApplySoftware):
2765         * platform/graphics/filters/SourceGraphic.cpp:
2766         (WebCore::SourceGraphic::determineAbsolutePaintRect):
2767         (WebCore::SourceGraphic::platformApplySoftware):
2768         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
2769         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
2770         * svg/graphics/filters/SVGFEImage.cpp:
2771         (WebCore::FEImage::determineAbsolutePaintRect):
2772         (WebCore::FEImage::platformApplySoftware):
2773
2774 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
2775
2776         Make sure childContainmentLayer is parented
2777         https://bugs.webkit.org/show_bug.cgi?id=130808
2778
2779         Reviewed by Tim Horton.
2780
2781         m_childContainmentLayer was never parented if the page
2782         created no other compositing layers, which left a dangling
2783         GraphicsLayer which in turn confused UI-side compositing a little.
2784         Fix by always parenting this layer.
2785
2786         * rendering/RenderLayerBacking.cpp:
2787         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2788
2789 2014-03-26  Brian Burg  <bburg@apple.com>
2790
2791         Web Replay: disable page cache during capture/replay
2792         https://bugs.webkit.org/show_bug.cgi?id=130672
2793
2794         Reviewed by Timothy Hatcher.
2795
2796         Save, set, and restore page cache settings at the correct times.
2797
2798         No new tests. If this code fails, then the tests for network replay will fail.
2799
2800         * replay/ReplayController.cpp:
2801         (WebCore::ReplayController::setForceDeterministicSettings): Added.
2802         (WebCore::ReplayController::startCapturing):
2803         (WebCore::ReplayController::stopCapturing):
2804         (WebCore::ReplayController::cancelPlayback):
2805         (WebCore::ReplayController::replayToPosition):
2806         * replay/ReplayController.h:
2807
2808 2014-03-26  Sam Weinig  <sam@webkit.org>
2809
2810         Convert more of HTMLConverter to C++
2811         https://bugs.webkit.org/show_bug.cgi?id=130811
2812
2813         Reviewed by Anders Carlsson.
2814
2815         * editing/cocoa/HTMLConverter.mm:
2816         (HTMLConverter::HTMLConverter):
2817         (HTMLConverter::~HTMLConverter):
2818         (HTMLConverter::_blockLevelElementForNode):
2819         (HTMLConverter::_colorForElement):
2820         (HTMLConverter::_computedAttributesForElement):
2821         (HTMLConverter::_attributesForElement):
2822         (HTMLConverter::_fillInBlock):
2823         (HTMLConverter::_enterElement):
2824         (HTMLConverter::_addTableForElement):
2825         (HTMLConverter::_addTableCellForElement):
2826         (HTMLConverter::_processElement):
2827         (HTMLConverter::_exitElement):
2828         (HTMLConverter::_getFloat): Deleted.
2829         (HTMLConverter::_elementIsBlockLevel): Deleted.
2830         (HTMLConverter::_elementHasOwnBackgroundColor): Deleted.
2831         (HTMLConverter::_colorForNode): Deleted.
2832
2833 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
2834
2835         Hook up -webkit-overflow-scrolling:touch for iOS WK2
2836         https://bugs.webkit.org/show_bug.cgi?id=130809
2837
2838         Reviewed by Tim Horton.
2839
2840         Get -webkit-overflow-scrolling: touch working for iOS WK2.
2841         
2842         * WebCore.exp.in:
2843         * page/scrolling/AsyncScrollingCoordinator.cpp:
2844         (WebCore::AsyncScrollingCoordinator::updateScrollingNode):
2845         Send in ScrollingGeometry when we update scrolling nodes.
2846         * page/scrolling/AsyncScrollingCoordinator.h:
2847         * page/scrolling/ScrollingCoordinator.h:
2848         (WebCore::ScrollingCoordinator::updateScrollingNode):
2849         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
2850         Need to get to the scrolling layer in a subclass.
2851         (WebCore::ScrollingTreeScrollingNodeIOS::scrollLayer):
2852         * rendering/RenderLayer.cpp:
2853         (WebCore::RenderLayer::hasAcceleratedTouchScrolling): Remove code
2854         that temporarily disabled touch-scrolling.
2855         * rendering/RenderLayerCompositor.cpp:
2856         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): When we
2857         update scrolling nodes, send in the right scrolling geometry.
2858
2859 2014-03-26  Timothy Hatcher  <timothy@apple.com>
2860
2861         Modernize the loops in InspectorPageAgent.cpp.
2862
2863         Also moves the check for hiddenFromInspector to a lower level.
2864         This hides hidden resources from more places.
2865
2866         https://bugs.webkit.org/show_bug.cgi?id=130803
2867
2868         Reviewed by Joseph Pecoraro.
2869
2870         * inspector/InspectorPageAgent.cpp:
2871         (WebCore::buildArrayForCookies):
2872         (WebCore::cachedResourcesForFrame):
2873         (WebCore::allResourcesURLsForFrame):
2874         (WebCore::InspectorPageAgent::getCookies):
2875         (WebCore::InspectorPageAgent::searchInResources):
2876         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
2877         (WebCore::InspectorPageAgent::loaderDetachedFromFrame):
2878         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
2879
2880 2014-03-26  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2881
2882         Add platform implementation for RTCOfferAnswerOptions and RTCOfferOptions
2883         https://bugs.webkit.org/show_bug.cgi?id=130689
2884
2885         Reviewed by Eric Carlson.
2886
2887         RTCOfferAnswerOptions and RTCOfferOptions objects were being passed to platform class, causing a layer
2888         violation.
2889
2890         * Modules/mediastream/RTCOfferAnswerOptions.cpp:
2891         (WebCore::RTCOfferAnswerOptions::initialize):
2892         (WebCore::RTCOfferOptions::initialize):
2893         * Modules/mediastream/RTCOfferAnswerOptions.h:
2894         (WebCore::RTCOfferAnswerOptions::requestIdentity):
2895         (WebCore::RTCOfferAnswerOptions::privateOfferAnswerOptions):
2896         (WebCore::RTCOfferAnswerOptions::RTCOfferAnswerOptions):
2897         (WebCore::RTCOfferOptions::offerToReceiveVideo):
2898         (WebCore::RTCOfferOptions::offerToReceiveAudio):
2899         (WebCore::RTCOfferOptions::voiceActivityDetection):
2900         (WebCore::RTCOfferOptions::iceRestart):
2901         (WebCore::RTCOfferOptions::privateOfferOptions):
2902         (WebCore::RTCOfferOptions::RTCOfferOptions):
2903         * Modules/mediastream/RTCPeerConnection.cpp:
2904         (WebCore::RTCPeerConnection::createOffer):
2905         (WebCore::RTCPeerConnection::createAnswer):
2906         * platform/mediastream/RTCOfferAnswerOptionsPrivate.h: Added.
2907         * platform/mediastream/RTCPeerConnectionHandler.h:
2908         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
2909         (WebCore::RTCPeerConnectionHandlerMock::createOffer):
2910         (WebCore::RTCPeerConnectionHandlerMock::createAnswer):
2911         * platform/mock/RTCPeerConnectionHandlerMock.h:
2912
2913 2014-03-26  Zalan Bujtas  <zalan@apple.com>
2914
2915         Device scale factor should always be greater than 0.
2916         https://bugs.webkit.org/show_bug.cgi?id=130798
2917
2918         Reviewed by David Kilzer.
2919
2920         Rendering context requires a device scale factor > 0 so that we can map CSS pixels
2921         to device pixels properly. Neither 0 nor a negative device pixel ratio are considered to be valid.
2922
2923         * page/Page.cpp:
2924         (WebCore::Page::setDeviceScaleFactor):
2925
2926 2014-03-26  Myles C. Maxfield  <mmaxfield@apple.com>
2927
2928         Skipping underlines disregard points completely inside the underline rect
2929         https://bugs.webkit.org/show_bug.cgi?id=130800
2930
2931         Reviewed by Dean Jackson.
2932
2933         When determining bounds for underline skipping, endpoints of glyph contours
2934         that lie entirely within the rect of the underline are ignored. This patch
2935         makes these points affect the skipping regions the same way that intersections
2936         do.
2937
2938         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/glyph-inside-underline.html
2939
2940         * platform/graphics/mac/FontMac.mm:
2941         (WebCore::updateX): Refactored common code into a function
2942         (WebCore::findPathIntersections): Test for endpoints which lie entirely within
2943         the underline bounds
2944
2945 2014-03-26  Pratik Solanki  <psolanki@apple.com>
2946
2947         Unreviewed. iOS build fix after r166312. Soft link CMTimeRangeGetEnd.
2948
2949         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2950
2951 2014-03-26  Timothy Hatcher  <timothy@apple.com>
2952
2953         Propagate the hiddenFromInspector flag on ResourceRequest in
2954         places when a new request a made or passed between processes.
2955
2956         https://bugs.webkit.org/show_bug.cgi?id=130741
2957
2958         Reviewed by Joseph Pecoraro.
2959
2960         * WebCore.exp.in: Updated symbols for updateFromDelegatePreservingOldProperties.
2961         * platform/network/cf/ResourceRequest.h:
2962         * platform/network/cf/ResourceRequestCFNet.cpp:
2963         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
2964         (WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
2965         * platform/network/curl/ResourceRequest.h:
2966         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
2967         (WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
2968         * platform/network/mac/ResourceRequestMac.mm:
2969         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
2970         (WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
2971         * platform/network/soup/ResourceRequest.h:
2972         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
2973         (WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
2974
2975 2014-03-26  Zoltan Horvath  <zoltan@webkit.org>
2976
2977         [CSS Shapes] Remove no-longer-used shape-inside geometry code
2978         https://bugs.webkit.org/show_bug.cgi?id=130740
2979
2980         Reviewed by David Hyatt.
2981
2982         This patch removes shape-padding support, since it can be used only with shape-inside.
2983         Shape-inside support has been removed in r166301.
2984
2985         No new tests needed, existing tests have been removed by r166301.
2986
2987         * rendering/shapes/BoxShape.cpp:
2988         (WebCore::BoxShape::shapePaddingLogicalBoundingBox): Deleted.
2989         (WebCore::BoxShape::shapePaddingBounds): Deleted.
2990         (WebCore::BoxShape::getIncludedIntervals): Deleted.
2991         (WebCore::BoxShape::firstIncludedIntervalLogicalTop): Deleted.
2992         * rendering/shapes/BoxShape.h:
2993         * rendering/shapes/PolygonShape.cpp:
2994         (WebCore::leftSide): Deleted.
2995         (WebCore::isReflexVertex): Deleted.
2996         (WebCore::computeShapePaddingBounds): Deleted.
2997         (WebCore::PolygonShape::shapePaddingBounds): Deleted.
2998         (WebCore::PolygonShape::getIncludedIntervals): Deleted.
2999         (WebCore::firstFitRectInPolygon): Deleted.
3000         (WebCore::aboveOrToTheLeft): Deleted.
3001         (WebCore::PolygonShape::firstIncludedIntervalLogicalTop): Deleted.
3002         * rendering/shapes/PolygonShape.h:
3003         (WebCore::PolygonShape::PolygonShape):
3004         * rendering/shapes/RasterShape.cpp:
3005         (WebCore::RasterShapeIntervals::firstIncludedIntervalY): Deleted.
3006         (WebCore::RasterShapeIntervals::getIncludedIntervals): Deleted.
3007         (WebCore::RasterShape::paddingIntervals): Deleted.
3008         (WebCore::RasterShape::getIncludedIntervals): Deleted.
3009         (WebCore::RasterShape::firstIncludedIntervalLogicalTop): Deleted.
3010         * rendering/shapes/RasterShape.h:
3011         * rendering/shapes/RectangleShape.cpp:
3012         (WebCore::ellipseYIntercept): Deleted.
3013         (WebCore::RectangleShape::shapePaddingBounds): Deleted.
3014         (WebCore::RectangleShape::getIncludedIntervals): Deleted.
3015         (WebCore::cornerInterceptForWidth): Deleted.
3016         (WebCore::RectangleShape::firstIncludedIntervalLogicalTop): Deleted.
3017         * rendering/shapes/RectangleShape.h:
3018         * rendering/shapes/Shape.cpp:
3019         (WebCore::Shape::createShape):
3020         (WebCore::Shape::createRasterShape):
3021         (WebCore::Shape::createBoxShape):
3022         * rendering/shapes/Shape.h:
3023         (WebCore::Shape::lineOverlapsShapePaddingBounds): Deleted.
3024         (WebCore::Shape::shapePadding): Deleted.
3025         * rendering/shapes/ShapeInfo.cpp:
3026         (WebCore::ShapeInfo<RenderType>::computedShape):
3027         * rendering/style/RenderStyle.cpp:
3028         (WebCore::RenderStyle::changeRequiresLayout):
3029         * rendering/style/RenderStyle.h:
3030         * rendering/style/StyleRareNonInheritedData.cpp:
3031         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3032         (WebCore::StyleRareNonInheritedData::operator==):
3033         * rendering/style/StyleRareNonInheritedData.h:
3034
3035 2014-03-26  Jeremy Jones  <jeremyj@apple.com>
3036
3037         Implement hasLiveStreamingContent property in WebAVPlayerController
3038         https://bugs.webkit.org/show_bug.cgi?id=128684
3039
3040         Reviewed by Simon Fraser.
3041
3042         * WebCore.exp.in:
3043         Add export for WebVideoFullscreenInterfaceAVKit::setSeekableRanges().
3044
3045         * platform/ios/WebVideoFullscreenInterface.h:
3046         Add setSeekableRanges()
3047
3048         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3049         Add setSeekableRanges()
3050
3051         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3052         Remove vestigial playerLayer property. Add seekableTimeRanges property.
3053
3054         (-[WebAVPlayerController dealloc]):
3055         Release _seekableTimeRanges.
3056         Remove references to _playerLayer.
3057
3058         (-[WebAVPlayerController hasLiveStreamingContent]):
3059         Implement based on duration. Live stream has an infinite duration.
3060
3061         (+[WebAVPlayerController keyPathsForValuesAffectingHasLiveStreamingContent]):
3062         Describe dependent keys for computed property hasLiveStreamingContent.
3063
3064         (-[WebAVPlayerController skipBackwardThirtySeconds:]):
3065         Seek back 30 seconds if that time is in the seekable ranges.
3066
3067         (-[WebAVPlayerController gotoEndOfSeekableRanges:]):
3068         Jump to live by going to the of the seekable ranges.
3069
3070         (WebVideoFullscreenInterfaceAVKit::setSeekableRanges):
3071         Convert TimeRange to CMTimeRange.
3072
3073         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
3074         (WebVideoFullscreenModelMediaElement::setMediaElement):
3075         Set initial seekable ranges.
3076
3077         (WebVideoFullscreenModelMediaElement::handleEvent):
3078         Update seekable ranges when time changes.
3079
3080 2014-03-26  Brent Fulgham  <bfulgham@apple.com>
3081
3082         Fix OS X build.
3083
3084         * WebCore.exp.in: Add missing export symbol.
3085
3086 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
3087
3088         Fix the Windows build. Add a no-op impl for Mac non-UI-side.
3089
3090         * platform/graphics/ca/mac/PlatformCALayerMac.h:
3091         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3092         (PlatformCALayerWin::PlatformCALayerWin):
3093         * platform/graphics/ca/win/PlatformCALayerWin.h:
3094
3095 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
3096
3097         REGRESSION (r155977): matrix animations no longer animate
3098         https://bugs.webkit.org/show_bug.cgi?id=130789
3099         <rdar://problem/15650946>
3100
3101         Reviewed by Dean Jackson.
3102         
3103         r155977 erroneously removed two lines that set the end points for
3104         matrix animations (used when transform lists don't match), so
3105         put them back.
3106         
3107         Also don't repaint when updateContentsScale()
3108         is called and doesn't change the contents scale.
3109
3110         Test: compositing/animation/matrix-animation.html
3111
3112         * platform/graphics/ca/GraphicsLayerCA.cpp:
3113         (WebCore::GraphicsLayerCA::updateRootRelativeScale):
3114         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
3115         (WebCore::GraphicsLayerCA::updateContentsScale):
3116
3117 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
3118
3119         Add a custom behavior flag to GraphicsLayer, piped down to PlatformCALayer, for scrolling layers
3120         https://bugs.webkit.org/show_bug.cgi?id=130778
3121
3122         Reviewed by Tim Horton.
3123
3124         Make it possible to put a "custom behavior" flag on a layer so that,
3125         with UI-side compositing, we know to create a specific type of
3126         layer or view for that GraphicsLayer.
3127
3128         * WebCore.exp.in:
3129         * platform/graphics/GraphicsLayer.cpp:
3130         (WebCore::GraphicsLayer::GraphicsLayer):
3131         * platform/graphics/GraphicsLayer.h:
3132         (WebCore::GraphicsLayer::setCustomBehavior):
3133         (WebCore::GraphicsLayer::customBehavior):
3134         * platform/graphics/ca/GraphicsLayerCA.cpp:
3135         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3136         (WebCore::GraphicsLayerCA::updateCustomBehavior):
3137         (WebCore::GraphicsLayerCA::setCustomBehavior):
3138         * platform/graphics/ca/GraphicsLayerCA.h:
3139         * platform/graphics/ca/PlatformCALayer.h:
3140         * platform/graphics/ca/mac/PlatformCALayerMac.h:
3141         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3142         (PlatformCALayerMac::PlatformCALayerMac):
3143         * rendering/RenderLayerBacking.cpp:
3144         (WebCore::RenderLayerBacking::updateScrollingLayers):
3145
3146 2014-03-26  Brent Fulgham  <bfulgham@apple.com>
3147
3148         Unreviewed test correction.
3149
3150         Because of the way DRT on Windows links to WebCore, having the implementaion of the update
3151         method in the header caused a runtime failure due to duplicate symbols being bound to the
3152         compilation unit.
3153
3154         * accessibility/AXObjectCache.cpp:
3155         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility): Moved from header.
3156         * accessibility/AXObjectCache.h:
3157         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility): Deleted.
3158
3159 2014-03-26  Jer Noble  <jer.noble@apple.com>
3160
3161         REGRESSION(r162679): Poster image visible under the video
3162         https://bugs.webkit.org/show_bug.cgi?id=130783
3163
3164         Reviewed by Simon Fraser.
3165
3166         In the listed revision, we started checking for isRenderImage()
3167         instead of isImage(). RenderMedias return 'true' for the first
3168         but 'false' for the second. Change the if() statement to check
3169         for isRenderMedia() in addition to !isRenderImage().
3170
3171         * rendering/RenderLayerBacking.cpp:
3172         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
3173
3174 2014-03-26  Antti Koivisto  <antti@apple.com>
3175
3176         Render tree construction is O(N^2) in number of siblings
3177         https://bugs.webkit.org/show_bug.cgi?id=129065
3178
3179         Reviewed by Darin Adler.
3180         
3181         When adding a new renderer to the tree we would search for the correct render tree
3182         position by traversing DOM children forward to find something that already has a renderer.
3183         In common case there is no such renderer. This would be repeated for each inserted renderer
3184         leading to O(n^2) in respect to child node count.
3185         
3186         This patch caches the computed render tree insertion position and passes it to siblings.
3187         Until the cached position is reached it can be used for all new renderers.
3188
3189         Test: perf/sibling-renderer-On2.html
3190
3191         * style/StyleResolveTree.cpp:
3192         (WebCore::Style::RenderTreePosition::parent):
3193         (WebCore::Style::RenderTreePosition::RenderTreePosition):
3194         (WebCore::Style::RenderTreePosition::canInsert):
3195         (WebCore::Style::RenderTreePosition::insert):
3196         (WebCore::Style::RenderTreePosition::computeNextSibling):
3197         (WebCore::Style::RenderTreePosition::invalidateNextSibling):
3198         (WebCore::Style::styleForElement):
3199         (WebCore::Style::elementInsideRegionNeedsRenderer):
3200         (WebCore::Style::createRendererIfNeeded):
3201         (WebCore::Style::createTextRendererIfNeeded):
3202         (WebCore::Style::attachTextRenderer):
3203         (WebCore::Style::updateTextRendererAfterContentChange):
3204         (WebCore::Style::attachChildren):
3205         (WebCore::Style::attachDistributedChildren):
3206         (WebCore::Style::attachShadowRoot):
3207         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
3208         (WebCore::Style::attachRenderTree):
3209         (WebCore::Style::resolveLocal):
3210         (WebCore::Style::resolveTextNode):
3211         (WebCore::Style::resolveShadowTree):
3212         (WebCore::Style::updateBeforeOrAfterPseudoElement):
3213         (WebCore::Style::resolveTree):
3214
3215 2014-03-26  Commit Queue  <commit-queue@webkit.org>
3216
3217         Unreviewed, rolling out r166264.
3218         https://bugs.webkit.org/show_bug.cgi?id=130785
3219
3220         Broke some window.opener tests for WK2 Mavericks (Requested by
3221         brrian__ on #webkit).
3222
3223         Reverted changeset:
3224
3225         "Web Replay: resource unique identifiers should be unique-per-
3226         frame, not globally"
3227         https://bugs.webkit.org/show_bug.cgi?id=130632
3228         http://trac.webkit.org/changeset/166264
3229
3230 2014-03-26  Zoltan Horvath  <zoltan@webkit.org>
3231
3232         [CSS Shapes] Remove shape-inside support
3233         https://bugs.webkit.org/show_bug.cgi?id=130698
3234
3235         Reviewed by David Hyatt.
3236
3237         CSS Shapes Level 1 (CR) only contains shape-outside. We are focusing our efforts on finalizing
3238         the implementation of shape-outside, it's worth to remove shape-inside code at this point for now.
3239
3240         A list of reasons for the removal:
3241           - Shape-inside is only part of Shapes Level 2, which needs to be improved on some topics.
3242           - Shape-inside is lack of new shapes support (e.g. inset).
3243           - Deprecated shapes (r165472) are removed from the code (e.g. rectangle), which affects shape-inside. 
3244           - The current shape-inside code spreads across the layout code.
3245           - The current shape-inside implementation is experimental in some areas,
3246             and the partially implemented code can have security implications.
3247           - Removal of shape-inside opens possibilities for code complexity and performance
3248             optimizations for shape-outside. (e.g. simpler geometry code)
3249
3250         No new tests are needed.
3251
3252         * CMakeLists.txt:
3253         * Configurations/FeatureDefines.xcconfig:
3254         * GNUmakefile.list.am:
3255         * WebCore.xcodeproj/project.pbxproj:
3256         * css/CSSComputedStyleDeclaration.cpp:
3257         (WebCore::ComputedStyleExtractor::propertyValue):
3258         * css/CSSParser.cpp:
3259         (WebCore::isSimpleLengthPropertyID):
3260         (WebCore::CSSParser::parseValue):
3261         (WebCore::CSSParser::parseShapeProperty):
3262         * css/CSSPropertyNames.in:
3263         * css/DeprecatedStyleBuilder.cpp:
3264         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3265         * css/StyleResolver.cpp:
3266         (WebCore::StyleResolver::applyProperty):
3267         (WebCore::StyleResolver::loadPendingImages):
3268         * page/animation/CSSPropertyAnimation.cpp:
3269         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
3270         * rendering/LayoutState.cpp:
3271         (WebCore::LayoutState::LayoutState):
3272         * rendering/LayoutState.h:
3273         (WebCore::LayoutState::LayoutState):
3274         (WebCore::LayoutState::shapeInsideInfo): Deleted.
3275         * rendering/RenderBlock.cpp:
3276         (WebCore::RenderBlock::styleDidChange):
3277         (WebCore::RenderBlock::imageChanged):
3278         (WebCore::RenderBlock::preparePaginationBeforeBlockLayout):
3279         (WebCore::RenderBlock::relayoutShapeDescendantIfMoved): Deleted.
3280         (WebCore::RenderBlock::logicalOffsetFromShapeAncestorContainer): Deleted.
3281         (WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange): Deleted.
3282         (WebCore::RenderBlock::ensureShapeInsideInfo): Deleted.
3283         (WebCore::RenderBlock::shapeInsideInfo): Deleted.
3284         (WebCore::RenderBlock::setShapeInsideInfo): Deleted.
3285         (WebCore::RenderBlock::markShapeInsideDescendantsForLayout): Deleted.
3286         (WebCore::RenderBlock::layoutShapeInsideInfo): Deleted.
3287         (WebCore::shapeInfoRequiresRelayout): Deleted.
3288         (WebCore::RenderBlock::computeShapeSize): Deleted.
3289         (WebCore::RenderBlock::updateShapesBeforeBlockLayout): Deleted.
3290         (WebCore::RenderBlock::updateShapesAfterBlockLayout): Deleted.
3291         (WebCore::RenderBlock::prepareShapesAndPaginationBeforeBlockLayout): Deleted.
3292         * rendering/RenderBlock.h:
3293         (WebCore::RenderBlock::allowsShapeInsideInfoSharing): Deleted.
3294         * rendering/RenderBlockFlow.cpp:
3295         (WebCore::RenderBlockFlow::layoutBlock):
3296         (WebCore::RenderBlockFlow::layoutBlockChild):
3297         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
3298         * rendering/RenderBlockFlow.h:
3299         * rendering/RenderBlockLineLayout.cpp:
3300         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
3301         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
3302         (WebCore::constructBidiRunsForLine): Deleted.
3303         (WebCore::pushShapeContentOverflowBelowTheContentBox): Deleted.
3304         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLine): Deleted.
3305         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread): Deleted.
3306         (WebCore::adjustLogicalLineTop): Deleted.
3307         (WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded): Deleted.
3308         * rendering/RenderDeprecatedFlexibleBox.cpp:
3309         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
3310         * rendering/RenderElement.cpp:
3311         (WebCore::RenderElement::~RenderElement):
3312         (WebCore::RenderElement::initializeStyle):
3313         (WebCore::RenderElement::setStyle):
3314         * rendering/RenderFlexibleBox.cpp:
3315         (WebCore::RenderFlexibleBox::layoutBlock):
3316         * rendering/RenderGrid.cpp:
3317         (WebCore::RenderGrid::layoutBlock):
3318         * rendering/RenderNamedFlowFragment.cpp:
3319         (WebCore::RenderNamedFlowFragment::createStyle):
3320         * rendering/RenderView.h:
3321         * rendering/SimpleLineLayout.cpp:
3322         (WebCore::SimpleLineLayout::canUseFor):
3323         * rendering/line/BreakingContextInlineHeaders.h:
3324         (WebCore::BreakingContext::handleText):
3325         (WebCore::BreakingContext::handleEndOfLine):
3326         (WebCore::updateSegmentsForShapes): Deleted.
3327         * rendering/line/LineBreaker.cpp:
3328         (WebCore::LineBreaker::nextLineBreak):
3329         * rendering/line/LineWidth.cpp:
3330         (WebCore::LineWidth::LineWidth):
3331         (WebCore::LineWidth::updateAvailableWidth):
3332         (WebCore::LineWidth::wrapNextToShapeOutside):
3333         (WebCore::LineWidth::fitBelowFloats):
3334         (WebCore::LineWidth::updateLineSegment): Deleted.
3335         (WebCore::LineWidth::updateCurrentShapeSegment): Deleted.
3336         * rendering/line/LineWidth.h:
3337         * rendering/shapes/ShapeInsideInfo.cpp: Removed.
3338         * rendering/shapes/ShapeInsideInfo.h: Removed.
3339         * rendering/style/RenderStyle.cpp:
3340         (WebCore::RenderStyle::changeRequiresLayout):
3341         * rendering/style/RenderStyle.h:
3342         * rendering/style/StyleRareNonInheritedData.cpp:
3343         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3344         (WebCore::StyleRareNonInheritedData::operator==):
3345         * rendering/style/StyleRareNonInheritedData.h:
3346
3347 2014-03-25  Brent Fulgham  <bfulgham@apple.com>
3348
3349         Avoid duplicate size checks when creating empty image
3350         https://bugs.webkit.org/show_bug.cgi?id=130730
3351
3352         Reviewed by Dean Jackson.
3353
3354         Merged from Blink (patch by ch.dumez@samsung.com):
3355         https://chromium.googlesource.com/chromium/blink/+/4861a71bc1f284fc97417f405ab7d08dc6947b88
3356         http://crbug.com/190633011
3357
3358         * html/canvas/CanvasRenderingContext2D.cpp:
3359         (WebCore::createEmptyImageData): Don't perform overflow calculation twice.
3360
3361 2014-03-26  Sergio Villar Senin  <svillar@igalia.com>
3362
3363         [CSS Grid Layout] getComputedStyle() must return the specified value for positioning properties
3364         https://bugs.webkit.org/show_bug.cgi?id=130010
3365
3366         Reviewed by Darin Adler.
3367
3368         According to the specs
3369         http://dev.w3.org/csswg/css-grid/#property-index and also to
3370         http://lists.w3.org/Archives/Public/www-style/2014Mar/0162.html
3371         the function getComputedStyle() must return the specified values
3372         for positioning properties, i.e, grid-{columns|rows}-{start|end}.
3373
3374         We were in some cases, adjusting the style in the StyleResolver
3375         (for example with two opposing spans) something that is now done
3376         in the RenderGrid because we cannot alter the original style.
3377
3378         The code moved to the renderer became more self explanatory and it
3379         now supports named grid areas with names ending in "-start" and
3380         "-end".
3381
3382         Test: fast/css-grid-layout/named-grid-lines-with-named-grid-areas-get-set.html
3383
3384         * css/StyleResolver.cpp:
3385         (WebCore::StyleResolver::adjustRenderStyle):
3386         (WebCore::gridLineDefinedBeforeGridArea): Deleted.
3387         (WebCore::StyleResolver::adjustNamedGridItemPosition): Deleted.
3388         (WebCore::StyleResolver::adjustGridItemPosition): Deleted.
3389         * css/StyleResolver.h:
3390         * rendering/RenderGrid.cpp:
3391         (WebCore::isColumnSide):
3392         (WebCore::RenderGrid::explicitGridSizeForSide):
3393         (WebCore::gridLineDefinedBeforeGridArea):
3394         (WebCore::setNamedLinePositionIfDefinedBeforeArea):
3395         (WebCore::RenderGrid::adjustNamedGridItemPosition):
3396         (WebCore::RenderGrid::adjustGridPositionsFromStyle):
3397         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
3398         (WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle):
3399         (WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition):
3400         * rendering/RenderGrid.h:
3401         * rendering/style/GridPosition.h:
3402         (WebCore::GridPosition::setAutoPosition): New helper function.
3403
3404 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
3405
3406         Fix the iOS build.
3407
3408         * WebCore.exp.in:
3409
3410 2014-03-26  Tim Horton  <timothy_horton@apple.com>
3411
3412         [iOS WebKit2] Flush all surfaces after painting into all of them, instead of after painting into each one
3413         https://bugs.webkit.org/show_bug.cgi?id=130768
3414         <rdar://problem/16421471>
3415
3416         Reviewed by Simon Fraser.
3417
3418         * platform/graphics/cocoa/IOSurface.h:
3419         Add a non-ensuring platformContext() getter.
3420
3421 2014-03-26  James Craig  <jcraig@apple.com>
3422
3423         Web Inspector: AXI: crash when inspecting "bar" text node in getAccessibilityPropertiesForNode layout test
3424         https://bugs.webkit.org/show_bug.cgi?id=130290
3425
3426         Reviewed by Timothy Hatcher.
3427
3428         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
3429
3430         Fixing regression from r165590. http://webkit.org/b/129779
3431         Verify isElementNode to avoid calling toElement on document or text nodes.
3432
3433         * inspector/InspectorDOMAgent.cpp:
3434         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3435
3436 2014-03-25  Sergio Villar Senin  <svillar@igalia.com>
3437
3438         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in editing/
3439         https://bugs.webkit.org/show_bug.cgi?id=130722
3440
3441         Reviewed by Antti Koivisto.
3442
3443         * editing/AlternativeTextController.cpp:
3444         (WebCore::markerTypesForAutocorrection):
3445         (WebCore::markerTypesFo