plainText() is O(N^2)
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-07-02  Geoffrey Garen  <ggaren@apple.com>
2
3         plainText() is O(N^2)
4         https://bugs.webkit.org/show_bug.cgi?id=118282
5         <rdar://problem/14284360>
6
7         Reviewed by Alexey Proskuryakov.
8
9         * editing/TextIterator.cpp:
10         (WebCore::plainText): Linear growth for a vector data type is O(N^2).
11         Don't do that. Luckily, StringBuilder does the right thing automatically,
12         so we can just delete code.
13
14 2013-07-02  Tim Horton  <timothy_horton@apple.com>
15
16         constrainScrollPositionForOverhang needs to handle scrollOrigin correctly
17         https://bugs.webkit.org/show_bug.cgi?id=118176
18         <rdar://problem/14301271>
19
20         Reviewed by Anders Carlsson.
21
22         Test: compositing/geometry/fixed-position-flipped-writing-mode.html
23
24         WebCore makes use of constrainScrollPositionForOverhang not only for
25         constraining fixed- and sticky-positioned elements to the viewport, but
26         also for clamping the tile cache's visible rect.
27
28         Therefore, constrainScrollPositionForOverhang needs to correctly take
29         the scrollOrigin into account. The easiest way I saw to do this was to
30         reimplement the function in terms of a pair of rect intersections
31         between a virtual scrollable "viewport" and the document (with a bit
32         of complication from headers and footers).
33
34         The first intersection is performed, then if the viewport doesn't fit,
35         it is pushed down and to the right, from the origin. Next, we intersect
36         again, this time pushing the rect up by the amount it overflowed the document
37         rect from the bottom right. This performs effectively the same constraint
38         as previously, but handles the scrollOrigin correctly and is also somewhat
39         easier to read and understand (with pictures).
40
41         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
42         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
43         Subtract the scrollOrigin out of the offset passed to scrollOffsetForFixedPosition,
44         it's expecting an offset without the origin included.
45
46         * platform/ScrollableArea.cpp:
47         (WebCore::ScrollableArea::constrainScrollPositionForOverhang):
48         Reimplement the function as described above.
49
50 2013-07-02  Christophe Dumez  <ch.dumez@sisa.samsung.com>
51
52         Remove SVGStyledLocatableElement class
53         https://bugs.webkit.org/show_bug.cgi?id=118283
54
55         Reviewed by Dirk Schulze.
56
57         Remove SVGStyledLocatableElement class and have SVGGraphicsElement
58         inherit SVGStyledElement directly instead. SVGStyledLocatableElement
59         is no longer needed and according to the specification, SVGGraphicsElement
60         should inherit SVGStyledElement (actually SVGElement once we merge
61         SVGStyledElement into SVGElement).
62
63         No new tests, no behavior change.
64
65         * CMakeLists.txt:
66         * GNUmakefile.list.am:
67         * Target.pri:
68         * WebCore.order:
69         * WebCore.vcxproj/WebCore.vcxproj:
70         * WebCore.vcxproj/WebCore.vcxproj.filters:
71         * WebCore.xcodeproj/project.pbxproj:
72         * bindings/scripts/CodeGeneratorJS.pm:
73         (GetGnuVTableOffsetForType):
74         * svg/SVGAllInOne.cpp:
75         * svg/SVGElement.cpp:
76         (WebCore::SVGElement::getBoundingBox):
77         * svg/SVGElement.h:
78         * svg/SVGGraphicsElement.cpp:
79         (WebCore::SVGGraphicsElement::SVGGraphicsElement):
80         (WebCore::SVGGraphicsElement::parseAttribute):
81         (WebCore::SVGGraphicsElement::svgAttributeChanged):
82         * svg/SVGGraphicsElement.h:
83         * svg/SVGLocatable.cpp:
84         (WebCore::SVGLocatable::getTransformToElement):
85         * svg/SVGStyledElement.cpp:
86         (WebCore::SVGStyledElement::localCoordinateSpaceTransform):
87         * svg/SVGStyledLocatableElement.cpp: Removed.
88         * svg/SVGStyledLocatableElement.h: Removed.
89
90 2013-07-02  peavo@outlook.com  <peavo@outlook.com>
91
92         [Curl] Crash after download.
93         https://bugs.webkit.org/show_bug.cgi?id=118303
94
95         Reviewed by Brent Fulgham.
96
97         We need to make sure that the Curl easy handle is removed from the Curl multi handle before it's freed.
98
99         * platform/network/curl/CurlDownload.cpp:
100         (CurlDownloadManager::updateHandleList): Use addToCurl() and removeFromCurl() methods.
101         (CurlDownloadManager::addToCurl): Add method to add easy handle to multi handle.
102         (CurlDownloadManager::removeFromCurl): Add method to remove easy handle from multi handle, and then delete the handle.
103         (CurlDownloadManager::downloadThread): Use removeFromCurl() method.
104         (CurlDownload::~CurlDownload):
105         * platform/network/curl/CurlDownload.h: Avoid deleting Curl easy handle in destructor.
106
107 2013-07-02  Radu Stavila  <stavila@adobe.com>
108
109         [CSSRegions] No other SVG elements except the SVGRoot must have RegionInfo objects attached
110         https://bugs.webkit.org/show_bug.cgi?id=118295
111
112         Reviewed by Antti Koivisto.
113
114         Only the SVGRoot element can be collected in a named flow. As such, no SVG element below the root should
115         be attached to a RenderBoxRegionInfo object.
116
117         A larger patch's test (https://bugs.webkit.org/show_bug.cgi?id=118300) is failing because of this.
118         This change will be covered by that test.
119
120         * rendering/RenderBoxModelObject.h:
121         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
122         * rendering/RenderObject.h:
123         (WebCore::RenderObject::isRenderSVGBlock):
124         * rendering/svg/RenderSVGBlock.h:
125
126 2013-07-02  Kangil Han  <kangil.han@samsung.com>
127
128         is/toHTMLStyleElement should use Element* for its argument
129         https://bugs.webkit.org/show_bug.cgi?id=118286
130
131         Reviewed by Andreas Kling.
132
133         To reduce unnecessary call of isElementNode(), this patch replaces argument
134         of is/toHTMLStyleElement from Node* to Element*. Plus, use Element::hasTagName
135         in collectActiveStyleSheets function for minor code refactoring since
136         its cost is cheaper than Node::hasTagName.
137
138         * css/CSSStyleSheet.cpp:
139         (WebCore::isAcceptableCSSStyleSheetParent):
140         * css/StyleScopeResolver.cpp:
141         (WebCore::StyleScopeResolver::scopeFor):
142         * dom/DocumentStyleSheetCollection.cpp:
143         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
144         * dom/Node.cpp:
145         (WebCore::Node::numberOfScopedHTMLStyleChildren):
146         * html/HTMLStyleElement.h:
147         (WebCore::isHTMLStyleElement):
148         (WebCore::toHTMLStyleElement):
149
150 2013-07-02  Ryosuke Niwa  <rniwa@webkit.org>
151
152         Unexpose EditingPropertiesToInclude in EditingStyle.h after r151772
153         https://bugs.webkit.org/show_bug.cgi?id=118271
154
155         Reviewed by Andreas Kling.
156
157         Don't expose EditingPropertiesToInclude in EditingStyle.h and do other cleanups as described below.
158
159         No new tests since there should be no behavioral change.
160
161         * editing/EditingStyle.cpp:
162         (WebCore::copyEditingProperties): Use newly defined numAllEditingProperties and numInheritableEditingProperties
163         instead of a magic number of 2.
164         (WebCore::copyPropertiesFromComputedStyle): Renamed from editingStyleFromComputedStyle. It now takes ComputedStyleExtractor and
165         PropertiesToInclude instead of Node* and EditingPropertiesToInclude and handles AllProperties. Also added a helper that takes Node*.
166         (WebCore::EditingStyle::init): Calls copyPropertiesFromComputedStyle. Unfortunately, we need to special-case EditingPropertiesInEffect
167         and not set background-color and text-decoration. This is required probably due to a bug elsewhere.
168         (WebCore::EditingStyle::removeStyleAddedByNode):
169         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
170         (WebCore::extractEditingProperties): Renamed from EditingStyle::removeAllButEditingProperties; takes PropertiesToInclude instead of
171         EditingPropertiesToInclude since the only caller of this function, EditingStyle::mergeInlineAndImplicitStyleOfElement, was converting
172         the type.
173         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
174         * editing/EditingStyle.h:
175
176 2013-07-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
177
178         Introduce toSVGInlineTextBox
179         https://bugs.webkit.org/show_bug.cgi?id=118289
180
181         Reviewed by Andreas Kling.
182
183         As a step to change static_cast with toXXX, static_cast<SVGInlineTextBox*> can
184         be changed with toSVGInlineTextBox().
185
186         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153345
187
188         * rendering/svg/RenderSVGInlineText.cpp:
189         (WebCore::RenderSVGInlineText::positionForPoint):
190         * rendering/svg/SVGInlineFlowBox.cpp:
191         (WebCore::SVGInlineFlowBox::paintSelectionBackground):
192         (WebCore::SVGInlineFlowBox::paint):
193         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
194         * rendering/svg/SVGInlineTextBox.h:
195         (WebCore::toSVGInlineTextBox):
196         * rendering/svg/SVGRenderTreeAsText.cpp:
197         (WebCore::writeSVGInlineTextBoxes):
198         * rendering/svg/SVGRootInlineBox.cpp:
199         (WebCore::SVGRootInlineBox::paint):
200         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
201         (WebCore::SVGRootInlineBox::layoutChildBoxes):
202         (WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
203         * rendering/svg/SVGTextQuery.cpp:
204         (WebCore::SVGTextQuery::collectTextBoxesInFlowBox):
205
206 2013-07-02  Christophe Dumez  <ch.dumez@sisa.samsung.com>
207
208         Simplify SVGTextContentElement::elementFromRenderer()
209         https://bugs.webkit.org/show_bug.cgi?id=118284
210
211         Reviewed by Andreas Kling.
212
213         Simplify SVGTextContentElement::elementFromRenderer() by leveraging
214         SVGElement::isTextContent() methods instead of explicitly checking
215         for tag names.
216
217         No new tests, no behavior change.
218
219         * svg/SVGTextContentElement.cpp:
220         (WebCore::SVGTextContentElement::elementFromRenderer):
221
222 2013-07-02  Csaba Osztrogonác  <ossy@webkit.org>
223
224         Fix cast-align warnings in WebCore/platform/graphics/texmap/TextureMapperGL.cpp
225         https://bugs.webkit.org/show_bug.cgi?id=118249
226
227         Reviewed by Allan Sandfeld Jensen.
228
229         * platform/graphics/texmap/TextureMapperGL.cpp:
230         (WebCore::BitmapTextureGL::updateContents):
231
232 2013-07-02  Allan Sandfeld Jensen  <allan.jensen@digia.com>
233
234         [Qt][WK1] Support WebGL with EGL on Linux
235         https://bugs.webkit.org/show_bug.cgi?id=118251
236
237         Reviewed by Kenneth Rohde Christiansen.
238
239         Let GraphicsContext3D work without a GraphicsSurface.
240
241         * Target.pri:
242         * platform/graphics/OpenGLShims.cpp:
243         (WebCore::getProcAddress):
244         * platform/graphics/qt/GraphicsContext3DQt.cpp:
245         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
246         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
247
248 2013-07-02  Catalin Badea  <badea@adobe.com>
249
250         [CSS-Regions] OverrideLogicalHeight used by both regions and flexbox
251         https://bugs.webkit.org/show_bug.cgi?id=118057
252
253         Reviewed by David Hyatt.
254
255         Remove the use of overrideLogicalContentHeight() from regions and
256         use a local variable instead. The change was needed to avoid
257         overlapping with flexbox containers.
258
259         Test: fast/regions/autoheight-flexbox.html
260
261         * rendering/RenderFlowThread.cpp:
262         (WebCore::RenderFlowThread::validateRegions):
263         (WebCore::RenderFlowThread::layout):
264         (WebCore::RenderFlowThread::applyBreakAfterContent):
265         (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
266         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
267         (WebCore::RenderFlowThread::addForcedRegionBreak):
268         * rendering/RenderFlowThread.h:
269         * rendering/RenderRegion.cpp:
270         (WebCore::RenderRegion::RenderRegion):
271         (WebCore::RenderRegion::pageLogicalHeight):
272         (WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
273         (WebCore::RenderRegion::updateRegionHasAutoLogicalHeightFlag):
274         (WebCore::RenderRegion::layoutBlock):
275         (WebCore::RenderRegion::updateLogicalHeight):
276         * rendering/RenderRegion.h:
277         (WebCore::RenderRegion::computedAutoHeight):
278         (WebCore::RenderRegion::setComputedAutoHeight):
279         (WebCore::RenderRegion::clearComputedAutoHeight):
280         (WebCore::RenderRegion::hasComputedAutoHeight):
281         * rendering/RenderView.cpp:
282
283 2013-07-01  Alex Christensen  <achristensen@apple.com>
284
285         Windows should be included in the list of platforms that can use OpenGL ES 2.
286         https://bugs.webkit.org/show_bug.cgi?id=118264
287
288         Reviewed by Dean Jackson.
289
290         * platform/graphics/GraphicsContext3D.h: Added PLATFORM(WIN) to platforms using OpenGL ES 2.
291
292 2013-07-01  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
293
294         [GTK] Remove unsupported AC backends
295         https://bugs.webkit.org/show_bug.cgi?id=117362
296
297         Reviewed by Martin Robinson.
298
299         * GNUmakefile.am:
300         * GNUmakefile.list.am:
301         * Source/WebCore/platform/graphics/PlatformLayer.h: Removed mentions of clutter
302         and the texmap cairo backend.
303         * platform/graphics/clutter/DrawingBufferClutter.cpp: Removed.
304         * platform/graphics/clutter/GraphicsContext3DClutter.cpp: Removed.
305         * platform/graphics/clutter/GraphicsContext3DPrivate.cpp: Removed.
306         * platform/graphics/clutter/GraphicsContext3DPrivate.h: Removed.
307         * platform/graphics/clutter/GraphicsLayerActor.cpp: Removed.
308         * platform/graphics/clutter/GraphicsLayerActor.h: Removed.
309         * platform/graphics/clutter/GraphicsLayerClutter.cpp: Removed.
310         * platform/graphics/clutter/GraphicsLayerClutter.h: Removed.
311         * platform/graphics/clutter/PlatformClutterAnimation.cpp: Removed.
312         * platform/graphics/clutter/PlatformClutterAnimation.h: Removed.
313         * platform/graphics/clutter/PlatformClutterLayerClient.h: Removed.
314         * platform/graphics/clutter/TransformationMatrixClutter.cpp: Removed.
315         * Source/WebCore/platform/graphics/transforms/TransformationMatrix.h: Removed cogl
316         matrix type conversion.
317
318 2013-07-01  Alex Christensen  <achristensen@apple.com>
319
320         DrawingBuffer constructor and destructor were not defined for Windows.
321         I moved duplicate code from Cairo and Qt to DrawingBuffer.cpp to be used by Qt, Cairo, and Windows.
322         https://bugs.webkit.org/show_bug.cgi?id=118262
323
324         Reviewed by Dean Jackson.
325
326         * platform/graphics/cairo/DrawingBufferCairo.cpp: Removed duplicate DrawingBuffer constructor and destructor.
327         * platform/graphics/gpu/DrawingBuffer.cpp:
328         (WebCore::DrawingBuffer::DrawingBuffer):
329         (WebCore::DrawingBuffer::~DrawingBuffer): Moved from Cairo and Qt implementation.
330         * platform/graphics/gpu/qt/DrawingBufferQt.cpp: Removed duplicate DrawingBuffer constructor and destructor.
331
332 2013-07-01  Alex Christensen  <achristensen@apple.com>
333
334         Fixed unreachable return when GLX or EGL are used with WebGL.
335         https://bugs.webkit.org/show_bug.cgi?id=118263
336
337         Reviewed by Noam Rosenthal.
338
339         * platform/graphics/opengl/GLPlatformContext.cpp:
340         (WebCore::createOffScreenContext): Fixed unreachable return.
341
342 2013-07-01  Tim Horton  <timothy_horton@apple.com>
343
344         Maximum scroll position can be negative in some cases
345         https://bugs.webkit.org/show_bug.cgi?id=118175
346         <rdar://problem/14301217>
347
348         Reviewed by Anders Carlsson.
349
350         Test (API): WebKit2.ResizeReversePaginatedWebView
351
352         * page/FrameView.cpp:
353         (WebCore::FrameView::maximumScrollPosition):
354         * page/FrameView.h:
355         Override maximumScrollPosition() in FrameView and don't clamp to zero if
356         a reverse pagination mode is enabled, as it is possible (and common) to
357         have a negative maximum scroll position with reverse pagination.
358
359         * platform/ScrollView.cpp:
360         (WebCore::ScrollView::updateScrollbars):
361         Drive-by adoption of toIntSize().
362
363 2013-07-01  Alex Christensen  <achristensen@apple.com>
364
365         Removed all references to DrawingBuffer methods unused since the removal of Chromium:
366         DrawingBuffer::prepareBackBuffer,
367         DrawingBuffer::requiresCopyFromBackToFrontBuffer, and
368         DrawingBuffer::clearPlatformLayer.
369         https://bugs.webkit.org/show_bug.cgi?id=118257
370
371         Reviewed by Darin Adler.
372
373         * platform/graphics/blackberry/DrawingBufferBlackBerry.cpp:
374         (WebCore::DrawingBuffer::platformLayer):
375         * platform/graphics/cairo/DrawingBufferCairo.cpp:
376         (WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
377         * platform/graphics/clutter/DrawingBufferClutter.cpp:
378         (WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
379         * platform/graphics/gpu/DrawingBuffer.cpp:
380         (WebCore::DrawingBuffer::clear):
381         * platform/graphics/gpu/DrawingBuffer.h:
382         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
383         (WebCore::DrawingBuffer::frontColorBuffer):
384         * platform/graphics/gpu/qt/DrawingBufferQt.cpp:
385         (WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
386
387 2013-07-01  Jochen Eisinger  <jochen@chromium.org>
388
389         Remove support for consumable user gestures
390         https://bugs.webkit.org/show_bug.cgi?id=118247
391
392         Reviewed by Geoffrey Garen.
393
394         The features was not enabled on any port, and is meanwhile broken, so we
395         should delete it.
396
397         No new tests, just deleting dead code.
398
399         * accessibility/AccessibilityNodeObject.cpp:
400         (WebCore::AccessibilityNodeObject::increment):
401         (WebCore::AccessibilityNodeObject::decrement):
402         * accessibility/AccessibilityObject.cpp:
403         (WebCore::AccessibilityObject::press):
404         * bindings/ScriptControllerBase.cpp:
405         (WebCore::ScriptController::executeScript):
406         * bindings/js/ScriptController.cpp:
407         (WebCore::ScriptController::executeScriptInWorld):
408         * dom/UserGestureIndicator.cpp:
409         (WebCore::isDefinite):
410         (WebCore::UserGestureIndicator::UserGestureIndicator):
411         (WebCore::UserGestureIndicator::~UserGestureIndicator):
412         * dom/UserGestureIndicator.h:
413         (WebCore::UserGestureIndicator::processingUserGesture):
414         * inspector/InspectorFrontendClientLocal.cpp:
415         (WebCore::InspectorFrontendClientLocal::openInNewTab):
416         * inspector/InspectorFrontendHost.cpp:
417         (WebCore::FrontendMenuProvider::contextMenuItemSelected):
418         * inspector/InspectorPageAgent.cpp:
419         (WebCore::InspectorPageAgent::navigate):
420         * loader/NavigationScheduler.cpp:
421         (WebCore::ScheduledURLNavigation::fire):
422         (WebCore::ScheduledURLNavigation::didStartTimer):
423         (WebCore::ScheduledRedirect::fire):
424         (WebCore::ScheduledRefresh::fire):
425         (WebCore::ScheduledHistoryNavigation::fire):
426         (WebCore::ScheduledFormSubmission::fire):
427         (WebCore::ScheduledFormSubmission::didStartTimer):
428         * page/DOMTimer.cpp:
429         (WebCore::DOMTimer::DOMTimer):
430         (WebCore::DOMTimer::fired):
431         * page/DOMTimer.h:
432         * page/DOMWindow.cpp:
433         (WebCore::DOMWindow::showModalDialog):
434         * page/EventHandler.cpp:
435         (WebCore::EventHandler::clear):
436         (WebCore::EventHandler::handleMousePressEvent):
437         (WebCore::EventHandler::handleMouseReleaseEvent):
438         * page/EventHandler.h:
439         * rendering/HitTestResult.cpp:
440         (WebCore::HitTestResult::toggleMediaFullscreenState):
441         (WebCore::HitTestResult::enterFullscreenForVideo):
442
443 2013-07-01  Frédéric Wang  <fred.wang@free.fr>
444
445         Add Support for mspace element
446         https://bugs.webkit.org/show_bug.cgi?id=115610
447
448         Reviewed by Chris Fleizach.
449
450         This patch adds basic support for the MathML mspace element. This is
451         important to let people control spacing of mathematical formulas.
452         Attributes width, height and depth are implemented. For the moment,
453         only nonnegative width are accepted.
454
455         * CMakeLists.txt: add references to the RenderMathMLSpace files.
456         * GNUmakefile.list.am: ditto.
457         * Target.pri: ditto.
458         * WebCore.vcxproj/WebCore.vcxproj: ditto.
459         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
460         * WebCore.xcodeproj/project.pbxproj: ditto.
461         * css/mathml.css:
462         (mtable[columnlines="dashed"] > mtr > mtd + mtd): remove the obsolete linebreaking rule.
463         * mathml/MathMLTextElement.cpp:
464         (WebCore::MathMLTextElement::createRenderer): map mspaceTag to RenderMathMLSpace.
465         * mathml/mathattrs.in: add width, height and depth attributes
466         * mathml/mathtags.in: add mspace element
467         * rendering/mathml/RenderMathMLBlock.cpp:
468         (WebCore::parseMathMLLength): fix int to float conversion.
469         * rendering/mathml/RenderMathMLBlock.h: declare isRenderMathMLSpace.
470         (WebCore::RenderMathMLBlock::isRenderMathMLSpace):
471         * rendering/mathml/RenderMathMLSpace.cpp: Added.
472         (WebCore::RenderMathMLSpace::RenderMathMLSpace):
473         (WebCore::RenderMathMLSpace::isChildAllowed):
474         (WebCore::RenderMathMLSpace::computePreferredLogicalWidths):
475         (WebCore::RenderMathMLSpace::updateFromElement):
476         (WebCore::RenderMathMLSpace::updateLogicalWidth):
477         (WebCore::RenderMathMLSpace::updateLogicalHeight):
478         (WebCore::RenderMathMLSpace::layout):
479         (WebCore::RenderMathMLSpace::styleDidChange):
480         (WebCore::RenderMathMLSpace::firstLineBoxBaseline):
481         * rendering/mathml/RenderMathMLSpace.h: Added.
482         (WebCore::RenderMathMLSpace::isRenderMathMLSpace):
483         (WebCore::RenderMathMLSpace::renderName):
484         (WebCore::toRenderMathMLSpace):
485
486 2013-06-27  Jer Noble  <jer.noble@apple.com>
487
488         Audio in apps which embed WebViews is corrupted.
489         https://bugs.webkit.org/show_bug.cgi?id=118163
490
491         Reviewed by Maciej Stachowiak.
492
493         Add a preference, which defaults to off, which controls whether the
494         AudioSessionManager will switch to a large audio buffer setting for
495         power-savings during <video> playback.
496
497         * WebCore.exp.in:
498         * page/Settings.cpp:
499         (WebCore::Settings::setLowPowerVideoAudioBufferSizeEnabled): Added.  Simple setter.
500         * page/Settings.h:
501         (WebCore::Settings::lowPowerVideoAudioBufferSizeEnabled): Added.  Simple getter.
502         * platform/audio/mac/AudioSessionManagerMac.cpp:
503         (AudioSessionManager::updateSessionState): Only set the large audio buffer
504             size if lowPowerVideoAudioBufferSize is enabled.
505
506 2013-07-01  Brian Holt  <brian.holt@samsung.com>
507
508         [ATK] Leak: leaks in WebKitAccessibleInterfaceText
509         https://bugs.webkit.org/show_bug.cgi?id=118248
510
511         Fixed memory leaks.
512
513         Reviewed by Christophe Dumez.
514
515         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
516         (getPangoLayoutForAtk):
517         (webkitAccessibleTextGetText):
518
519 2013-07-01  Roger Fong  <roger_fong@apple.com>
520
521         Unreviewed. Make WebCore.make copy over QTMovieWin DLL's and PDB's.
522         <rdar://problem/14321403>
523
524         * WebCore.vcxproj/WebCore.make:
525
526 2013-07-01  peavo@outlook.com  <peavo@outlook.com>
527
528         [Win] Crash when scrolling page with images.
529         https://bugs.webkit.org/show_bug.cgi?id=117832
530
531         Reviewed by Brent Fulgham.
532
533         Avoid access violation by returning early from method if image frame doesn't have pixel data.
534
535         * platform/image-decoders/ImageDecoder.h:
536         (WebCore::ImageFrame::hasPixelData): Added method to check if frame has pixel data.
537         * platform/image-decoders/gif/GIFImageDecoder.cpp:
538         (WebCore::GIFImageDecoder::haveDecodedRow): Early return if frame doesn't have pixel data.
539
540 2013-07-01  Noam Rosenthal  <noam@webkit.org>
541
542         Avoid calling RenderLayerBacking::resetContentsRect() if possible
543         https://bugs.webkit.org/show_bug.cgi?id=118217
544
545         Reviewed by Simon Fraser.
546
547         Call resetContentsRect() only if the layer has a contentsLayer.
548         Otherwise the contentsRect is redundant for the GraphicsLayer.
549
550         No new tests - optimization only. This is covered by plenty of existing
551         tests in webgl/ and compositing/.
552
553         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
554         (WebCore::GraphicsLayerTextureMapper::hasContentsLayer):
555         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
556             Added hasContentsLayer calls for TextureMapper/CoordinatedGraphics
557
558         * rendering/RenderLayerBacking.cpp:
559         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
560
561 2013-07-01  Allan Sandfeld Jensen  <allan.jensen@digia.com>
562
563         [Qt] Avoid creating a QWindow for offscreen GraphicsContext3D
564         https://bugs.webkit.org/show_bug.cgi?id=118244
565
566         Reviewed by Noam Rosenthal.
567
568         In Qt 5.0 we had to create invisible windows, but in Qt 5.1
569         we can now create specific offscreen surfaces.
570
571         * platform/graphics/qt/GraphicsContext3DQt.cpp:
572         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
573
574 2013-07-01  Allan Sandfeld Jensen  <allan.jensen@digia.com>
575
576         [Qt] Remove long unused Qt4 forward definitions
577
578         Unreviewed cleanu-up.
579
580         * platform/graphics/GraphicsContext3D.h:
581
582 2013-07-01  Antti Koivisto  <antti@apple.com>
583
584         Use DeferrableOneShotTimer for deleting decoded data
585         https://bugs.webkit.org/show_bug.cgi?id=118150
586
587         Reviewed by Andreas Kling.
588
589         Adam Barth pointed out that the virtual function for overriding the default delay doesn't work
590         as expected from base class constructor.
591
592         * loader/cache/CachedResource.cpp:
593         (WebCore::deadDecodedDataDeletionIntervalForResourceType):
594         (WebCore::CachedResource::CachedResource):
595         
596             Use static function instead of calling a virtual.
597
598         * loader/cache/CachedResource.h:
599         * loader/cache/CachedScript.cpp:
600         * loader/cache/CachedScript.h:
601
602 2013-07-01  Kangil Han  <kangil.han@samsung.com>
603
604         Adopt toHTMLTextAreaElement for code cleanup
605         https://bugs.webkit.org/show_bug.cgi?id=118226
606
607         Reviewed by Andreas Kling.
608
609         To enhance readability, this patch adopts toHTMLTextAreaElement.
610         This also helps out to reduce duplicated use of static_cast.
611
612         * accessibility/AccessibilityNodeObject.cpp:
613         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
614         (WebCore::AccessibilityNodeObject::isNativeTextControl):
615         (WebCore::AccessibilityNodeObject::isReadOnly):
616         (WebCore::AccessibilityNodeObject::text):
617         * accessibility/AccessibilityRenderObject.cpp:
618         (WebCore::AccessibilityRenderObject::setValue):
619         * css/StyleResolver.cpp:
620         (WebCore::StyleResolver::adjustRenderStyle):
621         * editing/markup.cpp:
622         (WebCore::StyledMarkupAccumulator::appendText):
623         * html/HTMLFormControlElement.cpp:
624         (WebCore::shouldAutofocus):
625         * html/HTMLTextAreaElement.h:
626         (WebCore::toHTMLTextAreaElement):
627         * page/FocusController.cpp:
628         (WebCore::clearSelectionIfNeeded):
629         * rendering/HitTestResult.cpp:
630         (WebCore::HitTestResult::isContentEditable):
631         * rendering/RenderBox.cpp:
632         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
633         * rendering/RenderTextControlMultiLine.cpp:
634         (WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
635         (WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
636         (WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):
637         * testing/Internals.cpp:
638         (WebCore::Internals::wasLastChangeUserEdit):
639
640 2013-07-01  Kwang Yul Seo  <skyul@company100.net>
641
642         Add missing string headers that are used when LOG_DISABLED is 0.
643         https://bugs.webkit.org/show_bug.cgi?id=118227
644
645         Reviewed by Andreas Kling.
646
647         Build fix for LOG_DISABLED=0.
648
649         No new tests, no behavior change.
650
651         * html/track/InbandTextTrack.cpp:
652         * rendering/RenderLayerCompositor.cpp:
653
654 2013-06-29  Simon Fraser  <simon.fraser@apple.com>
655
656         Avoid calling into Objective-C every time we get the scrollbar width
657         https://bugs.webkit.org/show_bug.cgi?id=118216
658
659         Reviewed by Geoffrey Garen.
660
661         Profiling shows that calling Scrollbar::isOverlayScrollbar() is somewhat
662         expensive, because it calls down into Objective-C. Fix by caching in
663         ScrollbarThemeMac whether we're using overlay scrollbars. We update this
664         cache on creation, and when preferences change; ScrollAnimatorMac::updateScrollerStyle()
665         is the function that gets called when the user changes the setting in System Preferences.
666
667         * platform/ScrollbarTheme.h:
668         (WebCore::ScrollbarTheme::usesOverlayScrollbarsChanged):
669         * platform/mac/ScrollAnimatorMac.mm:
670         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
671         * platform/mac/ScrollbarThemeMac.h:
672         * platform/mac/ScrollbarThemeMac.mm:
673         (WebCore::ScrollbarThemeMac::preferencesChanged):
674         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
675         (WebCore::ScrollbarThemeMac::usesOverlayScrollbarsChanged):
676
677 2013-06-29  Simon Fraser  <simon.fraser@apple.com>
678
679         Avoid calling isSimpleContainerCompositingLayer() an extra time
680         https://bugs.webkit.org/show_bug.cgi?id=118218
681
682         Reviewed by Tim Horton.
683
684         containsPaintedContent() called isSimpleContainerCompositingLayer(), which
685         is not particularly cheap. But the caller already has this information,
686         so pass it in.
687
688         * rendering/RenderLayerBacking.cpp:
689         (WebCore::RenderLayerBacking::updateDrawsContent):
690         (WebCore::RenderLayerBacking::containsPaintedContent):
691         * rendering/RenderLayerBacking.h:
692
693 2013-06-29  Simon Fraser  <simon.fraser@apple.com>
694
695         Avoid doing work in RenderBox::outlineBoundsForRepaint() when the repaintContainer is this
696         https://bugs.webkit.org/show_bug.cgi?id=118215
697
698         Reviewed by Tim Horton.
699
700         When the RenderGeometryMap code path was added, RenderBox::outlineBoundsForRepaint()
701         actually got slower if no coordinate mapping was needed. So avoid doing work when
702         we can, including avoiding the FloatQuad construction.
703         
704         Speeds up scrolling overflow:scroll areas with large numbers of layer children.
705
706         * rendering/RenderBox.cpp:
707         (WebCore::RenderBox::outlineBoundsForRepaint):
708
709 2013-06-29  Kangil Han  <kangil.han@samsung.com>
710
711         Adopt is/toHTMLOptGroupElement for code cleanup
712         https://bugs.webkit.org/show_bug.cgi?id=118213
713
714         Reviewed by Andreas Kling.
715
716         To enhance readability, this patch adopts is/toHTMLOptGroupElement.
717         This also helps out to reduce duplicated use of static_cast.
718
719         * accessibility/AccessibilityListBoxOption.cpp:
720         (WebCore::AccessibilityListBoxOption::isEnabled):
721         (WebCore::AccessibilityListBoxOption::stringValue):
722         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
723         * css/SelectorChecker.cpp:
724         (WebCore::SelectorChecker::checkOne):
725         * css/StyleResolver.cpp:
726         (WebCore::StyleResolver::canShareStyleWithElement):
727         * html/HTMLOptGroupElement.h:
728         (WebCore::isHTMLOptGroupElement):
729         (WebCore::toHTMLOptGroupElement):
730         * html/HTMLOptionElement.cpp:
731         (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
732         (WebCore::HTMLOptionElement::isDisabledFormControl):
733         * html/HTMLSelectElement.cpp:
734         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
735         (WebCore::HTMLSelectElement::recalcListItems):
736         * html/parser/HTMLConstructionSite.cpp:
737         (WebCore::hasImpliedEndTag):
738         * html/parser/HTMLElementStack.cpp:
739         (WebCore::HTMLNames::isSelectScopeMarker):
740         * html/parser/HTMLTreeBuilder.cpp:
741         (WebCore::HTMLTreeBuilder::processStartTag):
742         (WebCore::HTMLTreeBuilder::processEndTag):
743         * rendering/RenderListBox.cpp:
744         (WebCore::RenderListBox::updateFromElement):
745         (WebCore::RenderListBox::paintItemForeground):
746         * rendering/RenderMenuList.cpp:
747         (WebCore::RenderMenuList::itemText):
748         (WebCore::RenderMenuList::itemIsEnabled):
749         (WebCore::RenderMenuList::itemIsLabel):
750
751 2013-06-29  ChangSeok Oh  <changseok.oh@collabora.com>
752
753         Build fix for unguarded SVGGraphicsElement
754         https://bugs.webkit.org/show_bug.cgi?id=118214
755
756         Reviewed by Christophe Dumez.
757
758         Add the SVG condition to SVGGraphicsElement.idl
759
760         No new tests required since no functionality changed.
761
762         * svg/SVGGraphicsElement.idl:
763
764 2013-06-29  Kangil Han  <kangil.han@samsung.com>
765
766         Adopt is/toHTMLOptionElement for code cleanup
767         https://bugs.webkit.org/show_bug.cgi?id=118212
768
769         Reviewed by Andreas Kling.
770
771         To enhance readability, this patch adopts is/toHTMLOptionElement.
772         This also helps out to reduce duplicated use of static_cast.
773
774         * accessibility/AccessibilityListBoxOption.cpp:
775         (WebCore::AccessibilityListBoxOption::isSelected):
776         (WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
777         (WebCore::AccessibilityListBoxOption::stringValue):
778         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
779         * accessibility/AccessibilityMenuListOption.cpp:
780         (WebCore::AccessibilityMenuListOption::setElement):
781         (WebCore::AccessibilityMenuListOption::isEnabled):
782         (WebCore::AccessibilityMenuListOption::isSelected):
783         (WebCore::AccessibilityMenuListOption::setSelected):
784         (WebCore::AccessibilityMenuListOption::stringValue):
785         * accessibility/AccessibilityMenuListPopup.cpp:
786         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
787         * accessibility/AccessibilityRenderObject.cpp:
788         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
789         * css/SelectorChecker.cpp:
790         (WebCore::SelectorChecker::checkOne):
791         * css/StyleResolver.cpp:
792         (WebCore::StyleResolver::canShareStyleWithElement):
793         * html/HTMLCollection.cpp:
794         (WebCore::isMatchingElement):
795         * html/HTMLOptionElement.cpp:
796         (WebCore::HTMLOptionElement::index):
797         * html/HTMLOptionElement.h:
798         (WebCore::isHTMLOptionElement):
799         (WebCore::toHTMLOptionElement):
800         * html/HTMLOptionsCollection.cpp:
801         (WebCore::HTMLOptionsCollection::add):
802         * html/HTMLSelectElement.cpp:
803         (WebCore::HTMLSelectElement::hasPlaceholderLabelOption):
804         (WebCore::HTMLSelectElement::value):
805         (WebCore::HTMLSelectElement::setValue):
806         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
807         (WebCore::HTMLSelectElement::nextValidIndex):
808         (WebCore::HTMLSelectElement::saveLastSelection):
809         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
810         (WebCore::HTMLSelectElement::updateListBoxSelection):
811         (WebCore::HTMLSelectElement::listBoxOnChange):
812         (WebCore::HTMLSelectElement::recalcListItems):
813         (WebCore::HTMLSelectElement::selectedIndex):
814         (WebCore::HTMLSelectElement::selectOption):
815         (WebCore::HTMLSelectElement::optionToListIndex):
816         (WebCore::HTMLSelectElement::listToOptionIndex):
817         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
818         (WebCore::HTMLSelectElement::saveFormControlState):
819         (WebCore::HTMLSelectElement::searchOptionsForValue):
820         (WebCore::HTMLSelectElement::restoreFormControlState):
821         (WebCore::HTMLSelectElement::appendFormData):
822         (WebCore::HTMLSelectElement::reset):
823         (WebCore::HTMLSelectElement::updateSelectedState):
824         (WebCore::HTMLSelectElement::lastSelectedListIndex):
825         (WebCore::HTMLSelectElement::optionAtIndex):
826         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
827         (WebCore::HTMLSelectElement::length):
828         * html/parser/HTMLConstructionSite.cpp:
829         (WebCore::hasImpliedEndTag):
830         * html/parser/HTMLElementStack.cpp:
831         (WebCore::HTMLNames::isSelectScopeMarker):
832         * html/parser/HTMLTreeBuilder.cpp:
833         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
834         (WebCore::HTMLTreeBuilder::processStartTag):
835         (WebCore::HTMLTreeBuilder::processEndTag):
836         * rendering/RenderListBox.cpp:
837         (WebCore::RenderListBox::updateFromElement):
838         (WebCore::RenderListBox::addFocusRingRects):
839         (WebCore::RenderListBox::paintItemForeground):
840         (WebCore::RenderListBox::paintItemBackground):
841         * rendering/RenderMenuList.cpp:
842         (WebCore::RenderMenuList::updateOptionsWidth):
843         (WebCore::RenderMenuList::setTextFromOption):
844         (WebCore::RenderMenuList::itemText):
845         (WebCore::RenderMenuList::itemIsEnabled):
846         (WebCore::RenderMenuList::itemIsSelected):
847         * rendering/RenderTheme.cpp:
848         (WebCore::RenderTheme::paintSliderTicks):
849
850 2013-06-29  Carlos Garcia Campos  <cgarcia@igalia.com>
851
852         REGRESSION(151586): multipart/x-mixed-replace images are broken
853         https://bugs.webkit.org/show_bug.cgi?id=118169
854
855         Reviewed by Alexey Proskuryakov.
856
857         When loading multipart content the resource data will change as
858         the next part is loaded, so we need to make a copy of the data
859         before sending it to the resource.
860
861         * loader/SubresourceLoader.cpp:
862         (WebCore::SubresourceLoader::didReceiveResponse):
863
864 2013-06-28  Eric Carlson  <eric.carlson@apple.com>
865
866         [Mac] adopt new AVFoundation caption API
867         https://bugs.webkit.org/show_bug.cgi?id=118207
868
869         Reviewed by Dean Jackson.
870
871         No new tests, I was not able to come up with a reliable layout test.
872
873         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
874         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
875         (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): New, call currentTrack->resetCueValues().
876         (-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]): New delegate method.
877
878 2013-06-28  Kangil Han  <kangil.han@samsung.com>
879
880         Adopt is/toHTMLImageElement for code cleanup
881         https://bugs.webkit.org/show_bug.cgi?id=118182
882
883         Reviewed by Andreas Kling.
884
885         To enhance readability, this patch adopts is/toHTMLImageElement.
886         This also helps out to reduce duplicated use of static_cast.
887
888         * accessibility/AccessibilityNodeObject.cpp:
889         (WebCore::AccessibilityNodeObject::isNativeImage):
890         * accessibility/AccessibilityRenderObject.cpp:
891         (WebCore::AccessibilityRenderObject::url):
892         * bindings/js/JSNodeCustom.cpp:
893         (WebCore::isReachableFromDOM):
894         * bridge/qt/qt_pixmapruntime.cpp:
895         (JSC::Bindings::assignToHTMLImageElement):
896         (JSC::Bindings::QtPixmapRuntime::toQt):
897         * dom/Clipboard.cpp:
898         (WebCore::Clipboard::setDragImage):
899         * dom/Node.cpp:
900         (WebCore::Node::enclosingLinkEventParentOrSelf):
901         * editing/Editor.cpp:
902         (WebCore::imageElementFromImageDocument):
903         * html/HTMLAnchorElement.cpp:
904         (WebCore::appendServerMapMousePosition):
905         * html/HTMLImageElement.h:
906         (WebCore::isHTMLImageElement):
907         (WebCore::toHTMLImageElement):
908         * html/HTMLMapElement.cpp:
909         (WebCore::HTMLMapElement::imageElement):
910         * html/HTMLNameCollection.cpp:
911         (WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch):
912         (WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch):
913         (WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch):
914         (WebCore::DocumentNameCollection::nodeMatches):
915         * page/DragController.cpp:
916         (WebCore::DragController::draggableElement):
917         * page/PageSerializer.cpp:
918         (WebCore::PageSerializer::serializeFrame):
919         * platform/gtk/PasteboardGtk.cpp:
920         (WebCore::getURLForImageNode):
921         * platform/mac/HTMLConverter.mm:
922         (+[WebHTMLConverter editingAttributedStringFromRange:]):
923         * rendering/HitTestResult.cpp:
924         (WebCore::HitTestResult::altDisplayString):
925         (WebCore::HitTestResult::absoluteImageURL):
926         * rendering/RenderImage.cpp:
927         (WebCore::RenderImage::paintIntoRect):
928         (WebCore::RenderImage::imageMap):
929         (WebCore::RenderImage::updateAltText):
930         * rendering/RenderObject.cpp:
931         (WebCore::RenderObject::shouldRespectImageOrientation):
932
933 2013-06-28  Gavin Barraclough  <barraclough@apple.com>
934
935         PageThrottler::shouldThrottleTimers is wrong.
936         https://bugs.webkit.org/show_bug.cgi?id=118210
937
938         Reviewed by Anders Carlson.
939
940         m_throttleState == PageNotThrottledState
941             -> page NOT throttled, so should NOT throttle timers
942         m_throttleState != PageNotThrottledState
943             -> page NOT NOT throttled, so should throttle timers
944
945         This needs cleaning up, but for now, 1 character fix.
946
947         * page/PageThrottler.h:
948         (WebCore::PageThrottler::shouldThrottleTimers):
949             == -> !=
950
951 2013-06-28  Ryosuke Niwa  <rniwa@webkit.org>
952
953         An element with -webkit-user-select: all should be selected on single click
954         https://bugs.webkit.org/show_bug.cgi?id=117864
955
956         Reviewed by Darin Adler.
957
958         Set m_mouseDownMayStartSelect true even when the node cannot start selection
959         if the node was inside an element with -webkit-user-select: all.
960
961         Test: editing/selection/user-select-all-with-single-click.html
962
963         * page/EventHandler.cpp:
964         (WebCore::canMouseDownStartSelect):
965
966 2013-06-28  Ryosuke Niwa  <rniwa@webkit.org>
967
968         Remove unused attachChildrenLazily method and make attach/detachChildren private
969         https://bugs.webkit.org/show_bug.cgi?id=118016
970
971         Reviewed by Darin Adler.
972
973         Merge https://chromium.googlesource.com/chromium/blink/+/009520dc31c9458e0cf71cf212fa5688c4ca68b0
974
975         No one should be manually trying to attach or detach all their children so there's
976         no reason for these methods to be public.
977         
978         In doing this I realized that attachChildrenLazily is not used and can be removed.
979         
980         I also realized that we were detaching all our children before the ShadowRoots which
981         is sad since the InsertionPoints will call detach() on them as well, and then when we
982         call ContainerNode::detach at the end of Element::detach we'll go detach them again!
983         This patch makes it so we only go through and detach them twice instead of three times.
984         In the future we should figure out a way to only do this once.
985
986         * dom/ContainerNode.h:
987         * dom/Element.cpp:
988         (WebCore::Element::detach):
989
990 2013-06-28  Alexey Proskuryakov  <ap@apple.com>
991
992         [Mac] Crash when loading is stopped from -didReceiveResponse
993         https://bugs.webkit.org/show_bug.cgi?id=118209
994         <rdar://problem/14259249>
995
996         Reviewed by Brady Eidson.
997
998         Test: TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.mm.
999
1000         * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveResponse):
1001         Added yet another check for reachedTerminalState().
1002
1003 2013-06-28  Beth Dakin  <bdakin@apple.com>
1004
1005         Cached pages don't update their backing scale factor when it changes
1006         https://bugs.webkit.org/show_bug.cgi?id=118206
1007         -and-
1008         <rdar://problem/14261627>
1009
1010         Reviewed by Tim Horton.
1011
1012         It is not sufficient to mark pages in the PageCache as needing a full style 
1013         recalc. We also need to ensure that the RenderLayerCompositors for the CachesPages 
1014         get updated.
1015
1016         Keep track of whether device scale has been updated with 
1017         m_needsDeviceScaleChanged. If that has been marked true, then restore() will call 
1018         Frame::deviceOrPageScaleFactorChanged().
1019         * history/CachedPage.cpp:
1020         (WebCore::CachedPage::CachedPage):
1021         (WebCore::CachedPage::restore):
1022         * history/CachedPage.h:
1023         (WebCore::CachedPage::markForDeviceScaleChanged):
1024
1025         Propagate markForDeviceScaleChanged() to all of the CachedPages.
1026         * history/PageCache.cpp:
1027         (WebCore::PageCache::markPagesForDeviceScaleChanged):
1028         * history/PageCache.h:
1029
1030         Call PageCache::markPagesForDeviceScaleChanged()
1031         * page/Page.cpp:
1032         (WebCore::Page::setDeviceScaleFactor):
1033
1034 2013-06-28  Alex Christensen  <achristensen@apple.com>
1035
1036         Added template parameters to std::min to fix compile errors in Visual Studio x64.
1037         https://bugs.webkit.org/show_bug.cgi?id=118204
1038
1039         Reviewed by Geoffrey Garen.
1040
1041         * platform/win/PasteboardWin.cpp:
1042         (WebCore::Pasteboard::writeURLToDataObject): Added <unsigned> to std::min.
1043         (WebCore::createGlobalImageFileDescriptor): Added <int> to std::min.
1044
1045 2013-06-28  Alex Christensen  <achristensen@apple.com>
1046
1047         Added WebGL files to Windows build.
1048         https://bugs.webkit.org/show_bug.cgi?id=118200
1049
1050         Reviewed by Brent Fulgham.
1051
1052         * WebCore.vcxproj/WebCore.vcxproj: Added WebGL files, removed unused GraphicsContext3DOpenGLES.cpp.
1053         * WebCore.vcxproj/WebCore.vcxproj.filters: Added WebGL files, removed unused GraphicsContext3DOpenGLES.cpp.
1054         * platform/graphics/cairo/GLContext.cpp: Only include GLContextEGL.h or GLContextGLX.h if they're needed.
1055         * platform/graphics/cg/GraphicsContext3DCG.cpp: Only include GraphicsContext3DNEON.h if it's needed.
1056
1057 2013-06-28  Ryosuke Niwa  <rniwa@webkit.org>
1058
1059         -webkit-line-break: after-white-space sometimes truncates DOM on copy & paste
1060         https://bugs.webkit.org/show_bug.cgi?id=118164
1061
1062         Reviewed by Sam Weinig.
1063
1064         We can't assume that all subsequent ancestors contain exactly one child since they could have been
1065         added in the first if statement matching: currentNode->parentNode() != rootNode && isRemovableBlock(currentNode)
1066
1067         Exit early when we encounter such an ancestor since removing its ancestor (that contains multiple children
1068         some of which aren't in nodesToRemove) can clobber more nodes than we're allowed to remove.
1069
1070         Test: editing/pasteboard/simplfiying-markup-should-not-strip-content.html
1071
1072         * editing/SimplifyMarkupCommand.cpp:
1073         (WebCore::SimplifyMarkupCommand::doApply):
1074         (WebCore::SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove):
1075
1076 2013-06-28  Gwang Yoon Hwang  <ryumiel@company100.net>
1077
1078         Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
1079         https://bugs.webkit.org/show_bug.cgi?id=104360
1080
1081         Reviewed by Noam Rosenthal.
1082
1083         The CoordinatedLayerTreeHost has too many responsibilities. It
1084         implements LayerTreeHost, GraphicsLayerClient,
1085         CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
1086         UpdateAtlas::Client, GraphicsLayerFactory and
1087         WebCustomFilterProgramProxyClient.
1088
1089         This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.
1090
1091         This patch introduces a new class called CompositingCoordinator, which
1092         takes the responsibility of managing compositing resources in
1093         WebProcess.
1094
1095         CoordinatedLayerTreeHost is responsible only for the scheduling and
1096         IPC-specific stuff, which are relevant only for WebKit2.
1097
1098         No new tests, covered by existing tests.
1099
1100         * CMakeLists.txt:
1101         * Target.pri:
1102         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Added.
1103         (WebCore::CompositingCoordinator::create):
1104         (WebCore::CompositingCoordinator::~CompositingCoordinator):
1105         (WebCore::CompositingCoordinator::CompositingCoordinator):
1106         (WebCore::CompositingCoordinator::setRootCompositingLayer):
1107         (WebCore::CompositingCoordinator::sizeDidChange):
1108         (WebCore::CompositingCoordinator::flushPendingLayerChanges):
1109         (WebCore::CompositingCoordinator::syncDisplayState):
1110         (WebCore::CompositingCoordinator::nextAnimationServiceTime):
1111         (WebCore::CompositingCoordinator::clearPendingStateChanges):
1112         (WebCore::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
1113         (WebCore::CompositingCoordinator::createRootLayer):
1114         (WebCore::CompositingCoordinator::syncLayerState):
1115         (WebCore::CompositingCoordinator::createImageBackingIfNeeded):
1116         (WebCore::CompositingCoordinator::createImageBacking):
1117         (WebCore::CompositingCoordinator::updateImageBacking):
1118         (WebCore::CompositingCoordinator::clearImageBackingContents):
1119         (WebCore::CompositingCoordinator::removeImageBacking):
1120         (WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
1121         (WebCore::CompositingCoordinator::notifyAnimationStarted):
1122         (WebCore::CompositingCoordinator::notifyFlushRequired):
1123         (WebCore::CompositingCoordinator::paintContents):
1124         (WebCore::CompositingCoordinator::createGraphicsLayer):
1125         (WebCore::CompositingCoordinator::deviceScaleFactor):
1126         (WebCore::CompositingCoordinator::pageScaleFactor):
1127         (WebCore::CompositingCoordinator::createUpdateAtlas):
1128         (WebCore::CompositingCoordinator::removeUpdateAtlas):
1129         (WebCore::CompositingCoordinator::visibleContentsRect):
1130         (WebCore::CompositingCoordinator::mainContentsLayer):
1131         (WebCore::CompositingCoordinator::setVisibleContentsRect):
1132         (WebCore::CompositingCoordinator::deviceOrPageScaleFactorChanged):
1133         (WebCore::CompositingCoordinator::detachLayer):
1134         (WebCore::CompositingCoordinator::commitScrollOffset):
1135         (WebCore::CompositingCoordinator::renderNextFrame):
1136         (WebCore::CompositingCoordinator::purgeBackingStores):
1137         (WebCore::CompositingCoordinator::paintToSurface):
1138         (WebCore::CompositingCoordinator::scheduleReleaseInactiveAtlases):
1139         (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
1140         * platform/graphics/texmap/coordinated/CompositingCoordinator.h: Added.
1141         (WebCore::CompositingCoordinator::clearRootLayer):
1142         (WebCore::CompositingCoordinator::rootLayer):
1143         (WebCore::CompositingCoordinator::state):
1144
1145 2013-06-28  Commit Queue  <commit-queue@webkit.org>
1146
1147         Unreviewed, rolling out r152135.
1148         http://trac.webkit.org/changeset/152135
1149         https://bugs.webkit.org/show_bug.cgi?id=118199
1150
1151         Rolling out temporary patch used for debugging the test bots
1152         (Requested by rfong on #webkit).
1153
1154         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1155         (WebCore::MediaPlayerPrivateAVFoundation::load):
1156         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1157         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::load):
1158
1159 2013-06-28  Morten Stenshorne  <mstensho@opera.com>
1160
1161         SVG relayout problem when displayed with different image box heights
1162         https://bugs.webkit.org/show_bug.cgi?id=118140
1163
1164         Reviewed by Philip Rogers.
1165
1166         If the root element is an SVG, its position and height are affected
1167         by the view height.
1168
1169         Test: svg/as-image/same-source-different-height.html
1170
1171         * rendering/RenderView.cpp:
1172         (WebCore::RenderView::layout):
1173
1174 2013-06-28  Simon Fraser  <simon.fraser@apple.com>
1175
1176         Allow some LayoutPoint and LayoutSize conversions to be inlined
1177         https://bugs.webkit.org/show_bug.cgi?id=118167
1178
1179         Reviewed by Ryosuke Niwa.
1180
1181         Construction of FloatSize from LayoutSize, and FloatPoint's move(const LayoutSize&)
1182         and moveBy(const LayoutPoint&) were not inlined, and showed up on some profiles.
1183         
1184         Make them inlined by removing the overloaded functions, and instead providing
1185         conversion operators from LayoutSize to FloatSize, and LayoutPoint to FloatPoint.
1186         Do the same to allow a LayoutRect to be converted to a FloatRect.
1187         
1188         This is nice because it removes pollution of FloatRect, FloatPoint and FloatSize with
1189         Layout* entirely.
1190         
1191         Remove Qt-specific conversions on LayoutRect, LayoutPoint and LayoutSize. Qt can
1192         convert via IntRect/FloatRect as necessary.
1193
1194         * platform/graphics/FloatPoint.cpp:
1195         * platform/graphics/FloatPoint.h:
1196         (WebCore::FloatPoint::move):
1197         (WebCore::FloatPoint::moveBy):
1198         * platform/graphics/FloatRect.cpp:
1199         * platform/graphics/FloatRect.h:
1200         * platform/graphics/FloatSize.cpp:
1201         * platform/graphics/FloatSize.h:
1202         * platform/graphics/LayoutPoint.h:
1203         (WebCore::LayoutPoint::operator FloatPoint):
1204         * platform/graphics/LayoutRect.cpp:
1205         * platform/graphics/LayoutRect.h:
1206         (WebCore::LayoutRect::operator FloatRect):
1207         * platform/graphics/LayoutSize.h:
1208         (WebCore::LayoutSize::operator FloatSize):
1209
1210 2013-06-28  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1211
1212         Get rid of IsWorkerGlobalScope and ExtendsDOMGlobalObject extended attributes
1213         https://bugs.webkit.org/show_bug.cgi?id=118191
1214
1215         Reviewed by Kentaro Hara.
1216
1217         Remove WebKit-specific [IsWorkerGlobalScope] and [ExtendsDOMGlobalObject] IDL
1218         extended attributes and update the JSC bindings generator to figure this out
1219         on its own.
1220
1221         No new tests, no behavior change.
1222
1223         * bindings/scripts/CodeGeneratorJS.pm:
1224         (IsDOMGlobalObject):
1225         (GenerateHeader):
1226         (GenerateImplementation):
1227         (GenerateConstructorHelperMethods):
1228         * bindings/scripts/IDLAttributes.txt:
1229         * page/DOMWindow.idl:
1230         * workers/DedicatedWorkerGlobalScope.idl:
1231         * workers/SharedWorkerGlobalScope.idl:
1232         * workers/WorkerGlobalScope.idl:
1233
1234 2013-06-28  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1235
1236         Introduce SVGGraphicsElement IDL interface
1237         https://bugs.webkit.org/show_bug.cgi?id=118178
1238
1239         Reviewed by Kentaro Hara.
1240
1241         Introduce SVGGraphicsElement IDL interface as per the latest SVG
1242         specification:
1243         - https://svgwg.org/svg2-draft/types.html#InterfaceSVGGraphicsElement
1244
1245         SVGGraphicsElement is a merge of SVGLocatable and SVGTransformable.
1246         This is one step towards simplifying inheritance in SVG and matching
1247         the latest SVG2 specification.
1248
1249         No new tests, already covered by existing tests.
1250
1251         * CMakeLists.txt:
1252         * DerivedSources.cpp:
1253         * DerivedSources.make:
1254         * DerivedSources.pri:
1255         * GNUmakefile.list.am:
1256         * Target.pri:
1257         * WebCore.order:
1258         * WebCore.vcxproj/WebCore.vcxproj:
1259         * WebCore.vcxproj/WebCore.vcxproj.filters:
1260         * WebCore.xcodeproj/project.pbxproj:
1261         * bindings/scripts/CodeGeneratorJS.pm:
1262         (GetGnuVTableOffsetForType):
1263         * rendering/svg/RenderSVGEllipse.cpp:
1264         (WebCore::RenderSVGEllipse::RenderSVGEllipse):
1265         * rendering/svg/RenderSVGEllipse.h:
1266         * rendering/svg/RenderSVGPath.cpp:
1267         (WebCore::RenderSVGPath::RenderSVGPath):
1268         * rendering/svg/RenderSVGPath.h:
1269         * rendering/svg/RenderSVGResourceClipper.cpp:
1270         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
1271         * rendering/svg/RenderSVGResourceContainer.cpp:
1272         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
1273         * rendering/svg/RenderSVGResourceMarker.cpp:
1274         * rendering/svg/RenderSVGShape.cpp:
1275         (WebCore::RenderSVGShape::RenderSVGShape):
1276         (WebCore::RenderSVGShape::updateShapeFromElement):
1277         (WebCore::RenderSVGShape::layout):
1278         (WebCore::RenderSVGShape::nonScalingStrokeTransform):
1279         (WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
1280         * rendering/svg/RenderSVGShape.h:
1281         * rendering/svg/RenderSVGTransformableContainer.cpp:
1282         (WebCore::RenderSVGTransformableContainer::RenderSVGTransformableContainer):
1283         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
1284         * rendering/svg/RenderSVGTransformableContainer.h:
1285         * svg/SVGAElement.cpp:
1286         (WebCore::SVGAElement::SVGAElement):
1287         (WebCore::SVGAElement::parseAttribute):
1288         (WebCore::SVGAElement::svgAttributeChanged):
1289         (WebCore::SVGAElement::defaultEventHandler):
1290         (WebCore::SVGAElement::supportsFocus):
1291         (WebCore::SVGAElement::isURLAttribute):
1292         * svg/SVGAElement.h:
1293         * svg/SVGAElement.idl:
1294         * svg/SVGAllInOne.cpp:
1295         * svg/SVGAnimateMotionElement.cpp:
1296         (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
1297         * svg/SVGCircleElement.cpp:
1298         (WebCore::SVGCircleElement::SVGCircleElement):
1299         (WebCore::SVGCircleElement::parseAttribute):
1300         (WebCore::SVGCircleElement::svgAttributeChanged):
1301         * svg/SVGCircleElement.h:
1302         * svg/SVGCircleElement.idl:
1303         * svg/SVGClipPathElement.cpp:
1304         (WebCore::SVGClipPathElement::SVGClipPathElement):
1305         (WebCore::SVGClipPathElement::parseAttribute):
1306         (WebCore::SVGClipPathElement::svgAttributeChanged):
1307         (WebCore::SVGClipPathElement::childrenChanged):
1308         * svg/SVGClipPathElement.h:
1309         * svg/SVGClipPathElement.idl:
1310         * svg/SVGDefsElement.cpp:
1311         (WebCore::SVGDefsElement::SVGDefsElement):
1312         * svg/SVGDefsElement.h:
1313         * svg/SVGDefsElement.idl:
1314         * svg/SVGElement.h:
1315         (WebCore::SVGElement::isSVGGraphicsElement):
1316         * svg/SVGEllipseElement.cpp:
1317         (WebCore::SVGEllipseElement::SVGEllipseElement):
1318         (WebCore::SVGEllipseElement::parseAttribute):
1319         (WebCore::SVGEllipseElement::svgAttributeChanged):
1320         * svg/SVGEllipseElement.h:
1321         * svg/SVGEllipseElement.idl:
1322         * svg/SVGForeignObjectElement.cpp:
1323         (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
1324         (WebCore::SVGForeignObjectElement::parseAttribute):
1325         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
1326         (WebCore::SVGForeignObjectElement::rendererIsNeeded):
1327         * svg/SVGForeignObjectElement.h:
1328         * svg/SVGForeignObjectElement.idl:
1329         * svg/SVGGElement.cpp:
1330         (WebCore::SVGGElement::SVGGElement):
1331         (WebCore::SVGGElement::parseAttribute):
1332         (WebCore::SVGGElement::svgAttributeChanged):
1333         * svg/SVGGElement.h:
1334         * svg/SVGGElement.idl:
1335         * svg/SVGGraphicsElement.cpp: Renamed from Source/WebCore/svg/SVGStyledTransformableElement.cpp.
1336         (WebCore::SVGGraphicsElement::SVGGraphicsElement):
1337         (WebCore::SVGGraphicsElement::~SVGGraphicsElement):
1338         (WebCore::SVGGraphicsElement::getCTM):
1339         (WebCore::SVGGraphicsElement::getScreenCTM):
1340         (WebCore::SVGGraphicsElement::animatedLocalTransform):
1341         (WebCore::SVGGraphicsElement::supplementalTransform):
1342         (WebCore::SVGGraphicsElement::isSupportedAttribute):
1343         (WebCore::SVGGraphicsElement::parseAttribute):
1344         (WebCore::SVGGraphicsElement::svgAttributeChanged):
1345         (WebCore::SVGGraphicsElement::nearestViewportElement):
1346         (WebCore::SVGGraphicsElement::farthestViewportElement):
1347         (WebCore::SVGGraphicsElement::getBBox):
1348         (WebCore::SVGGraphicsElement::createRenderer):
1349         (WebCore::SVGGraphicsElement::toClipPath):
1350         * svg/SVGGraphicsElement.h: Renamed from Source/WebCore/svg/SVGStyledTransformableElement.h.
1351         (WebCore::SVGGraphicsElement::localCoordinateSpaceTransform):
1352         (WebCore::SVGGraphicsElement::synchronizeRequiredFeatures):
1353         (WebCore::SVGGraphicsElement::synchronizeRequiredExtensions):
1354         (WebCore::SVGGraphicsElement::synchronizeSystemLanguage):
1355         (WebCore::toSVGGraphicsElement):
1356         * svg/SVGGraphicsElement.idl: Copied from Source/WebCore/svg/SVGForeignObjectElement.idl.
1357         * svg/SVGImageElement.cpp:
1358         (WebCore::SVGImageElement::SVGImageElement):
1359         (WebCore::SVGImageElement::isPresentationAttribute):
1360         (WebCore::SVGImageElement::collectStyleForPresentationAttribute):
1361         (WebCore::SVGImageElement::parseAttribute):
1362         (WebCore::SVGImageElement::svgAttributeChanged):
1363         (WebCore::SVGImageElement::attach):
1364         (WebCore::SVGImageElement::insertedInto):
1365         (WebCore::SVGImageElement::addSubresourceAttributeURLs):
1366         (WebCore::SVGImageElement::didMoveToNewDocument):
1367         * svg/SVGImageElement.h:
1368         * svg/SVGImageElement.idl:
1369         * svg/SVGLineElement.cpp:
1370         (WebCore::SVGLineElement::SVGLineElement):
1371         (WebCore::SVGLineElement::parseAttribute):
1372         (WebCore::SVGLineElement::svgAttributeChanged):
1373         * svg/SVGLineElement.h:
1374         * svg/SVGLineElement.idl:
1375         * svg/SVGPathElement.cpp:
1376         (WebCore::SVGPathElement::SVGPathElement):
1377         (WebCore::SVGPathElement::parseAttribute):
1378         (WebCore::SVGPathElement::svgAttributeChanged):
1379         (WebCore::SVGPathElement::insertedInto):
1380         (WebCore::SVGPathElement::removedFrom):
1381         * svg/SVGPathElement.h:
1382         * svg/SVGPathElement.idl:
1383         * svg/SVGPatternElement.cpp:
1384         * svg/SVGPolyElement.cpp:
1385         (WebCore::SVGPolyElement::SVGPolyElement):
1386         (WebCore::SVGPolyElement::parseAttribute):
1387         (WebCore::SVGPolyElement::svgAttributeChanged):
1388         * svg/SVGPolyElement.h:
1389         * svg/SVGPolygonElement.idl:
1390         * svg/SVGPolylineElement.idl:
1391         * svg/SVGRectElement.cpp:
1392         (WebCore::SVGRectElement::SVGRectElement):
1393         (WebCore::SVGRectElement::parseAttribute):
1394         (WebCore::SVGRectElement::svgAttributeChanged):
1395         * svg/SVGRectElement.h:
1396         * svg/SVGRectElement.idl:
1397         * svg/SVGSVGElement.cpp:
1398         (WebCore::SVGSVGElement::SVGSVGElement):
1399         (WebCore::SVGSVGElement::didMoveToNewDocument):
1400         (WebCore::SVGSVGElement::parseAttribute):
1401         (WebCore::SVGSVGElement::insertedInto):
1402         (WebCore::SVGSVGElement::removedFrom):
1403         * svg/SVGSVGElement.h:
1404         * svg/SVGSVGElement.idl:
1405         * svg/SVGStyledElement.cpp:
1406         (WebCore::SVGStyledElement::localCoordinateSpaceTransform):
1407         * svg/SVGSwitchElement.cpp:
1408         (WebCore::SVGSwitchElement::SVGSwitchElement):
1409         * svg/SVGSwitchElement.h:
1410         * svg/SVGSwitchElement.idl:
1411         * svg/SVGUseElement.cpp:
1412         (WebCore::SVGUseElement::SVGUseElement):
1413         (WebCore::SVGUseElement::parseAttribute):
1414         (WebCore::SVGUseElement::insertedInto):
1415         (WebCore::SVGUseElement::removedFrom):
1416         (WebCore::SVGUseElement::svgAttributeChanged):
1417         (WebCore::SVGUseElement::toClipPath):
1418         (WebCore::SVGUseElement::finishParsingChildren):
1419         * svg/SVGUseElement.h:
1420         * svg/SVGUseElement.idl:
1421
1422 2013-06-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1423
1424         Add new schemes to content utils.
1425         https://bugs.webkit.org/show_bug.cgi?id=118181
1426
1427         Reviewed by Christophe Dumez.
1428
1429         According to latest content handler spec, new schemes are added to it.
1430         Those are "geo, magnet, sip, ssh and xmpp".
1431
1432         http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers
1433
1434         Tests: fast/dom/register-protocol-handler.html
1435                fast/dom/unregister-protocol-handler.html
1436
1437         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1438         (WebCore::initProtocolHandlerWhitelist):
1439
1440 2013-06-28  Sanghyup Lee  <sh53.lee@samsung.com>
1441
1442         Avoid duplicating hostWindow() call in ScrollView.cpp
1443         https://bugs.webkit.org/show_bug.cgi?id=118168
1444
1445         Reviewed by Christophe Dumez.
1446
1447         Remove redundant hostWindow() calls in ScrollView.cpp.
1448
1449         * platform/ScrollView.cpp:
1450         (WebCore::ScrollView::scrollContents):
1451         (WebCore::ScrollView::contentsToScreen):
1452         (WebCore::ScrollView::screenToContents):
1453         (WebCore::ScrollView::repaintContentRectangle):
1454         (WebCore::ScrollView::updateOverhangAreas):
1455         (WebCore::ScrollView::addPanScrollIcon):
1456         (WebCore::ScrollView::removePanScrollIcon):
1457
1458 2013-06-28  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1459
1460         Unreviewed, fix GTK build after r152156.
1461
1462         * GNUmakefile.list.am:
1463
1464 2013-06-28  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1465
1466         Merge SVGLangSpace into SVGElement
1467         https://bugs.webkit.org/show_bug.cgi?id=118170
1468
1469         Reviewed by Kentaro Hara.
1470
1471         Remove SVGLangSpace IDL interface and move its attributes to SVGElement
1472         to match the latest specification and simplify inheritance in SVG:
1473         - https://svgwg.org/svg2-draft/types.html#InterfaceSVGElement
1474
1475         No new tests, no behavior change.
1476
1477         * DerivedSources.make:
1478         * WebCore.xcodeproj/project.pbxproj:
1479         * svg/SVGAElement.h:
1480         * svg/SVGAElement.idl:
1481         * svg/SVGCircleElement.h:
1482         * svg/SVGCircleElement.idl:
1483         * svg/SVGClipPathElement.h:
1484         * svg/SVGClipPathElement.idl:
1485         * svg/SVGDefsElement.h:
1486         * svg/SVGDefsElement.idl:
1487         * svg/SVGDescElement.h:
1488         * svg/SVGDescElement.idl:
1489         * svg/SVGElement.cpp:
1490         (WebCore::SVGElement::parseAttribute):
1491         * svg/SVGElement.h:
1492         * svg/SVGElement.idl:
1493         * svg/SVGEllipseElement.h:
1494         * svg/SVGEllipseElement.idl:
1495         * svg/SVGFEImageElement.h:
1496         * svg/SVGFEImageElement.idl:
1497         * svg/SVGFilterElement.h:
1498         * svg/SVGFilterElement.idl:
1499         * svg/SVGForeignObjectElement.h:
1500         * svg/SVGForeignObjectElement.idl:
1501         * svg/SVGGElement.h:
1502         * svg/SVGGElement.idl:
1503         * svg/SVGImageElement.h:
1504         * svg/SVGImageElement.idl:
1505         * svg/SVGLangSpace.idl: Removed.
1506         * svg/SVGLineElement.h:
1507         * svg/SVGLineElement.idl:
1508         * svg/SVGMarkerElement.h:
1509         * svg/SVGMarkerElement.idl:
1510         * svg/SVGMaskElement.h:
1511         * svg/SVGMaskElement.idl:
1512         * svg/SVGPathElement.h:
1513         * svg/SVGPathElement.idl:
1514         * svg/SVGPatternElement.h:
1515         * svg/SVGPatternElement.idl:
1516         * svg/SVGPolyElement.h:
1517         * svg/SVGPolygonElement.idl:
1518         * svg/SVGPolylineElement.idl:
1519         * svg/SVGRectElement.h:
1520         * svg/SVGRectElement.idl:
1521         * svg/SVGSVGElement.h:
1522         * svg/SVGSVGElement.idl:
1523         * svg/SVGStyleElement.h:
1524         * svg/SVGStyleElement.idl:
1525         * svg/SVGSwitchElement.h:
1526         * svg/SVGSwitchElement.idl:
1527         * svg/SVGSymbolElement.h:
1528         * svg/SVGSymbolElement.idl:
1529         * svg/SVGTextContentElement.h:
1530         * svg/SVGTextContentElement.idl:
1531         * svg/SVGTitleElement.h:
1532         * svg/SVGTitleElement.idl:
1533         * svg/SVGUseElement.h:
1534         * svg/SVGUseElement.idl:
1535
1536 2013-06-28  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1537
1538         Use & instead of | in the value of [CallWith]
1539         https://bugs.webkit.org/show_bug.cgi?id=118054
1540
1541         Reviewed by Kentaro Hara.
1542
1543         [CallWith=ScriptExecutionContext|ScriptState] meant that both the
1544         ScriptExecutionContext AND the ScriptState would be passed as
1545         arguments to the implementation (not one OR the other).
1546
1547         This patch changes the semantics for those IDL extended attributes
1548         to make it less confusing. Proper usage is now:
1549         [CallWith=ScriptExecutionContext&ScriptState]
1550
1551         No new tests, covered by existing bindings tests.
1552
1553         * bindings/scripts/CodeGenerator.pm:
1554         (ExtendedAttributeContains):
1555         * bindings/scripts/test/TestObj.idl:
1556         * page/Console.idl:
1557
1558 2013-06-27  Kangil Han  <kangil.han@samsung.com>
1559
1560         HTMLAudioElement doesn't have to know about isVideo function
1561         https://bugs.webkit.org/show_bug.cgi?id=118116
1562
1563         Reviewed by Eric Carlson.
1564
1565         Minor code cleanup to remove isVideo function from HTMLAudioElement.
1566         We can use default function in HTMLMediaElement as hasVideo does.
1567
1568         * html/HTMLAudioElement.h:
1569         * html/HTMLMediaElement.h:
1570         (WebCore::HTMLMediaElement::isVideo):
1571
1572 2013-06-27  Kangil Han  <kangil.han@samsung.com>
1573
1574         Adopt is/toHTMLInputElement for code cleanup
1575         https://bugs.webkit.org/show_bug.cgi?id=118130
1576
1577         Reviewed by Antti Koivisto.
1578
1579         To enhance readability, this patch adopts is/toHTMLInputElement.
1580         This also helps out to reduce duplicated use of static_cast.
1581
1582         * accessibility/AccessibilityMediaControls.cpp:
1583         (WebCore::AccessibilityMediaTimeline::valueDescription):
1584         * accessibility/AccessibilityNodeObject.cpp:
1585         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
1586         (WebCore::AccessibilityNodeObject::isNativeTextControl):
1587         (WebCore::AccessibilityNodeObject::isNativeImage):
1588         (WebCore::AccessibilityNodeObject::isInputImage):
1589         (WebCore::AccessibilityNodeObject::isReadOnly):
1590         (WebCore::AccessibilityNodeObject::valueForRange):
1591         (WebCore::AccessibilityNodeObject::maxValueForRange):
1592         (WebCore::AccessibilityNodeObject::minValueForRange):
1593         (WebCore::AccessibilityNodeObject::actionElement):
1594         (WebCore::AccessibilityNodeObject::titleElementText):
1595         (WebCore::AccessibilityNodeObject::visibleText):
1596         (WebCore::AccessibilityNodeObject::title):
1597         (WebCore::AccessibilityNodeObject::text):
1598         (WebCore::AccessibilityNodeObject::colorValue):
1599         (WebCore::accessibleNameForNode):
1600         * accessibility/AccessibilityRenderObject.cpp:
1601         (WebCore::AccessibilityRenderObject::isFileUploadButton):
1602         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
1603         (WebCore::AccessibilityRenderObject::url):
1604         (WebCore::AccessibilityRenderObject::setValue):
1605         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1606         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
1607         * accessibility/AccessibilitySlider.cpp:
1608         (WebCore::AccessibilitySlider::element):
1609         * accessibility/ios/AccessibilityObjectIOS.mm:
1610         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
1611         * bindings/js/JSHTMLInputElementCustom.cpp:
1612         (WebCore::JSHTMLInputElement::selectionStart):
1613         (WebCore::JSHTMLInputElement::setSelectionStart):
1614         (WebCore::JSHTMLInputElement::selectionEnd):
1615         (WebCore::JSHTMLInputElement::setSelectionEnd):
1616         (WebCore::JSHTMLInputElement::selectionDirection):
1617         (WebCore::JSHTMLInputElement::setSelectionDirection):
1618         (WebCore::JSHTMLInputElement::setSelectionRange):
1619         * css/StyleResolver.cpp:
1620         (WebCore::StyleResolver::adjustRenderStyle):
1621         * editing/FrameSelection.cpp:
1622         (WebCore::FrameSelection::isInPasswordField):
1623         * editing/ReplaceSelectionCommand.cpp:
1624         (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
1625         * html/HTMLFormControlElement.cpp:
1626         (WebCore::shouldAutofocus):
1627         * html/HTMLFormElement.cpp:
1628         (WebCore::HTMLFormElement::getTextFieldValues):
1629         * html/HTMLInputElement.h:
1630         (WebCore::isHTMLInputElement):
1631         (WebCore::toHTMLInputElement):
1632         * html/RadioInputType.cpp:
1633         (WebCore::RadioInputType::handleKeydownEvent):
1634         (WebCore::RadioInputType::isKeyboardFocusable):
1635         * html/shadow/MediaControlElementTypes.cpp:
1636         (WebCore::mediaControlElementType):
1637         * html/shadow/TextControlInnerElements.cpp:
1638         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
1639         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
1640         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
1641         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
1642         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
1643         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
1644         (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
1645         * loader/FormSubmission.cpp:
1646         (WebCore::FormSubmission::create):
1647         * page/Chrome.cpp:
1648         (WebCore::Chrome::setToolTip):
1649         * page/EventHandler.cpp:
1650         (WebCore::isSubmitImage):
1651         (WebCore::EventHandler::handleMousePressEvent):
1652         * page/FocusController.cpp:
1653         (WebCore::clearSelectionIfNeeded):
1654         * platform/gtk/PasteboardGtk.cpp:
1655         (WebCore::getURLForImageNode):
1656         * platform/qt/RenderThemeQt.cpp:
1657         (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
1658         * platform/qt/RenderThemeQtMobile.cpp:
1659         (WebCore::RenderThemeQtMobile::paintSliderTrack):
1660         * rendering/HitTestResult.cpp:
1661         (WebCore::HitTestResult::altDisplayString):
1662         (WebCore::HitTestResult::absoluteImageURL):
1663         (WebCore::HitTestResult::isContentEditable):
1664         * rendering/RenderBlock.cpp:
1665         (WebCore::RenderBlock::hasLineIfEmpty):
1666         * rendering/RenderBox.cpp:
1667         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
1668         * rendering/RenderButton.cpp:
1669         (WebCore::RenderButton::updateFromElement):
1670         (WebCore::RenderButton::canHaveGeneratedChildren):
1671         * rendering/RenderDetailsMarker.cpp:
1672         (WebCore::RenderDetailsMarker::isOpen):
1673         * rendering/RenderFileUploadControl.cpp:
1674         (WebCore::RenderFileUploadControl::updateFromElement):
1675         (WebCore::RenderFileUploadControl::maxFilenameWidth):
1676         (WebCore::RenderFileUploadControl::paintObject):
1677         (WebCore::RenderFileUploadControl::uploadButton):
1678         (WebCore::RenderFileUploadControl::fileTextValue):
1679         * rendering/RenderImage.cpp:
1680         (WebCore::RenderImage::updateAltText):
1681         * testing/Internals.cpp:
1682         (WebCore::Internals::selectColorInColorChooser):
1683
1684 2013-06-27  Antti Koivisto  <antti@apple.com>
1685
1686         Use DeferrableOneShotTimer for deleting decoded data
1687         https://bugs.webkit.org/show_bug.cgi?id=118150
1688
1689         Reviewed by Andreas Kling.
1690
1691         Up to 1% of page load time can be used under CachedScript::script() for restarting
1692         the decoded data deletion timer.
1693         
1694         Using DeferrableOneShotTimer instead of a plain Timer avoids unnecessary low level timer access.
1695
1696         * loader/cache/CachedResource.cpp:
1697         (WebCore::CachedResource::CachedResource):
1698         (WebCore::CachedResource::destroyDecodedDataIfNeeded):
1699         (WebCore::CachedResource::decodedDataDeletionTimerFired):
1700         (WebCore::CachedResource::decodedDataDeletionTimerDelay):
1701
1702             Adopt DeferrableOneShotTimer.
1703
1704         * loader/cache/CachedResource.h:
1705         * loader/cache/CachedScript.cpp:
1706         (WebCore::CachedScript::script):
1707         (WebCore::CachedScript::decodedDataDeletionTimerDelay):
1708         
1709             Keep using zero delay for scripts.
1710
1711         * platform/Timer.h:
1712         (WebCore::DeferrableOneShotTimer::stop):
1713         
1714             Avoid unnecessary restart after stopping and starting again.
1715
1716 2013-06-27  Anders Carlsson  <andersca@apple.com>
1717
1718         Add a new String::charactersWithNullTermination() function that returns a vector
1719         https://bugs.webkit.org/show_bug.cgi?id=118155
1720
1721         Reviewed by Andreas Kling.
1722
1723         Change calls to deprecatedCharactersWithNullTermination() to charactersWithNullTermination().data()
1724
1725         * platform/graphics/win/FontCacheWin.cpp:
1726         (WebCore::getLinkedFonts):
1727         * platform/graphics/win/FontCustomPlatformData.cpp:
1728         (WebCore::FontCustomPlatformData::fontPlatformData):
1729         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1730         (WebCore::FontCustomPlatformData::fontPlatformData):
1731         * platform/graphics/win/IconWin.cpp:
1732         (WebCore::Icon::createIconForFiles):
1733         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1734         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
1735         * platform/graphics/wince/FontPlatformData.cpp:
1736         (WebCore::FontPlatformData::FontPlatformData):
1737         * platform/network/curl/CurlDownload.cpp:
1738         (CurlDownload::moveFileToDestination):
1739         * platform/network/win/CookieJarWin.cpp:
1740         (WebCore::setCookiesFromDOM):
1741         (WebCore::cookiesForDOM):
1742         * platform/network/win/DownloadBundleWin.cpp:
1743         (WebCore::DownloadBundle::appendResumeData):
1744         (WebCore::DownloadBundle::extractResumeData):
1745         * platform/network/win/ResourceHandleWin.cpp:
1746         (WebCore::createInternetHandle):
1747         (WebCore::ResourceHandle::start):
1748         (WebCore::ResourceHandle::fileLoadTimer):
1749         * platform/text/win/LocaleWin.cpp:
1750         (WebCore::LCIDFromLocaleInternal):
1751         * platform/text/win/TextCodecWin.cpp:
1752         (WebCore::TextCodecWin::enumerateSupportedEncodings):
1753         * platform/win/ClipboardUtilitiesWin.cpp:
1754         (WebCore::getWebLocData):
1755         (WebCore::createGlobalData):
1756         (WebCore::setFileDescriptorData):
1757         (WebCore::getURL):
1758         (WebCore::setCFData):
1759         * platform/win/ContextMenuWin.cpp:
1760         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
1761         * platform/win/DragImageWin.cpp:
1762         (WebCore::createDragImageIconForCachedImageFilename):
1763         * platform/win/FileSystemWin.cpp:
1764         (WebCore::getFindData):
1765         (WebCore::deleteFile):
1766         (WebCore::deleteEmptyDirectory):
1767         (WebCore::pathByAppendingComponent):
1768         (WebCore::makeAllDirectories):
1769         (WebCore::pathGetFileName):
1770         (WebCore::openTemporaryFile):
1771         (WebCore::openFile):
1772         * platform/win/MIMETypeRegistryWin.cpp:
1773         (WebCore::mimeTypeForExtension):
1774         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
1775         * platform/win/PasteboardWin.cpp:
1776         (WebCore::createGlobalImageFileDescriptor):
1777         (WebCore::createGlobalHDropContent):
1778         * platform/win/PathWalker.cpp:
1779         (WebCore::PathWalker::PathWalker):
1780         * platform/win/SSLKeyGeneratorWin.cpp:
1781         (WebCore::WebCore::signedPublicKeyAndChallengeString):
1782         * platform/win/SharedBufferWin.cpp:
1783         (WebCore::SharedBuffer::createWithContentsOfFile):
1784         * platform/wince/FileSystemWinCE.cpp:
1785         (WebCore::getFileInfo):
1786         (WebCore::fileExists):
1787         (WebCore::deleteFile):
1788         (WebCore::deleteEmptyDirectory):
1789         (WebCore::makeAllDirectories):
1790         (WebCore::openTemporaryFile):
1791         (WebCore::openFile):
1792         * plugins/win/PluginDatabaseWin.cpp:
1793         (WebCore::PluginDatabase::getPluginPathsInDirectories):
1794         (WebCore::addMozillaPluginDirectories):
1795         (WebCore::addAdobeAcrobatPluginDirectory):
1796         (WebCore::addJavaPluginDirectory):
1797         * plugins/win/PluginPackageWin.cpp:
1798         (WebCore::getVersionInfo):
1799         (WebCore::PluginPackage::fetchInfo):
1800         (WebCore::PluginPackage::load):
1801         * plugins/win/PluginViewWin.cpp:
1802         (WebCore::PluginView::handlePostReadFile):
1803
1804 2013-06-27  Frédéric Wang  <fred.wang@free.fr>
1805
1806         Implement parsing of MathML lengths.
1807         https://bugs.webkit.org/show_bug.cgi?id=118053
1808
1809         Reviewed by Chris Fleizach.
1810
1811         A parsing function for MathML lengths, similar to Gecko's one, is
1812         implemented. It is currently only used to parse mfrac@linethickness but
1813         will be convenient to parse other MathML attributes in the future.
1814
1815         Tests: mathml/presentation/mfrac-linethickness1.html
1816                mathml/presentation/mfrac-linethickness2.html
1817                mathml/presentation/mfrac-linethickness3.html
1818
1819         * rendering/mathml/RenderMathMLBlock.cpp: add parsing functions
1820         (WebCore::parseMathMLLength): parsing MathML Length (number unit)
1821         (WebCore::parseNamedSpace): parsing MathML namedspaces
1822         * rendering/mathml/RenderMathMLBlock.h: declare parsing functions
1823         * rendering/mathml/RenderMathMLFraction.cpp: use the parsing function for linethickness
1824         (WebCore::RenderMathMLFraction::updateFromElement):
1825
1826 2013-06-27  Anders Carlsson  <andersca@apple.com>
1827
1828         Remove call to deprecatedCharactersWithNullTermination() in WebGL code
1829         https://bugs.webkit.org/show_bug.cgi?id=118154
1830
1831         Reviewed by Dean Jackson.
1832
1833         Remove an unneeded call to deprecatedCharactersWithNullTermination(). Ultimately, 
1834         the string we used to call it on gets converted to an UTF-8 CString that has a null character anyway.
1835
1836         * html/canvas/WebGLProgram.cpp:
1837         (WebCore::WebGLProgram::cacheActiveAttribLocations):
1838
1839 2013-06-27  Roger Fong  <roger_fong@apple.com>
1840
1841         Unreviewed. Temporarily add some stderr output to Media Engine load methods to determine which engine buildbots are using for layout tests.
1842
1843         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1844         (WebCore::MediaPlayerPrivateAVFoundation::load):
1845         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1846         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::load):
1847
1848 2013-06-27  Anders Carlsson  <andersca@apple.com>
1849
1850         Stop using deprecatedCharactersWithNullTermination in SQLite code
1851         https://bugs.webkit.org/show_bug.cgi?id=118146
1852
1853         Reviewed by Filip Pizlo.
1854
1855         Turns out SQLite uses UTF-8 internally so we might just as well use the SQLite functions
1856         that take UTF-8 strings and do the conversion ourselves. This has the added advantage that we can
1857         use String::utf8() which returns a null-terminated string.
1858
1859         Require a version of SQLite newer than 3.6.16 so we can remove two workarounds. 3.6.16 was released
1860         4 years ago so supported port is likely to have it.
1861
1862         * platform/sql/SQLiteFileSystem.cpp:
1863         (WebCore::SQLiteFileSystem::openDatabase):
1864         Use sqlite3_open instead of sqlite3_open16.
1865
1866         * platform/sql/SQLiteFileSystem.h:
1867         Fix parameter name capitalization.
1868
1869         * platform/sql/SQLiteStatement.cpp:
1870         (WebCore::SQLiteStatement::prepare):
1871         Use sqlite3_prepare_v2. Also, pass the length of the string (including the null character), since
1872         that lets SQLite avoid a buffer copy. Remove a workaround for versions of SQLite older than 3.6.16.
1873
1874 2013-06-27  Andrew Lo  <anlo@blackberry.com>
1875
1876         [BlackBerry] Unnecessary root layer commits occur during html5 video playback
1877         https://bugs.webkit.org/show_bug.cgi?id=118147
1878
1879         Reviewed by Rob Buis.
1880         Internally reviewed by Arvid Nilsson, John Griggs.
1881
1882         Only request layer commits when layer properties change in
1883         GraphicsLayerBlackBerry::updateContentsRect and
1884         GraphicsLayerBlackBerry::setContentsToMedia.
1885         JIRA112749.
1886
1887         * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
1888         (WebCore::GraphicsLayerBlackBerry::setContentsToMedia):
1889         (WebCore::GraphicsLayerBlackBerry::updateContentsRect):
1890
1891 2013-06-27  Bem Jones-Bey  <bjonesbe@adobe.com>
1892
1893         [CSS Shapes] New positioning model: basic support for rectangle shape-outside
1894         https://bugs.webkit.org/show_bug.cgi?id=118080
1895
1896         Reviewed by David Hyatt.
1897
1898         With the latest Editor's Draft of the CSS Shapes specification,
1899         shape-outside no longer affects the positioning of floats. This is the
1900         first step in changing the implementation to reflect this
1901         specification change. The bulk of this change is reverting the code
1902         that was needed to position floats based on the bounding box of the
1903         shape.
1904
1905         Tests: csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-000.html
1906                csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-001.html
1907                csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-002.html
1908                csswg/submitted/shapes/shape-outside/shape-outside-floats-square-000.html
1909                csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-000.html
1910                csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-001.html
1911                csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-002.html
1912
1913         * rendering/LayoutState.cpp:
1914         (WebCore::LayoutState::LayoutState): Revert changes to support float
1915             positioning from shape-outside.
1916         * rendering/RenderBlock.cpp:
1917         (WebCore::RenderBlock::blockSelectionGaps): Ditto.
1918         (WebCore::RenderBlock::insertFloatingObject): Ditto.
1919         (WebCore::RenderBlock::positionNewFloats): Ditto.
1920         (WebCore::RenderBlock::logicalLeftOffsetForLine): Instead of
1921             converting to shape bounding box coordinates, convert to the
1922             float's margin box coordinates.
1923         (WebCore::RenderBlock::logicalRightOffsetForLine): Ditto.
1924         (WebCore::positionForPointRespectingEditingBoundaries): Revert changes
1925             to support float positioning from shape-outside.
1926         * rendering/RenderBlock.h:
1927         (WebCore::RenderBlock::xPositionForFloatIncludingMargin): Ditto.
1928         (WebCore::RenderBlock::yPositionForFloatIncludingMargin): Ditto.
1929         * rendering/RenderBlockLineLayout.cpp:
1930         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Instead
1931             of converting to shape bounding box coordinates, convert to the
1932             float's margin box coordinates.
1933         * rendering/RenderBox.cpp:
1934         (WebCore::RenderBox::mapLocalToContainer): Revert changes to support
1935             float positioning from shape-outside.
1936         (WebCore::RenderBox::offsetFromContainer): Ditto.
1937         (WebCore::RenderBox::computeRectForRepaint): Ditto.
1938         (WebCore::RenderBox::layoutOverflowRectForPropagation): Ditto.
1939         * rendering/RenderBoxModelObject.cpp: Ditto.
1940         * rendering/RenderBoxModelObject.h: Ditto.
1941         * rendering/RenderInline.cpp:
1942         (WebCore::RenderInline::clippedOverflowRectForRepaint): Ditto.
1943         (WebCore::RenderInline::computeRectForRepaint): Ditto.
1944         (WebCore::RenderInline::mapLocalToContainer): Ditto.
1945         * rendering/RenderLayer.cpp:
1946         (WebCore::RenderLayer::updateLayerPosition): Ditto.
1947         (WebCore::RenderLayer::calculateClipRects): Ditto.
1948         (WebCore::RenderLayer::shouldBeNormalFlowOnly): Ditto.
1949         * rendering/RenderLayer.h:
1950         (WebCore::RenderLayer::offsetForInFlowPosition): Ditto.
1951         * rendering/RenderObject.h: Ditto.
1952         * rendering/shapes/ShapeInfo.h: Make m_renderer protected, since we
1953             now need it in the subclass to compute the segments.
1954         * rendering/shapes/ShapeOutsideInfo.cpp:
1955         (WebCore::ShapeOutsideInfo::computeSegmentsForLine): Update segment
1956             computation to use the float's margin box instead of the shape's
1957             bounding box for computing the deltas.
1958         (WebCore::ShapeOutsideInfo::leftSegmentMarginBoxDelta): This used to
1959             be leftSegmentShapeBoundingBoxDelta, which has been renamed in the
1960             obvious way.
1961         (WebCore::ShapeOutsideInfo::rightSegmentMarginBoxDelta): This used to
1962             be rightSegmentShapeBoundingBoxDelta, which has been renamed in the
1963             obvious way.
1964         * rendering/shapes/ShapeOutsideInfo.h: Revert changes to support float
1965             positioning from shape-outside.
1966         * rendering/style/RenderStyle.h: Ditto.
1967
1968 2013-06-27  Antti Koivisto  <antti@apple.com>
1969
1970         RenderLayerCompositor destructor is fragile
1971         https://bugs.webkit.org/show_bug.cgi?id=118143
1972
1973         Reviewed by Simon Fraser.
1974
1975         With iOS tile cache implementation deleting RenderLayerCompositor may end up starting a deleted timer. 
1976         This corrupts the timer heap and leads to a crash later. This happens because GraphicsLayers destructor 
1977         calls back to the RenderLayerCompositor that is being deleted. This is pretty fragile in general.
1978         
1979         No test as there is no known way to repro this with plain webkit.
1980
1981         * platform/Timer.cpp:
1982         (WebCore::TimerBase::TimerBase):
1983         (WebCore::TimerBase::~TimerBase):
1984         (WebCore::TimerBase::setNextFireTime):
1985         * platform/Timer.h:
1986         
1987             Assert that the timer is alive before starting it. This turns bugs like this into clear crash stacks
1988             instead of hard-to-debug timer heap corruptions.
1989
1990         * rendering/RenderLayerCompositor.cpp:
1991         (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
1992         
1993             Take care to delete owned GraphicsLayers before proceeding with the rest of the destructor.
1994
1995 2013-06-27  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1996
1997         Update SVG interfaces to stop inheriting from SVGURIReference and SVGTests
1998         https://bugs.webkit.org/show_bug.cgi?id=118142
1999
2000         Reviewed by Ryosuke Niwa.
2001
2002         Stop inheriting from SVGURIReference and SVGTests and use IDL implements statements
2003         instead. This is one step towards getting rid of multiple inheritance in SVG (which
2004         is no longer supported by Web IDL) and matching the latest specification:
2005         - https://svgwg.org/svg2-draft/types.html#BasicDOMInterfaces
2006
2007         No new tests, no behavior change.
2008
2009         * CMakeLists.txt:
2010         * DerivedSources.pri:
2011         * GNUmakefile.list.am:
2012         * svg/SVGAElement.idl:
2013         * svg/SVGAltGlyphElement.idl:
2014         * svg/SVGAnimationElement.idl:
2015         * svg/SVGCircleElement.idl:
2016         * svg/SVGClipPathElement.idl:
2017         * svg/SVGCursorElement.idl:
2018         * svg/SVGDefsElement.idl:
2019         * svg/SVGEllipseElement.idl:
2020         * svg/SVGFEImageElement.idl:
2021         * svg/SVGFilterElement.idl:
2022         * svg/SVGForeignObjectElement.idl:
2023         * svg/SVGGElement.idl:
2024         * svg/SVGGlyphRefElement.idl:
2025         * svg/SVGGradientElement.idl:
2026         * svg/SVGImageElement.idl:
2027         * svg/SVGLineElement.idl:
2028         * svg/SVGMPathElement.idl:
2029         * svg/SVGMaskElement.idl:
2030         * svg/SVGPathElement.idl:
2031         * svg/SVGPatternElement.idl:
2032         * svg/SVGPolygonElement.idl:
2033         * svg/SVGPolylineElement.idl:
2034         * svg/SVGRectElement.idl:
2035         * svg/SVGSVGElement.idl:
2036         * svg/SVGScriptElement.idl:
2037         * svg/SVGSwitchElement.idl:
2038         * svg/SVGTRefElement.idl:
2039         * svg/SVGTextContentElement.idl:
2040         * svg/SVGTextPathElement.idl:
2041         * svg/SVGUseElement.idl:
2042
2043 2013-06-27  Ruth Fong  <ruth_fong@apple.com>
2044
2045         Polish context menus for media elements
2046         https://bugs.webkit.org/show_bug.cgi?id=118078
2047         <rdar://problem/14278960>
2048
2049         Reviewed by Eric Carlson.
2050
2051         No new tests: media/context-menu-action.html,
2052         which has been disabled by bug 116651, is used to test context menus.
2053
2054         * English.lproj/Localizable.strings: Changed "Fullscreen" to "Full Screen"
2055         and added strings "Show Controls" and "Hide Controls".
2056
2057         * page/ContextMenuController.cpp: Updated to include a new context menu item 
2058         that toggles betweeen "Show Controls" and "Hide Controls".
2059
2060         * platform/ContextMenuItem.h:
2061
2062         * platform/LocalizedStrings.cpp:
2063         * platform/LocalizedStrings.h:
2064         * platform/efl/LocalizedStringsEfl.cpp:
2065         * platform/gtk/LocalizedStringsGtk.cpp:
2066         * platform/qt/LocalizedStringsQt.cpp:
2067         Added equivalents of localized strings "Show Controls" and "Hide Controls".
2068
2069 2013-06-27  Chris Fleizach  <cfleizach@apple.com>
2070
2071         AX: IOS: crash while navigating with SVG
2072         https://bugs.webkit.org/show_bug.cgi?id=118101
2073
2074         Need to check if the SVG path exists before copying it.
2075
2076         Reviewed by Stephen Chenney.
2077
2078         Test: platform/iphone-simulator/accessibility/svg-path-crash.html
2079
2080         * accessibility/AccessibilityRenderObject.cpp:
2081         (WebCore::AccessibilityRenderObject::elementPath):
2082         * rendering/svg/RenderSVGShape.h:
2083         (WebCore::RenderSVGShape::hasPath):
2084
2085 2013-06-27  Seokju Kwon  <seokju.kwon@gmail.com>
2086
2087         Removing the redundant checks after r152078
2088         https://bugs.webkit.org/show_bug.cgi?id=118117
2089
2090         Reviewed by Simon Fraser.
2091
2092         Avoided redundant checks in RenderLayerCompositor::reasonsForCompositing() after r152078.
2093
2094         No new tests as no functionality change.
2095
2096         * inspector/InspectorLayerTreeAgent.cpp:
2097         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
2098         * rendering/RenderLayerCompositor.cpp:
2099         (WebCore::RenderLayerCompositor::logReasonsForCompositing):
2100
2101 2013-06-27  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2102
2103         Remove [NoInterfaceObject] from WorkerGlobalScope
2104         https://bugs.webkit.org/show_bug.cgi?id=118071
2105
2106         Reviewed by Kentaro Hara.
2107
2108         Expose WorkerGlobalScope interface in worker environment as per the latest
2109         specification:
2110         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
2111
2112         Also expose the SharedWorkerGlobalScope interface when the JavaScript global environment is a
2113         shared worker environment, and the DedicatedWorkerGlobalScope interface when the JavaScript
2114         global environment is a dedicated worker environment:
2115         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#sharedworkerglobalscope
2116         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#dedicatedworkerglobalscope
2117
2118         The semantics of the [GlobalContext] IDL extended attribute has changed to support this
2119         use case. The value for the extended attribute is now the name of the interface to which the
2120         Constructor attribute should be added (Window, WorkerGlobalScope, SharedWorkerGlobalScope...).
2121         It is possible to specify several interface names by using '&' as separator. For e.g.
2122         [GlobalContext=DOMWindow&WorkerGlobalScope].
2123
2124         Tests: fast/js/global-constructors-attributes-dedicated-worker.html
2125                fast/js/global-constructors-attributes-shared-worker.html
2126
2127         * CMakeLists.txt:
2128         * DerivedSources.make:
2129         * DerivedSources.pri:
2130         * GNUmakefile.am:
2131         * Modules/websockets/WebSocket.idl:
2132         * UseJSC.cmake:
2133         * bindings/scripts/CodeGeneratorJS.pm:
2134         (GenerateConstructorHelperMethods):
2135         * bindings/scripts/IDLAttributes.txt:
2136         * bindings/scripts/generate-bindings.pl:
2137         (checkIfIDLAttributesExists):
2138         * bindings/scripts/preprocess-idls.pl:
2139         * dom/MessageChannel.idl:
2140         * dom/MessageEvent.idl:
2141         * fileapi/Blob.idl:
2142         * fileapi/FileReader.idl:
2143         * fileapi/FileReaderSync.idl:
2144         * html/DOMURL.idl:
2145         * html/canvas/ArrayBuffer.idl:
2146         * html/canvas/DataView.idl:
2147         * html/canvas/Float32Array.idl:
2148         * html/canvas/Float64Array.idl:
2149         * html/canvas/Int16Array.idl:
2150         * html/canvas/Int32Array.idl:
2151         * html/canvas/Int8Array.idl:
2152         * html/canvas/Uint16Array.idl:
2153         * html/canvas/Uint32Array.idl:
2154         * html/canvas/Uint8Array.idl:
2155         * html/canvas/Uint8ClampedArray.idl:
2156         * page/EventSource.idl:
2157         * workers/DedicatedWorkerGlobalScope.idl:
2158         * workers/SharedWorkerGlobalScope.idl:
2159         * workers/WorkerGlobalScope.idl:
2160         * workers/WorkerLocation.idl:
2161         * xml/XMLHttpRequest.idl:
2162
2163 2013-06-27  Commit Queue  <commit-queue@webkit.org>
2164
2165         Unreviewed, rolling out r152074.
2166         http://trac.webkit.org/changeset/152074
2167         https://bugs.webkit.org/show_bug.cgi?id=118137
2168
2169         It caused lots of layout and API test crash on Qt Wk2.
2170         (Requested by kadam on #webkit).
2171
2172         * CMakeLists.txt:
2173         * Target.pri:
2174         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Removed.
2175         * platform/graphics/texmap/coordinated/CompositingCoordinator.h: Removed.
2176
2177 2013-06-27  Seokju Kwon  <seokju.kwon@gmail.com>
2178
2179         Avoid duplicating hostWindow() call in FrameView::setFrameRect()
2180         https://bugs.webkit.org/show_bug.cgi?id=118115
2181
2182         Reviewed by Christophe Dumez.
2183
2184         Remove a redundant call in FrameView::setFrameRect().
2185
2186         No function change, no tests.
2187
2188         * page/FrameView.cpp:
2189         (WebCore::FrameView::scheduleAnimation):
2190
2191 2013-06-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2192
2193         Fixing some compiler warnings
2194         https://bugs.webkit.org/show_bug.cgi?id=117791
2195
2196         Reviewed by Martin Robinson.
2197
2198         No new tests needed.
2199
2200         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2201         (webkitAccessibleTextGetTextForOffset): Fixed warning about
2202         uninitialized variable.
2203
2204 2013-06-27  Iago Toral Quiroga  <itoral@igalia.com>
2205
2206         Use consistent file names for WidgetBackingStoreGtkX11 class
2207         https://bugs.webkit.org/show_bug.cgi?id=118124
2208
2209         Reviewed by Carlos Garcia Campos.
2210
2211         * GNUmakefile.list.am:
2212         * PlatformGTK.cmake:
2213         * platform/gtk/GtkWidgetBackingStoreX11.cpp: Removed.
2214         * platform/gtk/GtkWidgetBackingStoreX11.h: Removed.
2215         * platform/gtk/WidgetBackingStoreGtkX11.cpp: Added.
2216         (WebCore::WidgetBackingStoreGtkX11::create):
2217         (WebCore::WidgetBackingStoreGtkX11::WidgetBackingStoreGtkX11):
2218         (WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11):
2219         (WebCore::WidgetBackingStoreGtkX11::cairoSurface):
2220         (WebCore::WidgetBackingStoreGtkX11::scroll):
2221         * platform/gtk/WidgetBackingStoreGtkX11.h: Added.
2222
2223 2013-06-27  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2224
2225         Buildfix for !ENABLE(SVG) builds.
2226
2227         Reviewed by Csaba Osztrogonác.
2228
2229         Moving RenderObject::hasAspectRatio() outside from ENABLE(SVG) guard.
2230
2231         * rendering/RenderObject.h:
2232         (WebCore::RenderObject::hasAspectRatio):
2233
2234 2013-06-27  Kangil Han  <kangil.han@samsung.com>
2235
2236         Adopt is/toHTMLLabelElement for code cleanup
2237         https://bugs.webkit.org/show_bug.cgi?id=118113
2238
2239         Reviewed by Andreas Kling.
2240
2241         To enhance readability, this patch adopts is/toHTMLLabelElement.
2242         This also helps out to reduce duplicated use of static_cast.
2243
2244         * accessibility/AXObjectCache.cpp:
2245         (WebCore::AXObjectCache::handleAttributeChanged):
2246         (WebCore::AXObjectCache::labelChanged):
2247         * accessibility/AccessibilityNodeObject.cpp:
2248         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2249         (WebCore::AccessibilityNodeObject::labelForElement):
2250         * accessibility/AccessibilityRenderObject.cpp:
2251         (WebCore::AccessibilityRenderObject::labelElementContainer):
2252         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2253         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2254         * dom/DocumentOrderedMap.cpp:
2255         (WebCore::keyMatchesLabelForAttribute):
2256         * dom/Element.cpp:
2257         (WebCore::Element::updateLabel):
2258         * dom/TreeScope.cpp:
2259         (WebCore::TreeScope::labelElementForId):
2260         * html/HTMLLabelElement.h:
2261         (WebCore::isHTMLLabelElement):
2262         (WebCore::toHTMLLabelElement):
2263         * html/LabelsNodeList.cpp:
2264         (WebCore::LabelsNodeList::nodeMatches):
2265
2266 2013-06-27  Peter Gal  <galpeter@inf.u-szeged.hu>
2267
2268         [curl] Fix unused variable/parameter warnings
2269         https://bugs.webkit.org/show_bug.cgi?id=118050
2270
2271         Reviewed by Christophe Dumez.
2272
2273         Commented out unused parameters and removed an unused variable in the curl backend.
2274
2275         No tests required.
2276
2277         * platform/network/curl/CredentialStorageCurl.cpp:
2278         (WebCore::CredentialStorage::getFromPersistentStorage):
2279         * platform/network/curl/DNSCurl.cpp:
2280         (WebCore::prefetchDNS):
2281         * platform/network/curl/ResourceHandleManager.cpp:
2282         (WebCore::curl_lock_callback):
2283         (WebCore::curl_unlock_callback):
2284         (WebCore::headerCallback):
2285         (WebCore::ResourceHandleManager::downloadTimerCallback):
2286
2287 2013-06-27  Csaba Osztrogonác  <ossy@webkit.org>
2288
2289         Fix cast-align warnings in WebCore/platform/graphics/cairo
2290         https://bugs.webkit.org/show_bug.cgi?id=117990
2291
2292         Reviewed by Rob Buis.
2293
2294         * platform/graphics/cairo/BitmapImageCairo.cpp:
2295         (WebCore::BitmapImage::checkForSolidColor):
2296         * platform/graphics/cairo/ImageBufferCairo.cpp:
2297         (WebCore::ImageBuffer::platformTransformColorSpace):
2298         (WebCore::getImageData):
2299         (WebCore::ImageBuffer::putByteArray):
2300
2301 2013-06-27  Szabolcs Dávid  <davidsz@inf.u-szeged.hu>
2302
2303         [curl] Add "set-cookie" to appendable headers
2304         https://bugs.webkit.org/show_bug.cgi?id=118061
2305
2306         Reviewed by Christophe Dumez.
2307
2308         Mark set-cookie as an appendable header.
2309
2310         * platform/network/curl/ResourceHandleManager.cpp:
2311         (WebCore::isAppendableHeader):
2312
2313 2013-06-27  Horia Iosif Olaru  <olaru@adobe.com>
2314
2315         Remove ENABLE_CSS_COMPOSITING guards around -webkit-background-blend mode related code. The same flag guards -webkit-blend-mode code, but those guards are not touched by this change.
2316
2317         https://bugs.webkit.org/show_bug.cgi?id=117619
2318
2319         Reviewed by Dean Jackson.
2320
2321         Test: css3/compositing/effect-background-blend-mode-tiled.html
2322
2323         * WebCore.exp.in:
2324         * bindings/generic/RuntimeEnabledFeatures.h:
2325         * css/CSSComputedStyleDeclaration.cpp:
2326         (WebCore::ComputedStyleExtractor::propertyValue):
2327         * css/CSSParser.cpp:
2328         (WebCore::CSSParser::parseValue):
2329         (WebCore::CSSParser::parseFillProperty):
2330         * css/CSSProperty.cpp:
2331         (WebCore::CSSProperty::isInheritedProperty):
2332         * css/CSSPropertyNames.in:
2333         * css/DeprecatedStyleBuilder.cpp:
2334         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2335
2336 2013-06-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2337
2338         Rename WorkerContext to WorkerGlobalScope
2339         https://bugs.webkit.org/show_bug.cgi?id=118059
2340
2341         Reviewed by Kentaro Hara.
2342
2343         Rename WorkerContext / SharedWorkerContext / DedicatedWorkerContext to
2344         WorkerGlobalScope / SharedWorkerGlobalScope / DedicatedWorkerGlobalScope
2345         to match the latest specification:
2346         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workerglobalscope
2347
2348         Those interfaces have [NoInterfaceObject] IDL extended attribute so the
2349         name did not matter much so far. However, the specification was updated
2350         and [NoInterfaceObject] was removed. We should therefore rename those
2351         interfaces as a preparation for this change.
2352
2353         No new tests, no behavior change as these interfaces are not exposed to
2354         JavaScript yet.
2355
2356         * CMakeLists.txt:
2357         * DerivedSources.cpp:
2358         * DerivedSources.make:
2359         * DerivedSources.pri:
2360         * GNUmakefile.am:
2361         * GNUmakefile.list.am:
2362         * Modules/filesystem/WorkerGlobalScopeFileSystem.cpp: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.cpp.
2363         (WebCore::WorkerGlobalScopeFileSystem::webkitRequestFileSystem):
2364         (WebCore::WorkerGlobalScopeFileSystem::webkitRequestFileSystemSync):
2365         (WebCore::WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemURL):
2366         (WebCore::WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemSyncURL):
2367         * Modules/filesystem/WorkerGlobalScopeFileSystem.h: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.h.
2368         * Modules/filesystem/WorkerGlobalScopeFileSystem.idl: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.idl.
2369         * Modules/indexeddb/IDBFactory.cpp:
2370         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.cpp.
2371         (WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
2372         (WebCore::WorkerGlobalScopeIndexedDatabase::~WorkerGlobalScopeIndexedDatabase):
2373         (WebCore::WorkerGlobalScopeIndexedDatabase::supplementName):
2374         (WebCore::WorkerGlobalScopeIndexedDatabase::from):
2375         (WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
2376         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.h.
2377         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.idl.
2378         * Modules/notifications/Notification.cpp:
2379         * Modules/notifications/NotificationCenter.cpp:
2380         * Modules/notifications/WorkerGlobalScopeNotifications.cpp: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.cpp.
2381         (WebCore::WorkerGlobalScopeNotifications::WorkerGlobalScopeNotifications):
2382         (WebCore::WorkerGlobalScopeNotifications::~WorkerGlobalScopeNotifications):
2383         (WebCore::WorkerGlobalScopeNotifications::supplementName):
2384         (WebCore::WorkerGlobalScopeNotifications::from):
2385         (WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
2386         * Modules/notifications/WorkerGlobalScopeNotifications.h: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.h.
2387         * Modules/notifications/WorkerGlobalScopeNotifications.idl: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.idl.
2388         * Modules/webdatabase/DatabaseContext.cpp:
2389         (WebCore::DatabaseContext::allowDatabaseAccess):
2390         (WebCore::DatabaseContext::databaseExceededQuota):
2391         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.cpp.
2392         (WebCore::WorkerGlobalScopeWebDatabase::openDatabase):
2393         (WebCore::WorkerGlobalScopeWebDatabase::openDatabaseSync):
2394         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.h.
2395         (WebCore::WorkerGlobalScopeWebDatabase::WorkerGlobalScopeWebDatabase):
2396         (WebCore::WorkerGlobalScopeWebDatabase::~WorkerGlobalScopeWebDatabase):
2397         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.idl.
2398         * Modules/websockets/ThreadableWebSocketChannel.cpp:
2399         (WebCore::ThreadableWebSocketChannel::create):
2400         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2401         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback):
2402         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2403         (WebCore::WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel):
2404         (WebCore::workerGlobalScopeDidSend):
2405         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
2406         (WebCore::workerGlobalScopeDidGetBufferedAmount):
2407         (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
2408         (WebCore::workerGlobalScopeDidConnect):
2409         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
2410         (WebCore::workerGlobalScopeDidReceiveMessage):
2411         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
2412         (WebCore::workerGlobalScopeDidReceiveBinaryData):
2413         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
2414         (WebCore::workerGlobalScopeDidUpdateBufferedAmount):
2415         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
2416         (WebCore::workerGlobalScopeDidStartClosingHandshake):
2417         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
2418         (WebCore::workerGlobalScopeDidClose):
2419         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
2420         (WebCore::workerGlobalScopeDidReceiveMessageError):
2421         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
2422         (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
2423         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create):
2424         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask):
2425         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask):
2426         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
2427         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
2428         (WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):
2429         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2430         (WebCore::WorkerThreadableWebSocketChannel::create):
2431         (WebCore::WorkerThreadableWebSocketChannel::Bridge::create):
2432         * Target.pri:
2433         * UseJSC.cmake:
2434         * WebCore.order:
2435         * WebCore.vcxproj/WebCore.vcxproj:
2436         * WebCore.vcxproj/WebCore.vcxproj.filters:
2437         * WebCore.xcodeproj/project.pbxproj:
2438         * bindings/cpp/WebDOMEventTarget.cpp:
2439         (toWebKit):
2440         * bindings/cpp/WebDOMEventTarget.h:
2441         * bindings/generic/ActiveDOMCallback.cpp:
2442         * bindings/js/DOMRequestState.h:
2443         (WebCore::DOMRequestState::DOMRequestState):
2444         * bindings/js/JSBindingsAllInOne.cpp:
2445         * bindings/js/JSDOMBinding.h:
2446         * bindings/js/JSDOMGlobalObject.cpp:
2447         (WebCore::JSDOMGlobalObject::scriptExecutionContext):
2448         (WebCore::toJSDOMGlobalObject):
2449         * bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSDedicatedWorkerContextCustom.cpp.
2450         (WebCore::JSDedicatedWorkerGlobalScope::postMessage):
2451         * bindings/js/JSEventListener.cpp:
2452         (WebCore::JSEventListener::handleEvent):
2453         * bindings/js/JSEventTargetCustom.cpp:
2454         (WebCore::toJS):
2455         * bindings/js/JSWorkerGlobalScopeBase.cpp: Renamed from Source/WebCore/bindings/js/JSWorkerContextBase.cpp.
2456         (WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
2457         (WebCore::JSWorkerGlobalScopeBase::finishCreation):
2458         (WebCore::JSWorkerGlobalScopeBase::destroy):
2459         (WebCore::JSWorkerGlobalScopeBase::scriptExecutionContext):
2460         (WebCore::toJS):
2461         (WebCore::toJSDedicatedWorkerGlobalScope):
2462         (WebCore::toJSSharedWorkerGlobalScope):
2463         (WebCore::toJSWorkerGlobalScope):
2464         * bindings/js/JSWorkerGlobalScopeBase.h: Renamed from Source/WebCore/bindings/js/JSWorkerContextBase.h.
2465         (WebCore::JSWorkerGlobalScopeBase::impl):
2466         (WebCore::JSWorkerGlobalScopeBase::createStructure):
2467         * bindings/js/JSWorkerGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWorkerContextCustom.cpp.
2468         (WebCore::JSWorkerGlobalScope::visitChildren):
2469         (WebCore::JSWorkerGlobalScope::getOwnPropertySlotDelegate):
2470         (WebCore::JSWorkerGlobalScope::getOwnPropertyDescriptorDelegate):
2471         (WebCore::JSWorkerGlobalScope::importScripts):
2472         (WebCore::JSWorkerGlobalScope::setTimeout):
2473         (WebCore::JSWorkerGlobalScope::setInterval):
2474         * bindings/js/ScheduledAction.cpp:
2475         (WebCore::ScheduledAction::execute):
2476         * bindings/js/ScheduledAction.h:
2477         * bindings/js/ScriptProfiler.cpp:
2478         (WebCore::ScriptProfiler::startForWorkerGlobalScope):
2479         (WebCore::ScriptProfiler::stopForWorkerGlobalScope):
2480         * bindings/js/ScriptProfiler.h:
2481         * bindings/js/ScriptState.cpp:
2482         (WebCore::scriptStateFromWorkerGlobalScope):
2483         * bindings/js/ScriptState.h:
2484         * bindings/js/WorkerScriptController.cpp:
2485         (WebCore::WorkerScriptController::WorkerScriptController):
2486         (WebCore::WorkerScriptController::~WorkerScriptController):
2487         (WebCore::WorkerScriptController::initScript):
2488         (WebCore::WorkerScriptController::evaluate):
2489         (WebCore::WorkerScriptController::setException):
2490         (WebCore::WorkerScriptController::forbidExecution):
2491         (WebCore::WorkerScriptController::isExecutionForbidden):
2492         (WebCore::WorkerScriptController::disableEval):
2493         (WebCore::WorkerScriptController::attachDebugger):
2494         (WebCore::WorkerScriptController::detachDebugger):
2495         * bindings/js/WorkerScriptController.h:
2496         (WebCore::WorkerScriptController::workerGlobalScopeWrapper):
2497         (WebCore::WorkerScriptController::initScriptIfNeeded):
2498         * bindings/js/WorkerScriptDebugServer.cpp:
2499         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
2500         (WebCore::WorkerScriptDebugServer::addListener):
2501         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
2502         (WebCore::WorkerScriptDebugServer::removeListener):
2503         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
2504         * bindings/js/WorkerScriptDebugServer.h:
2505         * bindings/scripts/CodeGeneratorJS.pm:
2506         (GenerateHeader):
2507         (GenerateImplementation):
2508         * bindings/scripts/IDLAttributes.txt:
2509         * bindings/scripts/preprocess-idls.pl:
2510         * dom/ActiveDOMObject.cpp:
2511         * dom/EventTarget.h:
2512         * dom/EventTargetFactory.in:
2513         * dom/MessagePort.cpp:
2514         (WebCore::MessagePort::dispatchMessages):
2515         * dom/ScriptExecutionContext.cpp:
2516         (WebCore::ScriptExecutionContext::createdMessagePort):
2517         (WebCore::ScriptExecutionContext::destroyedMessagePort):
2518         (WebCore::ScriptExecutionContext::vm):
2519         * dom/ScriptExecutionContext.h:
2520         (WebCore::ScriptExecutionContext::isWorkerGlobalScope):
2521         * inspector/InjectedScriptManager.cpp:
2522         (WebCore::InjectedScriptManager::createForWorker):
2523         (WebCore::InjectedScriptManager::canAccessInspectedWorkerGlobalScope):
2524         * inspector/InjectedScriptManager.h:
2525         * inspector/InspectorConsoleInstrumentation.h:
2526         (WebCore::InspectorInstrumentation::addMessageToConsole):
2527         * inspector/InspectorInstrumentation.cpp:
2528         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScopeImpl):
2529         (WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
2530         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminatedImpl):
2531         (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
2532         (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
2533         * inspector/InspectorInstrumentation.h:
2534         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
2535         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
2536         * inspector/InspectorProfilerAgent.cpp:
2537         (WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
2538         (WebCore::WorkerProfilerAgent::startProfiling):
2539         (WebCore::WorkerProfilerAgent::stopProfiling):
2540         (WebCore::InspectorProfilerAgent::create):
2541         * inspector/InspectorProfilerAgent.h:
2542         * inspector/InspectorRuntimeAgent.h:
2543         * inspector/InspectorWorkerAgent.cpp:
2544         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
2545         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel):
2546         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::proxy):
2547         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::connectToWorkerGlobalScope):
2548         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::disconnectFromWorkerGlobalScope):
2549         (WebCore::InspectorWorkerAgent::connectToWorker):
2550         (WebCore::InspectorWorkerAgent::disconnectFromWorker):
2551         (WebCore::InspectorWorkerAgent::didStartWorkerGlobalScope):
2552         (WebCore::InspectorWorkerAgent::workerGlobalScopeTerminated):
2553         (WebCore::InspectorWorkerAgent::destroyWorkerFrontendChannels):
2554         (WebCore::InspectorWorkerAgent::createWorkerFrontendChannel):
2555         * inspector/InspectorWorkerAgent.h:
2556         * inspector/InstrumentingAgents.cpp:
2557         (WebCore::instrumentationForWorkerGlobalScope):
2558         * inspector/InstrumentingAgents.h:
2559         * inspector/WorkerDebuggerAgent.cpp:
2560         (WebCore::WorkerDebuggerAgent::create):
2561         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
2562         (WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
2563         (WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
2564         (WebCore::WorkerDebuggerAgent::injectedScriptForEval):
2565         * inspector/WorkerDebuggerAgent.h:
2566         * inspector/WorkerInspectorController.cpp:
2567         (WebCore::WorkerInspectorController::WorkerInspectorController):
2568         (WebCore::WorkerInspectorController::connectFrontend):
2569         * inspector/WorkerInspectorController.h:
2570         * inspector/WorkerRuntimeAgent.cpp:
2571         (WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
2572         (WebCore::WorkerRuntimeAgent::injectedScriptForEval):
2573         (WebCore::WorkerRuntimeAgent::pauseWorkerGlobalScope):
2574         * inspector/WorkerRuntimeAgent.h:
2575         (WebCore::WorkerRuntimeAgent::create):
2576         * loader/ThreadableLoader.cpp:
2577         (WebCore::ThreadableLoader::create):
2578         (WebCore::ThreadableLoader::loadResourceSynchronously):
2579         * loader/WorkerThreadableLoader.cpp:
2580         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
2581         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
2582         (WebCore::workerGlobalScopeDidSendData):
2583         (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
2584         (WebCore::workerGlobalScopeDidReceiveResponse):
2585         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
2586         (WebCore::workerGlobalScopeDidReceiveData):
2587         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
2588         (WebCore::workerGlobalScopeDidFinishLoading):
2589         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
2590         (WebCore::workerGlobalScopeDidFail):
2591         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
2592         (WebCore::workerGlobalScopeDidFailAccessControlCheck):
2593         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
2594         (WebCore::workerGlobalScopeDidFailRedirectCheck):
2595         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
2596         * loader/WorkerThreadableLoader.h:
2597         (WebCore::WorkerThreadableLoader::create):
2598         * loader/cache/MemoryCache.cpp:
2599         (WebCore::MemoryCache::removeRequestFromCache):
2600         * platform/blackberry/LocalFileSystemBlackBerry.cpp:
2601         (WebCore::openFileSystem):
2602         (WebCore::LocalFileSystem::deleteFileSystem):
2603         * platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp:
2604         (WebCore::WorkerAsyncFileSystemBlackBerry::WorkerAsyncFileSystemBlackBerry):
2605         (WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystem):
2606         (WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystem):
2607         * platform/blackberry/WorkerAsyncFileSystemBlackBerry.h:
2608         (WebCore::WorkerAsyncFileSystemBlackBerry::create):
2609         * platform/blackberry/WorkerAsyncFileWriterBlackBerry.h:
2610         * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp:
2611         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::postTaskToWorkerThread):
2612         * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h:
2613         * platform/blackberry/WorkerPlatformFileWriterClient.cpp:
2614         (WebCore::WorkerPlatformFileWriterClient::postTaskToWorkerThreadIfNeeded):
2615         * platform/blackberry/WorkerPlatformFileWriterClient.h:
2616         * workers/DedicatedWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/DedicatedWorkerContext.cpp.
2617         (WebCore::DedicatedWorkerGlobalScope::create):
2618         (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
2619         (WebCore::DedicatedWorkerGlobalScope::~DedicatedWorkerGlobalScope):
2620         (WebCore::DedicatedWorkerGlobalScope::interfaceName):
2621         (WebCore::DedicatedWorkerGlobalScope::postMessage):
2622         (WebCore::DedicatedWorkerGlobalScope::importScripts):
2623         (WebCore::DedicatedWorkerGlobalScope::thread):
2624         * workers/DedicatedWorkerGlobalScope.h: Renamed from Source/WebCore/workers/DedicatedWorkerContext.h.
2625         * workers/DedicatedWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/DedicatedWorkerContext.idl.
2626         * workers/DedicatedWorkerThread.cpp:
2627         (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
2628         (WebCore::DedicatedWorkerThread::runEventLoop):
2629         * workers/DedicatedWorkerThread.h:
2630         * workers/DefaultSharedWorkerRepository.cpp:
2631         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
2632         (WebCore::SharedWorkerProxy::workerGlobalScopeClosed):
2633         (WebCore::SharedWorkerProxy::workerGlobalScopeDestroyed):
2634         (WebCore::SharedWorkerConnectTask::performTask):
2635         (WebCore::SharedWorkerScriptLoader::notifyFinished):
2636         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
2637         * workers/SharedWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/SharedWorkerContext.cpp.
2638         (WebCore::createConnectEvent):
2639         (WebCore::SharedWorkerGlobalScope::create):
2640         (WebCore::SharedWorkerGlobalScope::SharedWorkerGlobalScope):
2641         (WebCore::SharedWorkerGlobalScope::~SharedWorkerGlobalScope):
2642         (WebCore::SharedWorkerGlobalScope::interfaceName):
2643         (WebCore::SharedWorkerGlobalScope::thread):
2644         (WebCore::SharedWorkerGlobalScope::logExceptionToConsole):
2645         * workers/SharedWorkerGlobalScope.h: Renamed from Source/WebCore/workers/SharedWorkerContext.h.
2646         (WebCore::SharedWorkerGlobalScope::name):
2647         * workers/SharedWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/SharedWorkerContext.idl.
2648         * workers/SharedWorkerThread.cpp:
2649         (WebCore::SharedWorkerThread::createWorkerGlobalScope):
2650         * workers/SharedWorkerThread.h:
2651         * workers/Worker.cpp:
2652         (WebCore::Worker::Worker):
2653         (WebCore::Worker::postMessage):
2654         (WebCore::Worker::terminate):
2655         (WebCore::Worker::notifyFinished):
2656         * workers/Worker.h:
2657         * workers/WorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/WorkerContext.cpp.
2658         (WebCore::CloseWorkerGlobalScopeTask::create):
2659         (WebCore::CloseWorkerGlobalScopeTask::performTask):
2660         (WebCore::CloseWorkerGlobalScopeTask::isCleanupTask):
2661         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
2662         (WebCore::WorkerGlobalScope::~WorkerGlobalScope):
2663         (WebCore::WorkerGlobalScope::applyContentSecurityPolicyFromString):
2664         (WebCore::WorkerGlobalScope::scriptExecutionContext):
2665         (WebCore::WorkerGlobalScope::virtualURL):
2666         (WebCore::WorkerGlobalScope::virtualCompleteURL):
2667         (WebCore::WorkerGlobalScope::completeURL):
2668         (WebCore::WorkerGlobalScope::userAgent):
2669         (WebCore::WorkerGlobalScope::disableEval):
2670         (WebCore::WorkerGlobalScope::location):
2671         (WebCore::WorkerGlobalScope::close):
2672         (WebCore::WorkerGlobalScope::navigator):
2673         (WebCore::WorkerGlobalScope::hasPendingActivity):
2674         (WebCore::WorkerGlobalScope::postTask):
2675         (WebCore::WorkerGlobalScope::setTimeout):
2676         (WebCore::WorkerGlobalScope::clearTimeout):
2677         (WebCore::WorkerGlobalScope::clearInspector):
2678         (WebCore::WorkerGlobalScope::setInterval):
2679         (WebCore::WorkerGlobalScope::clearInterval):
2680         (WebCore::WorkerGlobalScope::importScripts):
2681         (WebCore::WorkerGlobalScope::errorEventTarget):
2682         (WebCore::WorkerGlobalScope::logExceptionToConsole):
2683         (WebCore::WorkerGlobalScope::addConsoleMessage):
2684         (WebCore::WorkerGlobalScope::addMessage):
2685         (WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
2686         (WebCore::WorkerGlobalScope::isContextThread):
2687         (WebCore::WorkerGlobalScope::isJSExecutionForbidden):
2688         (WebCore::WorkerGlobalScope::eventTargetData):
2689         (WebCore::WorkerGlobalScope::ensureEventTargetData):
2690         (WebCore::WorkerGlobalScope::Observer::Observer):
2691         (WebCore::WorkerGlobalScope::Observer::~Observer):
2692         (WebCore::WorkerGlobalScope::Observer::stopObserving):
2693         (WebCore::WorkerGlobalScope::registerObserver):
2694         (WebCore::WorkerGlobalScope::unregisterObserver):
2695         (WebCore::WorkerGlobalScope::notifyObserversOfStop):
2696         (WebCore::WorkerGlobalScope::eventQueue):
2697         * workers/WorkerGlobalScope.h: Renamed from Source/WebCore/workers/WorkerContext.h.
2698         (WebCore::WorkerGlobalScope::isSharedWorkerGlobalScope):
2699         (WebCore::WorkerGlobalScope::isDedicatedWorkerGlobalScope):
2700         (WebCore::WorkerGlobalScope::url):
2701         (WebCore::WorkerGlobalScope::groupSettings):
2702         (WebCore::WorkerGlobalScope::script):
2703         (WebCore::WorkerGlobalScope::clearScript):
2704         (WebCore::WorkerGlobalScope::thread):
2705         (WebCore::WorkerGlobalScope::self):
2706         (WebCore::WorkerGlobalScope::workerInspectorController):
2707         (WebCore::WorkerGlobalScope::optionalNavigator):
2708         (WebCore::WorkerGlobalScope::optionalLocation):
2709         (WebCore::WorkerGlobalScope::isClosing):
2710         * workers/WorkerGlobalScope.idl: Renamed from Source/WebCore/workers/WorkerContext.idl.
2711         * workers/WorkerGlobalScopeProxy.h: Renamed from Source/WebCore/workers/WorkerContextProxy.h.
2712         (WebCore::WorkerGlobalScopeProxy::~WorkerGlobalScopeProxy):
2713         (WebCore::WorkerGlobalScopeProxy::PageInspector::~PageInspector):
2714         (WebCore::WorkerGlobalScopeProxy::connectToInspector):
2715         (WebCore::WorkerGlobalScopeProxy::disconnectFromInspector):
2716         (WebCore::WorkerGlobalScopeProxy::sendMessageToInspector):
2717         * workers/WorkerLoaderProxy.h:
2718         * workers/WorkerMessagingProxy.cpp:
2719         (WebCore::MessageWorkerGlobalScopeTask::create):
2720         (WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask):
2721         (WebCore::MessageWorkerGlobalScopeTask::performTask):
2722         (WebCore::WorkerGlobalScopeDestroyedTask::create):
2723         (WebCore::WorkerGlobalScopeDestroyedTask::WorkerGlobalScopeDestroyedTask):
2724         (WebCore::WorkerGlobalScopeDestroyedTask::performTask):
2725         (WebCore::WorkerTerminateTask::performTask):
2726         (WebCore::PostMessageToPageInspectorTask::performTask):
2727         (WebCore::WorkerGlobalScopeProxy::create):
2728         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
2729         (WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
2730         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
2731         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
2732         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
2733         (WebCore::WorkerMessagingProxy::workerObjectDestroyedInternal):
2734         (WebCore::connectToWorkerGlobalScopeInspectorTask):
2735         (WebCore::WorkerMessagingProxy::connectToInspector):
2736         (WebCore::disconnectFromWorkerGlobalScopeInspectorTask):
2737         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
2738         (WebCore::dispatchOnInspectorBackendTask):
2739         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
2740         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
2741         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyedInternal):
2742         (WebCore::WorkerMessagingProxy::terminateWorkerGlobalScope):
2743         * workers/WorkerMessagingProxy.h:
2744         * workers/WorkerObjectProxy.h:
2745         * workers/WorkerReportingProxy.h:
2746         * workers/WorkerRunLoop.cpp:
2747         (WebCore::WorkerRunLoop::run):
2748         (WebCore::WorkerRunLoop::runInMode):
2749         (WebCore::WorkerRunLoop::runCleanupTasks):
2750         (WebCore::WorkerRunLoop::Task::performTask):
2751         * workers/WorkerRunLoop.h:
2752         * workers/WorkerScriptLoader.cpp:
2753         (WebCore::WorkerScriptLoader::loadSynchronously):
2754         * workers/WorkerThread.cpp:
2755         (WebCore::WorkerThread::workerThread):
2756         (WebCore::WorkerThread::runEventLoop):
2757         (WebCore::WorkerThreadShutdownFinishTask::performTask):
2758         (WebCore::WorkerThreadShutdownStartTask::performTask):
2759         (WebCore::WorkerThread::stop):
2760         * workers/WorkerThread.h:
2761         (WebCore::WorkerThread::workerGlobalScope):
2762         * xml/XMLHttpRequest.cpp:
2763         (WebCore::XMLHttpRequest::usesDashboardBackwardCompatibilityMode):
2764         (WebCore::XMLHttpRequest::responseXML):
2765
2766 2013-06-26  Sanjoy Pal  <sanjoy.pal@samsung.com>
2767
2768         Avoid redundant checks for Compositing reasons in RenderLayerCompositor
2769         https://bugs.webkit.org/show_bug.cgi?id=118114
2770
2771         Reviewed by Anders Carlsson.
2772
2773         A RenderObject can be any one of the Video, Canvas, Plugin or Iframe.
2774         Hence removing the redundant checks.
2775
2776         No new tests as no functionality change.
2777
2778         * rendering/RenderLayerCompositor.cpp:
2779         (WebCore::RenderLayerCompositor::reasonsForCompositing):
2780
2781 2013-06-26  Gwang Yoon Hwang  <ryumiel@company100.net>
2782
2783         Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
2784         https://bugs.webkit.org/show_bug.cgi?id=104360
2785
2786         Reviewed by Noam Rosenthal.
2787
2788         The CoordinatedLayerTreeHost has too many responsibilities. It
2789         implements LayerTreeHost, GraphicsLayerClient,
2790         CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
2791         UpdateAtlas::Client, GraphicsLayerFactory and
2792         WebCustomFilterProgramProxyClient.
2793
2794         This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.
2795
2796         This patch introduces a new class called CompositingCoordinator, which
2797         takes the responsibility of managing compositing resources in
2798         WebProcess.
2799
2800         CoordinatedLayerTreeHost is responsible only for the scheduling and
2801         IPC-specific stuff, which are relevant only for WebKit2.
2802
2803         No new tests, covered by existing tests.
2804
2805         * CMakeLists.txt:
2806         * Target.pri:
2807         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Added.
2808         (WebCore::CompositingCoordinator::create):
2809         (WebCore::CompositingCoordinator::~CompositingCoordinator):
2810         (WebCore::CompositingCoordinator::CompositingCoordinator):
2811         (WebCore::CompositingCoordinator::setRootCompositingLayer):
2812         (WebCore::CompositingCoordinator::sizeDidChange):
2813         (WebCore::CompositingCoordinator::flushPendingLayerChanges):
2814         (WebCore::CompositingCoordinator::syncDisplayState):
2815         (WebCore::CompositingCoordinator::nextAnimationServiceTime):
2816         (WebCore::CompositingCoordinator::clearPendingStateChanges):
2817         (WebCore::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
2818         (WebCore::CompositingCoordinator::createRootLayer):
2819         (WebCore::CompositingCoordinator::syncLayerState):
2820         (WebCore::CompositingCoordinator::createImageBackingIfNeeded):
2821         (WebCore::CompositingCoordinator::createImageBacking):
2822         (WebCore::CompositingCoordinator::updateImageBacking):
2823         (WebCore::CompositingCoordinator::clearImageBackingContents):
2824         (WebCore::CompositingCoordinator::removeImageBacking):
2825         (WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
2826         (WebCore::CompositingCoordinator::notifyAnimationStarted):
2827         (WebCore::CompositingCoordinator::notifyFlushRequired):
2828         (WebCore::CompositingCoordinator::paintContents):
2829         (WebCore::CompositingCoordinator::createGraphicsLayer):
2830         (WebCore::CompositingCoordinator::deviceScaleFactor):
2831         (WebCore::CompositingCoordinator::pageScaleFactor):
2832         (WebCore::CompositingCoordinator::createUpdateAtlas):
2833         (WebCore::CompositingCoordinator::removeUpdateAtlas):
2834         (WebCore::CompositingCoordinator::visibleContentsRect):
2835         (WebCore::CompositingCoordinator::mainContentsLayer):
2836         (WebCore::CompositingCoordinator::setVisibleContentsRect):
2837         (WebCore::CompositingCoordinator::deviceOrPageScaleFactorChanged):
2838         (WebCore::CompositingCoordinator::detachLayer):
2839         (WebCore::CompositingCoordinator::commitScrollOffset):
2840         (WebCore::CompositingCoordinator::renderNextFrame):
2841         (WebCore::CompositingCoordinator::purgeBackingStores):
2842         (WebCore::CompositingCoordinator::paintToSurface):
2843         (WebCore::CompositingCoordinator::scheduleReleaseInactiveAtlases):
2844         (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
2845         * platform/graphics/texmap/coordinated/CompositingCoordinator.h: Added.
2846         (WebCore::CompositingCoordinator::clearRootLayer):
2847         (WebCore::CompositingCoordinator::rootLayer):
2848         (WebCore::CompositingCoordinator::state):
2849
2850 2013-06-26  Kihong Kwon  <kihong.kwon@samsung.com>
2851
2852         Vibration cannot be canceled during pattern vibration.
2853         https://bugs.webkit.org/show_bug.cgi?id=117822
2854
2855         Reviewed by Gyuyoung Kim.
2856
2857         Vibration can not cancel during pattern vibration is working. If resting time which are
2858         even numbers of pattern m_isVibraing will be false and cancel will thus return early.
2859         In addition, m_timerStart needs to be stopped in the cancelVibration().
2860         If cancelVibration() is called right after m_timerStart is fired, timerStartFired
2861         function can be called even if vibration is already canceled because of timing issue of timer.
2862
2863         Test: vibration/cancelVibration-during-pattern-vibrating.html
2864
2865         * Modules/vibration/Vibration.cpp:
2866         (WebCore::Vibration::vibrate):
2867         (WebCore::Vibration::cancelVibration):
2868         (WebCore::Vibration::suspendVibration):
2869         (WebCore::Vibration::resumeVibration):
2870         (WebCore::Vibration::stopVibration):
2871         (WebCore::Vibration::timerStartFired):
2872         (WebCore::Vibration::timerStopFired):
2873         * Modules/vibration/Vibration.h:
2874
2875 2013-06-26  Anders Carlsson  <andersca@apple.com>
2876
2877         Deprecate StringImpl::charactersWithNullTermination
2878         https://bugs.webkit.org/show_bug.cgi?id=118108
2879
2880         Reviewed by Beth Dakin.
2881
2882         Rename calls to charactersWithNullTermination to deprecatedCharactersWithNullTermination.
2883
2884         * html/canvas/WebGLProgram.cpp:
2885         (WebCore::WebGLProgram::cacheActiveAttribLocations):
2886         * platform/graphics/win/FontCacheWin.cpp:
2887         (WebCore::getLinkedFonts):
2888         * platform/graphics/win/FontCustomPlatformData.cpp:
2889         (WebCore::FontCustomPlatformData::fontPlatformData):
2890         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2891         (WebCore::FontCustomPlatformData::fontPlatformData):
2892         * platform/graphics/win/IconWin.cpp:
2893         (WebCore::Icon::createIconForFiles):
2894         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2895         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
2896         * platform/graphics/wince/FontPlatformData.cpp:
2897         (WebCore::FontPlatformData::FontPlatformData):
2898         * platform/network/curl/CurlDownload.cpp:
2899         (CurlDownload::moveFileToDestination):
2900         * platform/network/win/CookieJarWin.cpp:
2901         (WebCore::setCookiesFromDOM):
2902         (WebCore::cookiesForDOM):
2903         * platform/network/win/DownloadBundleWin.cpp:
2904         (WebCore::DownloadBundle::appendResumeData):
2905         (WebCore::DownloadBundle::extractResumeData):
2906         * platform/network/win/ResourceHandleWin.cpp:
2907         (WebCore::createInternetHandle):
2908         (WebCore::ResourceHandle::start):
2909         (WebCore::ResourceHandle::fileLoadTimer):
2910         * platform/sql/SQLiteFileSystem.cpp:
2911         (WebCore::SQLiteFileSystem::openDatabase):
2912         * platform/sql/SQLiteStatement.cpp:
2913         (WebCore::SQLiteStatement::prepare):
2914         * platform/text/win/LocaleWin.cpp:
2915         (WebCore::LCIDFromLocaleInternal):
2916         * platform/text/win/TextCodecWin.cpp:
2917         (WebCore::TextCodecWin::enumerateSupportedEncodings):
2918         * platform/win/ClipboardUtilitiesWin.cpp:
2919         (WebCore::getWebLocData):
2920         (WebCore::createGlobalData):
2921         (WebCore::setFileDescriptorData):
2922         (WebCore::getURL):
2923         (WebCore::setCFData):
2924         * platform/win/ContextMenuWin.cpp:
2925         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
2926         * platform/win/DragImageWin.cpp:
2927         (WebCore::createDragImageIconForCachedImageFilename):
2928         * platform/win/FileSystemWin.cpp:
2929         (WebCore::getFindData):
2930         (WebCore::deleteFile):
2931         (WebCore::deleteEmptyDirectory):
2932         (WebCore::pathByAppendingComponent):
2933         (WebCore::makeAllDirectories):
2934         (WebCore::pathGetFileName):
2935         (WebCore::openTemporaryFile):
2936         (WebCore::openFile):
2937         * platform/win/MIMETypeRegistryWin.cpp:
2938         (WebCore::mimeTypeForExtension):
2939         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
2940         * platform/win/PasteboardWin.cpp:
2941         (WebCore::createGlobalImageFileDescriptor):
2942         (WebCore::createGlobalHDropContent):
2943         * platform/win/PathWalker.cpp:
2944         (WebCore::PathWalker::PathWalker):
2945         * platform/win/SSLKeyGeneratorWin.cpp:
2946         (WebCore::WebCore::signedPublicKeyAndChallengeString):
2947         * platform/win/SharedBufferWin.cpp:
2948         (WebCore::SharedBuffer::createWithContentsOfFile):
2949         * platform/wince/FileSystemWinCE.cpp:
2950         (WebCore::getFileInfo):
2951         (WebCore::fileExists):
2952         (WebCore::deleteFile):
2953         (WebCore::deleteEmptyDirectory):
2954         (WebCore::makeAllDirectories):
2955         (WebCore::openTemporaryFile):
2956         (WebCore::openFile):
2957         * plugins/win/PluginDatabaseWin.cpp:
2958         (WebCore::PluginDatabase::getPluginPathsInDirectories):
2959         (WebCore::addMozillaPluginDirectories):
2960         (WebCore::addAdobeAcrobatPluginDirectory):
2961         (WebCore::addJavaPluginDirectory):
2962         * plugins/win/PluginPackageWin.cpp:
2963         (WebCore::getVersionInfo):
2964         (WebCore::PluginPackage::fetchInfo):
2965         (WebCore::PluginPackage::load):
2966         * plugins/win/PluginViewWin.cpp:
2967         (WebCore::PluginView::handlePostReadFile):
2968
2969 2013-06-26  Roger Fong  <roger_fong@apple.com>
2970
2971         Add an accessibility delegate interface to AppleWin port.
2972         https://bugs.webkit.org/show_bug.cgi?id=118094.
2973
2974         Reviewed by Brent Fulgham.
2975
2976         * accessibility/win/AXObjectCacheWin.cpp: We call the page client's AXStartFrameLoad and AXFinishFrameLoad methods here, which will in turn call the AccessibilityDelegate's callbacks.
2977         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
2978         * loader/EmptyClients.h:
2979         (WebCore::EmptyChromeClient::AXStartFrameLoad):
2980         (WebCore::EmptyChromeClient::AXFinishFrameLoad):
2981         * page/ChromeClient.h:
2982
2983 2013-06-26  Jer Noble  <jer.noble@apple.com>
2984
2985         Potential use-after-free after neutering AudioBuffer's underlying ArrayBuffer.
2986         https://bugs.webkit.org/show_bug.cgi?id=118040
2987
2988         Reviewed by Filip Pizlo.
2989
2990         Test: webaudio/audiobuffer-neuter.html
2991
2992         When creating an AudioBuffer's backing ArrayBufferView objects, mark them as 'unneuterable',
2993         meaning the underlying data will be copied in a neuter scenario rather than transferred. This
2994         means the underlying assumtions of the webaudio code can continue to assume that the memory
2995         areas owned by the ArrayBufferView will be present until the AudioBuffer is itself destroyed.
2996
2997         In order to not expose the 'unneuterable' behavior to JavaScript, return a fresh Float32Array
2998         wrapper around the ArrayBuffer object, rather than our own.
2999
3000         * Modules/webaudio/AudioBuffer.cpp:
3001         (WebCore::AudioBuffer::AudioBuffer): Mark the newly created channels as not neuterable.
3002         (WebCore::AudioBuffer::getChannelData): Return a new Float32Array object rather than a pointer to our own.
3003         * Modules/webaudio/AudioBuffer.h:
3004
3005 2013-06-26  Brent Fulgham  <bfulgham@apple.com>
3006
3007         [Windows] Unreviewed build correction after r152035.
3008
3009         * page/CaptionUserPreferencesMediaAF.cpp: Don't attempt to include CoreText.h
3010           if we do not have MediaAccessibility Framework.
3011
3012 2013-06-26  Brent Fulgham  <bfulgham@apple.com>
3013
3014         [Windows] Enable CaptionUserPreferencesMediaAF on Windows.
3015         https://bugs.webkit.org/show_bug.cgi?id=118076
3016
3017         Reviewed by Eric Carlson.
3018
3019         * WebCore.vcxproj/WebCore.vcxproj: Enable building the CaptionUserPreferencesMediaAF source file.
3020         * page/CaptionUserPreferencesMediaAF.cpp: Add soft-link commands for CoreText symbols needed in
3021           the implementation for Windows.
3022         * platform/LocalizedStrings.cpp: Enable Text Track-related strings on Windows.
3023         * platform/LocalizedStrings.h: Ditto.
3024
3025 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
3026
3027         Speed up SVG sprites by only painting the source rect in SVGImage::draw
3028         https://bugs.webkit.org/show_bug.cgi?id=118070
3029
3030         Reviewed by Tim Horton.
3031
3032         Merge https://chromium.googlesource.com/chromium/blink/+/d359ab67fdd76a877d666dca91c311505dd27bbf.
3033
3034         * svg/graphics/SVGImage.cpp:
3035         (WebCore::SVGImage::draw):
3036
3037 2013-06-26  David Kilzer  <ddkilzer@apple.com>
3038
3039         BUILD FIX (r151981): Include HTMLAudioElement.h for ENABLE(PLUGIN_PROXY_FOR_VIDEO)
3040
3041         * css/StyleResolver.cpp:
3042         - Include HTMLAudioElement.h.
3043         - Sort headers.
3044         * rendering/RenderLayerCompositor.cpp:
3045         - Include HTMLAudioElement.h.
3046
3047 2013-06-26  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
3048
3049         getComputedStyle().width wrong after text changed
3050         https://bugs.webkit.org/show_bug.cgi?id=106611
3051
3052         Reviewed by Dean Jackson.
3053
3054         When a new RenderText is created, NodeRenderingContext::createRendererForTextIfNeeded() sets a style to the RenderText.
3055         If a font in the new style needs transcode (e.g. Meiryo), styleDidChange() calls transformText().
3056         It sets a preferredLogicalWidthsDirty flag.
3057         After that, createRendererForTextIfNeeded() inserts the RenderText to its parent renderer.
3058         However, RenderObjectChildList::insertChildNode() doesn't set a preferredLogicalWidthsDirty flag of owner
3059         because a preferredLogicalWidthsDirty flag of the RenderText is already true.
3060
3061         Inserting new child should always sets a preferredLogicalWidthsDirty flag.
3062         Therefore, this patch called setPreferredLogicalWidthsDirty() of owner.
3063
3064         Test: fast/dynamic/empty-absolute-innerhtml-transcoding-text.html
3065
3066         * rendering/RenderObjectChildList.cpp:
3067         (WebCore::RenderObjectChildList::insertChildNode):
3068
3069 2013-06-26  Brent Fulgham  <bfulgham@apple.com>
3070
3071         Prepare CaptionUserPreferencesMac for use on Windows port.
3072         https://bugs.webkit.org/show_bug.cgi?id=118069
3073
3074         Reviewed by Eric Carlson.
3075
3076         * WebCore.vcxproj/WebCore.vcxproj: Add new files.
3077         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3078         * WebCore.xcodeproj/project.pbxproj: Update for new file name.
3079         * page/CaptionUserPreferencesMac.h: Removed.
3080         * page/CaptionUserPreferencesMac.mm: Removed.
3081         * page/CaptionUserPreferencesMediaAF.cpp: Copied from page/CaptionUserPreferencesMac.mm.
3082         * page/CaptionUserPreferencesMediaAF.h: Copied from page/CaptionUserPreferencesMac.h.
3083         * page/PageGroup.cpp:
3084         (WebCore::PageGroup::captionPreferences): Updated to new class name.
3085
3086 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
3087
3088         Remove unneccesary cast to Node* in MediaControlTextTrackContainerElement::updateDisplay
3089         https://bugs.webkit.org/show_bug.cgi?id=118020
3090
3091         Reviewed by Christophe Dumez.
3092
3093         Merge https://chromium.googlesource.com/chromium/blink/+/2de89f61bb316f5e166b45ce71bb2b293dbf575d
3094
3095         TextTrackCue is a Node, there's no reason to static_cast from it to Node*.
3096
3097         * html/shadow/MediaControlElements.cpp:
3098         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
3099
3100 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
3101
3102         RenderBox::hasRenderOverflow should return bool instead of RenderOverflow*
3103         https://bugs.webkit.org/show_bug.cgi?id=118041
3104
3105         Reviewed by Christophe Dumez.
3106
3107         Merge https://chromium.googlesource.com/chromium/blink/+/1683b58c855b745463acbf18086e32279db5000f.
3108
3109         * rendering/RenderBox.h:
3110         (WebCore::RenderBox::hasRenderOverflow):
3111         (WebCore::RenderBox::hasHorizontalLayoutOverflow):
3112         (WebCore::RenderBox::hasVerticalLayoutOverflow):
3113
3114 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
3115
3116         Remove unneeded static_casts from SelectorChecker
3117         https://bugs.webkit.org/show_bug.cgi?id=118018
3118
3119         Reviewed by Christophe Dumez.
3120
3121         Merge https://chromium.googlesource.com/chromium/blink/+/adc5b8bec2d8c6a857b3c930ca7484f76cad1367
3122
3123         SelectorChecker::checkOne casts to StyledElement just to call classNames, but
3124         this method is on Element so there's no reason for this. The cast here also
3125         looks pretty suspect. The method also casts to HTMLFrameElementBase to call
3126         containsFullScreenElement which is also on Element so the cast can be removed.
3127
3128         * css/SelectorChecker.cpp:
3129         (WebCore::SelectorChecker::checkOne):
3130
3131 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
3132
3133         Set Attr.ownerDocument in Element#setAttributeNode()
3134         https://bugs.webkit.org/show_bug.cgi?id=118031
3135
3136         Reviewed by Andreas Kling.
3137
3138         Merge https://chromium.googlesource.com/chromium/blink/+/fa739fe5369f55bbdcb3fa123cb64df36b8ae414.
3139
3140         Adopt Attr node as needed.
3141
3142         Test: fast/dom/Attr/set-attribute-node-from-iframe.html
3143
3144         * dom/Element.cpp:
3145         (WebCore::Element::setAttributeNode):
3146
3147 2013-06-25  David Hyatt  <hyatt@apple.com>
3148
3149         Flex boxes (both old and new) don't handle max-height images correctly.
3150         https://bugs.webkit.org/show_bug.cgi?id=118000
3151
3152         Reviewed by Beth Dakin.
3153
3154         Tests: css3/flexbox/image-percent-max-height.html
3155                fast/flexbox/image-percent-max-height.html
3156
3157         * rendering/RenderBlock.cpp:
3158         (WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):
3159         (WebCore::RenderBlock::layoutBlockChildren):
3160         Pull the percentage height descendant code that dirties those descendants
3161         out of layoutBlockChildren and into a protected helper function,
3162         dirtyForLayoutFromPercentageHeightDescendants, that can be called from the 
3163         flex box code.
3164         
3165         Also patch dirtyForLayoutFromPercentageHeightDescendants so that it will dirty
3166         preferred logical widths when a child has an aspect ratio, since we know that
3167         percentage height changes will potentially affect the preferred widths of the image and
3168         its ancestor blocks.
3169
3170         * rendering/RenderBlock.h:
3171         Declaration of the new dirtyForLayoutFromPercentageHeightDescendants function.
3172
3173         * rendering/RenderDeprecatedFlexibleBox.cpp:
3174         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
3175         Make the old flex box code call dirtyForLayoutFromPercentageHeightDescendants so
3176         that everything is dirtied properly.
3177
3178         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3179         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
3180         Remove the isReplaced()/percentage height/width dirtying now that the old flexible
3181         box is using the same dirtying mechanism as RenderBlock.
3182
3183         * rendering/RenderFlexibleBox.cpp:
3184         (WebCore::RenderFlexibleBox::layoutBlock):
3185         Patch the new flexible box code to use the dirtying mechanism that RenderBlock
3186         uses for percentage heights/widths on replaced descendants.
3187
3188         * rendering/RenderObject.h:
3189         (WebCore::RenderObject::hasAspectRatio):
3190         Pulled the static helper function from RenderReplaced into a full-blown method
3191         on RenderObject, so that dirtyForLayoutFromPercentageHeightDescendants can call
3192         it to check if an object has an aspect ratio.
3193
3194         * rendering/RenderReplaced.cpp:
3195         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
3196         (WebCore::RenderReplaced::computeIntrinsicRatioInformation):
3197         Patch the call sites of the static helper function to use hasAspectRatio instead
3198         and get rid of the static in the cpp file.
3199
3200 2013-06-26  Kangil Han  <kangil.han@samsung.com>
3201
3202         Adopt is/toHTMLAreaElement for code cleanup
3203         https://bugs.webkit.org/show_bug.cgi?id=117980
3204
3205         Reviewed by Antonio Gomes.
3206
3207         To enhance readibility, this patch adopts is/toHTMLAreaElement.
3208         This also helps out to reduce duplicated use of static_cast.
3209
3210         * accessibility/AXObjectCache.cpp:
3211         (WebCore::AXObjectCache::focusedUIElementForPage):
3212         * accessibility/AccessibilityRenderObject.cpp:
3213         (WebCore::AccessibilityRenderObject::getDocumentLinks):
3214         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
3215         (WebCore::AccessibilityRenderObject::addImageMapChildren):
3216         * html/HTMLAreaElement.h:
3217         (WebCore::isHTMLAreaElement):
3218         (WebCore::toHTMLAreaElement):
3219         * html/HTMLMapElement.cpp:
3220         (WebCore::HTMLMapElement::mapMouseEvent):
3221         * page/FocusController.cpp:
3222         (WebCore::FocusController::advanceFocusDirectionally):
3223         * page/SpatialNavigation.cpp:
3224         (WebCore::FocusCandidate::FocusCandidate):
3225         (WebCore::areElementsOnSameLine):
3226         * rendering/HitTestResult.cpp:
3227         (WebCore::HitTestResult::absoluteLinkURL):
3228         * rendering/RenderImage.cpp:
3229         (WebCore::RenderImage::paintAreaElementFocusRing):
3230
3231 2013-06-26  Brady Eidson  <beidson@apple.com>
3232
3233         [Mac] Document URL is not updated by HSTS
3234         <rdar://problem/14241270> and https://bugs.webkit.org/show_bug.cgi?id=118003
3235         
3236         Patch started by Alexey Proskuryakov, finished by Brady Eidson.
3237
3238         Reviewed by Brady Eidson and then Alexey Proskuryakov.
3239
3240         Synthesize a response and properly handle willSendRequest when the URL changes in a way that's typical for HSTS.
3241
3242         * platform/network/mac/WebCoreURLResponse:
3243         * platform/network/mac/WebCoreURLResponse:
3244         (WebCore::synthesizeRedirectResponseIfNecessary): Synthesize a redirect response and when the URL changes in a way that's
3245           typical for HSTS connections.
3246
3247         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
3248         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): Call synthesizeRedirectResponseIfNecessary.
3249
3250         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3251         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): Ditto.
3252
3253 2013-06-26  Andrei Bucur  <abucur@adobe.com>
3254
3255         [CSS Regions] fast/regions/seamless-iframe-flowed-into-regions.html asserts
3256         https://bugs.webkit.org/show_bug.cgi?id=117797
3257
3258         Reviewed by Antti Koivisto.
3259
3260         The seamless iframes inherit the current RenderFlowThread during layout. This means getting
3261         the LayoutState object from the flow thread RenderView object is not always correct.
3262         For RenderObjects inside the seamless iframes the view()/LayoutState object is different than the one
3263         of the RenderFlowThread. The patch changes the code to use the correct LayoutState object during
3264         layout when pushing a new state.
3265
3266         Tests: covered by fast/regions/seamless-iframe-flowed-into-regions.html
3267
3268         * rendering/RenderFlowThread.cpp:
3269         (WebCore::RenderFlowThread::currentActiveRenderBox):
3270         (WebCore::RenderFlowThread::pushFlowThreadLayoutState):
3271         (WebCore::RenderFlowThread::popFlowThreadLayoutState):
3272
3273 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
3274
3275         Remove many static_casts to Element types from AccessibilityNodeObject
3276         https://bugs.webkit.org/show_bug.cgi?id=118021
3277
3278         Reviewed by Chris Fleizach.
3279
3280         Merge https://chromium.googlesource.com/chromium/blink/+/ecd837f94996a20fdb8798e24f26cf6edea2a423.
3281
3282         * accessibility/AccessibilityNodeObject.cpp:
3283         (WebCore::AccessibilityNodeObject::isReadOnly):
3284         (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
3285         (WebCore::AccessibilityNodeObject::text):
3286
3287 2013-06-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3288
3289         Stop inheriting SVGExternalResourcesRequired, SVGFitToViewBox and SVGZoomAndPan
3290         https://bugs.webkit.org/show_bug.cgi?id=118029
3291
3292         Reviewed by Kentaro Hara.
3293
3294         Stop inheriting SVGExternalResourcesRequired, SVGFitToViewBox and SVGZoomAndPan
3295         in the IDL and use implements statements instead.
3296
3297         This is one step towards getting rid of multiple inheritance in the SVG code
3298         and matching the latest specification:
3299         http://www.w3.org/TR/SVG2/types.html#BasicDOMInterfaces
3300
3301         There is no webexposed behavior change.
3302
3303         No new tests, no behavior change.
3304
3305         * svg/SVGAnimationElement.idl:
3306         * svg/SVGCircleElement.idl:
3307         * svg/SVGClipPathElement.idl:
3308         * svg/SVGCursorElement.idl:
3309         * svg/SVGDefsElement.idl:
3310         * svg/SVGEllipseElement.idl:
3311         * svg/SVGFEImageElement.idl:
3312         * svg/SVGFilterElement.idl:
3313         * svg/SVGForeignObjectElement.idl:
3314         * svg/SVGGElement.idl:
3315         * svg/SVGGradientElement.idl:
3316         * svg/SVGImageElement.idl:
3317         * svg/SVGLineElement.idl:
3318         * svg/SVGMPathElement.idl:
3319         * svg/SVGMarkerElement.idl:
3320         * svg/SVGMaskElement.idl:
3321         * svg/SVGPathElement.idl:
3322         * svg/SVGPatternElement.idl:
3323         * svg/SVGPolygonElement.idl:
3324         * svg/SVGPolylineElement.idl:
3325         * svg/SVGRectElement.idl:
3326         * svg/SVGSVGElement.idl:
3327         * svg/SVGScriptElement.idl:
3328         * svg/SVGSwitchElement.idl:
3329         * svg/SVGSymbolElement.idl:
3330         * svg/SVGTextContentElement.idl:
3331         * svg/SVGUseElement.idl:
3332         * svg/SVGViewSpec.idl:
3333
3334 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
3335
3336         Use-after-free in RadioInputType::handleKeydownEvent
3337         https://bugs.webkit.org/show_bug.cgi?id=118035
3338
3339         Reviewed by Kent Tamura.
3340
3341         Use RefPtr for inputElement since setFocusedNode could blow it away.
3342
3343         * html/RadioInputType.cpp:
3344         (WebCore::RadioInputType::handleKeydownEvent):
3345
3346 2013-06-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3347
3348         Get rid of multiple inheritence for SVGViewElement interface
3349         https://bugs.webkit.org/show_bug.cgi?id=118014
3350
3351         Reviewed by Kentaro Hara.
3352
3353         Web IDL no longer supports multiple inheritence. As per the latest
3354         specification SVGViewElement should only inherit from SVGElement.
3355         'implements' statements are used for the rest. This patch refactors
3356         the IDL files to match the latest specification:
3357         http://www.w3.org/TR/SVG2/linking.html#InterfaceSVGViewElement
3358
3359         Note that there is a WebExposed change as SVGZoomAndPan used to be
3360         exposed on the Window and it is not anymore. SVGZoomAndPan merely
3361         supplements SVGViewElement and should not be exposed to JavaScript
3362         according to the latest specification.
3363
3364         No new tests, covered by existing tests.
3365
3366         * CMakeLists.txt:
3367         * DerivedSources.pri:
3368         * GNUmakefile.list.am:
3369         * svg/SVGExternalResourcesRequired.idl:
3370         * svg/SVGFitToViewBox.idl:
3371         * svg/SVGViewElement.idl:
3372         * svg/SVGZoomAndPan.idl:
3373
3374 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
3375
3376         Mark SVG(Circle|Path|Rect)Element::createRenderer() with OVERRIDE
3377         https://bugs.webkit.org/show_bug.cgi?id=118037
3378
3379         Reviewed by Philip Rogers.
3380
3381         Merge https://chromium.googlesource.com/chromium/blink/+/e8196920e769ab0786b2b4b21d3fdc2d87afef0d.
3382
3383         * svg/SVGCircleElement.h:
3384         * svg/SVGPathElement.h:
3385         * svg/SVGRectElement.h:
3386
3387 2013-06-26  Kangil Han  <kangil.han@samsung.com>
3388
3389         Adopt is/toHTMLAudioElement for code cleanup
3390         https://bugs.webkit.org/show_bug.cgi?id=117985
3391
3392         Reviewed by Jer Noble.
3393
3394         To enhance readibility, this patch adopts is/toHTMLAudioElement.
3395         This also helps out to reduce duplicated use of static_cast.
3396
3397         * bindings/js/JSNodeCustom.cpp:
3398         (WebCore::isReachableFromDOM):
3399         * css/CSSDefaultStyleSheets.cpp:
3400         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
3401         * css/StyleResolver.cpp:
3402         (WebCore::StyleResolver::canShareStyleWithElement):
3403         * html/HTMLAudioElement.h:
3404         (WebCore::isHTMLAudioElement):
3405         (WebCore::toHTMLAudioElement):
3406         * loader/SubframeLoader.cpp:
3407         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
3408         * rendering/HitTestResult.cpp:
3409         (WebCore::HitTestResult::mediaElement):
3410         * rendering/RenderLayerCompositor.cpp:
3411         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
3412         * rendering/RenderThemeMac.mm:
3413         (WebCore::RenderThemeMac::paintMediaMuteButton):
3414         (WebCore::RenderThemeMac::paintMediaPlayButton):
3415
3416 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
3417
3418         Refactoring: Fold Document::focusedNodeRemoved into Document::removeFocusedNodeOfSubtree
3419         https://bugs.webkit.org/show_bug.cgi?id=118036
3420
3421         Reviewed by Kent Tamura.
3422
3423         Merge https://chromium.googlesource.com/chromium/blink/+/3391beabe75548cc638a6c88982f913621a4410f.
3424
3425         * dom/Document.cpp:
3426         (WebCore::Document::removeFocusedNodeOfSubtree):
3427         * dom/Document.h:
3428
3429 2013-06-25  Ryosuke Niwa  <rniwa@webkit.org>
3430
3431         JSString should remember AtomicString
3432         https://bugs.webkit.org/show_bug.cgi?id=117386
3433
3434         Reviewed by Geoffrey Garen.
3435
3436         Added "Atomic" attribute as a WebKit extension to WebIDL, and deployed it in Element.idl and Node.idl so that
3437         the binding code can use newly added JSValue::toAtomic to update JSString's m_value.
3438
3439         * bindings/js/JSDOMBinding.cpp:
3440         (WebCore::valueToAtomicStringWithNullCheck): Added.
3441         (WebCore::valueToAtomicStringWithUndefinedOrNullCheck): Added.
3442
3443         * bindings/js/JSDOMBinding.h:
3444
3445         * bindings/scripts/CodeGeneratorJS.pm:
3446         (GetNativeTypeFromSignature): Return const AtomicString& when either Atomic attribute is specified or the type is
3447         Reflect. Note that setAttribute and getAttribute both use AtomicString for all arguments.
3448         (JSValueToNative): Use AtomicString equivalents when possible when converting DOMString to a WebCore object.
3449
3450         * bindings/scripts/IDLAttributes.txt: Added "Atomic" attribute.
3451
3452         * bindings/scripts/test/JS/JSTestObj.cpp: Baselined test cases.
3453         (WebCore::setJSTestObjReflectedStringAttr):
3454         (WebCore::setJSTestObjReflectedURLAttr):
3455         (WebCore::setJSTestObjReflectedCustomURLAttr):
3456
3457         * dom/Document.idl:
3458         * dom/Element.idl:
3459         * dom/Node.idl:
3460
3461 2013-06-25  Kangil&n