Revert the second half of r151257. WebGLRenderingContext::create can return null.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-06-05  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Revert the second half of r151257. WebGLRenderingContext::create can return null.
4
5         * html/HTMLCanvasElement.cpp:
6         (WebCore::HTMLCanvasElement::getContext):
7
8 2013-06-05  Ryosuke Niwa  <rniwa@webkit.org>
9
10         Remove unnecessary null check in HTMLCanvasElement.cpp.
11
12         Rubber-stamped by Benjamin Poulain.
13
14         * html/HTMLCanvasElement.cpp:
15         (WebCore::HTMLCanvasElement::getContext):
16
17 2013-06-05  Peter Gal  <galpeter@inf.u-szeged.hu>
18
19         [curl] Add implementation for HTTP PUT method.
20         https://bugs.webkit.org/show_bug.cgi?id=117256
21
22         Reviewed by Brent Fulgham.
23
24         No new tests, covered by existing tests.
25
26         * platform/network/curl/ResourceHandleManager.cpp:
27         (WebCore::getFormSize):
28         (WebCore::setupFormData):
29         (WebCore::ResourceHandleManager::setupPUT):
30         (WebCore::ResourceHandleManager::setupPOST):
31
32 2013-06-05  Peter Gal  <galpeter@inf.u-szeged.hu>
33
34         [curl] Normalize mime type information
35         https://bugs.webkit.org/show_bug.cgi?id=117194
36
37         Reviewed by Brent Fulgham.
38
39         * platform/MIMETypeRegistry.cpp: Enable MIME type normalization for curl.
40
41 2013-06-05  Xueqing Huang  <huangxueqing@baidu.com>
42
43         Move OleGetClipboard to Pasteboard::createForCopyAndPaste.
44         https://bugs.webkit.org/show_bug.cgi?id=117064
45
46         Reviewed by Darin Adler.
47
48         No behavior change, no new tests.
49
50         * platform/win/EditorWin.cpp:
51         (WebCore::Editor::newGeneralClipboard): Editor should not create IDataObject explicitly then set it to Pasteboard.
52         * platform/win/PasteboardWin.cpp:
53         (WebCore::Pasteboard::createForCopyAndPaste): Construct a Pasteboard and create IDataObject by "OleGetClipboard".
54
55 2013-06-05  Benjamin Poulain  <bpoulain@apple.com>
56
57         WebSQL forces 16-bit strings
58         https://bugs.webkit.org/show_bug.cgi?id=116935
59
60         Reviewed by Darin Adler.
61
62         Merge chromium 49c9632ac135f6f06e623a7a81d9da1f6bb7196f.
63         https://chromium.googlesource.com/chromium/blink/+/49c9632ac135f6f06e623a7a81d9da1f6bb7196f
64
65         * platform/sql/SQLiteStatement.cpp:
66         (WebCore::SQLiteStatement::getColumnValue):
67
68 2013-06-05  Bear Travis  <betravis@adobe.com>
69
70         [CSS Exclusions][CSS Shapes] Split CSS Exclusions & Shapes compile & runtime flags
71         https://bugs.webkit.org/show_bug.cgi?id=117172
72
73         Reviewed by Alexandru Chiculita.
74
75         This patch adds a new compile and runtime flag for the CSS Shapes feature, which
76         has split off from the previous CSS Exclusions and Shapes specification. The
77         specifications are available here:
78         http://dev.w3.org/csswg/css-exclusions/
79         http://dev.w3.org/csswg/css-shapes/
80
81         The changes introduce a new CSS_SHAPES compile flag, and a new cssShapesEnabled
82         runtime flag. In general, the code changes are simple renames.
83
84         Refactoring, no new tests.
85
86         * bindings/generic/RuntimeEnabledFeatures.h:
87         (WebCore::RuntimeEnabledFeatures::setCSSShapesEnabled):
88         (WebCore::RuntimeEnabledFeatures::cssShapesEnabled):
89         * css/CSSComputedStyleDeclaration.cpp:
90         (WebCore::ComputedStyleExtractor::propertyValue):
91         * css/CSSParser.cpp:
92         (WebCore::isSimpleLengthPropertyID):
93         (WebCore::CSSParser::parseValue):
94         * css/CSSProperty.cpp:
95         (WebCore::CSSProperty::isInheritedProperty):
96         * css/DeprecatedStyleBuilder.cpp:
97         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
98         * css/StyleResolver.cpp:
99         (WebCore::StyleResolver::applyProperty):
100         (WebCore::StyleResolver::loadPendingImages):
101         * page/animation/CSSPropertyAnimation.cpp:
102         (WebCore::CSSPropertyAnimation::ensurePropertyMap):
103         * rendering/BidiRun.h:
104         (WebCore::BidiRun::BidiRun):
105         * rendering/ExclusionShapeInfo.cpp:
106         * rendering/ExclusionShapeInfo.h:
107         * rendering/ExclusionShapeInsideInfo.cpp:
108         * rendering/ExclusionShapeInsideInfo.h:
109         * rendering/ExclusionShapeOutsideInfo.cpp:
110         * rendering/ExclusionShapeOutsideInfo.h:
111         * rendering/LayoutState.cpp:
112         (WebCore::LayoutState::LayoutState):
113         * rendering/LayoutState.h:
114         (WebCore::LayoutState::LayoutState):
115         * rendering/RenderBlock.cpp:
116         (WebCore::RenderBlock::styleDidChange):
117         (WebCore::exclusionInfoRequiresRelayout):
118         (WebCore::RenderBlock::updateRegionsAndExclusionsBeforeChildLayout):
119         (WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout):
120         (WebCore::RenderBlock::insertFloatingObject):
121         (WebCore::RenderBlock::computeLogicalLocationForFloat):
122         (WebCore::RenderBlock::positionNewFloats):
123         (WebCore::::collectIfNeeded):
124         (WebCore::RenderBlock::logicalLeftOffsetForLine):
125         (WebCore::RenderBlock::logicalRightOffsetForLine):
126         * rendering/RenderBlock.h:
127         (WebCore::RenderBlock::xPositionForFloatIncludingMargin):
128         (WebCore::RenderBlock::yPositionForFloatIncludingMargin):
129         (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
130         * rendering/RenderBlockLineLayout.cpp:
131         (WebCore::LineWidth::LineWidth):
132         (WebCore::LineWidth::updateAvailableWidth):
133         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
134         (WebCore::RenderBlock::constructLine):
135         (WebCore::computeExpansionForJustifiedText):
136         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
137         (WebCore::RenderBlock::computeInlineDirectionPositionsForSegment):
138         (WebCore::constructBidiRunsForLine):
139         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
140         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
141         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
142         * rendering/RenderBox.cpp:
143         (WebCore::RenderBox::willBeDestroyed):
144         (WebCore::RenderBox::styleDidChange):
145         * rendering/RenderBox.h:
146         * rendering/RenderBoxModelObject.cpp:
147         (WebCore::RenderBoxModelObject::paintOffset):
148         * rendering/RenderLayer.cpp:
149         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
150         * rendering/RenderObject.h:
151         (WebCore::RenderObject::hasPaintOffset):
152         * rendering/RenderView.h:
153         (WebCore::RenderView::pushLayoutState):
154         * rendering/style/RenderStyle.cpp:
155         (WebCore::RenderStyle::changeRequiresLayout):
156         * rendering/style/RenderStyle.h:
157         * testing/InternalSettings.cpp:
158         (WebCore::InternalSettings::Backup::Backup):
159         (WebCore::InternalSettings::Backup::restoreTo):
160         (WebCore::InternalSettings::setCSSShapesEnabled):
161
162 2013-06-05  Oliver Hunt  <oliver@apple.com>
163
164         Don't throttle timers if a page is doing something that might be interesting
165         https://bugs.webkit.org/show_bug.cgi?id=117273
166
167         Reviewed by Gavin Barraclough.
168
169         Make the decision about whether or not to throttle timers be
170         determined by the PageThrottler
171
172         * page/Page.cpp:
173         (WebCore::Page::throttleTimers):
174         (WebCore::Page::unthrottleTimers):
175         (WebCore::Page::setVisibilityState):
176         (WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged):
177         * page/Page.h:
178         * page/PageThrottler.cpp:
179         (WebCore::PageThrottler::throttlePage):
180         (WebCore::PageThrottler::unthrottlePage):
181
182 2013-06-05  Mark Salisbury  <mark.salisbury@hp.com>
183
184         [WinCE,WinCairo] RenderThemeWin.cpp needs to include FrameSelection.h.
185         https://bugs.webkit.org/show_bug.cgi?id=116583
186
187         Reviewed by Brent Fulgham.
188
189         * rendering/RenderThemeWin.cpp:
190
191 2013-06-05  Peter Gal  <galpeter@inf.u-szeged.hu>
192
193         [curl] Restrict allowed protocols
194         https://bugs.webkit.org/show_bug.cgi?id=117257
195
196         Reviewed by Brent Fulgham.
197
198         curl supports various protocols (like: HTTP,...,POP3,IMAP...) and by
199         default all of the are enabled for a single curl handle. Furthermore
200         all of the protocols are allowed during Location header follow.
201         This could pose a security risk for example: a malicious server responds
202         with a crafted Location header pointing to an imap/../(etc) url and the
203         curl backend will follow it and will give the result for the WebCore.
204
205         This patch will restrict the allowed protocols to: HTTP(S), FTP(S), FILE
206
207         * platform/network/curl/ResourceHandleManager.cpp:
208         (WebCore::ResourceHandleManager::initializeHandle):
209
210 2013-06-05  Bear Travis  <betravis@adobe.com>
211
212         [css exclusions] Clean up ExclusionShapeInsideInfo dynamic removal code
213         https://bugs.webkit.org/show_bug.cgi?id=116236
214
215         Reviewed by David Hyatt.
216
217         Instead of keeping the ExclusionShapeInsideInfo around after it has
218         become stale, we can immediately remove it and just mark descendants
219         for relayout. This patch removes most of the code added by
220         https://bugs.webkit.org/show_bug.cgi?id=111029
221         in favor of this simpler approach.
222
223         This patch does not introduce new functionality.
224
225         * rendering/ExclusionShapeInsideInfo.h:
226         (WebCore::ExclusionShapeInsideInfo::ExclusionShapeInsideInfo):
227         (ExclusionShapeInsideInfo): Remove needsRemoval code.
228         * rendering/LayoutState.cpp:
229         (WebCore::LayoutState::LayoutState): Ditto.
230         * rendering/RenderBlock.cpp:
231         (WebCore::RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange): Remove
232         needsRemoval code and mark descendants for layout.
233         (WebCore):
234         (WebCore::RenderBlock::markShapeInsideDescendantsForLayout): Method to mark
235         descendants of a shape inside with inline content for layout.
236         (WebCore::exclusionInfoRequiresRelayout): Remove needsRemoval code.
237         (WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout): Ditto.
238         * rendering/RenderBlock.h:
239         (WebCore::RenderBlock::exclusionShapeInsideInfo): Ditto.
240         (RenderBlock):
241         * rendering/RenderBlockLineLayout.cpp:
242         (WebCore::RenderBlock::layoutExclusionShapeInsideInfo): Ditto.
243
244 2013-06-05  Arunprasad Rajkumar  <arurajku@cisco.com>
245
246         Avoid multiple copies of inline script & style strings
247         https://bugs.webkit.org/show_bug.cgi?id=117202
248
249         Reviewed by Darin Adler.
250
251         Merge from https://chromiumcodereview.appspot.com/16005007.
252
253         No new tests needed.
254
255         The HTML parser breaks up large text nodes into small chunks to avoid some
256         O(n^2) editing algorithms. This fix skips that workaround for <script> and
257         <style> elements, which aren't likely to need editing. As a result, <script>
258         ends up with a single text node, containing a contiguous String, which is the
259         source code of that inline script block.
260
261         Prior this fix, we could end up with two copies of large inline scripts: one
262         monolithic string retained by JSC and a number of shards retained by the DOM.
263         After this fix, both the DOM and JSC use the same monolithic string, removing a
264         copy.
265
266         * dom/Text.cpp:
267         (WebCore::Text::createWithLengthLimit):
268         * html/parser/HTMLConstructionSite.cpp:
269         (WebCore::shouldUseLengthLimit):
270         (WebCore::HTMLConstructionSite::insertTextNode):
271
272 2013-06-05  Kondapally Kalyan  <kalyan.kondapally@intel.com>
273
274         [EFL] Build fix with EGL and GLES2 backend.
275         https://bugs.webkit.org/show_bug.cgi?id=117246
276
277         Reviewed by Kenneth Rohde Christiansen.
278
279         r150958 added support for EGLTransportSurfaceClient.
280         This patch adds the missing changes.
281
282         * platform/graphics/surfaces/efl/GLTransportSurface.cpp:
283         (WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
284         (WebCore::GLTransportSurfaceClient::GLTransportSurfaceClient):
285         * platform/graphics/surfaces/efl/GLTransportSurface.h:
286         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
287         (WebCore::GraphicsSurfacePrivate::initializeClient):
288         * platform/graphics/surfaces/egl/EGLXSurface.cpp:
289         (WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
290         * platform/graphics/surfaces/egl/EGLXSurface.h:
291         * platform/graphics/surfaces/glx/GLXSurface.cpp:
292         (WebCore::GLXTransportSurfaceClient::GLXTransportSurfaceClient):
293         * platform/graphics/surfaces/glx/GLXSurface.h:
294         * platform/graphics/surfaces/glx/X11Helper.cpp:
295         (WebCore::X11Helper::createOffScreenWindow):
296         (WebCore::X11Helper::createPixmap):
297         * platform/graphics/surfaces/glx/X11Helper.h:
298
299 2013-06-05  Jae Hyun Park  <jae.park@company100.net>
300
301         [GTK] Support using GLContext from multiple threads
302         https://bugs.webkit.org/show_bug.cgi?id=117238
303
304         Reviewed by Martin Robinson.
305
306         Current implementation assumes that GLContext is only used in the main thread.
307         However, to support using GLContext from multiple threads, we need to change it
308         to thread local. Therefore, ASSERT(isMainThread()) is removed and GLContext is
309         changed to thread local.
310
311         * platform/graphics/cairo/GLContext.cpp:
312         (WebCore::ThreadGlobalGLContext::setContext):
313         (WebCore::ThreadGlobalGLContext::context):
314         (WebCore::currentContext):
315         (WebCore::GLContext::sharingContext):
316         (WebCore::GLContext::~GLContext):
317         (WebCore::GLContext::makeContextCurrent):
318         (WebCore::GLContext::getCurrent):
319
320 2013-06-05  Christophe Dumez  <ch.dumez@sisa.samsung.com>
321
322         Unreviewed build fix when CHANNEL_MESSAGING is disabled.
323
324         Add #if ENABLE(CHANNEL_MESSAGING) to JSMessageChannelCustom.cpp.
325
326         * bindings/js/JSMessageChannelCustom.cpp:
327
328 2013-06-05  Christophe Dumez  <ch.dumez@sisa.samsung.com>
329
330         Remove remaining custom getters for WorkerContext constructor attributes
331         https://bugs.webkit.org/show_bug.cgi?id=117247
332
333         Reviewed by Kentaro Hara.
334
335         Remove custom getter code for remaining constructor attribute on WorkerContext
336         interface. The custom code wasn't needed as it was doing nothing more than the
337         generated one. These constructor attributes are now automatically generated.
338
339         No new tests, no behavior change.
340
341         * CMakeLists.txt:
342         * DerivedSources.make:
343         * DerivedSources.pri:
344         * GNUmakefile.list.am:
345         * Modules/websockets/WebSocket.idl:
346         * Modules/websockets/WorkerContextWebSocket.idl: Removed.
347         * WebCore.order:
348         * WebCore.xcodeproj/project.pbxproj:
349         * bindings/js/JSWorkerContextCustom.cpp:
350         * dom/MessageChannel.idl:
351         * page/EventSource.idl:
352         * workers/WorkerContext.idl:
353         * xml/XMLHttpRequest.idl:
354
355 2013-06-05  Ryuan Choi  <ryuan.choi@samsung.com>
356
357         Remove ChromeClient::deviceOrPageScaleFactorChanged
358         https://bugs.webkit.org/show_bug.cgi?id=117245
359
360         Reviewed by Andreas Kling.
361
362         It was introduced for chromium at r147357.
363         But now, there are no ports to use this.
364
365         No new tests - no behavior change.
366
367         * page/ChromeClient.h:
368         * page/Frame.cpp:
369         (WebCore::Frame::deviceOrPageScaleFactorChanged):
370
371 2013-06-05  Gwang Yoon Hwang  <ryumiel@company100.net>
372
373         [Coordinated Graphics] Prevent a recursive painting in CoordinatedGraphicsLayer
374         https://bugs.webkit.org/show_bug.cgi?id=117222
375
376         Reviewed by Noam Rosenthal.
377
378         CoordinatedGraphicsLayer::flushCompositingState() will cross frame
379         boundaries if the GraphicsLayers are connected. In this case,
380         updateContentBuffers will invoke a painting of a sub-frame that causes
381         flushCompositingState recursively.
382
383         To prevent this behavior this patch extracts updateContentBuffers from
384         flushCompositingState, and places it in
385         updateContentBuffersIncludeSublayers, which is another tree traveler for
386         painting.
387
388         No new tests, covered by existing tests.
389
390         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
391         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
392         (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
393         (WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
394         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
395
396 2013-06-05  Andreas Kling  <akling@apple.com>
397
398         Fix some inefficiencies in AnimationController's composite animation map.
399         <http://webkit.org/b/117248>
400
401         Reviewed by Antti Koivisto.
402
403         Clean up some small things that were showing up in a window resizing profile (0.4%)
404
405         * page/animation/AnimationControllerPrivate.h:
406         * page/animation/AnimationController.cpp:
407         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
408
409             Renamed this ensure* to conform to the WebKit Design Patterns, 2013 edition.
410             Always do a single hash lookup instead of two.
411
412         (WebCore::AnimationControllerPrivate::clear):
413
414             Use RefPtr<T> for local variables, never PassRefPtr<T>. See WKDP, 2013 ed.
415
416         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
417         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
418         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
419         (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
420
421             Peek into m_compositeAnimations through "const CompositeAnimation*" instead
422             of using RefPtrs. There's no need to hold a reference on the animation while
423             querying some const method on it.
424
425         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
426         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
427         (WebCore::AnimationController::updateAnimations):
428
429             Poke into m_compositeAnimations through "CompositeAnimation*" instead of using
430             RefPtrs. There's no need to hold a reference here either, we can modify the
431             animations through a raw pointer.
432
433 2013-06-05  Roland Takacs  <rtakacs@inf.u-szeged.hu>
434
435         Web Inspector: Clear button doesn't clean Memory graph in Overview pane.
436         https://bugs.webkit.org/show_bug.cgi?id=112429
437
438         Reviewed by Noam Rosenthal.
439
440         There is an early return from TimelineMemoryOverview.update() when
441         record array is empty. Thats why if you click onto the clear button,
442         the canvas won't be updated.
443         Moved this "return condition" after the canvas size definition
444         because we need to know the canvas size for refreshing.
445         Overridden TimelineOverviewBase's reset function to clear
446         HeapSizeLabels' content.
447
448         * inspector/front-end/TimelineOverviewPane.js:
449         (WebInspector.TimelineMemoryOverview.prototype.reset):
450         (WebInspector.TimelineMemoryOverview.prototype.update):
451
452 2013-06-05  Gwang Yoon Hwang  <ryumiel@company100.net>
453
454         [Coordinated Graphics] Rename client classes for CoordinatedImageBacking and UpdateAtlas.
455         https://bugs.webkit.org/show_bug.cgi?id=111948
456
457         Reviewed by Noam Rosenthal.
458
459         This patch renames CoordinatedImageBacking::Coordinator to
460         CoordinatedImageBacking::Client, and UpdateAtlasClient to
461         UpdateAtlas::Client for naming consistency and clarification.
462
463         No new tests, covered by existing tests.
464
465         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
466         (WebCore::CoordinatedImageBacking::create):
467         (WebCore::CoordinatedImageBacking::CoordinatedImageBacking):
468         (WebCore::CoordinatedImageBacking::removeHost):
469         (WebCore::CoordinatedImageBacking::update):
470         (WebCore::CoordinatedImageBacking::clearContentsTimerFired):
471         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
472         * platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
473         (WebCore::UpdateAtlas::UpdateAtlas):
474         * platform/graphics/texmap/coordinated/UpdateAtlas.h:
475
476 2013-06-05  Allan Sandfeld Jensen  <allan.jensen@digia.com>
477
478         [Qt] Handle Return key without key text
479         https://bugs.webkit.org/show_bug.cgi?id=117239
480
481         Reviewed by Andreas Kling.
482
483         Test added to tst_qwebpage.cpp.
484
485         * platform/qt/PlatformKeyboardEventQt.cpp:
486         (WebCore::keyTextForKeyEvent):
487
488 2013-06-05  Gwang Yoon Hwang  <ryumiel@company100.net>
489
490         Coordinated Graphics: Unify messages related object's lifecycles into CoordinatedGraphicsState.
491         https://bugs.webkit.org/show_bug.cgi?id=111919
492
493         Reviewed by Noam Rosenthal.
494
495         CoordinatedLayerTreeHostProxy has several methods, which simply passes
496         these calls to CoordinatedGraphicsScene.
497
498         This patch removes methods in CoordinatedLayerTreeHostProxy just for
499         message chaining. Instead of that, messages for creation/deletion of objects
500         (Layers, CustomFilters, UpdateAtlas, and ImageBacking) are unified into
501         CommitCoordinatedGraphicsState.
502
503         And this patch also removes codes for WebCoordinatedSurface in
504         CoordinatedLayerTreeHost, except for a factory method.
505         CoordinatedGraphicsArgumentCoders [en|de]codes CoordinatedSurface itself
506         using WebCoordinatedSurface.
507
508         No new tests, covered by existing tests.
509
510         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
511         (WebCore::CoordinatedGraphicsScene::syncCustomFilterPrograms):
512         (WebCore::CoordinatedGraphicsScene::syncUpdateAtlases):
513         (WebCore::CoordinatedGraphicsScene::syncImageBackings):
514         (WebCore::CoordinatedGraphicsScene::commitSceneState):
515         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
516         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
517         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
518         (WebCore::CoordinatedImageBacking::update):
519         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
520         * platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
521         (WebCore::UpdateAtlas::UpdateAtlas):
522         * platform/graphics/texmap/coordinated/UpdateAtlas.h:
523
524 2013-06-05  Andreas Kling  <akling@apple.com>
525
526         Remove unnecessary null checks in SelectorChecker::checkOne().
527         <http://webkit.org/b/117243>
528
529         Reviewed by Antti Koivisto.
530
531         This function was riddled with unnecessary null checks of 'element', despite ASSERT(element)
532         being the first thing it does.
533
534         * css/SelectorChecker.cpp:
535         (WebCore::SelectorChecker::checkOne):
536
537 2013-06-05  Christophe Dumez  <ch.dumez@sisa.samsung.com>
538
539         Merge [NoInterfaceObject] and [OmitConstructor] extended attributes
540         https://bugs.webkit.org/show_bug.cgi?id=115853
541
542         Reviewed by Geoffrey Garen.
543
544         Remove [OmitConstructor] extended attribute as it is overlapping with
545         the standard [NoInterfaceObject] Web IDL extended attribute.
546
547         Having [NoInterfaceObject] extended attribute on an interface now
548         implies that its constructor is omitted (i.e. not generated).
549
550         No new tests, no behavior change.
551
552         * Modules/geolocation/Coordinates.idl:
553         * Modules/geolocation/Geolocation.idl:
554         * Modules/geolocation/Geoposition.idl:
555         * Modules/notifications/Notification.idl:
556         * Modules/notifications/NotificationCenter.idl:
557         * Modules/quota/StorageInfo.idl:
558         * Modules/quota/StorageQuota.idl:
559         * Modules/webdatabase/Database.idl:
560         * Modules/webdatabase/DatabaseSync.idl:
561         * Modules/webdatabase/SQLError.idl:
562         * Modules/webdatabase/SQLResultSet.idl:
563         * Modules/webdatabase/SQLResultSetRowList.idl:
564         * Modules/webdatabase/SQLTransaction.idl:
565         * Modules/webdatabase/SQLTransactionSync.idl:
566         * bindings/scripts/CodeGeneratorJS.pm:
567         (GenerateHeader):
568         (GenerateAttributesHashTable):
569         (GenerateImplementation):
570         * bindings/scripts/IDLAttributes.txt:
571         * css/CSSUnknownRule.idl:
572         * css/MediaQueryListListener.idl:
573         * dom/EventListener.idl:
574         * dom/EventTarget.idl:
575         * html/MicroDataItemValue.idl:
576         * html/ValidityState.idl:
577         * html/canvas/EXTDrawBuffers.idl:
578         * html/canvas/EXTTextureFilterAnisotropic.idl:
579         * html/canvas/OESElementIndexUint.idl:
580         * html/canvas/OESStandardDerivatives.idl:
581         * html/canvas/OESTextureFloat.idl:
582         * html/canvas/OESTextureHalfFloat.idl:
583         * html/canvas/OESVertexArrayObject.idl:
584         * html/canvas/WebGLCompressedTextureATC.idl:
585         * html/canvas/WebGLCompressedTexturePVRTC.idl:
586         * html/canvas/WebGLCompressedTextureS3TC.idl:
587         * html/canvas/WebGLContextAttributes.idl:
588         * html/canvas/WebGLDebugRendererInfo.idl:
589         * html/canvas/WebGLDebugShaders.idl:
590         * html/canvas/WebGLDepthTexture.idl:
591         * html/canvas/WebGLLoseContext.idl:
592         * inspector/JavaScriptCallFrame.idl:
593         * inspector/ScriptProfile.idl:
594         * inspector/ScriptProfileNode.idl:
595         * loader/appcache/DOMApplicationCache.idl:
596         * page/AbstractView.idl:
597         * page/Console.idl:
598         * page/Crypto.idl:
599         * page/PerformanceEntryList.idl:
600         * page/WorkerNavigator.idl:
601         * page/make_settings.pl:
602         (generateInternalSettingsIdlFile):
603         * svg/ElementTimeControl.idl:
604         * svg/SVGAnimationElement.idl:
605         * svg/SVGExternalResourcesRequired.idl:
606         * svg/SVGFitToViewBox.idl:
607         * svg/SVGLangSpace.idl:
608         * svg/SVGLocatable.idl:
609         * svg/SVGTests.idl:
610         * svg/SVGTransformable.idl:
611         * svg/SVGURIReference.idl:
612         * testing/InternalSettings.idl:
613         * testing/Internals.idl:
614         * testing/MallocStatistics.idl:
615         * testing/MemoryInfo.idl:
616         * testing/TypeConversions.idl:
617         * workers/DedicatedWorkerContext.idl:
618         * workers/SharedWorkerContext.idl:
619         * workers/WorkerContext.idl:
620         * xml/XPathNSResolver.idl:
621
622 2013-06-05  Allan Sandfeld Jensen  <allan.jensen@digia.com>
623
624         [Qt] Font::shouldUseSmoothing() has fake dependency on Qt 5.1
625         https://bugs.webkit.org/show_bug.cgi?id=117195
626
627         Reviewed by Jocelyn Turcotte.
628
629         Remove the fake dependency on Qt 5.1 so we may rebase the layout tests
630         before switching to Qt 5.1
631
632         * platform/graphics/qt/FontPlatformDataQt.cpp:
633         (WebCore::FontPlatformData::FontPlatformData):
634
635 2013-06-05  Mihnea Ovidenie  <mihnea@adobe.com>
636
637         [CSSRegions] Respect renderer creation constraints when element is part of named flow
638         https://bugs.webkit.org/show_bug.cgi?id=116790
639
640         Reviewed by David Hyatt.
641
642         Before adding a child to a named flow, we have to make sure that the rules for
643         creation are properly checked.
644
645         Test: fast/regions/br-content-node-crash.xhtml
646
647         * rendering/RenderNamedFlowThread.cpp:
648         (WebCore::RenderNamedFlowThread::isChildAllowed):
649         Call isChildAllowed on the original parent renderer, before reparenting to
650         named flow.
651         * rendering/RenderNamedFlowThread.h:
652
653 2013-06-05  Philippe Normand  <pnormand@igalia.com>
654
655         Unreviewed, GStreamer 0.10 build fix after r151175.
656
657         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
658         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
659         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
660         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
661         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
662         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
663         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
664
665 2013-06-05  Mihnea Ovidenie  <mihnea@adobe.com>
666
667         [CSS Regions] REGRESSION Incorrect layer clipping inside flow thread
668         https://bugs.webkit.org/show_bug.cgi?id=117074
669
670         Reviewed by David Hyatt.
671
672         Function RenderBox::mapLocalToContainer was adapted for elements inside flow threads to convert
673         elements coordinates to RenderView coordinates, passing through the region in which the elements
674         were flowed (https://bugs.webkit.org/show_bug.cgi?id=66641).
675
676         The fix for https://bugs.webkit.org/show_bug.cgi?id=76486 modified RenderLayer::calculateClipRects and replaced
677         convertToLayerCoords with localToContainerPoint, which further calls mapLocalToContainer.
678
679         However, for elements inside the flow thread, which acts as a root layer for its collected children, we do not want
680         to get the offset in RenderView coordinates but rather in flow thread coordinates (and still take transforms into
681         account). This patch modifies RenderBox::mapLocalToContainer so that it stops at flow thread boundary when the passed
682         repaintContainer is the flow thread. The flow thread is the container for repaint for elements inside it, as seen from
683         RenderObject::containerForRepaint.
684
685         No new tests, converted overflow-size-change-with-stacking-context and overflow-size-change-with-stacking-context-rtl
686         into ref tests so that the we do not rely on pixel tests in the future.
687
688         * rendering/RenderBox.cpp:
689         (WebCore::RenderBox::mapLocalToContainer):
690
691 2013-06-05  Christophe Dumez  <ch.dumez@sisa.samsung.com>
692
693         Remove [NoInterfaceObject] from TreeWalker
694         https://bugs.webkit.org/show_bug.cgi?id=117225
695
696         Reviewed by Kentaro Hara.
697
698         Remove [NoInterfaceObject] IDL extended attribute from TreeWalker interface
699         to match Firefox's behavior and the specification:
700         http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-TreeWalker
701
702         No new tests, already covered by existing tests.
703
704         * dom/TreeWalker.idl:
705
706 2013-06-05  Zan Dobersek  <zdobersek@igalia.com>
707
708         Move MemoryInfo under window.internals
709         https://bugs.webkit.org/show_bug.cgi?id=117197
710
711         Reviewed by Ryosuke Niwa.
712
713         The MemoryInfo interface is not a subject of any specification and should not be exposed
714         to the Web. It's still used by the performance tests so it is moved under the testing
715         internals, accessible through window.internals.memoryInfo.
716
717         The jsHeapSizeLimit attribute is removed from the MemoryInfo interface as that value was
718         only usable when using the V8 bindings which are not supported anymore. A small fast/harness
719         test is also provided to check that the MemoryInfo object is accessible through window.internals.
720
721         Test: fast/harness/memoryinfo-object.html
722
723         * CMakeLists.txt:
724         * DerivedSources.cpp:
725         * DerivedSources.make:
726         * DerivedSources.pri:
727         * GNUmakefile.list.am:
728         * Target.pri:
729         * UseJSC.cmake:
730         * WebCore.exp.in:
731         * WebCore.order:
732         * WebCore.vcxproj/WebCore.vcxproj:
733         * WebCore.vcxproj/WebCore.vcxproj.filters:
734         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
735         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
736         * WebCore.xcodeproj/project.pbxproj:
737         * bindings/gobject/GNUmakefile.am: Remove the GObject bindings targets for MemoryInfo.
738         * bindings/js/JSBindingsAllInOne.cpp: Remove the JSMemoryInfo.h and MemoryInfo.h inclusion.
739         * bindings/js/JSMemoryInfoCustom.cpp: Removed.
740         * bindings/js/ScriptGCEvent.cpp: Remove the ENABLE(INSPECTOR) guards.
741         (WebCore::ScriptGCEvent::getHeapSize): Remove the jsHeapSizeLimit assignment.
742         * bindings/js/ScriptGCEvent.h: Remove the ENABLE(INSPECTOR) guards.
743         (WebCore::HeapInfo::HeapInfo): Remove the jsHeapSizeLimit member.
744         * page/Console.cpp: Remove the Console::memory method.
745         * page/Console.h: Ditto.
746         * page/Console.idl: Remove the window.console.memory attribute.
747         * page/MemoryInfo.cpp: Removed.
748         * page/Performance.cpp: Remove the Performance::memory method.
749         * page/Performance.h: Ditto.
750         * page/Performance.idl: Remove the window.performance.memory attribute.
751         * testing/Internals.cpp:
752         (WebCore::Internals::memoryInfo): Return a MemoryInfo object upon invoking.
753         * testing/Internals.h: Declare the Internals::memoryInfo method.
754         * testing/Internals.idl: Expose the window.internals.memoryInfo operation.
755         * testing/MemoryInfo.h: Renamed from Source/WebCore/page/MemoryInfo.h.
756         (WebCore::MemoryInfo::create): Return a new RefPtr-wrapped MemoryInfo object.
757         (WebCore::MemoryInfo::usedJSHeapSize): Return the value of the equally-named HeapInfo member.
758         (WebCore::MemoryInfo::totalJSHeapSize): Ditto.
759         (WebCore::MemoryInfo::MemoryInfo): Acquire the current heap info upon construction.
760         * testing/MemoryInfo.idl: Renamed from Source/WebCore/page/MemoryInfo.idl.
761         The jsHeapSizeLimit attribute is removed.
762
763 2013-06-04  Peter Gal  <galpeter@inf.u-szeged.hu>
764
765         [curl] Headers should be parsed as utf8 if possible
766         https://bugs.webkit.org/show_bug.cgi?id=117196
767
768         Reviewed by Brent Fulgham.
769
770         Testcase already present: http/tests/download/literal-utf-8.html
771
772         * platform/network/curl/ResourceHandleManager.cpp:
773         (WebCore::headerCallback): Parse the header as an utf8 string if possible.
774
775 2013-06-04  Oliver Hunt  <oliver@apple.com>
776
777         Prevent throttling while resources are being loaded
778         https://bugs.webkit.org/show_bug.cgi?id=117218
779
780         Reviewed by Gavin Barraclough.
781
782         Make use of the page activity assertion infrastructure to delay
783         throttling while we are waiting on resource loads.
784
785         * loader/FrameLoader.cpp:
786         (WebCore::FrameLoader::completed):
787         (WebCore::FrameLoader::started):
788         * loader/FrameLoader.h:
789         * loader/SubresourceLoader.cpp:
790         (WebCore::SubresourceLoader::init):
791         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
792         (WebCore::SubresourceLoader::didFinishLoading):
793         (WebCore::SubresourceLoader::didFail):
794         (WebCore::SubresourceLoader::willCancel):
795         * loader/SubresourceLoader.h:
796
797 2013-06-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
798
799         Remove [NoInterfaceObject] from XPathExpression and NodeIterator
800         https://bugs.webkit.org/show_bug.cgi?id=117204
801
802         Reviewed by Alexey Proskuryakov.
803
804         Remove [NoInterfaceObject] from XPathExpression and NodeIterator to match
805         their respective specifications:
806         - http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathExpression
807         - http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeIterator
808
809         No new tests, already covered by:
810         fast/js/global-constructors-attributes.html
811
812         * dom/NodeIterator.idl:
813         * xml/XPathExpression.idl:
814
815 2013-06-04  Chris Fleizach  <cfleizach@apple.com>
816
817         AX: MathML multiscripts not exposed in Accessibility
818         https://bugs.webkit.org/show_bug.cgi?id=115069
819
820         Unreviewed, build fix.
821
822         Remove an accessibility iOS method that was erroneously added.
823
824         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
825
826 2013-06-04  Greg Hughes  <ghughes@apple.com>
827
828         Add "VisibleOnly" key to search predicate
829         https://bugs.webkit.org/show_bug.cgi?id=115491
830
831         Reviewed by Chris Fleizach.
832
833         Added support for accessibility clients to use the search predicate to find only visible elements
834
835         * accessibility/AccessibilityObject.cpp:
836         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
837         (WebCore::AccessibilityObject::isOnscreen):
838         (WebCore):
839         * accessibility/AccessibilityObject.h:
840         (AccessibilitySearchCriteria):
841         (WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
842         (AccessibilityObject):
843         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
844         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
845
846 2013-06-04  Roger Fong  <roger_fong@apple.com>
847
848         Unreviewed. Rollout of r151146. Broke some tests.
849
850         * page/FrameView.cpp:
851         (WebCore::FrameView::forceLayoutForPagination):
852         * rendering/RenderBlock.cpp:
853         (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
854         (WebCore::RenderBlock::updateScrollInfoAfterLayout):
855         (WebCore::RenderBlock::layout):
856         * rendering/RenderBlock.h:
857         * rendering/RenderBox.cpp:
858         (WebCore::RenderBox::clearLayoutOverflow):
859         * rendering/RenderBox.h:
860         * rendering/RenderDeprecatedFlexibleBox.cpp:
861         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
862         * rendering/RenderGrid.cpp:
863         (WebCore::RenderGrid::layoutBlock):
864
865 2013-06-04  Noam Rosenthal  <noam@webkit.org>
866
867         Refactor the code that decides whether to enable WebGL from settings to helper functions
868         https://bugs.webkit.org/show_bug.cgi?id=117181
869
870         This removes some #ifdef crud out of the getContext() function.
871
872         Reviewed by Benjamin Poulain.
873
874         * html/HTMLCanvasElement.cpp:
875         (WebCore::requiresAcceleratedCompositingForWebGL):
876         (WebCore::shouldEnableWebGL):
877         (WebCore::HTMLCanvasElement::getContext):
878
879 2013-06-04  Thiago Santos  <thiago.sousa.santos@collabora.com>
880
881         Prevent race when pad caps is set on gstreamer player
882         https://bugs.webkit.org/show_bug.cgi?id=115355
883
884         Reviewed by Philippe Normand.
885
886         Prevent race when pad caps is set on gstreamer player and
887         Also protect internal paint buffer with a mutex.
888
889         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
890         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
891         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
892         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
893         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
894         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
895         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
896         (MediaPlayerPrivateGStreamerBase):
897
898 2013-06-04  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
899
900         [Qt] Fix a crash in QtPixmapRuntime.
901         https://bugs.webkit.org/show_bug.cgi?id=117193
902         https://bugreports.qt-project.org/browse/QTBUG-30736
903
904         Reviewed by Allan Sandfeld Jensen.
905
906         The crash could only be reproduced in release builds on Windows.
907         JSClassCreate calculates the size of JSClassDefinition.staticValues
908         and staticFunctions by iterating until an entry with a null name is found.
909
910         * bridge/qt/qt_pixmapruntime.cpp:
911         (JSC::Bindings::QtPixmapRuntime::getClassRef):
912
913 2013-06-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
914
915         Automatically generate WorkerContext constructor attributes
916         https://bugs.webkit.org/show_bug.cgi?id=117183
917
918         Reviewed by Kentaro Hara.
919
920         Add [GlobalContext=WindowOnly|WorkerOnly|WindowAndWorker] IDL extended attribute
921         to indicate to the bindings generator on which global context the constructor
922         attribute should be generated for interfaces without [NoInterfaceObject]:
923         - WindowOnly: only on the global Window object (default if ommitted)
924         - WorkerOnly: only on the worker context
925         - WindowAndWorker: On both the global Window object and the worker context
926
927         This covers all the current use cases.
928
929         The JSC bindings generator now automatically generates the Constructor attributes
930         on the WorkerContext for non-callback interfaces which do not have the
931         [NoInterfaceObject] extended attribute but have [GlobalContext=WorkerOnly|WindowAndWorker]
932         extended attribute.
933
934         No new tests, already covered by:
935         fast/js/global-constructors-attributes.html
936         fast/js/global-constructors-attributes-worker.html
937
938         * CMakeLists.txt:
939         * DerivedSources.make: Pass new --workerContextConstructorsFile argument to preprocess-idls.pl.
940         * DerivedSources.pri: Ditto.
941         * GNUmakefile.am: Ditto.
942         * PlatformBlackBerry.cmake: Ditto.
943         * UseJSC.cmake: Ditto.
944         * bindings/scripts/IDLAttributes.txt: Add [GlobalContext=WindowOnly|WorkerOnly|WindowAndWorker]
945         IDL extended attribute.
946         * bindings/scripts/preprocess-idls.pl: Add support for [GlobalContext] extended attribute and
947         generate a partial interface for WorkerContext global constructors that are automatically
948         generated.
949         * dom/MessageEvent.idl: Add [GlobalContext=WindowAndWorker].
950         * fileapi/Blob.idl: Add [GlobalContext=WindowAndWorker].
951         * fileapi/FileReader.idl: Add [GlobalContext=WindowAndWorker].
952         * fileapi/FileReaderSync.idl: Add [GlobalContext=WorkerOnly] and remove [NoInterfaceObject]
953         as the interface should only be visible in worker environment as per the spec.
954         * html/DOMURL.idl: Add [GlobalContext=WindowAndWorker].
955         * html/canvas/ArrayBuffer.idl: Add [GlobalContext=WindowAndWorker].
956         * html/canvas/DataView.idl: Add [GlobalContext=WindowAndWorker].
957         * html/canvas/Float32Array.idl: Add [GlobalContext=WindowAndWorker].
958         * html/canvas/Float64Array.idl: Add [GlobalContext=WindowAndWorker].
959         * html/canvas/Int16Array.idl: Add [GlobalContext=WindowAndWorker].
960         * html/canvas/Int32Array.idl: Add [GlobalContext=WindowAndWorker].
961         * html/canvas/Int8Array.idl: Add [GlobalContext=WindowAndWorker].
962         * html/canvas/Uint16Array.idl: Add [GlobalContext=WindowAndWorker].
963         * html/canvas/Uint32Array.idl: Add [GlobalContext=WindowAndWorker].
964         * html/canvas/Uint8Array.idl: Add [GlobalContext=WindowAndWorker].
965         * html/canvas/Uint8ClampedArray.idl: Add [GlobalContext=WindowAndWorker].
966         * workers/WorkerContext.idl: Remove several Constructor attributes which are now automatically
967         generated.
968         * workers/WorkerLocation.idl: Add [GlobalContext=WorkerOnly] and remove [NoInterfaceObject]
969         as the interface should only be visible in worker environment as per the spec.
970
971 2013-06-04  Kangil Han  <kangil.han@samsung.com>
972
973         Use ASSERT_DISABLED option for assertion purpose code in InlineBox
974         https://bugs.webkit.org/show_bug.cgi?id=117146
975
976         Reviewed by Alexey Proskuryakov.
977
978         We can distinguish assertion code with debug purpose by using ASSERT_DISABLED option.
979
980         * rendering/InlineBox.cpp:
981         (WebCore::InlineBox::~InlineBox):
982         (WebCore::InlineBox::destroy):
983         (WebCore::InlineBox::operator delete):
984         * rendering/InlineBox.h:
985         (WebCore::InlineBox::InlineBox):
986
987 2013-06-04  Kent Tamura  <tkent@chromium.org>
988
989         Fix an assertion failure in Range::textNodeSplit by Text::splitText
990         https://bugs.webkit.org/show_bug.cgi?id=116509
991
992         Reviewed by Ryosuke Niwa.
993
994         Range::textNodeSplit is called in Text::splitText, and it assumes the
995         next sibling node is still a Text node. A DOM mutation event handler can
996         break this assumption.
997
998         We had better postpone DOM mutation events dispatched in Node::insertBefore
999         until exiting splitText to avoid inconsistent Range state.
1000
1001         This imports http://src.chromium.org/viewvc/blink?view=revision&revision=150493 .
1002
1003         Test: fast/dom/Range/split-text-in-range.html
1004
1005         * dom/Text.cpp:
1006         (WebCore::Text::splitText): Add EventQueueScope.
1007
1008 2013-06-03  Kangil Han  <kangil.han@samsung.com>
1009
1010         Remove unused arithmetic operation in RenderListItem
1011         https://bugs.webkit.org/show_bug.cgi?id=117175
1012
1013         Reviewed by Brent Fulgham.
1014
1015         Variable 'markerLogicalLeft' is reassigned a value before the old one has been used.
1016
1017         * rendering/RenderListItem.cpp:
1018         (WebCore::RenderListItem::positionListMarker):
1019
1020 2013-06-03  Roger Fong  <roger_fong@apple.com>
1021
1022         Unreviewed. Some AppleWin VS2010 house cleaning.
1023
1024         * WebCore.vcxproj/build-generated-files.sh:
1025
1026 2013-06-03  Roger Fong  <roger_fong@apple.com>
1027
1028         clearLayoutOverflow should never be called before calling layer()->updateScrollInfoAfterLayout().
1029         https://bugs.webkit.org/show_bug.cgi?id=116689.
1030
1031         Reviewed by Ojan Vafai.
1032
1033         Make sure that clearLayoutOverflow only gets called after layer()->updateScrollInfoAfterLayout().
1034         Also move clearLayoutOverflow to RenderBlock so we can keep all the delayed scroll update logic together.
1035
1036         Test: fast/flexbox/clear-overflow-before-scroll-update.html
1037
1038         * rendering/RenderBlock.cpp:
1039         (WebCore::RenderBlock::layout): Remove call to clearLayoutOverflow.
1040         (WebCore::RenderBlock::finishDelayUpdateScrollInfo): Add call to clearLayoutOverflow.
1041         (WebCore::RenderBlock::updateScrollInfoAfterLayout): Ditto.
1042         (WebCore::RenderBlock::clearLayoutOverflow): ASSERT(!gDelayUpdateScrollInfo) and move from RenderBox to RenderBlock to keep delayed scroll update logic together.
1043         * rendering/RenderBlock.h:
1044         (RenderBlock):
1045         * rendering/RenderBox.cpp:
1046         * rendering/RenderBox.h:
1047         (WebCore::RenderBox::layoutOverflowRect): Remove from layoutOverflowRect.
1048         (RenderBox): 
1049         * rendering/RenderDeprecatedFlexibleBox.cpp:
1050         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): This should call updateScrollInfoAfterLayout() intead of directly calling layer()->updateScrollInfoAfterLayout().
1051         * rendering/RenderGrid.cpp:
1052         (WebCore::RenderGrid::layoutBlock): Ditto.
1053
1054 2013-05-31  Anders Carlsson  <andersca@apple.com>
1055
1056         Take the normal NSView code path when drawing into an inclusive layer
1057         https://bugs.webkit.org/show_bug.cgi?id=117094
1058         <rdar://problem/13812355>
1059
1060         Reviewed by Sam Weinig.
1061
1062         For now, take the normal code path when drawing into an inclusive layer.
1063
1064         * platform/mac/WidgetMac.mm:
1065         (WebCore::Widget::paint):
1066
1067 2013-05-31  Tiancheng Jiang  <tijiang@rim.com>
1068
1069         [BlackBerry] Update Button UX.
1070         https://bugs.webkit.org/show_bug.cgi?id=116992
1071
1072         Reviewed by Rob Buis.
1073
1074         BlackBerry PR 342298.
1075         Internally Review by Jeff Rogers.
1076
1077         * css/themeBlackBerry.css:
1078
1079 2013-05-31  David Kilzer  <ddkilzer@apple.com>
1080
1081         DerivedSources.make: any rules that use $(FEATURE_DEFINES) should be rebuilt when FeatureDefines.xcconfig changes
1082         <http://webkit.org/b/117081>
1083
1084         Reviewed by Mark Rowe.
1085
1086         * DerivedSources.make: Add $(PLATFORM_FEATURE_DEFINES)
1087         dependency for all rules that use $(FEATURE_DEFINES) to generate
1088         files.
1089         (PLATFORM_FEATURE_DEFINES): Set this variable to
1090         Configurations/FeatureDefines.xcconfig if not already set on
1091         Mac OS X.
1092
1093 2013-05-31  Tiancheng Jiang  <tijiang@rim.com>
1094
1095         Text Field UX updates.
1096         https://bugs.webkit.org/show_bug.cgi?id=116996
1097
1098         Reviewed by Rob Buis.
1099
1100         BlackBerry PR 342333.
1101         Internally Reviewed by Jeff Rogers.
1102
1103         Update disabled text field font color.
1104
1105         * css/themeBlackBerry.css:
1106
1107 2013-05-31  Dean Jackson  <dino@apple.com>
1108
1109         Update CheckedInt.h to latest version from Mozilla
1110         https://bugs.webkit.org/show_bug.cgi?id=117009
1111
1112         Reviewed by Darin Adler.
1113
1114         Mozilla have updated their version of CheckedInt and suggested
1115         we sync. Here are the improvements:
1116
1117         - CheckedInt now consistently rejects unsupported types. Before, you
1118         could sometimes construct a CheckedInt from an unsupported type (like,
1119         float) or multiply a CheckedInt by a float, and have it not caught! See
1120         https://bugzilla.mozilla.org/show_bug.cgi?id=869194
1121          - Fixed a possibility of undefined behavior in unary operator-. See bug
1122         https://bugzilla.mozilla.org/show_bug.cgi?id=849666
1123          - CheckedInt now supports the "long long" and "unsigned long long"
1124         types. We don't like "long long" (and neither does the Google C++ style
1125         guide!) but we had to do that because libogg exposes typedefs to those
1126         types. See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=869685
1127          - CheckedInt also now supports "signed char" in addition to "char" ---
1128         they are not the same type! See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=847521
1129          - Fixed and simplified usage of CheckedInt outside of Mozilla. You'll
1130         like this one! See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=849667
1131          - Fixed compilation with the Intel C++ compiler. See bug https://bugzilla.mozilla.org/show_bug.cgi?id=784309
1132
1133         * html/canvas/CheckedInt.h: Updated.
1134
1135 2013-05-31  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
1136
1137         Make sure gstreamer source element is thread-safe
1138         https://bugs.webkit.org/show_bug.cgi?id=115352
1139
1140         Reviewed by Philippe Normand.
1141
1142         GStreamer source element may be created by any gstreamer element on any thread by calling
1143         gst_element_make_from_uri with the URIs handled by the source element.
1144         This patch makes sure the gstreamer source element is thread-safe to avoid issues with it
1145         being created outside the main thread.
1146
1147         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1148         (_WebKitWebSrcPrivate):
1149         (webkit_web_src_init):
1150         (webKitWebSrcFinalize):
1151         (webKitWebSrcSetProperty):
1152         (webKitWebSrcGetProperty):
1153         (webKitWebSrcStop):
1154         (webKitWebSrcStart):
1155         (webKitWebSrcChangeState):
1156         (webKitWebSrcQueryWithParent):
1157         (webKitWebSrcGetUri):
1158         (webKitWebSrcSetUri):
1159         (webKitWebSrcNeedDataMainCb):
1160         (webKitWebSrcEnoughDataMainCb):
1161         (webKitWebSrcSeekMainCb):
1162         (webKitWebSrcSeekDataCb):
1163         (webKitWebSrcSetMediaPlayer):
1164         (StreamingClient::StreamingClient):
1165         (StreamingClient::~StreamingClient):
1166         (StreamingClient::didReceiveResponse):
1167         (StreamingClient::didReceiveData):
1168         (StreamingClient::didFinishLoading):
1169         (StreamingClient::wasBlocked):
1170         (StreamingClient::cannotShowURL):
1171
1172 2013-05-31  Sergio Villar Senin  <svillar@igalia.com>
1173
1174         Build fix when CSSParser debugging is enabled
1175         https://bugs.webkit.org/show_bug.cgi?id=117075
1176
1177         Reviewed by Andreas Kling.
1178
1179         Build fails when enabling parser debugging by setting YYDEBUG to
1180         1 because of a missing include.
1181
1182         * css/CSSGrammar.y.includes:
1183
1184 2013-05-31  Alberto Garcia  <agarcia@igalia.com>
1185
1186         [Soup] [Gstreamer] ASSERT in StreamingClient::getOrCreateReadBuffer
1187         https://bugs.webkit.org/show_bug.cgi?id=116686
1188
1189         Reviewed by Carlos Garcia Campos.
1190
1191         We were using g_input_stream_read_async() to handle redirections
1192         because of Gnome bug #691489.
1193
1194         This produces an unexpected read attempt which triggers an assert
1195         in StreamingClient::getOrCreateReadBuffer().
1196
1197         Now that the Gnome bug is fixed we can replace read_async() with
1198         skip_async().
1199
1200         * platform/network/soup/ResourceHandleSoup.cpp:
1201         (WebCore::ResourceHandle::ensureReadBuffer):
1202         (WebCore::redirectSkipCallback):
1203         (WebCore::sendRequestCallback):
1204
1205 2013-05-30  Eugene Klyuchnikov  <eustas@chromium.org>
1206
1207         selectionStart/selectionEnd return "obsolete" values when requested during "input" event
1208         https://bugs.webkit.org/show_bug.cgi?id=110742
1209
1210         Reviewed by Ryosuke Niwa.
1211
1212         This patch defers firing "webkitEditableContentChanged" until new
1213         selection is applied to control. This makes selection during "input"
1214         more consistent and reliable.
1215
1216         Background: "input" event is fired by "webkitEditableContentChanged"
1217         dispatcher. But "input" is scoped event, so under some conditions its
1218         dispatching may be deferred. When "input" dispatching is deferred,
1219         dispatcher observes updated selectionStart and selectionEnd.
1220         Otherwise values repersent state before applying editing command.
1221
1222         So, to make selectionStart/End to be more predictable and useful, we
1223         need either always dispatch "input" before selection is updated, or
1224         always dispatch "input" after selection is updated.
1225
1226         As it was mentioned, dispatching could be deferred by scoping. So
1227         dispatching before updating selection couldn't be guaranteed.
1228         Moreover, it will be hard to calculate updated selection in user
1229         code. On the other side - old selection could be easily tracked.
1230
1231         So, it looks logically that we should guarantee dispatching "input"
1232         after updating selection. There are no execution paths in
1233         "webkitEditableContentChanged" dispatched that depends on current
1234         selection. So it is safe to fire this event after selection is updated.
1235
1236         Test: editing/selection/caret-after-keypress.html
1237
1238         * editing/Editor.cpp:
1239         Dispatch "input" event after new selection in applied.
1240
1241 2013-05-30  Ruth Fong  <ruth_fong@apple.com>
1242
1243         WebKit's Enter Full Screen for <video> elements isn't working
1244         https://bugs.webkit.org/show_bug.cgi?id=117001
1245
1246         Reviewed by Jer Noble.
1247
1248         Fix workflow to allow a video to enter into full screen
1249         mode from a kWKContextMenuItemTagEnterVideoFullscreen 
1250         context menu item by denoting the enterFullscreenForVideo
1251         call as a user gesture, so Document::requestFullScreenForElement
1252         will execute correctly.
1253
1254         No new tests. Covered by media/context-menu-actions.html,
1255         which is disabled due to bug #116651.
1256
1257         * rendering/HitTestResult.cpp:
1258         (WebCore::HitTestResult::enterFullscreenForVideo):
1259
1260 2013-05-30  Rafael Brandao  <rafael.lobo@openbossa.org>
1261
1262         Fix double hash lookup in RenderTableSection::paintObject loop
1263         https://bugs.webkit.org/show_bug.cgi?id=117055
1264
1265         Reviewed by Antonio Gomes.
1266
1267         * rendering/RenderTableSection.cpp:
1268         (WebCore::RenderTableSection::paintObject):
1269
1270 2013-05-31  Stephanie Lewis  <slewis@apple.com>
1271
1272         Update low memory handler to use new memory pressure notifications on new OS versions.
1273         <rdar://problem/14027095>
1274
1275         Reviewed by Mark Rowe.
1276
1277         No change in functionality.
1278
1279         * WebCore.exp.in:
1280         * platform/mac/MemoryPressureHandlerMac.mm:
1281         (WebCore::MemoryPressureHandler::install): Call new API
1282         * platform/mac/WebCoreSystemInterface.h: 
1283         * platform/mac/WebCoreSystemInterface.mm:
1284
1285 2013-05-30  Rafael Brandao  <rafael.lobo@openbossa.org>
1286
1287         Fix double hash lookup in WebSocket::connect loop
1288         https://bugs.webkit.org/show_bug.cgi?id=117052
1289
1290         Reviewed by Anders Carlsson.
1291
1292         * Modules/websockets/WebSocket.cpp:
1293         (WebCore::WebSocket::connect):
1294
1295 2013-05-30  Benjamin Poulain  <bpoulain@apple.com>
1296
1297         Remove some 16bits conversion.
1298         https://bugs.webkit.org/show_bug.cgi?id=116935
1299
1300         Reviewed by Darin Adler.
1301
1302         Merge chromium ce35a544d09e6cb907457535340eb0e9984e57b8.
1303         https://chromium.googlesource.com/chromium/blink/+/ce35a544d09e6cb907457535340eb0e9984e57b8
1304
1305         * html/parser/InputStreamPreprocessor.h:
1306         * platform/FileSystem.cpp:
1307         (WebCore::encodeForFileName):
1308
1309 2013-05-30  Anders Carlsson  <andersca@apple.com>
1310
1311         REGRESSION (r119759): Adobe Flash Player "smaller" installer relies on the incorrect firing of a load event and needs an app-specific hack for compatibility
1312         https://bugs.webkit.org/show_bug.cgi?id=117042
1313         <rdar://problem/13916291>
1314
1315         Reviewed by Mark Rowe.
1316
1317         Ignore HTTP errors for scripts requested from within the installer. Instead of just checking for the
1318         Adobe Flash installer, we use the "com.solidstatenetworks.awkhost" bundle identifier to determine
1319         whether to apply the workaround. This could in theory fix other installers that use the same mechanism.
1320
1321         * loader/cache/CachedScript.cpp:
1322         (WebCore::CachedScript::shouldIgnoreHTTPStatusCodeErrors):
1323         * loader/cache/CachedScript.h:
1324         * platform/RuntimeApplicationChecks.cpp:
1325         (WebCore::applicationIsSolidStateNetworksDownloader):
1326         * platform/RuntimeApplicationChecks.h:
1327
1328 2013-05-30  Sergio Villar Senin  <svillar@igalia.com>
1329
1330         Allow no space between "background-position:" dimensions
1331         https://bugs.webkit.org/show_bug.cgi?id=116870
1332
1333         Reviewed by Darin Adler.
1334
1335         From Blink r149314 by <ericwilligers@chromium.org>
1336
1337         Specs allow no spaces between the dimensions of a
1338         "background-position:" like "1px+1px", we should support
1339         that.
1340
1341         Whitespaces are no longer early consumed, dramatically dropping
1342         the shift/reduce conflicts to half. The productions unary_term,
1343         calc_func_term, calc_func_expr and calc_func_paren_expr no longer
1344         consume whitespaces.
1345
1346         * css/CSSGrammar.y.in:
1347         * css/CSSParser.cpp:
1348         (WebCore::CSSParser::realLex):
1349
1350 2013-05-30  Jer Noble  <jer.noble@apple.com>
1351
1352         HTMLMediaElement will not unthrottle page when playback stops for nreasons other than user-initiated pause.
1353         https://bugs.webkit.org/show_bug.cgi?id=117016
1354
1355         Reviewed by Oliver Hunt.
1356
1357         Add a new class PageActivityAssertionToken to allow HTMLMediaElement to decouple
1358         knowledge of and control over the lifetime of PageThrottler. The new class will
1359         have weak references to and from the PageThrottler so that holders of the token
1360         will not need to care if the Page or PageThrottler has been destroyed. 
1361
1362         HTMLMediaElement will create one of these PageActivityAssertionTokens when playback
1363         begins and destroy it when playback stops for any reason, or when the element is
1364         destroyed.
1365
1366         * html/HTMLMediaElement.cpp:
1367         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1368         (WebCore::HTMLMediaElement::playInternal):
1369         (WebCore::HTMLMediaElement::pauseInternal):
1370         (WebCore::HTMLMediaElement::playbackProgressTimerFired):
1371         (WebCore::HTMLMediaElement::updatePlayState):
1372         * html/HTMLMediaElement.h:
1373         * page/Page.cpp:
1374         (WebCore::createActivityToken): Added simple factory method.
1375         * page/Page.h:
1376         * page/PageActivityAssertionToken.cpp: 
1377         (WebCore::PageActivityAssertionToken::PageActivityAssertionToken): Call addActivityToken();
1378         (WebCore::PageActivityAssertionToken::~PageActivityAssertionToken): Call removeActivityToken();
1379         (WebCore::PageActivityAssertionToken::invalidate): Clear m_throttler.
1380         * page/PageActivityAssertionToken.h:
1381         * page/PageThrottler.cpp:
1382         (WebCore::PageThrottler::~PageThrottler): Invalidate all outstanding tokens.
1383         (WebCore::PageThrottler::addActivityToken): Bump the activity count.
1384         (WebCore::PageThrottler::removeActivityToken): Lower the activity count.
1385         * page/PageThrottler.h:
1386
1387         Add the new files to the various build systems:
1388         * CMakeLists.txt:
1389         * GNUmakefile.list.am:
1390         * Target.pri:
1391         * WebCore.vcproj/WebCore.vcproj:
1392         * WebCore.vcxproj/WebCore.vcxproj:
1393         * WebCore.vcxproj/WebCore.vcxproj.filters:
1394         * WebCore.xcodeproj/project.pbxproj:
1395
1396 2013-05-29  Jeffrey Pfau  <jpfau@apple.com>
1397
1398         [Mac] Enable cache partitioning and the public suffix list on 10.8
1399         <rdar://problem/13679019>
1400
1401         Rubber-stamped by David Kilzer.
1402
1403         * Configurations/FeatureDefines.xcconfig:
1404
1405 2013-05-30  Andreas Kling  <akling@apple.com>
1406
1407         Fix double hash lookup in DocumentEventQueue::cancelEvent().
1408         <http://webkit.org/b/117031>
1409
1410         Reviewed by Anders Carlsson.
1411
1412         * dom/DocumentEventQueue.cpp:
1413         (WebCore::DocumentEventQueue::cancelEvent):
1414
1415 2013-05-30  Andreas Kling  <akling@apple.com>
1416
1417         Fix double hash lookup in DocumentLoader::removeSubresourceLoader().
1418         <http://webkit.org/b/117030>
1419
1420         Reviewed by Anders Carlsson.
1421
1422         * loader/DocumentLoader.cpp:
1423         (WebCore::DocumentLoader::removeSubresourceLoader):
1424
1425 2013-05-30  Andreas Kling  <akling@apple.com>
1426
1427         Fix double hash lookup in RenderView::repaintSelection() loop.
1428         <http://webkit.org/b/117029>
1429
1430         Reviewed by Anders Carlsson.
1431
1432         * rendering/RenderView.cpp:
1433         (WebCore::RenderView::repaintSelection):
1434
1435 2013-05-30  Peter Gal  <galpeter@inf.u-szeged.hu>
1436
1437         CURL: Incorrect stripping of query from file URL
1438         https://bugs.webkit.org/show_bug.cgi?id=104307
1439
1440         Reviewed by Darin Adler.
1441
1442         Clear the query part of the file URL if there is any.
1443
1444         * platform/network/curl/ResourceHandleManager.cpp:
1445         (WebCore::ResourceHandleManager::initializeHandle):
1446
1447 2013-05-30  Antti Koivisto  <antti@apple.com>
1448
1449         Separate generic font family settings to a class
1450         https://bugs.webkit.org/show_bug.cgi?id=117027
1451
1452         Reviewed by Andreas Kling.
1453
1454         The new class is under platform/ and can be accessed by the font code directly without platform violations.
1455
1456         * WebCore.xcodeproj/project.pbxproj:
1457         * page/Settings.cpp:
1458         (WebCore::invalidateAfterGenericFamilyChange):
1459         (WebCore::Settings::Settings):
1460         (WebCore::Settings::~Settings):
1461         (WebCore::Settings::create):
1462         (WebCore::Settings::standardFontFamily):
1463         (WebCore::Settings::setStandardFontFamily):
1464         (WebCore::Settings::fixedFontFamily):
1465         (WebCore::Settings::setFixedFontFamily):
1466         (WebCore::Settings::serifFontFamily):
1467         (WebCore::Settings::setSerifFontFamily):
1468         (WebCore::Settings::sansSerifFontFamily):
1469         (WebCore::Settings::setSansSerifFontFamily):
1470         (WebCore::Settings::cursiveFontFamily):
1471         (WebCore::Settings::setCursiveFontFamily):
1472         (WebCore::Settings::fantasyFontFamily):
1473         (WebCore::Settings::setFantasyFontFamily):
1474         (WebCore::Settings::pictographFontFamily):
1475         (WebCore::Settings::setPictographFontFamily):
1476         * page/Settings.h:
1477         * platform/graphics/FontGenericFamilies.cpp: Added.
1478         (WebCore::setGenericFontFamilyForScript):
1479         (WebCore::genericFontFamilyForScript):
1480         (WebCore::FontGenericFamilies::FontGenericFamilies):
1481         (WebCore::FontGenericFamilies::standardFontFamily):
1482         (WebCore::FontGenericFamilies::fixedFontFamily):
1483         (WebCore::FontGenericFamilies::serifFontFamily):
1484         (WebCore::FontGenericFamilies::sansSerifFontFamily):
1485         (WebCore::FontGenericFamilies::cursiveFontFamily):
1486         (WebCore::FontGenericFamilies::fantasyFontFamily):
1487         (WebCore::FontGenericFamilies::pictographFontFamily):
1488         (WebCore::FontGenericFamilies::setStandardFontFamily):
1489         (WebCore::FontGenericFamilies::setFixedFontFamily):
1490         (WebCore::FontGenericFamilies::setSerifFontFamily):
1491         (WebCore::FontGenericFamilies::setSansSerifFontFamily):
1492         (WebCore::FontGenericFamilies::setCursiveFontFamily):
1493         (WebCore::FontGenericFamilies::setFantasyFontFamily):
1494         (WebCore::FontGenericFamilies::setPictographFontFamily):
1495         * platform/graphics/FontGenericFamilies.h: Added.
1496         (WebCore::UScriptCodeHashTraits::emptyValue):
1497         (WebCore::UScriptCodeHashTraits::constructDeletedValue):
1498         (WebCore::UScriptCodeHashTraits::isDeletedValue):
1499         (WebCore::FontGenericFamilies::create):
1500
1501 2013-05-30  Andreas Kling  <akling@apple.com>
1502
1503         Avoid using CSSOM style declarations in HTML editing.
1504         <http://webkit.org/b/117019>
1505
1506         Reviewed by Antti Koivisto.
1507
1508         Convert the editing code to use ComputedStyleExtractor instead of instantiating CSSOM wrappers.
1509
1510         * css/CSSComputedStyleDeclaration.h:
1511         * css/CSSComputedStyleDeclaration.cpp:
1512         (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
1513         (WebCore::ComputedStyleExtractor::useFixedFontDefaultSize):
1514         (WebCore::ComputedStyleExtractor::propertyMatches):
1515         (WebCore::ComputedStyleExtractor::copyProperties):
1516         (WebCore::ComputedStyleExtractor::copyPropertiesInSet):
1517
1518             Moved here from CSSComputedStyleDeclaration. These methods are used by HTML editing.
1519
1520         (WebCore::CSSComputedStyleDeclaration::copyProperties):
1521
1522             Reimplemented to call ComputedStyleExtractor.
1523
1524         * css/CSSStyleDeclaration.h:
1525         * css/PropertySetCSSStyleDeclaration.h:
1526         * css/PropertySetCSSStyleDeclaration.cpp:
1527         (WebCore::PropertySetCSSStyleDeclaration::copyProperties):
1528
1529             Removed CSSStyleDeclaration::cssPropertyMatches(), the remaining code lives in
1530             ComputedStyleExtractor::propertyMatches() and is only used by HTML editing.
1531
1532         * css/StylePropertySet.h:
1533         * css/StylePropertySet.cpp:
1534         (WebCore::MutableStylePropertySet::removeEquivalentProperties):
1535
1536             Added an overload that takes a ComputedStyleExtractor.
1537             This code should move into EditingStyle.cpp, material for a follow-up patch.
1538
1539         * editing/ApplyStyleCommand.cpp:
1540         (WebCore::toIdentifier):
1541
1542             Add a file-local helper for yanking the identifier value (if any) out of a CSSPrimitiveValue.
1543
1544         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
1545         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
1546         (WebCore::highestEmbeddingAncestor):
1547         * editing/EditingStyle.h:
1548         * editing/EditingStyle.cpp:
1549         (WebCore::editingStyleFromComputedStyle):
1550         (WebCore::extractPropertyValue):
1551         (WebCore::identifierForStyleProperty):
1552         (WebCore::textColorFromStyle):
1553         (WebCore::backgroundColorFromStyle):
1554         (WebCore::EditingStyle::init):
1555         (WebCore::EditingStyle::removeStyleAddedByNode):
1556         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
1557         (WebCore::EditingStyle::triStateOfStyle):
1558         (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode):
1559         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
1560         (WebCore::StyleChange::StyleChange):
1561         (WebCore::fontWeightIsBold):
1562         (WebCore::extractPropertiesNotIn):
1563         (WebCore::getPropertiesNotIn):
1564
1565             Use ComputedStyleExtractor instead of CSSComputedStyleDeclaration in all of this code.
1566             Templatized a bunch of the code so we don't have to repeat ourselves for both StylePropertySet
1567             and ComputedStyleExtractor inputs.
1568
1569 2013-05-30  Roland Takacs  <rtakacs@inf.u-szeged.hu>
1570
1571         Remove "hidden"=true from Inspector.json
1572         https://bugs.webkit.org/show_bug.cgi?id=114116
1573
1574         Reviewed by Timothy Hatcher.
1575
1576         Remove "hidden"=true because it's a Chromium concept.
1577         Patch created by Timothy Hatcher.
1578
1579         * inspector/Inspector.json:
1580
1581 2013-05-30  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1582
1583         [EFL][EGL] Implement TransportSurface client.
1584         https://bugs.webkit.org/show_bug.cgi?id=114122
1585
1586         Reviewed by Kenneth Rohde Christiansen.
1587
1588         Covered by existing WebGL tests.
1589
1590         This patch implements the client support for Transport
1591         Surface with EGL backend using GLES2.
1592
1593         * platform/graphics/surfaces/efl/GLTransportSurface.cpp:
1594         (WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
1595         (WebCore::GLTransportSurfaceClient::GLTransportSurfaceClient):
1596         * platform/graphics/surfaces/efl/GLTransportSurface.h:
1597         (GLTransportSurfaceClient):
1598         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
1599         (WebCore::GraphicsSurfacePrivate::initializeClient):
1600         * platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
1601         (WebCore):
1602         (WebCore::EGLConfigSelector::surfaceClientConfig):
1603         (WebCore::EGLConfigSelector::findMatchingConfigWithVisualId):
1604         * platform/graphics/surfaces/egl/EGLConfigSelector.h:
1605         (WebCore):
1606         (EGLConfigSelector):
1607
1608         Support for retrieving valid EGLConfig on client side.
1609
1610         * platform/graphics/surfaces/egl/EGLHelper.cpp:
1611         (WebCore):
1612         (WebCore::resolveDisplay):
1613         (WebCore::EGLHelper::resolveEGLBindings):
1614         (WebCore::EGLHelper::createEGLImage):
1615         (WebCore::EGLHelper::destroyEGLImage):
1616         (WebCore::EGLHelper::imageTargetTexture2DOES):
1617         * platform/graphics/surfaces/egl/EGLHelper.h:
1618
1619         Helper functions to create and destroy EGLImage.
1620
1621         * platform/graphics/surfaces/egl/EGLXSurface.cpp:
1622         (WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
1623         (WebCore):
1624         (WebCore::EGLXTransportSurfaceClient::~EGLXTransportSurfaceClient):
1625         (WebCore::EGLXTransportSurfaceClient::destroy):
1626         (WebCore::EGLXTransportSurfaceClient::prepareTexture):
1627         (WebCore::EGLTextureFromPixmap::EGLTextureFromPixmap):
1628         (WebCore::EGLTextureFromPixmap::~EGLTextureFromPixmap):
1629         (WebCore::EGLTextureFromPixmap::destroy):
1630         (WebCore::EGLTextureFromPixmap::isValid):
1631         (WebCore::EGLTextureFromPixmap::bindTexImage):
1632         (WebCore::EGLTextureFromPixmap::reBindTexImage):
1633         * platform/graphics/surfaces/egl/EGLXSurface.h:
1634         (EGLXTransportSurfaceClient):
1635
1636         TransportSurfaceClient implementation.
1637
1638         (WebCore):
1639         * platform/graphics/surfaces/glx/GLXSurface.cpp:
1640         (WebCore::GLXTransportSurfaceClient::GLXTransportSurfaceClient):
1641         * platform/graphics/surfaces/glx/GLXSurface.h:
1642         (GLXTransportSurfaceClient):
1643         * platform/graphics/surfaces/glx/X11Helper.cpp:
1644         (WebCore::X11Helper::createOffScreenWindow):
1645         (WebCore):
1646         (WebCore::X11Helper::createPixmap):
1647         * platform/graphics/surfaces/glx/X11Helper.h:
1648         (X11Helper):
1649
1650 2013-05-30  Mike West  <mkwst@chromium.org>
1651
1652         Rename 'KURL::elidedString' and inspector's 'String.prototype.trimMiddle' for clarity.
1653         https://bugs.webkit.org/show_bug.cgi?id=111700
1654
1655         Reviewed by Darin Adler.
1656
1657         Darin suggested that 'KURL::elidedString' is inaccurately named[1], this
1658         patch is an attempt to do better. It additionally brings the Inspector's
1659         'String.prototype.trimMiddle' method into line, as the two methods do
1660         more or less the same thing.
1661
1662         After a bit of discussion with Maciej and Daniel Bates on IRC, I've
1663         settled on 'KURL::stringCenterEllipsizedToLength(unsigned)' and
1664         'String.prototype.centerEllipsizedToLength(number)' respectively.
1665
1666         No new tests are added, as this patch shouldn't have any visible effect
1667         on the web. It's strictly an internal refactoring.
1668
1669         * Modules/websockets/WebSocket.cpp:
1670         (WebCore::WebSocket::connect):
1671         (WebCore::WebSocket::send):
1672         * Modules/websockets/WebSocketChannel.cpp:
1673         (WebCore::WebSocketChannel::send):
1674         (WebCore::WebSocketChannel::fail):
1675         * bindings/ScriptControllerBase.cpp:
1676         (WebCore::ScriptController::canExecuteScripts):
1677         * dom/Document.cpp:
1678         (WebCore::Document::processHttpEquiv):
1679         * dom/ScriptElement.cpp:
1680         (WebCore::ScriptElement::executeScript):
1681         * html/HTMLMediaElement.cpp:
1682         (WebCore::HTMLMediaElement::canPlayType):
1683         (WebCore::HTMLMediaElement::isSafeToLoadURL):
1684         * loader/FrameLoader.cpp:
1685         (WebCore::FrameLoader::submitForm):
1686         (WebCore::FrameLoader::loadFrameRequest):
1687         (WebCore::FrameLoader::commitProvisionalLoad):
1688         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
1689         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
1690         (WebCore::createWindow):
1691         * loader/MainResourceLoader.cpp:
1692         (WebCore::MainResourceLoader::willSendRequest):
1693         (WebCore::MainResourceLoader::responseReceived):
1694         * loader/MixedContentChecker.cpp:
1695         (WebCore::MixedContentChecker::logWarning):
1696         * loader/appcache/ApplicationCacheGroup.cpp:
1697         (WebCore::ApplicationCacheGroup::didReceiveResponse):
1698         (WebCore::ApplicationCacheGroup::didFail):
1699         * loader/cache/CachedResourceLoader.cpp:
1700         (WebCore::CachedResourceLoader::canRequest):
1701         (WebCore::CachedResourceLoader::requestResource):
1702         (WebCore::CachedResourceLoader::loadResource):
1703         (WebCore::CachedResourceLoader::printAccessDeniedMessage):
1704         * page/ContentSecurityPolicy.cpp:
1705         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
1706         (WebCore::CSPDirectiveList::allowScriptNonce):
1707         (WebCore::CSPDirectiveList::allowPluginType):
1708         * platform/KURL.cpp:
1709         (WebCore::KURL::stringCenterEllipsizedToLength):
1710         * platform/KURL.h:
1711             Rename 'KURL::elidedString' to 'KURL::stringCenterEllipsizedToLength',
1712             and adjust callsites accordingly.
1713         * inspector/front-end/CallStackSidebarPane.js:
1714         (WebInspector.CallStackSidebarPane.Placard.prototype._update):
1715         * inspector/front-end/ElementsTreeOutline.js:
1716         (WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
1717         * inspector/front-end/HeapSnapshotGridNodes.js:
1718         (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
1719         * inspector/front-end/Linkifier.js:
1720         (WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor):
1721         * inspector/front-end/ResourceUtils.js:
1722         (WebInspector.linkifyURLAsNode):
1723         * inspector/front-end/TabbedEditorContainer.js:
1724         (WebInspector.TabbedEditorContainer.prototype._titleForFile):
1725         * inspector/front-end/utilities.js:
1726             Rename 'String.prototype.trimMiddle' to 'String.prototype.centerEllipsizedToLength'
1727             and adjust callsites accordingly.
1728
1729 2013-05-30  Antti Koivisto  <antti@apple.com>
1730
1731         Rename FontFallbackList.cpp/h to FontGlyphs.cpp/h
1732         https://bugs.webkit.org/show_bug.cgi?id=117022
1733
1734         Reviewed by Andreas Kling.
1735
1736         Rename to match the class name.
1737
1738         * CMakeLists.txt:
1739         * GNUmakefile.list.am:
1740         * Target.pri:
1741         * WebCore.vcproj/WebCore.vcproj:
1742         * WebCore.vcxproj/WebCore.vcxproj:
1743         * WebCore.vcxproj/WebCore.vcxproj.filters:
1744         * WebCore.xcodeproj/project.pbxproj:
1745         * platform/graphics/Font.h:
1746         * platform/graphics/FontCache.cpp:
1747         * platform/graphics/FontFallbackList.cpp: Removed.
1748         * platform/graphics/FontFallbackList.h: Removed.
1749         * platform/graphics/FontFastPath.cpp:
1750         * platform/graphics/FontGlyphs.cpp: Copied from Source/WebCore/platform/graphics/FontFallbackList.cpp.
1751         * platform/graphics/FontGlyphs.h: Copied from Source/WebCore/platform/graphics/FontFallbackList.h.
1752         * platform/graphics/mac/FontComplexTextMac.cpp:
1753
1754 2013-05-30  Ryosuke Niwa  <rniwa@webkit.org>
1755
1756         Get rid of Position::computedStyle
1757         https://bugs.webkit.org/show_bug.cgi?id=117024
1758
1759         Reviewed by Andreas Kling.
1760
1761         Removed the function.
1762
1763         * dom/Position.cpp:
1764         * dom/Position.h:
1765         * editing/ApplyStyleCommand.cpp:
1766         (WebCore::ApplyStyleCommand::positionToComputeInlineStyleChange): We need a position
1767         inside the dummy element since we'll get the containing element's style instead
1768         if we had the position before the dummy element.
1769         * editing/EditingStyle.cpp:
1770         (WebCore::StyleChange::StyleChange):
1771
1772 2013-05-30  Seokju Kwon  <seokju.kwon@gmail.com>
1773
1774         Remove obsolete forward declaration from InspectorFrontendHost.h
1775         https://bugs.webkit.org/show_bug.cgi?id=117017
1776
1777         Reviewed by Joseph Pecoraro.
1778
1779         Remove obsolete forward declaration and fix style issue as well.
1780
1781         No change in behavior, no new tests.
1782
1783         * inspector/InspectorFrontendHost.h:
1784         (WebCore):
1785         (InspectorFrontendHost):
1786
1787 2013-05-29  Tim Horton  <timothy_horton@apple.com>
1788
1789         Expose incrementalRenderingSuppressionTimeout via WK2
1790         https://bugs.webkit.org/show_bug.cgi?id=117015
1791         <rdar://problem/13992853>
1792
1793         Reviewed by Darin Adler.
1794
1795         * dom/Document.cpp:
1796         (WebCore::Document::setVisualUpdatesAllowed):
1797         Inform the FrameLoader that we're ready to transition the page, if
1798         nothing else already has. This will be forwarded to the FrameLoaderClient,
1799         and WebKit2's implementation will go ahead and un-freeze the layer tree,
1800         so that the incremental rendering suppression watchdog timer actually works.
1801
1802         (WebCore::Document::setVisualUpdatesAllowedByClient):
1803         Make incremental rendering suppression extension tokens play nice with the
1804         watchdog timer; allow setVisualUpdatesAllowedByClient=true to re-enable updates
1805         if either the page is in the "completed" state or the watchdog has already fired.
1806
1807         * loader/FrameLoader.cpp:
1808         * loader/FrameLoader.h:
1809         (WebCore::FrameLoader::forcePageTransitionIfNeeded): Added.
1810         Forward to the client.
1811
1812         * loader/FrameLoaderClient.h:
1813         (WebCore::FrameLoaderClient::forcePageTransitionIfNeeded): Added.
1814
1815 2013-05-29  Praveen R Jadhav  <praveen.j@samsung.com>
1816
1817         ProgressEvent should not be cancelable
1818         https://bugs.webkit.org/show_bug.cgi?id=114444
1819
1820         Reviewed by Darin Adler.
1821
1822         Parameter "cancelable" in ProgressEvent is set to false, by default, as mentioned in the specification. The spec link is given below.
1823
1824         Spec: http://www.w3.org/TR/2011/CR-progress-events-20110922/#suggested-names-for-events-using-the-progressevent-interface
1825
1826         No new tests. file-reader-event-listener.html and infoOnProgressEvent-expected.txt are updated.
1827
1828         * dom/ProgressEvent.cpp:
1829         (WebCore::ProgressEvent::ProgressEvent):
1830         (WebCore):
1831
1832 2013-05-29  Simon Fraser  <simon.fraser@apple.com>
1833
1834         Fix paint-related milestones to not fire when the layer tree is frozen
1835         https://bugs.webkit.org/show_bug.cgi?id=117012
1836
1837         Reviewed by Tim Horton.
1838
1839         In the previous code, it was possible to paint some layer and schedule
1840         the m_paintRelatedMilestonesTimer, but then the layer tree was put into
1841         a frozen state because the page redirected. However, the paint-related
1842         milestones timer would still fire. This caused woes with header/footer
1843         banners.
1844         
1845         Fix by not firing paint-related milestones if the layer tree is frozen,
1846         which we know via a new ChromeClient callback. When unfrozen, we'll
1847         paint again, and fire the timer later.
1848
1849         * page/ChromeClient.h:
1850         (WebCore::ChromeClient::layerTreeStateIsFrozen):
1851         * rendering/RenderLayerCompositor.cpp:
1852         (WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
1853
1854 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
1855
1856         Store form control list with RefPtr
1857         https://bugs.webkit.org/show_bug.cgi?id=116910
1858
1859         Reviewed by Kent Tamura.
1860
1861         Merge https://chromium.googlesource.com/chromium/blink/+/582132773280455ead1d42b0073be37efdeaf989.
1862
1863         Unfortunately, the Blink change doesn't provide much insight as to what kind of crashes are fixed
1864         by this code change but it cleans up the way form elements with state are registered to the form
1865         controller so it seems benefitial to merge it anyway.
1866
1867         * dom/Document.cpp:
1868         (WebCore::Document::dispose):
1869         * html/FormController.cpp:
1870         (WebCore::FormController::createSavedFormStateMap):
1871         (WebCore::FormController::registerFormElementWithState):
1872         (WebCore::FormController::unregisterFormElementWithState):
1873         (WebCore):
1874         * html/FormController.h:
1875         (FormController):
1876         * html/HTMLFormControlElementWithState.cpp:
1877         (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
1878         (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
1879         (WebCore::HTMLFormControlElementWithState::insertedInto):
1880         (WebCore):
1881         (WebCore::HTMLFormControlElementWithState::removedFrom):
1882         * html/HTMLFormControlElementWithState.h:
1883         (HTMLFormControlElementWithState):
1884         * html/HTMLTextFormControlElement.cpp:
1885         (WebCore::HTMLTextFormControlElement::insertedInto):
1886
1887 2013-05-29  Andreas Kling  <akling@apple.com>
1888
1889         Take ComputedStyleExtractor for a spin.
1890         <http://webkit.org/b/116968>
1891
1892         Reviewed by Antti Koivisto.
1893
1894         Convert some editing and SVG code to use ComputedStyleExtractor instead of creating full
1895         blown CSSComputedStyleDeclaration objects.
1896
1897         * editing/ApplyStyleCommand.cpp:
1898         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
1899         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
1900         (WebCore::highestEmbeddingAncestor):
1901         (WebCore::ApplyStyleCommand::computedFontSize):
1902         * editing/EditingStyle.cpp:
1903         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
1904         (WebCore::EditingStyle::textDirectionForSelection):
1905         (WebCore::getIdentifierValue):
1906         (WebCore::backgroundColorInEffect):
1907         * editing/EditingStyle.h:
1908         * svg/SVGAnimationElement.cpp:
1909         (WebCore::SVGAnimationElement::computeCSSPropertyValue):
1910
1911 2013-05-29  Benjamin Poulain  <bpoulain@apple.com>
1912
1913         Add a special case for SelectorDataList::execute when there is only one selector
1914         https://bugs.webkit.org/show_bug.cgi?id=116891
1915
1916         Reviewed by Andreas Kling.
1917
1918         In the vast majority of cases, querySelector is called with a single selector.
1919
1920         This patch takes that input into account to improve the performance of
1921         SelectorDataList::execute(). For the case of a single selector, we avoid three
1922         branches executed for every node of the traversal.
1923
1924         This improves QuerySelector's time by 2.3%.
1925
1926         * dom/SelectorQuery.cpp:
1927         (WebCore::SelectorDataList::execute):
1928
1929 2013-05-29  Dean Jackson  <dino@apple.com>
1930
1931         -webkit-text-underline-position should not be inherited
1932         https://bugs.webkit.org/show_bug.cgi?id=116363
1933
1934         Reverting http://trac.webkit.org/changeset/150366
1935         It was an incorrect fix referring to an old specification.
1936
1937         * css/CSSProperty.cpp:
1938         (WebCore::CSSProperty::isInheritedProperty):
1939         * rendering/style/RenderStyle.h:
1940         * rendering/style/StyleRareInheritedData.cpp:
1941         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1942         (WebCore::StyleRareInheritedData::operator==):
1943         * rendering/style/StyleRareInheritedData.h:
1944         (StyleRareInheritedData):
1945         * rendering/style/StyleRareNonInheritedData.cpp:
1946         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1947         (WebCore::StyleRareNonInheritedData::operator==):
1948         * rendering/style/StyleRareNonInheritedData.h:
1949         (StyleRareNonInheritedData):
1950
1951 2013-05-29  Ryuan Choi  <ryuan.choi@samsung.com>
1952
1953         [CMAKE] cmake errors when CMAKE_BUILD_TYPE is not specified.
1954         https://bugs.webkit.org/show_bug.cgi?id=116899
1955
1956         Reviewed by Laszlo Gombos.
1957
1958         * CMakeLists.txt: Fixed if statement to escape when find command fails.
1959
1960 2013-05-28  Oliver Hunt  <oliver@apple.com>
1961
1962         Add more accurate activity state tracking
1963         https://bugs.webkit.org/show_bug.cgi?id=116893
1964
1965         Reviewed by Gavin Barraclough.
1966
1967         Add a hysteresis to Page activity throttling.  We do this
1968         through a PageThrottler class that now handles entering and
1969         exiting throttling state, and adds a hysteresis to we can
1970         limit the amount of on/off bouncing on the throttle.
1971
1972         Media elements now make use of this to disable timer throttling
1973         while they are playing, and plugins use it to momentarily bounce
1974         from throttled to unthrottled state.
1975
1976         * CMakeLists.txt:
1977         * GNUmakefile.list.am:
1978         * Target.pri:
1979         * WebCore.exp.in:
1980         * WebCore.vcproj/WebCore.vcproj:
1981         * WebCore.vcxproj/WebCore.vcxproj:
1982         * WebCore.vcxproj/WebCore.vcxproj.filters:
1983         * WebCore.xcodeproj/project.pbxproj:
1984         * html/HTMLMediaElement.cpp:
1985         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1986         (WebCore::HTMLMediaElement::pageThrottlerIfPossible):
1987         (WebCore):
1988         (WebCore::HTMLMediaElement::playInternal):
1989         (WebCore::HTMLMediaElement::pauseInternal):
1990         * html/HTMLMediaElement.h:
1991         (WebCore):
1992         * html/MediaController.cpp:
1993         (MediaController::unpause):
1994         * page/ChromeClient.h:
1995         (WebCore::ChromeClient::incrementActivePageCount):
1996         (WebCore::ChromeClient::decrementActivePageCount):
1997         (ChromeClient):
1998         * page/Page.cpp:
1999         (WebCore::Page::Page):
2000         (WebCore::Page::~Page):
2001         (WebCore::Page::setThrottled):
2002         * page/Page.h:
2003         (WebCore):
2004         (Page):
2005         (WebCore::Page::pageThrottler):
2006         * page/PageThrottleState.h: Added.
2007         * page/PageThrottler.cpp: Added.
2008         (WebCore):
2009         (WebCore::PageThrottler::PageThrottler):
2010         (WebCore::PageThrottler::~PageThrottler):
2011         (WebCore::PageThrottler::clearPage):
2012         (WebCore::PageThrottler::throttlePage):
2013         (WebCore::PageThrottler::unthrottlePage):
2014         (WebCore::PageThrottler::setThrottled):
2015         (WebCore::PageThrottler::preventThrottling):
2016         (WebCore::PageThrottler::allowThrottling):
2017         (WebCore::PageThrottler::stopThrottleHysteresisTimer):
2018         (WebCore::PageThrottler::reportInterestingEvent):
2019         (WebCore::PageThrottler::startThrottleHysteresisTimer):
2020         (WebCore::PageThrottler::throttleHysteresisTimerFired):
2021         * page/PageThrottler.h: Added.
2022         (WebCore):
2023         (PageThrottler):
2024         (WebCore::PageThrottler::create):
2025         (WebCore::PageThrottler::shouldThrottleAnimations):
2026         (WebCore::PageThrottler::shouldThrottleTimers):
2027
2028 2013-05-29  Kent Tamura  <tkent@chromium.org>
2029
2030         Remove leftover files for ENABLE_PAGE_POPUP and ENABLE_CALENDAR_PICKER
2031         https://bugs.webkit.org/show_bug.cgi?id=116999
2032
2033         Reviewed by Anders Carlsson.
2034
2035         * Resources/pagepopups/colorSuggestionPicker.css: Removed.
2036         * Resources/pagepopups/colorSuggestionPicker.js: Removed.
2037         * Resources/pagepopups/pickerCommon.css: Removed.
2038         * Resources/pagepopups/pickerCommon.js: Removed.
2039         * Resources/pagepopups/suggestionPicker.css: Removed.
2040         * Resources/pagepopups/suggestionPicker.js: Removed.
2041
2042 2013-05-29  Jer Noble  <jer.noble@apple.com>
2043
2044         Unreviewed build fix; remove unintentional semicolon.
2045
2046         * Modules/webaudio/AudioScheduledSourceNode.cpp:
2047         (WebCore::AudioScheduledSourceNode::finish):
2048
2049 2013-05-29  Anders Carlsson  <andersca@apple.com>
2050
2051         Merge PODArea::Chunk into PODFreeListArena::FreeListChunk
2052         https://bugs.webkit.org/show_bug.cgi?id=117000
2053
2054         Reviewed by Oliver Hunt.
2055
2056         * platform/PODArena.h:
2057         (WebCore::PODArena::roundUp):
2058         * platform/PODFreeListArena.h:
2059         (PODFreeListArena):
2060         (WebCore::PODFreeListArena::FreeListChunk::FreeListChunk):
2061         (FreeListChunk):
2062         (WebCore::PODFreeListArena::FreeListChunk::~FreeListChunk):
2063         (WebCore::PODFreeListArena::FreeListChunk::allocate):
2064
2065 2013-05-29  Anders Carlsson  <andersca@apple.com>
2066
2067         Move some PODArena members to PODFreeListArena
2068         https://bugs.webkit.org/show_bug.cgi?id=116993
2069
2070         Reviewed by Sam Weinig.
2071
2072         This is more work towards merging the two classes.
2073
2074         * platform/PODArena.h:
2075         (PODArena):
2076         * platform/PODFreeListArena.h:
2077         (PODFreeListArena):
2078         (WebCore::PODFreeListArena::PODFreeListArena):
2079
2080 2013-05-29  Jer Noble  <jer.noble@apple.com>
2081
2082         [Mac] Scrubbing long movie files results in timeline snapping back to 0 during scrub.
2083         https://bugs.webkit.org/show_bug.cgi?id=116986
2084
2085         Reviewed by Eric Carlson.
2086
2087         Keep a count of the number of in-flight seek requests, and only issue a timeupdate
2088         (which triggers a "seeked" event) when the final seek completes.
2089
2090         Test: media/video-seek-multiple.html
2091
2092         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2093         (WebCore::MediaPlayerPrivateAVFoundation::seek):
2094         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
2095         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2096         (MediaPlayerPrivateAVFoundation):
2097
2098 2013-05-29  Anders Carlsson  <andersca@apple.com>
2099
2100         Remove unused code from PODArena
2101         https://bugs.webkit.org/show_bug.cgi?id=116990
2102
2103         Reviewed by Sam Weinig.
2104
2105         PODArena is only used as a base class of PODFreeListArena so remove unused member functions and make all
2106         members protected to make it impossible to use it without subclassing.
2107
2108         PODArena is a risky class to use since it doesn't return memory to the system unless the arena object is destroyed.
2109         This was the reason why PODFreeListArea was added. An upcoming patch will merge PODArena with PODFreeListArena and
2110         this is a small step towards that goal.
2111
2112         * platform/PODArena.h:
2113
2114 2013-05-29  Darin Adler  <darin@apple.com>
2115
2116         Remove custom binding for Clipboard setDragImage function
2117         https://bugs.webkit.org/show_bug.cgi?id=116422
2118
2119         Reviewed by Sam Weinig.
2120
2121         * bindings/js/JSClipboardCustom.cpp: Removed setDragImage binding.
2122
2123         * dom/Clipboard.cpp:
2124         (WebCore::Clipboard::canSetDragImage): Added a condition that this is a drag
2125         and drop clipboard. That used to be checked in the setDragImage binding.
2126         (WebCore::Clipboard::setDragImage): Added a version that takes an Element
2127         and calls through to the existing functions (in the legacy code path), or handles
2128         both the Element and HTMLImageElement not-in-document cases (in the new code path).
2129
2130         * dom/Clipboard.h: Updated for changes above.
2131
2132         * dom/Clipboard.idl: Removed [Custom] from setDragImage.
2133
2134         * page/EventHandler.cpp:
2135         (WebCore::EventHandler::handleDrag): Call the new setDragImage instead of the
2136         old setDragImageElement.
2137
2138 2013-05-29  Praveen R Jadhav  <praveen.j@samsung.com>
2139
2140         Cleanup AudioSourceNode.idl from WebKit build.
2141         https://bugs.webkit.org/show_bug.cgi?id=116905.
2142
2143         Reviewed by Darin Adler.
2144
2145         AudioSourceNode.idl is not part of WebAudio Specifications anymore.
2146         AudioNode is inherited directly in all the audio source nodes.
2147
2148         No new tests. Current test cases will cover all the scenarios.
2149
2150         * CMakeLists.txt:
2151         * DerivedSources.make:
2152         * DerivedSources.pri:
2153         * GNUmakefile.list.am:
2154         * Modules/webaudio/AudioBufferSourceNode.h:
2155         * Modules/webaudio/AudioBufferSourceNode.idl:
2156         * Modules/webaudio/AudioScheduledSourceNode.cpp:
2157         (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
2158         * Modules/webaudio/AudioScheduledSourceNode.h:
2159         * Modules/webaudio/AudioSourceNode.h: Removed.
2160         * Modules/webaudio/AudioSourceNode.idl: Removed.
2161         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
2162         (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
2163         * Modules/webaudio/MediaElementAudioSourceNode.h:
2164         (MediaElementAudioSourceNode):
2165         * Modules/webaudio/MediaElementAudioSourceNode.idl:
2166         * Modules/webaudio/MediaStreamAudioDestinationNode.idl:
2167         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
2168         (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
2169         * Modules/webaudio/MediaStreamAudioSourceNode.h:
2170         (MediaStreamAudioSourceNode):
2171         * Modules/webaudio/MediaStreamAudioSourceNode.idl:
2172         * Modules/webaudio/OscillatorNode.h:
2173         * Modules/webaudio/OscillatorNode.idl:
2174         * Target.pri:
2175         * WebCore.xcodeproj/project.pbxproj:
2176
2177 2013-05-29  Adam Barth  <abarth@webkit.org>
2178
2179         Optimize RenderText::offsetNext for 8 bit strings
2180         https://bugs.webkit.org/show_bug.cgi?id=116877
2181
2182         Reviewed by Darin Adler.
2183
2184         Previously, this function was always upconverting strings to 16 bits in
2185         order to create a cursorMovementIterator. This patch adds a fast path
2186         for ASCII and Latin-1 strings, which don't need this complicated cursor
2187         movement logic.
2188
2189         I ran into this code because nextOffset showed up as a memory pig on a
2190         memory profile of Mobile Gmail.
2191
2192         Test: editing/selection/move-by-character-brute-force.html
2193
2194         * rendering/RenderText.cpp:
2195         (WebCore::RenderText::previousOffset):
2196         (WebCore::RenderText::nextOffset):
2197
2198 2013-05-29  Brent Fulgham  <bfulgham@apple.com>
2199
2200         [Windows] Correct copy command (form versus forms)
2201
2202         * WebCore.vcproj/copyForwardingHeaders.cmd:
2203         * WebCore.vcxproj/copyForwardingHeaders.cmd:
2204
2205 2013-05-29  Bem Jones-Bey  <bjonesbe@adobe.com>
2206
2207         [CSS Shapes] Fix style issues in BasicShapes
2208         https://bugs.webkit.org/show_bug.cgi?id=116734
2209
2210         Reviewed by Alexandru Chiculita.
2211
2212         Fix indentation in BasicShapes.cpp, and change enums to respect the
2213         style rules CamelCase instead of HAVING_UNDERSCORES.
2214
2215         No new tests, only style changes.
2216
2217         * css/BasicShapeFunctions.cpp:
2218         (WebCore::valueForBasicShape):
2219         (WebCore::basicShapeForValue):
2220         * css/CSSBasicShapes.cpp:
2221         (WebCore::buildRectangleString):
2222         (WebCore::CSSBasicShapeRectangle::equals):
2223         (WebCore::CSSBasicShapeCircle::equals):
2224         (WebCore::CSSBasicShapeEllipse::equals):
2225         (WebCore::CSSBasicShapePolygon::equals):
2226         (WebCore::CSSBasicShapeInsetRectangle::equals):
2227         * css/CSSBasicShapes.h:
2228         (WebCore::CSSBasicShapeRectangle::type):
2229         (WebCore::CSSBasicShapeInsetRectangle::type):
2230         (WebCore::CSSBasicShapeCircle::type):
2231         (WebCore::CSSBasicShapeEllipse::type):
2232         (WebCore::CSSBasicShapePolygon::type):
2233         * rendering/ExclusionShape.cpp:
2234         (WebCore::ExclusionShape::createExclusionShape):
2235         * rendering/ExclusionShapeInsideInfo.cpp:
2236         (WebCore::ExclusionShapeInsideInfo::isEnabledFor):
2237         * rendering/ExclusionShapeOutsideInfo.cpp:
2238         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor):
2239         * rendering/style/BasicShapes.cpp:
2240         (WebCore::BasicShape::canBlend):
2241         (WebCore::BasicShapeRectangle::path):
2242         (WebCore::BasicShapeCircle::path):
2243         (WebCore::BasicShapeEllipse::path):
2244         (WebCore::BasicShapeInsetRectangle::path):
2245         * rendering/style/BasicShapes.h:
2246         (WebCore::BasicShapeRectangle::type):
2247         (WebCore::BasicShapeCircle::type):
2248         (WebCore::BasicShapeEllipse::type):
2249         (WebCore::BasicShapePolygon::type):
2250         (WebCore::BasicShapeInsetRectangle::type):
2251
2252 2013-05-29  Otto Derek Cheung  <otcheung@rim.com>
2253
2254         [BlackBerry] Handle Host-Only cookies
2255         https://bugs.webkit.org/show_bug.cgi?id=116969
2256
2257         PR 338809
2258         Reviewed by Rob Buis.
2259         Internally Reviewed by Joe Mason.
2260
2261         Adding support for host-only cookies (cookies with no
2262         specified domains). These cookies should only be returned
2263         when the host matches the cookie domain exactly.
2264
2265         Tested using Opera and Browser cookie test suite. Tested
2266         that host cookies are being stored in it's own map using
2267         Web Inspector.
2268
2269         * platform/blackberry/CookieManager.cpp:
2270         (WebCore::CookieManager::getRawCookies):
2271         (WebCore::CookieManager::checkAndTreatCookie):
2272         (WebCore::CookieManager::findOrCreateCookieMap):
2273         * platform/blackberry/CookieParser.cpp:
2274         (WebCore::CookieParser::CookieParser):
2275         (WebCore::CookieParser::parseOneCookie):
2276         * platform/blackberry/ParsedCookie.h:
2277         (WebCore::ParsedCookie::isHostOnly):
2278         (ParsedCookie):
2279
2280 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
2281
2282         Remove the size of DataVector in HTMLToken
2283         https://bugs.webkit.org/show_bug.cgi?id=116931
2284
2285         Reviewed by Sam Weinig.
2286
2287         Merge https://chromium.googlesource.com/chromium/blink/+/7977721e62c471bfa17b84d82cd5d8243a4eb9a9.
2288
2289         Shink HTMLToken by 1.5 kB
2290
2291         HTMLToken has an inline vector for buffering characters during tokenization. We
2292         originally picked the inline capacity of this buffer somewhat arbitrarily. This
2293         CL tunes the number based on a somewhat non-scientific browse of a number of
2294         popular web sites.
2295
2296         I (abarth) instrumented content_shell to log the length of each complete DataVector. I
2297         then browsed around a variety of web sites to collect data. The 99% percentile
2298         of DataVector lengths was just shy of 250 characters. I rounded that up to 256
2299         because powers of two are pretty. That means we'll malloc an external buffer
2300         less than 1% of the time, which seems fine.
2301
2302         * html/parser/HTMLToken.h:
2303         (HTMLToken):
2304
2305 2013-05-29  Brent Fulgham  <bfulgham@apple.com>
2306
2307         [Windows] Build correction after r150837
2308
2309         New 'forms' sub-folder of html needs to be included in
2310         copy operations.
2311
2312         * WebCore.vcproj/copyForwardingHeaders.cmd: copy html/forms.
2313         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Use correct
2314         'obj32' folder for build output.
2315         * WebCore.vcxproj/copyForwardingHeaders.cmd: copy html/forms.
2316
2317 2013-05-29  Tiancheng Jiang  <tijiang@rim.com>
2318
2319         [BlackBerry] Radio Button UX updates.
2320         https://bugs.webkit.org/show_bug.cgi?id=116881
2321
2322         Reviewed by Rob Buis.
2323
2324         BlackBerry PR 342322.
2325         Internally Reviewed by Jeff Rogers.
2326         Change images.
2327
2328         * platform/blackberry/RenderThemeBlackBerry.cpp:
2329         (WebCore::RenderThemeBlackBerry::paintRadio):
2330
2331 2013-05-29  Tiancheng Jiang  <tijiang@rim.com>
2332
2333         [BlackBerry] Datetime string is not centred in form controls.
2334         https://bugs.webkit.org/show_bug.cgi?id=100760
2335
2336         Reviewed by Rob Buis.
2337
2338         BlackBerry PR 343512
2339         Internally Reviewed by Jeff Rogers.
2340
2341         Adjust margin for inner text node of datetime form controls.
2342
2343         * css/themeBlackBerry.css:
2344         (input::-webkit-date-and-time-value):
2345
2346 2013-05-29  Brent Fulgham  <bfulgham@apple.com>
2347
2348         [Windows] Build correction after r150876
2349
2350         A clean build will now fail because the BaseMultipleFieldsDateAndTimeInputType sources have
2351         been removed, but are still referenced in the project file.
2352
2353         * WebCore.vcxproj/WebCore.vcxproj: Remove reference to BaseMultipleFieldsDateAndTimeInputType
2354         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
2355
2356 2013-05-28  Jer Noble  <jer.noble@apple.com>
2357
2358         Support the 'onended' EventListener property for AudioBufferSourceNode and OscillatorNode.
2359         https://bugs.webkit.org/show_bug.cgi?id=116798
2360
2361         Reviewed by Eric Carlson.
2362
2363         Tests: webaudio/audiobuffersource-ended.html
2364                webaudio/oscillator-ended.html
2365
2366         * Modules/webaudio/AudioScheduledSourceNode.cpp:
2367         (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
2368         (WebCore::AudioScheduledSourceNode::setOnended): Set m_hasEndedListener.
2369         (WebCore::AudioScheduledSourceNode::finish): Call notifyEndedDispatch on the main thread.
2370         (WebCore::AudioScheduledSourceNode::notifyEndedDispatch): Call notifyEnded().
2371         (WebCore::AudioScheduledSourceNode::notifyEnded): Call the onended event listener.
2372         * Modules/webaudio/AudioScheduledSourceNode.h:
2373         (WebCore::AudioScheduledSourceNode::onended): Added boilerplate.
2374         * Modules/webaudio/AudioBufferSourceNode.idl: Added the onerror attribute.
2375         * Modules/webaudio/OscillatorNode.idl: Ditto.
2376
2377 2013-05-29  Bem Jones-Bey  <bjonesbe@adobe.com>
2378
2379         [CSS Shapes] Support parsing inset-rectangle shapes
2380         https://bugs.webkit.org/show_bug.cgi?id=116638
2381
2382         Reviewed by Dean Jackson.
2383
2384         Add parsing for inset-rectangle. It's very similar to parsing for
2385         rectangle.
2386
2387         No new tests, updated existing tests to cover this.
2388
2389         * css/BasicShapeFunctions.cpp:
2390         (WebCore::valueForBasicShape): Add support for inset rectangles.
2391         (WebCore::basicShapeForValue): Add support for inset rectangles.
2392         * css/CSSBasicShapes.cpp:
2393         (WebCore::buildInsetRectangleString): Create an inset-rectangle css
2394             string.
2395         (WebCore::CSSBasicShapeInsetRectangle::cssText): Convert inset
2396             rectangle shape to a CSS string.
2397         (WebCore::CSSBasicShapeInsetRectangle::equals): Compare two inset
2398             rectangles.
2399         (WebCore::CSSBasicShapeInsetRectangle::serializeResolvingVariables):
2400             Create an inset rectangle string, with CSS variables resolved.
2401         (WebCore::CSSBasicShapeInsetRectangle::hasVariableReference):
2402             Determine if this inset rectangle has any CSS Variable references.
2403         * css/CSSBasicShapes.h:
2404         (CSSBasicShapeInsetRectangle): Add inset rectangle class. This is a
2405             direct representation of the CSS property. All the methods below
2406             are just simple getters and setters, along with a construtor and a
2407             factory method.
2408         (WebCore::CSSBasicShapeInsetRectangle::create): 
2409         (WebCore::CSSBasicShapeInsetRectangle::top): 
2410         (WebCore::CSSBasicShapeInsetRectangle::right):
2411         (WebCore::CSSBasicShapeInsetRectangle::bottom):
2412         (WebCore::CSSBasicShapeInsetRectangle::left):
2413         (WebCore::CSSBasicShapeInsetRectangle::radiusX):
2414         (WebCore::CSSBasicShapeInsetRectangle::radiusY):
2415         (WebCore::CSSBasicShapeInsetRectangle::setTop):
2416         (WebCore::CSSBasicShapeInsetRectangle::setRight):
2417         (WebCore::CSSBasicShapeInsetRectangle::setBottom):
2418         (WebCore::CSSBasicShapeInsetRectangle::setLeft):
2419         (WebCore::CSSBasicShapeInsetRectangle::setRadiusX):
2420         (WebCore::CSSBasicShapeInsetRectangle::setRadiusY):
2421         (WebCore::CSSBasicShapeInsetRectangle::type):
2422         (WebCore::CSSBasicShapeInsetRectangle::CSSBasicShapeInsetRectangle):
2423         (WebCore):
2424         * css/CSSParser.cpp:
2425         (WebCore::CSSParser::parseBasicShapeInsetRectangle): Parse the
2426             inset-rectangle CSS property and create a
2427             CSSBasicShapeInsetRectangle.
2428         (WebCore::CSSParser::parseBasicShape): Add a call to parse
2429             inset-rectangle.
2430         * rendering/ExclusionShapeInsideInfo.cpp:
2431         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Disable
2432             inset-rectangles, since only the parsing has been implemented so
2433             far.
2434         * rendering/ExclusionShapeOutsideInfo.cpp:
2435         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Disable
2436             inset-rectangles, since only the parsing has been implemented so
2437             far.
2438         * rendering/style/BasicShapes.cpp:
2439         (WebCore::BasicShapeInsetRectangle::path): Calculate the Path for an
2440             inset-rectangle.
2441         (WebCore::BasicShapeInsetRectangle::blend): Blend two inset rectangles
2442             together at a point depending on the "progress" and return the
2443             blended rectangle.
2444         * rendering/style/BasicShapes.h:
2445         (BasicShapeInsetRectangle): Add higher level inset rectangle class.
2446             This is used outside of the CSS representation. The methods below
2447             are just simple getters and setters, along with a constructor and
2448             a factory method.
2449         (WebCore::BasicShapeInsetRectangle::create):
2450         (WebCore::BasicShapeInsetRectangle::top):
2451         (WebCore::BasicShapeInsetRectangle::right):
2452         (WebCore::BasicShapeInsetRectangle::bottom):
2453         (WebCore::BasicShapeInsetRectangle::left):
2454         (WebCore::BasicShapeInsetRectangle::cornerRadiusX):
2455         (WebCore::BasicShapeInsetRectangle::cornerRadiusY):
2456         (WebCore::BasicShapeInsetRectangle::setTop):
2457         (WebCore::BasicShapeInsetRectangle::setRight):
2458         (WebCore::BasicShapeInsetRectangle::setBottom):
2459         (WebCore::BasicShapeInsetRectangle::setLeft):
2460         (WebCore::BasicShapeInsetRectangle::setCornerRadiusX):
2461         (WebCore::BasicShapeInsetRectangle::setCornerRadiusY):
2462         (WebCore::BasicShapeInsetRectangle::type):
2463         (WebCore::BasicShapeInsetRectangle::BasicShapeInsetRectangle):
2464
2465 2013-05-29  Andreas Kling  <akling@apple.com>
2466
2467         Move computed style extraction out of CSSComputedStyleDeclaration.
2468         <http://webkit.org/b/116965>
2469
2470         Reviewed by Antti Koivisto.
2471
2472         Make it possible to get computed CSSValues from a Node without creating a CSSOM
2473         style declaration object.
2474
2475         The bulk of the logic moves to a new class; ComputedStyleExtractor, which can be created
2476         on the stack, and takes the same setup variables as CSSComputedStyleDeclaration.
2477
2478         This is prep to enable futuristic optimizations in editing and elsewhere.
2479
2480         * css/CSSComputedStyleDeclaration.h:
2481         * css/CSSComputedStyleDeclaration.cpp:
2482         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2483
2484             Create a ComputedStyleExtractor to do the work!
2485
2486         (WebCore::ComputedStyleExtractor::currentColorOrValidColor):
2487         (WebCore::ComputedStyleExtractor::valueForFilter):
2488         (WebCore::ComputedStyleExtractor::ComputedStyleExtractor):
2489         (WebCore::ComputedStyleExtractor::valueForShadow):
2490         (WebCore::ComputedStyleExtractor::styledNode):
2491         (WebCore::ComputedStyleExtractor::propertyValue):
2492         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
2493         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
2494         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
2495         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
2496         * css/SVGCSSComputedStyleDeclaration.cpp:
2497         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
2498         (WebCore::ComputedStyleExtractor::svgPropertyValue):
2499
2500             Moved all of these from CSSComputedStyleDeclaration to the new class.
2501
2502         * rendering/style/RenderStyle.h:
2503         * svg/SVGPaint.h:
2504
2505             Have these two befriend ComputedStyleExtractor.
2506
2507 2013-05-29  Antti Koivisto  <antti@apple.com>
2508
2509         Another attempt to fix windows build.
2510         
2511         Not reviewed.
2512
2513         * css/CSSFontSelector.h:
2514
2515 2013-05-29  Antti Koivisto  <antti@apple.com>
2516
2517         Try to fix window build.
2518         
2519         Not reviewed.
2520
2521         * platform/graphics/FontCache.h:
2522         (WebCore::FontDescriptionFontDataCacheKey::computeHash):
2523
2524 2013-05-29  Simon Fraser  <simon.fraser@apple.com>
2525
2526         Fix the firing of m_paintRelatedMilestonesTimer
2527         https://bugs.webkit.org/show_bug.cgi?id=116919
2528
2529         Reviewed by Tim Horton.
2530
2531         r150671 intended to change things so that paint-related milestones
2532         only fire when painting has actually happened, so that WebKit clients
2533         are notified when we actually have bits to present.
2534         
2535         However, it made an incorrect assumption that painting would happen
2536         inside of flushCompositingState(). This is not the case; flushCompositingState()
2537         will just dirty CALayers, and later on Core Animation will ask us to paint them.
2538         
2539         This incorrect assumption meant that we would never start the
2540         m_paintRelatedMilestonesTimer, so never fire the milestones.
2541         
2542         Fix by starting the m_paintRelatedMilestonesTimer via the RenderLayerBacking
2543         paintContents call back. At this time we know we're painting, so we can both
2544         set the FrameView's last paint time, and start up the timer. We also only
2545         want to start the timer if there are pending milestones.
2546
2547         * rendering/RenderLayerBacking.cpp:
2548         (WebCore::RenderLayerBacking::paintIntoLayer):
2549         (WebCore::RenderLayerBacking::paintContents):
2550         * rendering/RenderLayerCompositor.cpp:
2551         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2552         (WebCore::RenderLayerCompositor::didPaintBacking):
2553         * rendering/RenderLayerCompositor.h:
2554         (RenderLayerCompositor):
2555
2556 2013-05-29  Antti Koivisto  <antti@apple.com>
2557
2558         Share FontGlyphs
2559         https://bugs.webkit.org/show_bug.cgi?id=116863
2560
2561         Reviewed by Anreas Kling.
2562
2563         Style system generates many Font objects that are identical or similar enough to have identical FontGlyphs. 
2564         We can figure out that the FontGlyphs are going to be the same and share them. This reduces memory usage.
2565         It also improves performance as the glyph cache and the width cache hang from FontGlyphs and their hit rate
2566         increases.
2567         
2568         On PLT3 this takes the number of live FontGlyphs at the end from 40k+ to <1k. Width cache hit rate improves
2569         from ~42% to ~55%.
2570
2571         * css/CSSFontSelector.cpp:
2572         (WebCore::CSSFontSelector::CSSFontSelector):
2573         
2574             Add unique id we can use in cache key.
2575
2576         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
2577         
2578             Bump the version number on invalidation so we don't reuse cache entries after web font is loaded.
2579
2580         (WebCore::CSSFontSelector::resolvesFamilyFor):
2581         
2582             Test if FontSelector is needed for resolving a particular FontDescription.
2583
2584         * css/CSSFontSelector.h:
2585         * page/Settings.cpp:
2586         (WebCore::setGenericFontFamilyMap):
2587         
2588             Invalidate the cache if standard font settings change.
2589
2590         * platform/graphics/Font.cpp:
2591         (FontGlyphsCacheKey):
2592         (FontGlyphsCacheEntry):
2593         (WebCore::operator==):
2594         (WebCore::fontGlyphsCache):
2595         (WebCore::invalidateFontGlyphsCache):
2596         (WebCore::makeFontSelectorFlags):
2597         (WebCore::makeFontGlyphsCacheKey):
2598         
2599             The cache key consists of
2600             
2601             - all families.
2602             - shared key with the lower level FontData cache (FontCache), guaranteeing FontDatas would be identical.
2603             - font selector specific keys.
2604
2605             These guarantee the FontData will be identical.
2606
2607         (WebCore::computeFontGlyphsCacheHash):
2608         (WebCore::pruneUnreferencedFromFontGlyphsCache):
2609         
2610             Don't accumulate unused entries.
2611
2612         (WebCore::retrieveOrAddCachedFontGlyphs):
2613         (WebCore::Font::update):
2614         * platform/graphics/Font.h:
2615         * platform/graphics/FontCache.cpp:
2616         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
2617         (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
2618         (WebCore::FontPlatformDataCacheKey::operator==):
2619         (FontPlatformDataCacheKey):
2620         (WebCore::computeHash):
2621         (WebCore::FontCache::getCachedFontPlatformData):
2622         (WebCore::FontCache::purgeInactiveFontData):
2623         (WebCore::FontCache::invalidate):
2624         * platform/graphics/FontCache.h:
2625         (WebCore::FontDescriptionFontDataCacheKey::FontDescriptionFontDataCacheKey):
2626         (WebCore::FontDescriptionFontDataCacheKey::makeFlagKey):
2627         (WebCore::FontDescriptionFontDataCacheKey::operator==):
2628         (WebCore::FontDescriptionFontDataCacheKey::operator!=):
2629         (WebCore::FontDescriptionFontDataCacheKey::computeHash):
2630         
2631             Separate part of the key for sharing.
2632
2633         (FontDescriptionFontDataCacheKey):
2634         * platform/graphics/FontFallbackList.cpp:
2635         (WebCore::FontGlyphs::FontGlyphs):
2636         (WebCore::FontGlyphs::releaseFontData):
2637         * platform/graphics/FontFallbackList.h:
2638         (WebCore::FontGlyphs::create):
2639         (WebCore::FontGlyphs::~FontGlyphs):
2640         
2641             Remove invalidate(). If FontGlyphs needs invalidation it is reconstructed.
2642
2643         * platform/graphics/FontSelector.h:
2644
2645 2013-05-29  Nico Weber  <thakis@chromium.org>
2646
2647         Remove unused file PlatformGestureEvent.cpp
2648         https://bugs.webkit.org/show_bug.cgi?id=116894
2649
2650         Reviewed by Darin Adler.
2651
2652         This was added in https://bugs.webkit.org/show_bug.cgi?id=49345 but
2653         not removed in https://bugs.webkit.org/show_bug.cgi?id=77492 which
2654         removed most of that code again.
2655         
2656         * platform/PlatformGestureRecognizer.cpp: Removed.
2657
2658 2013-05-29  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2659
2660         [texmap][GStreamer][GTK] Composited Video support
2661         https://bugs.webkit.org/show_bug.cgi?id=86410
2662
2663         Reviewed by Noam Rosenthal.
2664
2665         Enable the video accelerated compositing using the WebKit's
2666         TextureMapper.
2667
2668         This patch does not use hardware accelerated video decoding. It
2669         provides a generic path for system memory buffers.
2670
2671         This new functionality is only available when the coordinated graphics
2672         system is not used.
2673
2674         No new tests, already covered by existing tests.
2675
2676         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2677         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
2678         (WebCore):
2679         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): update the
2680         texture content with the new received video buffer.
2681         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): choose to
2682         use the accelerated compositing or the normal code path
2683         (WebCore::MediaPlayerPrivateGStreamerBase::paint): if accelerated
2684         compositing is used this method is halted.
2685         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper): get
2686         a texture from the pool and draws it if it is already available.
2687         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2688         (MediaPlayerPrivateGStreamerBase):
2689         (WebCore::MediaPlayerPrivateGStreamerBase::platformLayer): returns itself
2690         (WebCore::MediaPlayerPrivateGStreamerBase::supportsAcceleratedRendering):
2691         returns true
2692
2693 2013-05-29  Peter Gal  <galpeter@inf.u-szeged.hu>
2694
2695         [Qt] Missing files from build after r150853
2696         https://bugs.webkit.org/show_bug.cgi?id=116932
2697
2698         Reviewed by Csaba Osztrogonác.
2699
2700         * Target.pri: Added missing include path.
2701
2702 2013-05-29  Mihai Maerean  <mmaerean@adobe.com>
2703
2704         [CSS Regions] Content that has overflow: scroll cannot be scrolled by dragging the scroll thumbs with the mouse
2705         https://bugs.webkit.org/show_bug.cgi?id=113703
2706
2707         Reviewed by Darin Adler.
2708
2709         The point inside a box that's inside a region has its coordinates relative to the region, not the FlowThread
2710         that is its container in the RenderObject tree.
2711
2712         Previously, the coordinates were computed relatively to the FlowThread which doesn't really have a location in
2713         the page.
2714
2715         Tests: fast/regions/drag-scrollbars-of-content.html
2716                fast/regions/hover-in-second-region.html
2717
2718         * rendering/RenderBox.cpp:
2719         (WebCore::RenderBox::offsetFromContainer):
2720         * rendering/RenderBoxModelObject.cpp:
2721         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
2722
2723 2013-05-29  Andreas Kling  <akling@apple.com>
2724
2725         Fix dumb typo in r150879.
2726
2727         * editing/htmlediting.cpp:
2728         (WebCore::nextLeafNode):
2729
2730 2013-05-29  Andreas Kling  <akling@apple.com>
2731
2732         Move leaf Node traversal helpers to htmlediting.cpp
2733         <http://webkit.org/b/116940>
2734
2735         Reviewed by Antti Koivisto.
2736
2737         Move Node::previousLeafNode() and Node::nextLeafNode() to htmlediting.cpp along with their helpers.
2738         Fixes an 8-year old FIXME. \o/
2739
2740         * dom/Node.h:
2741         * dom/Node.cpp:
2742         * dom/Position.cpp:
2743         (WebCore::nextRenderedEditable):
2744         (WebCore::previousRenderedEditable):
2745         * editing/VisibleUnits.cpp:
2746         (WebCore::previousLeafWithSameEditability):
2747         (WebCore::nextLeafWithSameEditability):
2748         * editing/htmlediting.h:
2749         * editing/htmlediting.cpp:
2750         (WebCore::previousNodeConsideringAtomicNodes):
2751         (WebCore::nextNodeConsideringAtomicNodes):
2752         (WebCore::previousLeafNode):
2753         (WebCore::nextLeafNode):
2754
2755 2013-05-29  Peter Gal  <galpeter@inf.u-szeged.hu>
2756
2757         [Qt] Missing files from build after r150853
2758         https://bugs.webkit.org/show_bug.cgi?id=116932
2759
2760         Reviewed by Csaba Osztrogonác.
2761
2762         * Target.pri: Added the CFURLExtras.{cpp,h} files to the projectfile.
2763
2764 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
2765
2766         PresentationAttributeCacheCleaner::m_hitCount is never initialized
2767         https://bugs.webkit.org/show_bug.cgi?id=116946
2768
2769         Reviewed by Andreas Kling.
2770
2771         Merge https://chromium.googlesource.com/chromium/blink/+/70be7ddc41141ef6dec7795d37842c27dab2e194.
2772
2773         * dom/StyledElement.cpp:
2774         (WebCore::PresentationAttributeCacheCleaner::PresentationAttributeCacheCleaner):
2775
2776 2013-05-29  Kent Tamura  <tkent@chromium.org>
2777
2778         Remove ENABLE_INPUT_MULTIPLE_FIELDS_UI.
2779         https://bugs.webkit.org/show_bug.cgi?id=116796
2780
2781         Reviewed by Ryosuke Niwa.
2782
2783         This feature was used only by Chromium port.
2784
2785         * CMakeLists.txt:
2786         * GNUmakefile.list.am:
2787         * Target.pri:
2788         * WebCore.vcproj/WebCore.vcproj:
2789         * WebCore.vcxproj/WebCore.vcxproj:
2790         * WebCore.vcxproj/WebCore.vcxproj.filters:
2791         * WebCore.xcodeproj/project.pbxproj:
2792         * css/html.css:
2793         (input::-webkit-date-and-time-value):
2794         * dom/Element.cpp:
2795         * dom/Element.h:
2796         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
2797         * html/BaseChooserOnlyDateAndTimeInputType.h:
2798         * html/BaseMultipleFieldsDateAndTimeInputType.cpp: Removed.
2799         * html/BaseMultipleFieldsDateAndTimeInputType.h: Removed.
2800         * html/DateInputType.cpp:
2801         * html/DateInputType.h:
2802         (DateInputType):
2803         * html/DateTimeFieldsState.cpp: Removed.
2804         * html/DateTimeFieldsState.h: Removed.
2805         * html/DateTimeInputType.cpp:
2806         * html/DateTimeInputType.h:
2807         (DateTimeInputType):
2808         * html/DateTimeLocalInputType.cpp:
2809         * html/DateTimeLocalInputType.h:
2810         (DateTimeLocalInputType):
2811         * html/HTMLInputElement.cpp:
2812         (WebCore::HTMLInputElement::HTMLInputElement):
2813         (WebCore):
2814         * html/HTMLInputElement.h:
2815         (HTMLInputElement):
2816         * html/InputType.cpp:
2817         * html/InputType.h:
2818         (InputType):
2819         * html/MonthInputType.cpp:
2820         * html/MonthInputType.h:
2821         (MonthInputType):
2822         * html/TimeInputType.cpp:
2823         * html/TimeInputType.h:
2824         (TimeInputType):
2825         * html/WeekInputType.cpp:
2826         * html/WeekInputType.h:
2827         (WeekInputType):
2828         * html/shadow/ClearButtonElement.cpp: Removed.
2829         * html/shadow/ClearButtonElement.h: Removed.
2830         * html/shadow/DateTimeEditElement.cpp: Removed.
2831         * html/shadow/DateTimeEditElement.h: Removed.
2832         * html/shadow/DateTimeFieldElement.cpp: Removed.
2833         * html/shadow/DateTimeFieldElement.h: Removed.
2834         * html/shadow/DateTimeFieldElements.cpp: Removed.
2835         * html/shadow/DateTimeFieldElements.h: Removed.
2836         * html/shadow/DateTimeNumericFieldElement.cpp: Removed.
2837         * html/shadow/DateTimeNumericFieldElement.h: Removed.
2838         * html/shadow/DateTimeSymbolicFieldElement.cpp: Removed.
2839         * html/shadow/DateTimeSymbolicFieldElement.h: Removed.
2840         * html/shadow/PickerIndicatorElement.cpp: Removed.
2841         * html/shadow/PickerIndicatorElement.h: Removed.
2842         * page/ChromeClient.h:
2843         (ChromeClient):
2844         * platform/LocalizedStrings.h:
2845         (WebCore):
2846         * platform/text/PlatformLocale.cpp:
2847         * platform/text/PlatformLocale.h:
2848         (Locale):
2849         * rendering/RenderDetailsMarker.cpp:
2850         * rendering/RenderDetailsMarker.h:
2851         * rendering/RenderObject.h:
2852         (RenderObject):
2853
2854 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
2855
2856         Remove setFullScreenRendererSize and setFullScreenRendererBackgroundColor
2857         https://bugs.webkit.org/show_bug.cgi?id=116914
2858
2859         Reviewed by Benjamin Poulain.
2860
2861         Merge https://chromium.googlesource.com/chromium/blink/+/508eb21a07f69ed38b9be9ff92fe75dcb907861f
2862
2863         * dom/Document.cpp:
2864         * dom/Document.h:
2865
2866 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
2867
2868         Make WidgetHierarchyUpdatesSuspensionScope use swap instead of copy
2869         https://bugs.webkit.org/show_bug.cgi?id=116927
2870
2871         Reviewed by Andreas Kling.
2872
2873         Merge https://chromium.googlesource.com/chromium/blink/+/1d577e1fd5c5716a06e4007e04fc3d9d0a88f5e4
2874
2875         This is equivalent behavior code that is unambiguously better performance. swap is O(1) time and memory,
2876         copying a hash table is at least linear with the number of elements.
2877
2878         * rendering/RenderWidget.cpp:
2879         (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
2880
2881 2013-05-29  Andreas Kling  <akling@apple.com>
2882
2883         Remove Document::nodeAbsIndex() and Document::nodeWithAbsIndex().
2884
2885         Rubber-stamped by Antti "Lucky" Koivisto.
2886
2887         * dom/Document.h:
2888         * dom/Document.cpp:
2889
2890 2013-05-28  Andreas Kling  <akling@apple.com>
2891
2892         FocusController should operate on Elements internally.
2893         <http://webkit.org/b/116781>
2894
2895         Reviewed by Antti Koivisto.
2896
2897         Switch from Node* to Element* as much as possible inside FocusController.
2898         Mostly mechanical, gets rid of some unnecessary isElementNode() checks and casts.
2899
2900         * page/FocusController.h:
2901         * page/FocusController.cpp:
2902         (WebCore::dispatchEventsOnWindowAndFocusedElement):
2903         (WebCore::isNonFocusableShadowHost):
2904         (WebCore::adjustedTabIndex):
2905         (WebCore::shouldVisit):
2906         (WebCore::FocusController::setFocused):
2907         (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
2908         (WebCore::FocusController::advanceFocusInDocumentOrder):
2909         (WebCore::FocusController::findFocusableElementAcrossFocusScope):
2910         (WebCore::FocusController::findFocusableElementRecursively):
2911         (WebCore::FocusController::findFocusableElement):
2912         (WebCore::FocusController::nextFocusableElement):
2913         (WebCore::FocusController::previousFocusableElement):
2914         (WebCore::FocusController::setActive):
2915
2916 2013-05-29  Radu Stavila  <stavila@adobe.com>
2917
2918         [CSS Regions] Mouse over an element does not trigger :hover state for parent when the element is flowed in a region
2919         https://bugs.webkit.org/show_bug.cgi?id=111749
2920
2921         Reviewed by Antti Koivisto.
2922
2923         When searching for the hover ancestor and encountering a named flow thread,
2924         the search will continue with the DOM ancestor of the top-most element
2925         in the named flow thread.
2926
2927         Tests: fast/regions/hover-in-region-grandparent.html
2928                fast/regions/hover-in-region-parent-skip.html
2929                fast/regions/hover-in-region-parent-skip-inlines-anonymous.html
2930                fast/regions/hover-on-child-in-region.html
2931                fast/regions/hover-on-child-in-region-in-region.html
2932
2933         * rendering/RenderObject.cpp:
2934         (WebCore::RenderObject::hoverAncestor):
2935         * rendering/RenderObject.h:
2936
2937 2013-05-28  Nate Chapin  <japhet@chromium.org>
2938
2939         Crash in WebCore::SubresourceLoader::releaseResources when connection fails
2940         https://bugs.webkit.org/show_bug.cgi?id=87743
2941
2942         Don't do anything complicated in SubresourceLoader::releaseResources(),
2943         just clear variables. With this patch, releaseResources() will still
2944         assert in debug builds if it is called twice, but it will safely execute
2945         in release.
2946
2947         Reviewed by Darin Adler.
2948
2949         * loader/ResourceLoader.cpp:
2950         (WebCore::ResourceLoader::cleanupForError): Pull shared cleanup code out of didFail()
2951             and cancel() into a helper.
2952         (WebCore::ResourceLoader::cancel): Merge a couple variables into an enum, check for
2953             reentrancy from within didCancel().
2954         * loader/ResourceLoader.h: Replace m_calledWillCancel and m_cancelled with an enum.
2955         * loader/SubresourceLoader.cpp:
2956         (WebCore::SubresourceLoader::didFinishLoading): Don't call ResourceLoader::didFinishLoading(),
2957             put finish() in the middle of the process.
2958         (WebCore::SubresourceLoader::didFail): Don't call ResourceLoader::didFail(), put finish()
2959             in the middle of the process.
2960         (WebCore::SubresourceLoader::didCancel):
2961         (WebCore::SubresourceLoader::notifyDone): Do the non-trivial work previous done in releaseResources(),
2962             most importantly calling loadDone().
2963         (WebCore::SubresourceLoader::releaseResources): Only do simple variable clearing here.
2964         * loader/SubresourceLoader.h:
2965         (SubresourceLoader):
2966         * loader/cache/CachedResource.cpp: Split stopLoading() into cancelLoad() (which notifies clients)
2967             and clearLoader() (which just nulls m_loader).
2968         * loader/cache/CachedResource.h:
2969         * loader/chromium/ResourceLoaderChromium.cpp:
2970
2971 2013-05-28  Seokju Kwon  <seokju.kwon@gmail.com>
2972
2973         [GTK] Build fix after r150837
2974         https://bugs.webkit.org/show_bug.cgi?id=116904
2975
2976         Unreviewed build fix.
2977
2978         * GNUmakefile.am:
2979
2980 2013-05-28  Andy Estes  <aestes@apple.com>
2981
2982         REGRESSION (r150169): Images from file: URLs display after a delay even though they were preloaded by JavaScript
2983         https://bugs.webkit.org/show_bug.cgi?id=116906
2984         <rdar://problem/13991927>
2985
2986         Reviewed by Andreas Kling.
2987
2988         Writing a test for this is blocked on https://webkit.org/b/116199.
2989
2990         Some WebKit clients use JavaScript to preload images from disk so that
2991         subsequent loads will display immediately from the memory cache. By not
2992         caching non-HTTP sub-resources in memory, we break this common pattern.
2993         This change restricts r150169 to only apply to cached main resources.
2994         Sub-resources will again be cached indefinitely as they were prior to
2995         r150169.
2996
2997         * loader/cache/CachedResource.cpp:
2998         (WebCore::CachedResource::freshnessLifetime): If this is a non-HTTP
2999         main resource from a scheme that should not be cached indefinitely,
3000         return 0 for the freshness lifetime. For other non-HTTP cached
3001         resources, return an indefinite freshness lifetime.
3002
3003 2013-05-28  Dean Jackson  <dino@apple.com>
3004
3005         Animations do not restart after exiting page cache
3006         https://bugs.webkit.org/show_bug.cgi?id=116900
3007
3008         Reviewed by Tim Horton.
3009
3010         Animations are suspended as they enter the page cache, but
3011         were not getting correctly resumed when exiting. The cause
3012         was an error in r149576 which was checking a global flag for suspension
3013         on the AnimationController and thus not trying to resume anything.
3014
3015         Test: animations/resume-after-page-cache.html
3016
3017         * page/animation/AnimationController.cpp:
3018         (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
3019         (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
3020
3021 2013-05-28  Chris Rogers  <crogers@google.com>
3022
3023         Support multiple HRTFDatabases for different sample-rates
3024         https://bugs.webkit.org/show_bug.cgi?id=116183
3025
3026         Reviewed by Kenneth Russell.
3027
3028         Adapted from Blink:
3029         https://codereview.chromium.org/14636011/
3030
3031         This removes the limitation which required OfflineAudioContexts to be created at native sample-rate
3032
3033         * Modules/webaudio/AudioContext.h:
3034         (WebCore::AudioContext::hrtfDatabaseLoader):
3035         (AudioContext):
3036         * Modules/webaudio/OfflineAudioContext.cpp:
3037         (WebCore::OfflineAudioContext::create):
3038         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
3039         (WebCore::OfflineAudioDestinationNode::offlineRender):
3040         * Modules/webaudio/PannerNode.cpp:
3041         (WebCore::PannerNode::initialize):
3042         (WebCore::PannerNode::setPanningModel):
3043         * platform/audio/HRTFDatabaseLoader.cpp:
3044         (WebCore):
3045         (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
3046         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
3047         * platform/audio/HRTFDatabaseLoader.h:
3048         (HRTFDatabaseLoader):
3049         (WebCore::HRTFDatabaseLoader::loaderMap):
3050         * platform/audio/HRTFPanner.cpp:
3051         (WebCore::HRTFPanner::HRTFPanner):
3052         (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
3053         (WebCore::HRTFPanner::pan):
3054         * platform/audio/HRTFPanner.h:
3055         (HRTFPanner):
3056         * platform/audio/Panner.cpp:
3057         (WebCore::Panner::create):
3058         * platform/audio/Panner.h:
3059         (WebCore):
3060
3061 2013-05-28  Alexey Proskuryakov  <ap@apple.com>
3062
3063         Windows build fix.
3064
3065         * platform/cf/KURLCFNet.cpp:
3066         (WebCore::KURL::createCFURL):
3067
3068 2013-05-28  Alexey Proskuryakov  <ap@apple.com>
3069
3070         Freeze when loading a particular page on washingtonpost.com with NetworkProcess enabled
3071         https://bugs.webkit.org/show_bug.cgi?id=116887
3072         <rdar://problem/12965959>
3073
3074         Reviewed by Darin Adler.
3075
3076         Test: http/tests/uri/curly-braces-escaping.html
3077
3078         The issue was that WebKit used an incorrect accessor to get a string out of CFURL,
3079         unlike WebCore.
3080
3081         Centralized code for converting between CFURLs and strings in a place that WebKit
3082         can use directly.
3083
3084         * WebCore.exp.in:
3085         * WebCore.vcproj/WebCore.vcproj:
3086         * WebCore.vcxproj/WebCore.vcxproj:
3087         * WebCore.vcxproj/WebCore.vcxproj.filters:
3088         * WebCore.xcodeproj/project.pbxproj:
3089         Keeping things building.
3090
3091         * platform/KURL.cpp: (WebCore::KURL::copyToBuffer):
3092         * platform/KURL.h:
3093         Updated for a new typedef name. The code was using Vector<char, 512> and CharBuffer
3094         inconsistently, and now URLs use URLCharBuffer.
3095
3096         * platform/cf/CFURLExtras.cpp: Added.
3097         (WebCore::createCFURLFromBuffer):
3098         (WebCore::getURLBytes):
3099         * platform/cf/CFURLExtras.h: Added.
3100         * platform/cf/KURLCFNet.cpp:
3101         (WebCore::KURL::KURL):
3102         (WebCore::KURL::createCFURL):
3103         Extracted code for CFURL string manipulation that is not logcally part of KURL.
3104
3105         * platform/mac/KURLMac.mm:
3106         (WebCore::KURL::KURL): Use the new getURLBytes function.
3107         (WebCore::KURL::operator NSURL *): Added a comment.
3108         (WebCore::KURL::createCFURL): Added a comment, and updated for new names and
3109         signatures.
3110
3111         * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::platformLazyInit):
3112         Added a FIXME. We are still using CFURLGetString here. The difficulty is getting
3113         encodings right.
3114
3115 2013-05-28  Anders Carlsson  <andersca@apple.com>
3116
3117         Create a html/forms subdirectory and move FileIconLoader there
3118         https://bugs.webkit.org/show_bug.cgi?id=116880
3119
3120         Reviewed by Jessie Berlin.
3121
3122         A lot (if not the majority) of files in html/ are forms related, so it makes sense to begin splitting
3123         them out into a separate subdirectory, html/forms.
3124
3125         Begin my moving FileIconLoader from platform to html/forms. It is related to HTML forms (it's only used by
3126         the file upload element), and is not really a platform abstraction so it doesn't belong in platform.
3127
3128         * CMakeLists.txt:
3129         * GNUmakefile.list.am:
3130         * Target.pri:
3131         * WebCore.vcproj/WebCore.vcproj:
3132         * WebCore.vcxproj/WebCore.vcxproj:
3133         * WebCore.vcxproj/WebCore.vcxproj.filters:
3134         * WebCore.xcodeproj/project.pbxproj:
3135         * html/forms/FileIconLoader.cpp: Renamed from Source/WebCore/platform/FileIconLoader.cpp.
3136         * html/forms/FileIconLoader.h: Renamed from Source/WebCore/platform/FileIconLoader.h.
3137
3138 2013-05-28  Chris Fleizach  <cfleizach@apple.com>
3139
3140         AX: WKView is unable to set AXFocused to YES and does not handle keyboard events as expected
3141         https://bugs.webkit.org/show_bug.cgi?id=116756
3142
3143         Reviewed by Tim Horton.
3144
3145         If AXFocused is set to true, but the WebView is not the first responder, then the call will
3146         not do anything. This change asks the Chrome to make the WebView the first responder before
3147         trying to set focus within the page.
3148
3149         Was not able to make a test, it requires on interplay between areas outside the web view.
3150
3151         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3152         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
3153
3154 2013-05-28  Jer Noble  <jer.noble@apple.com>
3155
3156         Crash in DumpRenderTree at com.apple.WebCore: WebCore::RenderTextTrackCue::repositionGenericCue + 154
3157         https://bugs.webkit.org/show_bug.cgi?id=116882
3158
3159         Reviewed by Eric Carlson.
3160
3161         Remove an inappropriate assert. No cues coming through repositionGenericCue will be WebVTT ones.
3162
3163         * rendering/RenderTextTrackCue.cpp:
3164         (WebCore::RenderTextTrackCue::repositionGenericCue):
3165
3166 2013-05-28  Alberto Garcia  <agarcia@igalia.com>
3167
3168         [BlackBerry] GraphicsContext: add missing definitions.
3169         https://bugs.webkit.org/show_bug.cgi?id=115515
3170
3171         Reviewed by Rob Buis.
3172
3173         * platform/graphics/GraphicsContext.h:
3174         (Graphics):
3175         Add definition for PlatformGraphicsContext.
3176         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
3177         Include RoundedRect.h
3178
3179 2013-05-28  Arvid Nilsson  <anilsson@rim.com>
3180
3181         [BlackBerry] Fix style issues in BlackBerry accelerated compositing backend
3182         https://bugs.webkit.org/show_bug.cgi?id=116604
3183
3184         Reviewed by Carlos Garcia Campos.
3185
3186         PR 273550, 99638
3187
3188         Remove the "get" prefix from getters in the WebKit- and compositing-
3189         thread layer classes, as well as LayerRendererSurface. Clarify which
3190         geometry-related getters return normalized device coordinates by adding
3191         a comment.
3192
3193         Also remove dead code related to LayerData::m_holePunchClipRect, which
3194         was part of an eventually disabled fix for video clipping in iframes,
3195         PR 99638. Since we now use AC layers for iframes, the bug is no longer
3196         reproducible, and the dead code will never need to be enabled again.
3197
3198         No change in behavior, no new tests.
3199
3200         * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
3201         (WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
3202         * platform/graphics/blackberry/LayerCompositingThread.cpp:
3203         (WebCore::LayerCompositingThread::setDrawTransform):
3204         (WebCore::LayerCompositingThread::transformedHolePunchRect):
3205         (WebCore::LayerCompositingThread::drawTextures):
3206         (WebCore::LayerCompositingThread::drawSurface):
3207         * platform/graphics/blackberry/LayerCompositingThread.h:
3208         (WebCore::LayerCompositingThread::sublayers): Removed "get" prefix
3209         (LayerCompositingThread):
3210         (WebCore::LayerCompositingThread::boundingBox): Renamed from "getDrawRect"
3211         (WebCore::LayerCompositingThread::transformedBounds): Removed "get" prefix
3212         (WebCore::LayerCompositingThread::transformedHolePunchRect): Removed "get" prefix
3213         * platform/graphics/blackberry/LayerData.h:
3214         (LayerData): Removed unused data member "m_holePunchClipRect"
3215         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
3216         (WebCore::LayerFilterRenderer::applyActions):
3217         * platform/graphics/blackberry/LayerRenderer.cpp:
3218         (WebCore::LayerRenderer::compositeLayers):
3219         (WebCore::LayerRenderer::drawDebugBorder):
3220         (WebCore::LayerRenderer::drawHolePunchRect):
3221         (WebCore::LayerRenderer::prepareFrameRecursive):
3222         (WebCore::LayerRenderer::updateLayersRecursive):
3223         (WebCore::collect3DPreservingLayers):
3224         (WebCore::LayerRenderer::compositeLayersRecursive):
3225         * platform/graphics/blackberry/LayerRendererSurface.cpp:
3226         (WebCore::LayerRendererSurface::boundingBox):
3227         * platform/graphics/blackberry/LayerRendererSurface.h:
3228         (WebCore::LayerRendererSurface::boundingBox): Renamed from "drawRect" because that sounds like a verb, and this is a getter
3229         * platform/graphics/blackberry/LayerWebKitThread.h:
3230         (WebCore::LayerWebKitThread::sublayers): Removed "get" prefix
3231         * platform/graphics/blackberry/VideoLayerWebKitThread.cpp:
3232         (WebCore::VideoLayerWebKitThread::setHolePunchRect):
3233         (WebCore::VideoLayerWebKitThread::boundsChanged):
3234
3235 2013-05-28  Jer Noble  <jer.noble@apple.com>
3236
3237         Made AudioNode an EventTarget
3238         https://bugs.webkit.org/show_bug.cgi?id=116871
3239
3240         Merge: https://chromium.googlesource.com/chromium/blink/+/ef37484162ddb95d677dcfdcdd778ec60590928b
3241
3242         Reviewed by Darin Adler.
3243
3244         Tests: webaudio/audionode-expected.txt:
3245                webaudio/audionode.html:
3246
3247         Add the requisite boilerplate to allow AudioNode to become an EventTarget. Remove
3248         all that same boilerplate from ScriptProcessorNode now that it's base class
3249         is an EventTarget.
3250
3251         * Modules/webaudio/AudioNode.cpp:
3252         (WebCore::AudioNode::interfaceName): Added boilerplate.
3253         (WebCore::AudioNode::scriptExecutionContext): Return the AudioContext's context.
3254         (WebCore::AudioNode::processIfNecessary): Whitespace.
3255         * Modules/webaudio/AudioNode.h:
3256         * Modules/webaudio/AudioNode.idl: Make AudioNode an EventTarget.
3257         * Modules/webaudio/ScriptProcessorNode.cpp: Remove EventTarget boilerplate.
3258         * Modules/webaudio/ScriptProcessorNode.h: Ditto.
3259         * Modules/webaudio/ScriptProcessorNode.idl: Ditto.
3260         * dom/EventTarget.h: Mark AudioNode as an EventTarget.
3261         * dom/EventTargetFactory.in: Ditto.
3262
3263 2013-05-28  Arvid Nilsson  <anilsson@rim.com>
3264
3265         [BlackBerry] backface-visibility: hidden doesn't work properly with masks and filters
3266         https://bugs.webkit.org/show_bug.cgi?id=116616
3267
3268         Reviewed by Carlos Garcia Campos.
3269
3270         The BlackBerry::Platform::Graphics::GraphicsContext generates geometry
3271         with a different winding order than the accelerated compositing backend
3272         of the BlackBerry port. So, when we switched from Skia to this new
3273         rendering engine, we switched from glFrontFace(GL_CCW) to
3274         glFrontFace(GL_CW), and all was well when drawing display lists.
3275         However, we forgot to update the winding order of geometry generated
3276         within the accelerated compositing backend, which is used for masks and
3277         filters, so they were getting erroneously culled out when
3278         backface-visibility: hidden was applied to them. Fixed by switching the
3279         winding order of all geometry generated up here, which has the added
3280         benefit of enabling us to use TransformationMatrix::mapQuad instead of
3281         transforming point-by-point.
3282
3283         To further complicate matters, a right-side up transform is used when
3284         drawing layers into surfaces, reversing the winding order and requiring
3285         us to switch back to glFrontFace(GL_CCW) temporarily, when drawing
3286         layers to surfaces, or the layers will get culled out inside the
3287         surface.
3288
3289         Also fix spelling error, "drawed" should be "drawn".
3290
3291         No new tests, this is only detectable by pixel tests, which the
3292         BlackBerry port currently doesn't support.
3293
3294         PR 341945.
3295
3296         * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
3297         (WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
3298         * platform/graphics/blackberry/LayerCompositingThread.cpp:
3299         (WebCore::LayerCompositingThread::setDrawTransform):
3300         (WebCore::getTransformedRect):
3301         (WebCore::LayerCompositingThread::drawTextures):
3302         (WebCore::LayerCompositingThread::drawSurface):
3303         * platform/graphics/blackberry/LayerCompositingThread.h:
3304         (LayerCompositingThread):
3305         (WebCore::LayerCompositingThread::origin):
3306         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
3307         (WebCore):
3308         * platform/graphics/blackberry/LayerRenderer.cpp:
3309         (WebCore::LayerRenderer::compositeLayers):
3310         (WebCore):
3311         (WebCore::LayerRenderer::drawLayersOnSurfaces):
3312         * platform/graphics/blackberry/LayerRendererSurface.cpp:
3313         (WebCore::LayerRendererSurface::drawRect):
3314         (WebCore::LayerRendererSurface::transformedBounds):
3315         * platform/graphics/blackberry/LayerRendererSurface.h:
3316         (WebCore::LayerRendererSurface::origin):
3317         (LayerRendererSurface):
3318         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
3319         (WebCore):
3320         (WebCore::loadBufferingImageData):
3321         (WebCore::MediaPlayerPrivate::drawBufferingAnimation):
3322
3323 2013-05-28  Andreas Kling  <akling@apple.com>
3324
3325         Move Node::dispatchChangeEvent() to HTMLFormControlElement.
3326         <http://webkit.org/b/116866>
3327
3328         Reviewed by Anders Carlsson.
3329
3330         ...and devirtualize it, since it had no overrides.
3331
3332         * dom/Node.h:
3333         * dom/Node.cpp:
3334         * html/HTMLFormControlElement.h:
3335         * html/HTMLFormControlElement.cpp:
3336         (WebCore::HTMLFormControlElement::dispatchChangeEvent):
3337         (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
3338         * html/FileInputType.cpp:
3339         (WebCore::FileInputType::setFiles):
3340         * html/HTMLTextFormControlElement.cpp:
3341         (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
3342
3343 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
3344
3345         Refactoring CSS grammar
3346         https://bugs.webkit.org/show_bug.cgi?id=116679
3347
3348         Reviewed by Andreas Kling.
3349
3350         From Blink r149948 by <serya@chromium.org>
3351
3352         Added "closing_parenthesis:" and "error_recovery:" to avoid code
3353         duplication in a couple of error recovery rules. Some other rules
3354         were also refactored which allows to reduce the the number of
3355         shift/reduce conflicts by 2.
3356
3357         No new tests required as this is just a refactoring, no new
3358         functionality added.
3359
3360         * css/CSSGrammar.y.in:
3361
3362 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
3363
3364         Invalid block doesn't make declaration invalid
3365         https://bugs.webkit.org/show_bug.cgi?id=115709
3366
3367         Reviewed by Andreas Kling.
3368
3369         From Blink r149446 by <serya@chromium.org>
3370
3371         Added a new rule "declaration_recovery:" which covers any kind of
3372         "invalid_block_list maybe_space" sequence. By appending this new
3373         rule to every rule reductable to "declaration:" we can remove some
3374         redundant rules and improve error recovery of some others that
3375         were only accepting exactly one error.
3376
3377         One of the rules being removed was preventing invalid blocks in a
3378         declaration to invalidate the whole declaration. The rule was
3379         reporting the syntax error but at the same time accepting the
3380         invalid block as part of a valid declaration.
3381
3382         * css/CSSGrammar.y.in:
3383
3384 2013-05-28  Andreas Kling  <akling@apple.com>
3385
3386         Move dispatching of focus-related events from Node to Element.
3387         <http://webkit.org/b/116864>
3388
3389         Reviewed by Antti Koivisto.
3390
3391         ...and pass around pointers to Element instead of Node.
3392
3393         * dom/Node.cpp:
3394         * dom/Node.h:
3395         * dom/Element.h:
3396         * dom/Element.cpp:
3397         (WebCore::Element::dispatchFocusInEvent):
3398         (WebCore::Element::dispatchFocusOutEvent):
3399         (WebCore::Element::dispatchFocusEvent):
3400         (WebCore::Element::dispatchBlurEvent):
3401
3402             Moved here from Node.
3403
3404         * html/HTMLFormControlElement.h:
3405         * html/HTMLFormControlElement.cpp:
3406         (WebCore::HTMLFormControlElement::dispatchBlurEvent):
3407         * html/HTMLSelectElement.h:
3408         * html/HTMLSelectElement.cpp:
3409         (WebCore::HTMLSelectElement::dispatchFocusEvent):
3410         (WebCore::HTMLSelectElement::dispatchBlurEvent):
3411         * html/HTMLTextFormControlElement.h:
3412         * html/HTMLTextFormControlElement.cpp:
3413         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
3414         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
3415
3416             Update subclass overrides and sprinkle OVERRIDE/FINAL.
3417
3418 2013-05-28  Zan Dobersek  <zdobersek@igalia.com>
3419
3420         Remove CachedResourceRequest::initiatorElement
3421         https://bugs.webkit.org/show_bug.cgi?id=116862
3422
3423         Reviewed by Andreas Kling.
3424
3425         The CachedResourceRequest::initiatorElement method is not used anywhere and should be removed.
3426
3427         * loader/cache/CachedResourceRequest.cpp: Remove the initiatorElement method definition.
3428         * loader/cache/CachedResourceRequest.h:
3429         (CachedResourceRequest): Remove the initiatorElement method declaration.
3430
3431 2013-05-28  Andreas Kling  <akling@apple.com>
3432
3433         Document::setFocusedNode() should be setFocusedElement().
3434         <http://webkit.org/b/116857>
3435
3436         Reviewed by Antti Koivisto.
3437
3438         Only Elements can be focused, so tighten Document's idea of what's focused.
3439
3440         Most of this patch is just updating call sites for the new names and removing
3441         now-unnecessary isElementNode() checks and casts.
3442
3443         * WebCore.exp.in:
3444         * accessibility/AXObjectCache.cpp:
3445         (WebCore::AXObjectCache::focusedUIElementForPage):
3446         * accessibility/AccessibilityNodeObject.cpp:
3447         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
3448         * accessibility/AccessibilityRenderObject.cpp:
3449         (WebCore::AccessibilityRenderObject::isFocused):
3450         (WebCore::AccessibilityRenderObject::setFocused):
3451         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
3452         * bindings/objc/DOM.mm:
3453         (-[DOMElement isFocused]):
3454         * dom/Document.cpp:
3455         (WebCore::Document::dispose):
3456         (WebCore::Document::detach):
3457         (WebCore::Document::focusedNodeRemoved):
3458         (WebCore::Document::removeFocusedNodeOfSubtree):
3459         (WebCore::Document::setFocusedElement):
3460         (WebCore::Document::updateFocusAppearanceTimerFired):
3461         (WebCore::eventTargetNodeForDocument):
3462         * dom/Document.h:
3463         (Document):
3464         (WebCore::Document::focusedElement):
3465         * dom/Element.cpp:
3466         (WebCore::Element::attach):
3467         (WebCore::Element::focus):
3468         (WebCore::Element::blur):
3469         (WebCore::Element::cancelFocusAppearanceUpdate):
3470         * dom/Node.cpp:
3471         (WebCore::Node::rendererIsEditable):
3472         * dom/TreeScope.cpp:
3473         (WebCore::TreeScope::focusedElement):
3474         * dom/UserTypingGestureIndicator.cpp:
3475         (WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
3476         * editing/Editor.cpp:
3477         (WebCore::Editor::setBaseWritingDirection):
3478         (WebCore::Editor::setComposition):
3479         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
3480         * editing/EditorCommand.cpp:
3481         (WebCore::verticalScrollDistance):
3482         * editing/FrameSelection.cpp:
3483         (WebCore::FrameSelection::selectAll):
3484         (WebCore::FrameSelection::focusedOrActiveStateChanged):
3485         (WebCore::FrameSelection::setFocusedElementIfNeeded):
3486         (WebCore::FrameSelection::currentForm):
3487         * history/CachedPage.cpp:
3488         (WebCore::CachedPage::restore):
3489         * html/HTMLInputElement.cpp:
3490         (WebCore::HTMLInputElement::updateType):
3491         (WebCore::HTMLInputElement::attach):
3492         * html/HTMLTextAreaElement.cpp:
3493         (WebCore::HTMLTextAreaElement::setValueCommon):
3494         * html/HTMLTextFormControlElement.cpp:
3495         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):