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