416bdacc825163a876d823fa4a83899c85533630
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-03-29  Eric Seidel  <eric@webkit.org>
2
3         Reviewed by Ryosuke Niwa.
4
5         Rename InlineIterator::obj to m_obj to match modern style
6         https://bugs.webkit.org/show_bug.cgi?id=57319
7
8         I started this rename after confusion in InlineBidiResolver::appendRun.
9         (Which uses an "obj" local in InlineIterator.h.  It's not actually
10         masking m_obj because it's a separate class, but I didn't realize
11         that at the time because it's in InlineIterator.h which is itself confusing!)
12
13         * rendering/InlineIterator.h:
14         (WebCore::InlineIterator::InlineIterator):
15         (WebCore::operator==):
16         (WebCore::operator!=):
17         (WebCore::InlineIterator::increment):
18         (WebCore::InlineIterator::atEnd):
19         (WebCore::InlineIterator::current):
20         (WebCore::InlineIterator::direction):
21         (WebCore::InlineBidiResolver::appendRun):
22         * rendering/RenderBlockLineLayout.cpp:
23         (WebCore::checkMidpoints):
24         (WebCore::RenderBlock::appendRunsForObject):
25         (WebCore::RenderBlock::layoutInlineChildren):
26         (WebCore::RenderBlock::matchedEndLine):
27         (WebCore::skipNonBreakingSpace):
28         (WebCore::RenderBlock::requiresLineBox):
29         (WebCore::RenderBlock::skipTrailingWhitespace):
30         (WebCore::RenderBlock::skipLeadingWhitespace):
31         (WebCore::tryHyphenating):
32         (WebCore::RenderBlock::findNextLineBreak):
33
34 2011-03-29  Pavel Feldman  <pfeldman@chromium.org>
35
36         Reviewed by Yury Semikhatsky.
37
38         Web Inspector: document Timeline domain, make timeline event types of type string.
39         https://bugs.webkit.org/show_bug.cgi?id=57299
40
41         * inspector/Inspector.json:
42         * inspector/InspectorTimelineAgent.cpp:
43         (WebCore::InspectorTimelineAgent::pushGCEventRecords):
44         (WebCore::InspectorTimelineAgent::start):
45         (WebCore::InspectorTimelineAgent::stop):
46         (WebCore::InspectorTimelineAgent::willCallFunction):
47         (WebCore::InspectorTimelineAgent::didCallFunction):
48         (WebCore::InspectorTimelineAgent::willDispatchEvent):
49         (WebCore::InspectorTimelineAgent::didDispatchEvent):
50         (WebCore::InspectorTimelineAgent::willLayout):
51         (WebCore::InspectorTimelineAgent::didLayout):
52         (WebCore::InspectorTimelineAgent::willRecalculateStyle):
53         (WebCore::InspectorTimelineAgent::didRecalculateStyle):
54         (WebCore::InspectorTimelineAgent::willPaint):
55         (WebCore::InspectorTimelineAgent::didPaint):
56         (WebCore::InspectorTimelineAgent::willWriteHTML):
57         (WebCore::InspectorTimelineAgent::didWriteHTML):
58         (WebCore::InspectorTimelineAgent::didInstallTimer):
59         (WebCore::InspectorTimelineAgent::didRemoveTimer):
60         (WebCore::InspectorTimelineAgent::willFireTimer):
61         (WebCore::InspectorTimelineAgent::didFireTimer):
62         (WebCore::InspectorTimelineAgent::willChangeXHRReadyState):
63         (WebCore::InspectorTimelineAgent::didChangeXHRReadyState):
64         (WebCore::InspectorTimelineAgent::willLoadXHR):
65         (WebCore::InspectorTimelineAgent::didLoadXHR):
66         (WebCore::InspectorTimelineAgent::willEvaluateScript):
67         (WebCore::InspectorTimelineAgent::didEvaluateScript):
68         (WebCore::InspectorTimelineAgent::didScheduleResourceRequest):
69         (WebCore::InspectorTimelineAgent::willSendResourceRequest):
70         (WebCore::InspectorTimelineAgent::willReceiveResourceData):
71         (WebCore::InspectorTimelineAgent::didReceiveResourceData):
72         (WebCore::InspectorTimelineAgent::willReceiveResourceResponse):
73         (WebCore::InspectorTimelineAgent::didReceiveResourceResponse):
74         (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
75         (WebCore::InspectorTimelineAgent::didMarkTimeline):
76         (WebCore::InspectorTimelineAgent::didMarkDOMContentEvent):
77         (WebCore::InspectorTimelineAgent::didMarkLoadEvent):
78         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
79         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
80         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
81         * inspector/InspectorTimelineAgent.h:
82         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
83         * inspector/front-end/TimelineAgent.js:
84         * inspector/front-end/TimelinePanel.js:
85         (WebInspector.TimelinePanel.prototype.get _recordStyles):
86         (WebInspector.TimelinePanel.prototype._createEventDivider):
87         (WebInspector.TimelinePanel.prototype._findParentRecord):
88         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
89         (WebInspector.TimelineDispatcher.prototype.started):
90         (WebInspector.TimelineDispatcher.prototype.stopped):
91         (WebInspector.TimelineDispatcher.prototype.eventRecorded):
92         (WebInspector.TimelinePanel.FormattedRecord):
93         (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
94         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
95
96 2011-03-29  Andrey Adaikin  <aandrey@google.com>
97
98         Reviewed by Pavel Feldman.
99
100         Web Inspector: Fixing live edits tests on chromium.
101         https://bugs.webkit.org/show_bug.cgi?id=57316
102
103         * inspector/front-end/ScriptsPanel.js:
104         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource):
105         * inspector/front-end/SourceFrame.js:
106         (WebInspector.SourceFrame.prototype._handleSave.didEditScriptSource):
107         (WebInspector.SourceFrame.prototype._handleSave):
108         (WebInspector.SourceFrameDelegate.prototype.editScriptSource):
109
110 2011-03-29  Pavel Podivilov  <podivilov@chromium.org>
111
112         Reviewed by Yury Semikhatsky.
113
114         Web Inspector: fix call frames positions in formatted scripts.
115         https://bugs.webkit.org/show_bug.cgi?id=57036
116
117         Introduce PresentationCallFrame class that encapsulates source mapping details from UI components.
118
119         * inspector/front-end/CallStackSidebarPane.js:
120         (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLocation):
121         (WebInspector.CallStackSidebarPane.prototype.update):
122         (WebInspector.CallStackSidebarPane.prototype.set selectedCallFrame):
123         (WebInspector.CallStackSidebarPane.prototype._placardSelected):
124         (WebInspector.CallStackSidebarPane.prototype._contextMenu):
125         (WebInspector.CallStackSidebarPane.prototype._copyStackTrace):
126         * inspector/front-end/DebuggerModel.js:
127         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
128         (WebInspector.DebuggerModel.prototype.get debuggerPausedDetails):
129         (WebInspector.DebuggerModel.prototype._pausedScript):
130         * inspector/front-end/DebuggerPresentationModel.js:
131         (WebInspector.DebuggerPresentationModel):
132         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource):
133         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
134         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
135         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
136         (WebInspector.DebuggerPresentationModel.prototype._debuggerResumed):
137         (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame):
138         (WebInspector.DebuggerPresentationModel.prototype.get selectedCallFrame):
139         (WebInspector.DebuggerPresentationModel.prototype._reset):
140         (WebInspector.PresenationCallFrame): Call frame wrapper for UI.
141         * inspector/front-end/ScriptsPanel.js:
142         (WebInspector.ScriptsPanel):
143         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
144         (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation):
145         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
146         (WebInspector.ScriptsPanel.prototype._debuggerResumed):
147         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
148         (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation):
149         (WebInspector.ScriptsPanel.prototype._callFrameSelected):
150         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame):
151         * inspector/front-end/SourceFile.js:
152         (WebInspector.SourceFile.prototype.get content):
153         * inspector/front-end/SourceFrame.js:
154         (WebInspector.SourceFrame.prototype._createTextViewer):
155         (WebInspector.SourceFrame.prototype.setExecutionLine):
156         (WebInspector.SourceFrame.prototype.clearExecutionLine):
157         (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup):
158         (WebInspector.SourceFrame.prototype._showPopup):
159
160 2011-03-29  Emil A Eklund  <eae@chromium.org>
161
162         Reviewed by Darin Adler.
163
164         Fix for execCommand("Delete") with an empty selection.
165         https://bugs.webkit.org/show_bug.cgi?id=56652
166
167         Test: editing/execCommand/delete-empty-container.html
168
169         * editing/TypingCommand.cpp:
170         (WebCore::TypingCommand::makeEditableRootEmpty): Add check for root element.
171
172 2011-03-29  Mikhail Naganov  <mnaganov@chromium.org>
173
174         Reviewed by Pavel Feldman.
175
176         Web Inspector: [Chromium] Refactor HeapSnapshot-related code to
177         make sure we don't return big amounts of data to forms.
178         https://bugs.webkit.org/show_bug.cgi?id=57227
179
180         * inspector/front-end/DetailedHeapshotGridNodes.js:
181         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
182         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get _countPercent):
183         (WebInspector.HeapSnapshotObjectNode):
184         (WebInspector.HeapSnapshotObjectNode.prototype._createProvider):
185         (WebInspector.HeapSnapshotInstanceNode):
186         (WebInspector.HeapSnapshotInstanceNode.prototype._createProvider):
187         (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider):
188         (WebInspector.HeapSnapshotConstructorNode.prototype.get _countPercent):
189         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider.createProvider):
190         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider):
191         (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
192         * inspector/front-end/DetailedHeapshotView.js:
193         (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource):
194         (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.setDataSource):
195         * inspector/front-end/HeapSnapshot.js:
196         (WebInspector.HeapSnapshotNode.prototype.get dominatorIndex):
197         (WebInspector.HeapSnapshotNode.prototype.get retainers):
198         (WebInspector.HeapSnapshot):
199         (WebInspector.HeapSnapshot.prototype.get _allNodes):
200         (WebInspector.HeapSnapshot.prototype.get nodeCount):
201         (WebInspector.HeapSnapshot.prototype.get rootNodeIndex):
202         (WebInspector.HeapSnapshot.prototype.hasId):
203         (WebInspector.HeapSnapshot.prototype.get nodeIds):
204         (WebInspector.HeapSnapshot.prototype._retainersForNode):
205         (WebInspector.HeapSnapshot.prototype._buildRetainers):
206         (WebInspector.HeapSnapshot.prototype._buildAggregates):
207         (WebInspector.HeapSnapshot.prototype._buildAggregatesIndexes):
208         (WebInspector.HeapSnapshot.prototype._buildIdsList):
209         (WebInspector.HeapSnapshot.prototype._buildNodeIndex):
210         (WebInspector.HeapSnapshotFilteredOrderedIterator):
211         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.next):
212         (WebInspector.HeapSnapshotEdgesProvider):
213         (WebInspector.HeapSnapshotNodesProvider):
214
215 2011-03-29  Mikhail Naganov  <mnaganov@chromium.org>
216
217         Reviewed by Pavel Feldman.
218
219         Web Inspector: [Chromium] Fix detailed heap snapshots UI.
220         https://bugs.webkit.org/show_bug.cgi?id=57235
221
222         Fix two problems:
223           1. Text color of grid cells under selection needs to be white, otherwise it's unreadable for some colors;
224           2. Long strings need to be truncated in grid, their contents can be shown on hover.
225
226         * inspector/front-end/DetailedHeapshotView.js:
227         (WebInspector.DetailedHeapshotView.prototype._getHoverAnchor):
228         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup):
229         * inspector/front-end/heapProfiler.css:
230         (.detailed-heapshot-view .console-formatted-string):
231         (.detailed-heapshot-view .data-grid tr.selected *):
232         (.detailed-heapshot-view .data-grid:focus tr.selected *):
233
234 2011-03-29  Andrey Adaikin  <aandrey@google.com>
235
236         Reviewed by Yury Semikhatsky.
237
238         Web Inspector: Highlight visible lines first
239         https://bugs.webkit.org/show_bug.cgi?id=57013
240
241         * inspector/front-end/TextViewer.js:
242         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleChunkNumber):
243         (WebInspector.TextEditorChunkedPanel.prototype._findVisibleChunks):
244         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleLineNumber.compareLineRowOffsetTops):
245         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleLineNumber):
246         (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
247         (WebInspector.TextEditorMainPanel.prototype._paintLines):
248         (WebInspector.TextEditorMainPanel.prototype._paintLineChunks):
249         (WebInspector.TextEditorMainPanel.prototype._paintLine):
250         (WebInspector.TextEditorMainChunk.prototype.set expanded):
251
252 2011-03-29  Emil A Eklund  <eae@chromium.org>
253
254         Reviewed by Dimitri Glazkov.
255
256         Relative mouse coordinates recalculated for each target
257         https://bugs.webkit.org/show_bug.cgi?id=57130
258
259         Calculate relative coordinates lazily for mouse events instead of doing
260         it for each target. Speeds up dispatching of mouse events in deep dom
261         structures significantly, O(n^2) to O(n).
262
263         Also fixes https://bugs.webkit.org/show_bug.cgi?id=34973
264
265         Tests: fast/events/mouse-relative-position.html
266                perf/mouse-event.html
267
268         * dom/Event.cpp:
269         (WebCore::Event::setTarget):
270         * dom/MouseRelatedEvent.cpp:
271         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
272         (WebCore::MouseRelatedEvent::initCoordinates):
273         (WebCore::pageZoomFactor):
274         (WebCore::MouseRelatedEvent::receivedTarget):
275         (WebCore::MouseRelatedEvent::computeRelativePosition):
276         (WebCore::MouseRelatedEvent::layerX):
277         (WebCore::MouseRelatedEvent::layerY):
278         (WebCore::MouseRelatedEvent::offsetX):
279         (WebCore::MouseRelatedEvent::offsetY):
280         * dom/MouseRelatedEvent.h:
281         * dom/UIEvent.cpp:
282         (WebCore::UIEvent::layerX):
283         (WebCore::UIEvent::layerY):
284         * dom/UIEvent.h:
285
286 2011-03-29  Emil A Eklund  <eae@chromium.org>
287
288         Reviewed by Darin Adler.
289
290         getComputedStyle counterIncrement crash @ WebCore::counterToCSSValue
291         https://bugs.webkit.org/show_bug.cgi?id=57266
292
293         Add null check to counterToCSSValue.
294
295         Test: fast/css/getComputedStyle/counterIncrement-without-counter.html
296
297         * css/CSSComputedStyleDeclaration.cpp:
298         (WebCore::counterToCSSValue):
299
300 2011-03-29  Gavin Peters  <gavinp@chromium.org>
301
302         Reviewed by Tony Gentilcore.
303
304         Implement onerror events for <link rel=prefetch>
305         https://bugs.webkit.org/show_bug.cgi?id=57182
306
307         These events are equired on link elements, see
308         http://dev.w3.org/html5/spec/Overview.html#the-link-element
309
310         After a discussion in WebKit-dev about the direction of prefetch in the loader, and about a path
311         to adding the Link header, we decided to look at making onerror, onload and onbeforeload events
312         more uniformly supported.  See the thread at
313         https://lists.webkit.org/pipermail/webkit-dev/2011-February/016034.html .
314
315         It turned out that part of adding onerror for link prefetch was to make the top CachedResource less
316         abstract.  It was pure virtual until prefetch became the first consumer to use an unspecialised
317         implementation, and this CL continues that by adding a default checkNotify method to it.  As it
318         happens there were already two subclasses using what amounted to the generic checkNotify, so I
319         also removed those, buying us some code cleanup with the change.
320
321         Test: fast/dom/HTMLLinkElement/prefetch-onerror.html
322
323         * html/HTMLLinkElement.cpp:
324         (WebCore::HTMLLinkElement::parseMappedAttribute):
325         (WebCore::HTMLLinkElement::onloadTimerFired):
326         (WebCore::HTMLLinkElement::notifyFinished):
327         * loader/cache/CachedImage.cpp:
328         * loader/cache/CachedImage.h:
329         * loader/cache/CachedResource.cpp:
330         (WebCore::CachedResource::checkNotify):
331         (WebCore::CachedResource::data):
332         (WebCore::CachedResource::error):
333         * loader/cache/CachedResource.h:
334         * loader/cache/CachedScript.cpp:
335         * loader/cache/CachedScript.h:
336
337 2011-03-29  Eric Seidel  <eric@webkit.org>
338
339         Reviewed by Ryosuke Niwa.
340
341         Add support for parsing unicode-bidi: -webkit-isolate
342         https://bugs.webkit.org/show_bug.cgi?id=57181
343
344         Test: css3/unicode-bidi-insolate-parse.html
345
346         * WebCore.xcodeproj/project.pbxproj:
347         * css/CSSParser.cpp:
348         (WebCore::CSSParser::parseValue):
349         * css/CSSPrimitiveValueMappings.h:
350         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
351         (WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
352         * css/CSSValueKeywords.in:
353         * rendering/style/RenderStyleConstants.h:
354
355 2011-03-29  Patrick Gansterer  <paroga@webkit.org>
356
357         Unreviewed WinCE build fix for r82193.
358
359         * platform/wince/FileSystemWinCE.cpp:
360         (WebCore::openTemporaryFile):
361
362 2011-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
363
364         Unreviewed, rolling out r82198.
365         http://trac.webkit.org/changeset/82198
366         https://bugs.webkit.org/show_bug.cgi?id=57304
367
368         Broke Chromium Win build. (Requested by dave_levin on
369         #webkit).
370
371         * platform/image-decoders/png/PNGImageDecoder.cpp:
372         (WebCore::PNGImageDecoder::headerAvailable):
373         (WebCore::PNGImageDecoder::rowAvailable):
374
375 2011-03-28  Ofri Wolfus  <ofri@google.com>
376
377         Reviewed by Eric Seidel.
378
379         RTL: Select elements with a size attribute are always left aligned.
380         https://bugs.webkit.org/show_bug.cgi?id=50928
381
382         Added support for alignment in RenderListBox.
383
384         Test: fast/forms/listbox-bidi-align.html
385
386         * rendering/RenderListBox.cpp:
387         (WebCore::itemOffsetForAlignment):
388         (WebCore::RenderListBox::paintItemForeground): Add support for alignment and directionality.
389
390 2011-03-28  Kwang Yul Seo  <skyul@company100.net>
391
392         Reviewed by Benjamin Poulain.
393
394         [Qt] Change TextureMapperVideoLayer to TextureMapperMediaLayer
395         https://bugs.webkit.org/show_bug.cgi?id=57142
396
397         TextureMapperMediaLayer is a better name here because both video and plugins use this layer.
398         Remove ENABLE(VIDEO) guard.
399
400         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
401         * platform/graphics/qt/MediaPlayerPrivateQt.h:
402         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
403         (WebCore::GraphicsLayerTextureMapper::setContentsToMedia):
404         * platform/graphics/texmap/TextureMapperNode.h:
405         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
406         (WebCore::TextureMapperMediaLayer::layerType):
407
408 2011-03-28  Thomas Klausner  <tk@giga.or.at>
409
410         Reviewed by David Levin.
411
412         png-1.5 fixes
413         https://bugs.webkit.org/show_bug.cgi?id=54406
414
415         Fix compilation with png-1.5: struct members were hidden, and
416         a new API to terminate data processing was added (especially for
417         WebKit).
418
419         Compilation fixes, so no new tests.
420
421         * platform/image-decoders/png/PNGImageDecoder.cpp:
422         (WebCore::PNGImageDecoder::headerAvailable):
423         (WebCore::PNGImageDecoder::rowAvailable):
424
425 2011-03-28  Kwang Yul Seo  <skyul@company100.net>
426
427         Reviewed by Adam Barth.
428
429         Replace fprintf(stderr, ...) with LOG_ERROR
430         https://bugs.webkit.org/show_bug.cgi?id=57216
431
432         LOG_ERROR is a better choice here.
433
434         * bridge/jni/v8/JavaClassV8.cpp:
435         (JavaClass::JavaClass):
436
437 2011-03-28  Steve Block  <steveblock@google.com>
438
439         Reviewed by Jeremy Orlow.
440
441         Add a new JavaValue to type to represent a Java value in the Java bridge
442         https://bugs.webkit.org/show_bug.cgi?id=57022
443
444         This change introduces a new JavaValue type and uses it in place of jvalue
445         in the conversions to and from JavaNPObject used in the V8 Java bridge.
446
447         Refactoring only, no new tests.
448
449         * WebCore.gypi:
450         * bridge/jni/JNIUtility.cpp:
451         (JSC::Bindings::javaTypeFromClassName):
452         (JSC::Bindings::signatureFromJavaType):
453         (JSC::Bindings::getJNIField):
454         (JSC::Bindings::callJNIMethod):
455         * bridge/jni/JavaType.h:
456         * bridge/jni/v8/JNIUtilityPrivate.cpp:
457         (JSC::Bindings::convertNPVariantToJavaValue):
458         (JSC::Bindings::convertJavaValueToNPVariant):
459         (JSC::Bindings::jvalueToJavaValue):
460         (JSC::Bindings::javaValueToJvalue):
461         * bridge/jni/v8/JNIUtilityPrivate.h:
462         * bridge/jni/v8/JavaNPObjectV8.cpp:
463         (JSC::Bindings::JavaNPObjectInvoke):
464         (JSC::Bindings::JavaNPObjectGetProperty):
465         * bridge/jni/v8/JavaValueV8.h: Added.
466         (JSC::Bindings::JavaValue::JavaValue):
467
468 2011-03-28  Patrick Gansterer  <paroga@webkit.org>
469
470         Reviewed by Darin Adler.
471
472         Use String instead of CString as return value of openTemporaryFile
473         https://bugs.webkit.org/show_bug.cgi?id=55332
474
475         We usually store all paths as UTF-16. Do this for temporary files too.
476
477         * WebCore.exp.in
478         * platform/FileSystem.h:
479         * platform/android/FileSystemAndroid.cpp:
480         * platform/brew/FileSystemBrew.cpp:
481         * platform/efl/FileSystemEfl.cpp:
482         * platform/gtk/FileSystemGtk.cpp:
483         * platform/haiku/FileSystemHaiku.cpp:
484         * platform/mac/FileSystemMac.mm:
485         * platform/qt/FileSystemQt.cpp:
486         * platform/win/FileSystemWin.cpp:
487         * platform/wince/FileSystemWinCE.cpp:
488         * platform/wx/FileSystemWx.cpp:
489         * plugins/PluginStream.cpp:
490         (WebCore::PluginStream::destroyStream):
491         * plugins/PluginStream.h:
492
493 2011-03-28  Jeff Johnson  <opendarwin@lapcatsoftware.com>
494
495         Reviewed by Pavel Feldman.
496
497         Web Inspector: empty, non-functional window
498         https://bugs.webkit.org/show_bug.cgi?id=56354
499
500         Check whether DOM local storage is enabled
501         before attempting to access window.localStorage.
502
503         No new tests.
504
505         * inspector/front-end/Settings.js:
506         (WebInspector.Settings.prototype.findSettingForAllProjects):
507         (WebInspector.Settings.prototype._get):
508         (WebInspector.Settings.prototype._set):
509
510 2011-03-28  Beth Dakin  <bdakin@apple.com>
511
512         Reviewed by Darin Adler.
513
514         Fix for https://bugs.webkit.org/show_bug.cgi?id=57286 Alternative fix for: 
515         Horizontal scroller stops appearing after going Forward
516         -and corresponding-
517         <rdar://problem/9026946>
518
519         This patch rolls out revision 79053 and fixes the same bug in a  better way.
520
521         New function resetScrollbarsAndClearContentsSize() calls resetScrollbars() and then 
522         sets the contents size to 0. This is called when a document is going into the page 
523         cache.
524         * dom/Document.cpp:
525         (WebCore::Document::setInPageCache):
526         (WebCore::FrameView::resetScrollbarsAndClearContentsSize):
527
528         Roll-out of 79053.
529         * history/CachedFrame.cpp:
530         (WebCore::CachedFrameBase::restore):
531         * page/FrameView.cpp:
532         (WebCore::FrameView::FrameView):
533         (WebCore::FrameView::reset):
534         (WebCore::FrameView::layout):
535         * page/FrameView.h:
536
537 2011-03-28  Ojan Vafai  <ojan@chromium.org>
538
539         Reviewed by Antti Koivisto.
540
541         fix style sharing with :any and sibling selectors
542         https://bugs.webkit.org/show_bug.cgi?id=57211
543
544         Test: fast/css/sibling-selectors.html
545
546         * css/CSSStyleSelector.cpp:
547         (WebCore::collectFeaturesFromList):
548
549 2011-03-27  Ojan Vafai  <ojan@chromium.org>
550
551         Reviewed by Antti Koivisto.
552
553         fix :-webkit-any(:last-child)
554         https://bugs.webkit.org/show_bug.cgi?id=57207
555
556         We were passing the wrong arguments to checkSelector. Also, we were not
557         passing through the encounteredLink bool.
558
559         * css/CSSStyleSelector.cpp:
560         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
561         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
562         * css/CSSStyleSelector.h:
563
564 2011-03-27  Ojan Vafai  <ojan@chromium.org>
565
566         Reviewed by Antti Koivisto.
567
568         fix :-webkit-any(:last-child)
569         https://bugs.webkit.org/show_bug.cgi?id=57207
570
571         We were passing the wrong arguments to checkSelector. Also, we were not
572         passing through the encounteredLink bool.
573
574         * css/CSSStyleSelector.cpp:
575         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
576         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
577         * css/CSSStyleSelector.h:
578
579 2011-03-28  Maciej Stachowiak  <mjs@apple.com>
580
581         Reviewed by Darin Adler.
582
583         REGRESSION(r82152): fast/dom/HTMLAnchorElement/set-href-attribute-pathname.html
584         https://bugs.webkit.org/show_bug.cgi?id=57291
585
586         * platform/KURL.cpp:
587         (WebCore::KURL::parse): Instead of considering URLs with
588         credentials but no host invalid, consider them to have a host
589         ending in @ (which fails down the line)/
590
591 2011-03-28  Kent Tamura  <tkent@chromium.org>
592
593         Reviewed by Dimitri Glazkov.
594
595         Fix some problems of the appearance of form validation message bubble.
596         https://bugs.webkit.org/show_bug.cgi?id=57208
597
598         No new tests. Validation message bubble appearance is not testable
599         because it depends on a timer.
600
601         * css/html.css:
602         (::-webkit-validation-bubble):
603         (::-webkit-validation-bubble-message):
604         (::-webkit-validation-bubble-arrow):
605         (::-webkit-validation-bubble-arrow-clipper):
606           - Explicitly set margin, padding, and color.
607           - Make the shadow darker.
608           - Make the background color darker.
609           - Make opacity larger.
610           - Make the border color lighter.
611           - Add inset shadows
612           - Change the implementation of an arrow.
613             Stop making a right triangle by the border trick.
614             Use -webkit-transform instead.
615           - Make min-width workable by changing display property of
616             -webkit-validation-bubble to "inline-block".
617         * html/ValidationMessage.cpp:
618         (WebCore::ValidationMessage::buildBubbleTree):
619           Change the node structure. Before this change, -webkit-validation-bubble
620           had three DIVs inside. After this change, it has two DIVs;
621           -webkit-validation-bubble-arrow-clipper and
622           -webkit-validation-bubble-message, and
623           -webkit-validation-bubble-arrow-clipper contains
624           -webkit-validation-bubble-arrow.
625
626 2011-03-28  Enrica Casucci  <enrica@apple.com>
627
628         Reviewed by Sam Weinig.
629
630         REGRESSION: Can't enter pasted with context or Edit menu text in search or address field in the browser.
631         https://bugs.webkit.org/show_bug.cgi?id=57275
632         <rdar://problem/8246691>
633
634         We need to classify cut and paste actions as user typing actions even when
635         the action is triggered by a context menu selection to
636         allow the propagation of the textDidChangeInTextField event.
637
638         * editing/EditorCommand.cpp:
639         The following methods have been modified to properly set up
640         the UserTypingGestureAction when the command source is the
641         menu or a key binding sequence.
642         (WebCore::executeCut):
643         (WebCore::executePaste):
644         (WebCore::executePasteAndMatchStyle):
645         (WebCore::executePasteAsPlainText):
646         (WebCore::executeDelete):
647         * page/ContextMenuController.cpp:
648         (WebCore::ContextMenuController::contextMenuItemSelected): Changed to
649         call execute command instead of referring to the specific method in
650         the editor class.
651
652 2011-03-28  Oliver Hunt  <oliver@apple.com>
653
654         Reviewed by Geoffrey Garen.
655
656         instanceof Array test fails when using iframes
657         https://bugs.webkit.org/show_bug.cgi?id=17250
658
659         Update for new function and date apis
660
661         Test: fast/js/js-constructors-use-correct-global.html
662
663         * WebCore.xcodeproj/project.pbxproj:
664         * bindings/js/JSDOMBinding.cpp:
665         (WebCore::jsDateOrNull):
666         * bindings/js/JSLazyEventListener.cpp:
667         (WebCore::JSLazyEventListener::initializeJSFunction):
668
669 2011-03-28  Beth Dakin  <bdakin@apple.com>
670
671         Reviewed by Darin Adler.
672
673         Fix for https://bugs.webkit.org/show_bug.cgi?id=57124 When the scroller style is 
674         changed via delegate method, the page needs a full relayout and repaint
675         -and corresponding-
676         <rdar://problem/9059129>
677
678         Call into WebKitSystemInterface to associate the new painter with the existing 
679         painter controller. Reset the scrollbar frame rects to the new thickness -- normally 
680         this only happens when a scrollbar is created, so we have to reset the thickness 
681         here to pick up the new theme thickness. Finally, force a full relayout and style 
682         recall with setNeedsRecalcStyleInAllFrames()
683         * platform/mac/ScrollAnimatorMac.mm:
684         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
685
686         setNeedsRecalcStyleInAllFrames() used to be a static method in Settings.cpp. This 
687         patch moves it to be a member function on Page so that it can be called from 
688         FrameView when the scrollbar style changes.
689         * page/FrameView.cpp:
690         (WebCore::FrameView::setNeedsRecalcStyleInAllFrames):
691         * page/FrameView.h:
692         * page/Page.cpp:
693         (WebCore::Page::setNeedsRecalcStyleInAllFrames):
694         * page/Page.h:
695         * page/Settings.cpp:
696         (WebCore::Settings::setStandardFontFamily):
697         (WebCore::Settings::setFixedFontFamily):
698         (WebCore::Settings::setSerifFontFamily):
699         (WebCore::Settings::setSansSerifFontFamily):
700         (WebCore::Settings::setCursiveFontFamily):
701         (WebCore::Settings::setFantasyFontFamily):
702         (WebCore::Settings::setMinimumFontSize):
703         (WebCore::Settings::setMinimumLogicalFontSize):
704         (WebCore::Settings::setDefaultFontSize):
705         (WebCore::Settings::setDefaultFixedFontSize):
706         (WebCore::Settings::setTextAreasAreResizable):
707         (WebCore::Settings::setAuthorAndUserStylesEnabled):
708         (WebCore::Settings::setFontRenderingMode):
709         (WebCore::Settings::setAcceleratedCompositingEnabled):
710         (WebCore::Settings::setShowDebugBorders):
711         (WebCore::Settings::setShowRepaintCounter):
712         * platform/ScrollableArea.h:
713         (WebCore::ScrollableArea::setNeedsRecalcStyleInAllFrames):
714
715 2011-03-28  Dirk Pranke  <dpranke@chromium.org>
716
717         RS=Tony Chang.
718
719         r81977 moved FontPlatformData.h from
720         WebCore/platform/graphics/cocoa to platform/graphics. This
721         change updates the chromium build accordingly.
722
723         https://bugs.webkit.org/show_bug.cgi?id=57281
724
725         * platform/graphics/chromium/CrossProcessFontLoading.mm:
726
727 2011-03-28  Jer Noble  <jer.noble@apple.com>
728
729         Reviewed by Darin Adler.
730
731         MediaPlayerPrivateAVFoundation should report that it supportsFullScreen()
732         https://bugs.webkit.org/show_bug.cgi?id=57249
733
734         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
735         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen):
736         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
737
738 2011-03-28  Jer Noble  <jer.noble@apple.com>
739
740         Reviewed by Darin Adler.
741
742         AVFoundation can indeed support full screen.
743
744         MediaPlayerPrivateAVFoundation should report that it supportsFullScreen()
745         https://bugs.webkit.org/show_bug.cgi?id=57249
746
747         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
748         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen): Return true if using
749             the new full screen APIs.
750         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
751
752 2011-03-28  Eric Carlson  <eric.carlson@apple.com>
753
754         Reviewed by Darin Adler.
755
756         http streams don't always display video with AVFoundation backend
757         https://bugs.webkit.org/show_bug.cgi?id=57203
758
759         No new tests, we don't currently have tests for http live streams. Changes verified manually.
760
761         * platform/graphics/MediaPlayer.cpp:
762         (WebCore::MediaPlayer::MediaPlayer): Initialize m_shouldPrepareToRender.
763         (WebCore::MediaPlayer::loadWithNextMediaEngine): Call prepareForRendering on new engine
764             if m_shouldPrepareToRender is set.
765         (WebCore::MediaPlayer::prepareForRendering): Set m_shouldPrepareToRender.
766         * platform/graphics/MediaPlayer.h:
767
768         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
769         (WebCore::MediaPlayerPrivateAVFoundation::isReadyForVideoSetup): Don't return true until
770             m_isAllowedToRender has been set.
771         (WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering): Always call setUpVideoRendering,
772             it has logic to figure out when setup is required.
773         (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Call setUpVideoRendering when we aren't
774             using the preferred rendering mode because if we get a file's metadata between the
775             time supportsAcceleratedRendering() and paint() are called, we will allocate a software
776             renderer even when we prefer a layer backed renderer.
777         (WebCore::MediaPlayerPrivateAVFoundation::movieLoadType): Return "unknown" until we have metadata.
778
779         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
780         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
781         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Use itemKVOProperties() instead of
782             an explicit list of key path names.
783         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForURL): Ditto.
784         (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): metadataKeyNames renamed
785             to assetMetadataKeyNames, return an NSArray instead of a CFArrayRef since that is what the
786             callers need.
787         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Return the duration of the 
788             player item, not the asset, because AVAsset.duration always returns an indefinite time
789             for all streaming files.
790         (WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus): metadataKeyNames renamed
791             to assetMetadataKeyNames.
792         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext): Do nothing until
793             metadata is available.
794         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Ditto.
795         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Split size calculation logic off
796             into sizeChanged().
797         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged): New. Use AVPlayerItem.presentationSize
798             until tracks is non-NULL so we have a size as early as possible.
799         (WebCore::MediaPlayerPrivateAVFoundationObjC::assetMetadataKeyNames): Renamed from metadataKeyNames.
800         (WebCore::MediaPlayerPrivateAVFoundationObjC::itemKVOProperties): New, return an array of
801             KVO observable properties.
802         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Respond to 
803             presentationSize change.
804
805 2011-03-28  Anders Carlsson  <andersca@apple.com>
806
807         Reviewed by Sam Weinig.
808
809         Search field focus ring is missing
810         https://bugs.webkit.org/show_bug.cgi?id=57270
811         <rdar://problem/8765555>
812
813         Add an _automaticFocusRingDisabled method which returns YES.
814
815         * platform/mac/ThemeMac.mm:
816         (-[WebCoreFlippedView _automaticFocusRingDisabled]):
817
818 2011-03-28  Dimitri Glazkov  <dglazkov@chromium.org>
819
820         Reviewed by Darin Adler.
821
822         Move more events to EventDispatcher.
823         https://bugs.webkit.org/show_bug.cgi?id=57247
824
825         No functional changes, covered by existing tests.
826
827         * dom/EventDispatcher.cpp:
828         (WebCore::eventTargetRespectingSVGTargetRules): Made a static function,
829             since it's not used anywhere outside of the EventDispatcher.
830         (WebCore::EventDispatcher::dispatchScopedEvent): Moved from Node.cpp.
831         (WebCore::EventDispatcher::dispatchKeyEvent): Ditto.
832         (WebCore::EventDispatcher::dispatchWheelEvent): Ditto.
833         (WebCore::EventDispatcher::dispatchEvent): Changed to use eventTargetRespectingSVGTargetRules
834             as a static function.
835         * dom/EventDispatcher.h: Updated decls.
836         * dom/Node.cpp:
837         (WebCore::Node::dispatchScopedEvent): Replaced with calling EventDispatcher.
838         (WebCore::Node::dispatchKeyEvent): Ditto.
839         (WebCore::Node::dispatchWheelEvent): Ditto.
840
841 2011-03-28  Adele Peterson  <adele@apple.com>
842
843         Reviewed by Eric Seidel.
844
845         Fix for <rdar://problem/9112694> REGRESSION (r79411): "Check grammar with spelling" context menu doesn't check as you type
846         https://bugs.webkit.org/show_bug.cgi?id=57173
847
848         Test: editing/spelling/grammar.html
849
850         * WebCore.exp.in: Add symbol for new selectionStartHasMarkerFor method.
851         * editing/Editor.cpp:
852         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Every use of paragraph is specific to spelling or grammar, 
853          so to avoid confusion, we should explicitly use spellingParagraph or grammarParagraph.  In the case of this bug, 
854          when we're consider ambiguous boundary characters (characters that could indicate word boundaries, but are used 
855          in the middle of words too, like apostrophes), we should use the use the spellingParagraph since the spellingParagraph 
856          is the only one operated on when this information is used.
857          (WebCore::Editor::selectionStartHasMarkerFor): Changed from selectionStartHasSpellingMarkerFor so it can check for grammar as well as spelling.
858         * editing/Editor.h:
859
860 2011-03-28  Dan Bernstein  <mitz@apple.com>
861
862         Reviewed by Darin Adler.
863
864         <rdar://problem/8895977> REGRESSION: multicol crashes with positioned elements
865         https://bugs.webkit.org/show_bug.cgi?id=48983
866
867         Test: fast/multicol/paginated-layer-crash.html
868
869         * rendering/RenderLayer.cpp:
870         (WebCore::RenderLayer::paintPaginatedChildLayer): Bring the logic for finding pagintating layers
871         into sync with updatePagination() after r68069.
872         (WebCore::RenderLayer::hitTestPaginatedChildLayer): Ditto.
873
874 2011-03-28  Maciej Stachowiak  <mjs@apple.com>
875
876         Reviewed by Darin Adler' .
877
878         URLSs with non-empty username but empty hostname treat first path segment as hostname, potentially enabling XSS
879         https://bugs.webkit.org/show_bug.cgi?id=57220
880
881         Test: http/tests/uri/username-with-no-hostname.html
882
883         * platform/KURL.cpp:
884         (WebCore::hostPortIsEmptyButUserPassIsNot):
885         (WebCore::KURL::parse):
886
887 2011-03-28  Adam Barth  <abarth@webkit.org>
888
889         Reviewed by Eric Seidel.
890
891         script-src should block inline event handlers
892         https://bugs.webkit.org/show_bug.cgi?id=57212
893
894         I considered wrapping this into the canExecute check, but that approach
895         would require passing that function a bunch of context information to
896         behave correctly once we add support for the "options" directive that
897         re-enables these features.
898
899         Test: http/tests/security/contentSecurityPolicy/script-src-none-inline-event.html
900
901         * bindings/js/JSLazyEventListener.cpp:
902         (WebCore::JSLazyEventListener::initializeJSFunction):
903             - This function was a mess.  I couldn't resist cleaning it up a
904               bunch.  Notice that we ASSERT at the beginning of the function
905               that scriptExecutionContext is a document and that both ways of
906               getting the global object are the same when document->frame() is
907               non-zero because the document must be active and there is a
908               one-to-one relation between Frames and active Documents.
909         * bindings/v8/V8LazyEventListener.cpp:
910         (WebCore::V8LazyEventListener::prepareListenerObject):
911         * page/ContentSecurityPolicy.cpp:
912         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
913         * page/ContentSecurityPolicy.h:
914
915 2011-03-28  Jeff Miller  <jeffm@apple.com>
916
917         Reviewed by Adam Roben.
918
919         ResourceError::certificate() should return a PCCERT_CONTEXT
920         https://bugs.webkit.org/show_bug.cgi?id=57262
921
922         * platform/network/cf/ResourceError.h: certificate() now returns a PCCERT_CONTEXT.
923         * platform/network/cf/ResourceErrorCF.cpp:
924         (WebCore::ResourceError::certificate): Added.
925
926 2011-03-28  David Hyatt  <hyatt@apple.com>
927
928         Reviewed by Simon Fraser and Darin Adler.
929
930         https://bugs.webkit.org/show_bug.cgi?id=57221, memory corruption/crashes when positioned objects
931         occur at the end of a line.
932         
933         The old code and new code for dealing with a trailing space object midpoint manipulated a raw
934         array instead of the Vector. Otherwise this corruption would have been caught prior to check-in.
935         
936         I have patched the code to only go through the Vector and to make it handle the case that led to
937         the corruption. Trailing positioned objects can occur both prior to and following the trailing space
938         object's midpoint, so we have to be prepared to deal with both cases.
939         
940         This is already tested by fast/block/positioning/052.html, and that test now properly progresses
941         like the other positioning tests did.
942
943         * rendering/RenderBlockLineLayout.cpp:
944         (WebCore::RenderBlock::findNextLineBreak):
945
946 2011-03-28  Andrei Popescu  <andreip@google.com>
947
948         Reviewed by Steve Block.
949
950         V8IDBKeyCustom.cpp does not compile with INDEXED_DATABASE disabled
951         https://bugs.webkit.org/show_bug.cgi?id=57100
952
953         Close the ENABLE guard and the namespace in the right order.
954
955         No new tests, just cleanup.
956
957         * bindings/v8/custom/V8IDBAnyCustom.cpp:
958         * bindings/v8/custom/V8IDBKeyCustom.cpp:
959
960 2011-03-28  Jeff Miller  <jeffm@apple.com>
961
962         Reviewed by Adam Roben.
963
964         Include certificate when sending a WebCore::ResourceError to UI process on Windows
965         https://bugs.webkit.org/show_bug.cgi?id=57195
966
967         Add support for tracking the certificate in WebCore::ResourceError.
968
969         * platform/network/ResourceErrorBase.cpp:
970         (WebCore::ResourceErrorBase::copy): Call platformCopy() to copy platform-specific fields.
971         * platform/network/ResourceErrorBase.h:
972         (WebCore::ResourceErrorBase::platformCopy): Added.
973         * platform/network/cf/ResourceError.h: Added constructor that takes certificate data, shadowed platformCopy, added m_certificate.
974         (WebCore::ResourceError::certificate): Added.
975         * platform/network/cf/ResourceErrorCF.cpp:
976         (WebCore::ResourceError::ResourceError): Added constructor that takes certificate data.
977         (WebCore::ResourceError::platformLazyInit): Read any certificate from the userInfo dictionary.
978         (WebCore::ResourceError::platformCopy): Copy m_certificate.
979         (WebCore::ResourceError::cfError): Add any certificate data to the userInfo dictionary in the CFErrorRef.
980
981 2011-03-28  Jessie Berlin  <jberlin@apple.com>
982
983         Rubber-stamped by Adam Roben.
984
985         Add an extra newline to the end of the generated Inspector.idl file so that it does not
986         trigger the Windows "no newline at at end of file" warning.
987
988         * inspector/generate-inspector-idl:
989
990 2011-03-28  Csaba Osztrogon√°c  <ossy@webkit.org>
991
992         Buildfix after r82125.
993
994         [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
995         https://bugs.webkit.org/show_bug.cgi?id=57087
996
997         * platform/graphics/qt/MediaPlayerPrivateQt.cpp: Convert all char* to QString explicitly.
998         (WebCore::MediaPlayerPrivateQt::getSupportedTypes):
999         (WebCore::MediaPlayerPrivateQt::commitLoad):
1000
1001 2011-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1002
1003         Unreviewed, rolling out r82099.
1004         http://trac.webkit.org/changeset/82099
1005         https://bugs.webkit.org/show_bug.cgi?id=57245
1006
1007         Breaks live edits tests on chromium. (Requested by pfeldman on
1008         #webkit).
1009
1010         * inspector/front-end/ScriptsPanel.js:
1011         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource):
1012         * inspector/front-end/SourceFrame.js:
1013         (WebInspector.SourceFrame.prototype._handleSave):
1014         (WebInspector.SourceFrameDelegate.prototype.editScriptSource):
1015
1016 2011-03-28  Pavel Feldman  <pfeldman@chromium.org>
1017
1018         Reviewed by Yury Semikhatsky.
1019
1020         Web Inspector: brush up and rename debugger domain functions.
1021         https://bugs.webkit.org/show_bug.cgi?id=57240
1022
1023         * inspector/Inspector.json:
1024         * inspector/InspectorAgent.cpp:
1025         (WebCore::InspectorAgent::setFrontend):
1026         (WebCore::InspectorAgent::postWorkerNotificationToFrontend):
1027         * inspector/InspectorDebuggerAgent.cpp:
1028         (WebCore::InspectorDebuggerAgent::setBreakpointsActive):
1029         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1030         (WebCore::InspectorDebuggerAgent::setBreakpoint):
1031         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
1032         (WebCore::InspectorDebuggerAgent::editScriptSource):
1033         (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
1034         (WebCore::InspectorDebuggerAgent::didParseSource):
1035         (WebCore::InspectorDebuggerAgent::failedToParseSource):
1036         (WebCore::InspectorDebuggerAgent::didPause):
1037         (WebCore::InspectorDebuggerAgent::didContinue):
1038         * inspector/InspectorDebuggerAgent.h:
1039         * inspector/front-end/DebuggerModel.js:
1040         (WebInspector.DebuggerModel.prototype.setBreakpoint):
1041         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
1042         (WebInspector.DebuggerModel.prototype.removeBreakpoint):
1043         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
1044         (WebInspector.DebuggerDispatcher.prototype.paused):
1045         (WebInspector.DebuggerDispatcher.prototype.resumed):
1046         (WebInspector.DebuggerDispatcher.prototype.scriptParsed):
1047         (WebInspector.DebuggerDispatcher.prototype.scriptFailedToParse):
1048         (WebInspector.DebuggerDispatcher.prototype.breakpointResolved):
1049         * inspector/front-end/ScriptsPanel.js:
1050         (WebInspector.ScriptsPanel.prototype.toggleBreakpointsClicked):
1051         * inspector/front-end/inspector.js:
1052         (WebInspector.didCreateWorker):
1053         (WebInspector.didDestroyWorker):
1054
1055 2011-03-28  David Kilzer  <ddkilzer@apple.com>
1056
1057         <http://webkit.org/b/57239> Use forward class declaration instead of including header
1058
1059         Reviewed by Dan Bernstein.
1060
1061         Adding a "using namespace WebCore;" statement in a header may
1062         cause issues when <WebCore/Length.h> is included before
1063         <CoreText/CoreText.h>.
1064
1065         Length.h defines the LengthType enum with a 'Fixed' value.
1066         CoreText.h includes MacTypes.h, which has a
1067         "typedef SInt32 Fixed;" statement, and then CoreText.h includes
1068         other headers that also use 'Fixed', but expect the typedef to
1069         be defined, not the enum.  If another header includes
1070         "using namespace WebCore;" before CoreText.h, the
1071         following compiler errors result (paths abbreviated):
1072
1073             CoreText.framework/Headers/SFNTLayoutTypes.h:689: error: reference to 'Fixed' is ambiguous
1074             MacTypes.h:184: error: candidates are: typedef SInt32 Fixed
1075             Length.h:37: error:                 WebCore::LengthType WebCore::Fixed
1076             SFNTLayoutTypes.h:689: error: 'Fixed' does not name a type
1077
1078         * platform/mac/HTMLConverter.h: Use forward declaration of
1079         DocumentLoader class instead of including header.  Remove the
1080         unused "using namespace WebCore;" statement.
1081
1082 2011-03-26  Dimitri Glazkov  <dglazkov@chromium.org>
1083
1084         Reviewed by Eric Seidel.
1085
1086         Introduce EventDispatcher, the new common way to fire events.
1087         https://bugs.webkit.org/show_bug.cgi?id=57168
1088
1089         The goal here is two-fold:
1090         1) reduce the need to randomly sprinkle guards around the dispatch code
1091         by creating a well-scoped abstraction for dispatching events.
1092         2) create a place where fiddly event-related things like creating event
1093         contexts for ancestors can be done lazily.
1094
1095         Additionally, with all the free-standing static functions, this code was
1096         just begging to come out of Node.cpp.
1097
1098         The first step is a near-mechanical extraction of mouse-related events
1099         from Node.cpp to EventDispatcher. For now, the call sites are just
1100         replaced with invoking EventDispatcher. Later, we can remove these methods
1101         from Node.
1102
1103         Refactoring, no functional changes.
1104
1105         * Android.mk: Added EventDispatcher to build system.
1106         * CMakeLists.txt: Ditto.
1107         * GNUmakefile.am: Ditto.
1108         * WebCore.gypi: Ditto.
1109         * WebCore.pro: Ditto.
1110         * WebCore.vcproj/WebCore.vcproj: Ditto.
1111         * WebCore.xcodeproj/project.pbxproj: Ditto.
1112         * dom/DOMAllInOne.cpp: Ditto.
1113         * dom/EventDispatcher.cpp: Added.
1114         * dom/EventDispatcher.h: Added.
1115         * dom/Node.cpp:
1116         (WebCore::Node::dispatchScopedEvent): Replaced to use EventDispatcher.
1117         (WebCore::Node::dispatchEvent): Ditto.
1118         (WebCore::Node::dispatchMouseEvent): Ditto.
1119         (WebCore::Node::dispatchSimulatedClick): Ditto.
1120         * dom/Node.h: Updated decls.
1121
1122 2011-03-28  Dan Bernstein  <mitz@apple.com>
1123
1124         Reviewed by Maciej Stachowiak.
1125
1126         <rdar://problem/9003382> Incomplete repaint of overflow in flipped lines writing modes
1127         https://bugs.webkit.org/show_bug.cgi?id=57197
1128
1129         Tests: fast/repaint/overflow-flipped-writing-mode-block.html
1130                fast/repaint/overflow-flipped-writing-mode-table.html
1131
1132         * rendering/RenderBlock.cpp:
1133         (WebCore::RenderBlock::paint): Flip the overflow rect before testing for intersection
1134         with the damage rect.
1135         * rendering/RenderTable.cpp:
1136         (WebCore::RenderTable::paint): Made the intersection check more like the one in
1137         RenderBlock::paint().
1138
1139 2011-03-28  Xiaomei Ji  <xji@chromium.org>
1140
1141         Reviewed by Ryosuke Niwa.
1142
1143         move directionOfEnclosingBlock() to be global so that it could be reused.
1144         https://bugs.webkit.org/show_bug.cgi?id=57233.
1145
1146         Provide global function directionOfEnclosingBlock(Node*) so that it could be
1147         reused in SelectionController and other functionalities that need enclosing
1148         block's direcionality, such as moving caret by word in visual order.
1149       
1150         No new functionality, so no new tests.
1151
1152         * editing/SelectionController.cpp:
1153         (WebCore::SelectionController::directionOfEnclosingBlock):
1154         * editing/htmlediting.cpp:
1155         (WebCore::directionOfEnclosingBlock):
1156         * editing/htmlediting.h:
1157
1158 2011-03-28  Jarkko Sakkinen  <jarkko.j.sakkinen@gmail.com>
1159
1160         Reviewed by Benjamin Poulain.
1161
1162         [Qt] fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html fails
1163         https://bugs.webkit.org/show_bug.cgi?id=56825
1164
1165         Fixes for context attribute handling:
1166         - Initialize depth and stencil buffer depending on whether they
1167         are enabled in context attributes.
1168         - Always enable depth buffer when stencil buffer is enabled.
1169         - Disable stencil buffer on OpenGL ES 2.0
1170         - Cleaned up clutter code from initialization. Made code paths 
1171         more sane.
1172         - Clear mask is now set correctly in reshape().
1173
1174         Tests: fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
1175
1176         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1177         (WebCore::GraphicsContext3DInternal::isValid):
1178         (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
1179         (WebCore::GraphicsContext3DInternal::reshape):
1180         (WebCore::GraphicsContext3DInternal::paint):
1181         (WebCore::GraphicsContext3DInternal::getProcAddress):
1182         (WebCore::GraphicsContext3D::GraphicsContext3D):
1183         (WebCore::GraphicsContext3D::reshape):
1184         (WebCore::GraphicsContext3D::bindFramebuffer):
1185
1186 2011-03-28  Pavel Feldman  <pfeldman@chromium.org>
1187
1188         Reviewed by Yury Semikhatsky.
1189
1190         Web Inspector: rename network domain events from didHappenSomething to somethingHappened.
1191         https://bugs.webkit.org/show_bug.cgi?id=57226
1192
1193         * inspector/Inspector.json:
1194         * inspector/InspectorResourceAgent.cpp:
1195         (WebCore::InspectorResourceAgent::willSendRequest):
1196         (WebCore::InspectorResourceAgent::markResourceAsCached):
1197         (WebCore::InspectorResourceAgent::didReceiveResponse):
1198         (WebCore::InspectorResourceAgent::didReceiveContentLength):
1199         (WebCore::InspectorResourceAgent::didFinishLoading):
1200         (WebCore::InspectorResourceAgent::didFailLoading):
1201         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
1202         (WebCore::InspectorResourceAgent::setInitialContent):
1203         (WebCore::InspectorResourceAgent::didCommitLoad):
1204         (WebCore::InspectorResourceAgent::frameDetachedFromParent):
1205         (WebCore::InspectorResourceAgent::didCreateWebSocket):
1206         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
1207         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
1208         (WebCore::InspectorResourceAgent::didCloseWebSocket):
1209         * inspector/front-end/NetworkManager.js:
1210         (WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
1211         (WebInspector.NetworkDispatcher.prototype.resourceMarkedAsCached):
1212         (WebInspector.NetworkDispatcher.prototype.responseReceived):
1213         (WebInspector.NetworkDispatcher.prototype.dataReceived):
1214         (WebInspector.NetworkDispatcher.prototype.loadingFinished):
1215         (WebInspector.NetworkDispatcher.prototype.loadingFailed):
1216         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
1217         (WebInspector.NetworkDispatcher.prototype.frameDetached):
1218         (WebInspector.NetworkDispatcher.prototype.initialContentSet):
1219         (WebInspector.NetworkDispatcher.prototype.frameNavigated):
1220         (WebInspector.NetworkDispatcher.prototype.webSocketCreated):
1221         (WebInspector.NetworkDispatcher.prototype.webSocketWillSendHandshakeRequest):
1222         (WebInspector.NetworkDispatcher.prototype.webSocketHandshakeResponseReceived):
1223         (WebInspector.NetworkDispatcher.prototype.webSocketClosed):
1224
1225 2011-03-28  Mikhail Naganov  <mnaganov@chromium.org>
1226
1227         Reviewed by Pavel Feldman.
1228
1229         WebInspector: [Chromium] Delete native CPU profiles and heap snapshots on binding disposal.
1230         https://bugs.webkit.org/show_bug.cgi?id=57099
1231
1232         * bindings/v8/ScriptHeapSnapshot.cpp:
1233         (WebCore::ScriptHeapSnapshot::~ScriptHeapSnapshot):
1234         * bindings/v8/ScriptHeapSnapshot.h:
1235         * bindings/v8/ScriptProfile.cpp:
1236         (WebCore::ScriptProfile::~ScriptProfile):
1237         * bindings/v8/ScriptProfile.h:
1238         * inspector/InspectorProfilerAgent.cpp:
1239         (WebCore::InspectorProfilerAgent::resetState):
1240
1241 2011-03-24  Pavel Podivilov  <podivilov@chromium.org>
1242
1243         Reviewed by Yury Semikhatsky.
1244
1245         Web Inspector: fix console messages positions in formatted scripts.
1246         https://bugs.webkit.org/show_bug.cgi?id=57010
1247
1248         * inspector/front-end/DebuggerPresentationModel.js:
1249         (WebInspector.DebuggerPresentationModel):
1250         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1251         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage.didRequestMapping):
1252         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage):
1253         (WebInspector.DebuggerPresentationModel.prototype.clearConsoleMessages):
1254         (WebInspector.DebuggerPresentationModel.prototype._reset):
1255         * inspector/front-end/ResourceTreeModel.js:
1256         (WebInspector.ResourceTreeModel.prototype.addConsoleMessage):
1257         * inspector/front-end/ScriptsPanel.js:
1258         (WebInspector.ScriptsPanel):
1259         (WebInspector.ScriptsPanel.prototype.addConsoleMessage):
1260         (WebInspector.ScriptsPanel.prototype.clearConsoleMessages):
1261         (WebInspector.ScriptsPanel.prototype._consoleMessageAdded):
1262         (WebInspector.ScriptsPanel.prototype.reset):
1263         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
1264         * inspector/front-end/SourceFile.js:
1265         (WebInspector.SourceFile):
1266         * inspector/front-end/SourceFrame.js:
1267         (WebInspector.SourceFrame.prototype.addMessage):
1268         (WebInspector.SourceFrame.prototype._addExistingMessagesToSource):
1269         (WebInspector.SourceFrame.prototype.addMessageToSource):
1270
1271 2011-03-27  Pavel Feldman  <pfeldman@chromium.org>
1272
1273         Reviewed by Yury Semikhatsky.
1274
1275         Web Inspector: refactor ResourceTreeModel to remove poor dependencies.
1276         https://bugs.webkit.org/show_bug.cgi?id=57186
1277
1278         - ResourceTreeModel is now event target (Object)
1279         - There is no ResourceTreeModel -> UI dependencies
1280         - NetworkManager -> ResourceTreeModel dependencies has been removed
1281         - NetworkManager is no longer dealing with the resources tree, it is only responsible for network events
1282         - ResourceTreeModel requests tree structure from the backend separately
1283         - Cached resources tree payload is now limited to url and type (no headers involved)
1284         - Resources tree is being rendered lazily upon request from the panel.
1285
1286         * inspector/Inspector.json:
1287         * inspector/InspectorResourceAgent.cpp:
1288         (WebCore::InspectorResourceAgent::resourceContent):
1289         (WebCore::InspectorResourceAgent::resourceContentBase64):
1290         (WebCore::buildObjectForFrameTree):
1291         (WebCore::InspectorResourceAgent::enable):
1292         (WebCore::InspectorResourceAgent::getCachedResources):
1293         (WebCore::InspectorResourceAgent::getResourceContent):
1294         * inspector/InspectorResourceAgent.h:
1295         * inspector/InspectorStyleSheet.cpp:
1296         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
1297         * inspector/front-end/InspectorFrontendHostStub.js:
1298         (.WebInspector.InspectorFrontendHostStub.prototype.sendMessageToBackend):
1299         (.WebInspector.InspectorFrontendHostStub.prototype.loadSessionSetting):
1300         * inspector/front-end/NetworkManager.js:
1301         (WebInspector.NetworkManager):
1302         (WebInspector.NetworkManager.prototype.frontendReused):
1303         (WebInspector.NetworkManager.prototype.requestContent):
1304         (WebInspector.NetworkDispatcher):
1305         (WebInspector.NetworkDispatcher.prototype.didReceiveResponse):
1306         (WebInspector.NetworkDispatcher.prototype.didLoadResourceFromMemoryCache):
1307         (WebInspector.NetworkDispatcher.prototype.frameDetachedFromParent):
1308         (WebInspector.NetworkDispatcher.prototype.didCommitLoadForFrame):
1309         * inspector/front-end/NetworkPanel.js:
1310         (WebInspector.NetworkPanel):
1311         (WebInspector.NetworkPanel.prototype._updateSummaryBar):
1312         (WebInspector.NetworkPanel.prototype._onFrameCommitLoad):
1313         * inspector/front-end/ResourceTreeModel.js:
1314         (WebInspector.ResourceTreeModel):
1315         (WebInspector.ResourceTreeModel.prototype.frontendReused):
1316         (WebInspector.ResourceTreeModel.prototype._processCachedResources):
1317         (WebInspector.ResourceTreeModel.prototype._addOrUpdateFrame):
1318         (WebInspector.ResourceTreeModel.prototype.frames):
1319         (WebInspector.ResourceTreeModel.prototype.subframes):
1320         (WebInspector.ResourceTreeModel.prototype.resources):
1321         (WebInspector.ResourceTreeModel.prototype._onCommitLoad):
1322         (WebInspector.ResourceTreeModel.prototype._onFrameDetachedFromParent):
1323         (WebInspector.ResourceTreeModel.prototype._onResourceUpdated):
1324         (WebInspector.ResourceTreeModel.prototype._addResourceToFrame):
1325         (WebInspector.ResourceTreeModel.prototype.resourceForURL):
1326         (WebInspector.ResourceTreeModel.prototype._bindResourceURL):
1327         (WebInspector.ResourceTreeModel.prototype._clearChildFramesAndResources):
1328         (WebInspector.ResourceTreeModel.prototype._clearResources):
1329         (WebInspector.ResourceTreeModel.prototype._callForFrameResources):
1330         (WebInspector.ResourceTreeModel.prototype._unbindResourceURL):
1331         (WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
1332         (WebInspector.ResourceTreeModel.prototype._createResource):
1333         * inspector/front-end/ResourcesPanel.js:
1334         (WebInspector.ResourcesPanel):
1335         (WebInspector.ResourcesPanel.prototype.show):
1336         (WebInspector.ResourcesPanel.prototype._populateResourceTree.populateFrame):
1337         (WebInspector.ResourcesPanel.prototype._populateResourceTree):
1338         (WebInspector.ResourcesPanel.prototype._frameAdded):
1339         (WebInspector.ResourcesPanel.prototype._frameDetached):
1340         (WebInspector.ResourcesPanel.prototype._resourceAdded):
1341         (WebInspector.ResourcesPanel.prototype._frameNavigated):
1342         (WebInspector.FrameTreeElement.prototype.setTitles):
1343         * inspector/front-end/inspector.js:
1344         (WebInspector.frontendReused):
1345
1346 2011-03-27  Ryosuke Niwa  <rniwa@webkit.org>
1347
1348         Reviewed by Eric Seidel.
1349
1350         WebKit's behavior for text-align inherit differs from other browsers
1351         https://bugs.webkit.org/show_bug.cgi?id=56377
1352
1353         The bug was caused by WebKit's resolving text-align: start and text-align: end too early.
1354         As discussed on the bug, when text-align: start and text-align: end are inherited by descendent nodes,
1355         the alignment of the text in those nodes should be determined based on the directionality of the text,
1356         not by the directionality of the ancestor node from which text-align property is inherited.
1357
1358         Fixed the bug by introducing new enum values to ETextAlign: TASTART and TAEND. These two values will
1359         align text to the left in a LTR context and to the right in a RTL context respectively.
1360
1361         * css/CSSPrimitiveValueMappings.h:
1362         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added the support for TASTART and TAEND.
1363         (WebCore::CSSPrimitiveValue::operator ETextAlign): Ditto.
1364         * css/CSSStyleSelector.cpp:
1365         (WebCore::CSSStyleSelector::applyProperty): No longer processes CSSValueStart and CSSValueEnd.
1366         * rendering/RenderBlock.cpp:
1367         (WebCore::RenderBlock::localCaretRect): Added the support for TASTART and TAEND.
1368         * rendering/RenderBlockLineLayout.cpp:
1369         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Added the support for TASTART and TAEND.
1370         * rendering/RenderText.cpp:
1371         (WebCore::RenderText::localCaretRect): Ditto.
1372         * rendering/style/RenderStyle.h: ETextAlign now has 10 values and requires 4 bits.
1373         * rendering/style/RenderStyleConstants.h: Added TASTART and TAEND to ETextAlign.
1374
1375 2011-03-28  Pavel Podivilov  <podivilov@chromium.org>
1376
1377         Reviewed by Yury Semikhatsky.
1378
1379         Web Inspector: fix breakpoints positions in formatted scripts.
1380         https://bugs.webkit.org/show_bug.cgi?id=56931
1381
1382         Add async requestMapping method to SourceFile interface as required for populating
1383         breakpoints sidebar pane when in "format all scripts" mode.
1384
1385         * inspector/front-end/DebuggerPresentationModel.js:
1386         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
1387         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.didRequestSourceMapping):
1388         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
1389         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
1390         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
1391         (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame.didRequestSourceMapping):
1392         (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame):
1393         (WebInspector.PresentationBreakpoint): Breakpoint wrapper for UI.
1394         (WebInspector.PresentationBreakpoint.prototype.get sourceFileId):
1395         (WebInspector.PresentationBreakpoint.prototype.get lineNumber):
1396         (WebInspector.PresentationBreakpoint.prototype.get condition):
1397         (WebInspector.PresentationBreakpoint.prototype.get enabled):
1398         (WebInspector.PresentationBreakpoint.prototype.get url):
1399         (WebInspector.PresentationBreakpoint.prototype.get resolved):
1400         (WebInspector.PresentationBreakpoint.prototype.loadSnippet):
1401         * inspector/front-end/ScriptFormatter.js:
1402         (WebInspector.ScriptFormatter.prototype.formatContent.didFormatChunks):
1403         (WebInspector.ScriptFormatter.prototype.formatContent):
1404         * inspector/front-end/SourceFile.js:
1405         (WebInspector.SourceFile.prototype.requestSourceMapping):
1406         (WebInspector.FormattedSourceFile.prototype.requestSourceMapping):
1407         (WebInspector.FormattedSourceFile.prototype._didRequestContent):
1408         (WebInspector.SourceMapping):
1409         (WebInspector.SourceMapping.prototype.scriptLocationToSourceLocation):
1410         (WebInspector.SourceMapping.prototype.sourceLocationToScriptLocation):
1411         (WebInspector.FormattedSourceMapping):
1412         (WebInspector.FormattedSourceMapping.prototype.scriptLocationToSourceLocation):
1413         (WebInspector.FormattedSourceMapping.prototype.sourceLocationToScriptLocation):
1414         (WebInspector.FormattedSourceMapping.prototype._convertPosition):
1415
1416 2011-03-28  Nancy Piedra  <nancy.piedra@nokia.com>
1417
1418         Reviewed by Csaba Osztrogon√°c.
1419
1420         This patch fixes linking errors on Qt Webkit Windows MinGW builds.
1421         This patch sets the BUILDING_WEBKIT & QT_MAKEDLL macros so that
1422         QWEBKIT_EXPORT is defined as follows:
1423         #define QWEBKIT_EXPORT Q_DECL_EXPORT
1424
1425         No new tests needed since only changing .pro file.
1426
1427         * WebCore.pro:
1428
1429 2011-03-28  Andrey Adaikin  <aandrey@google.com>
1430
1431         Reviewed by Yury Semikhatsky.
1432
1433         Web Inspector: source frame should show the error to user when live edit is failed
1434         https://bugs.webkit.org/show_bug.cgi?id=57002
1435
1436         * inspector/front-end/ScriptsPanel.js:
1437         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource):
1438         * inspector/front-end/SourceFrame.js:
1439         (WebInspector.SourceFrame.prototype._handleSave.didSaveScriptSource):
1440         (WebInspector.SourceFrame.prototype._handleSave):
1441         (WebInspector.SourceFrameDelegate.prototype.editScriptSource):
1442
1443 2011-03-26  Mario Sanchez Prada  <msanchez@igalia.com>
1444
1445         Reviewed by Martin Robinson.
1446
1447         [GTK] Expose the AtkValue interface for WAI-ARIA sliders
1448         https://bugs.webkit.org/show_bug.cgi?id=56655
1449
1450         Implement AtkValue interface for WAI-ARIA sliders.
1451
1452         Test: platform/gtk/accessibility/aria-slider-required-attributes.html
1453
1454         * accessibility/gtk/AXObjectCacheAtk.cpp:
1455         (WebCore::AXObjectCache::postPlatformNotification): Emit the
1456         'property-change::accessible-value' signal when needed.
1457
1458         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1459         (core): New, returns a core object from an AtkValue.
1460         (webkitAccessibleValueGetCurrentValue): New, implements AtkValue.
1461         (webkitAccessibleValueGetMaximumValue): Ditto.
1462         (webkitAccessibleValueGetMinimumValue): Ditto.
1463         (webkitAccessibleValueSetCurrentValue): Ditto.
1464         (webkitAccessibleValueGetMinimumIncrement): Ditto.
1465         (atkValueInterfaceInit): Ditto.
1466         (GetAtkInterfaceTypeFromWAIType): Add ATK_TYPE_VALUE.
1467         (getInterfaceMaskFromObject): Set the WAI_VALUE bit for sliders.
1468
1469 2011-03-28  Maciej Stachowiak  <mjs@apple.com>
1470
1471         Reviewed by Dan Bernstein.
1472
1473         Assigning location.path to something that doesn't start with / mangles the authority
1474         https://bugs.webkit.org/show_bug.cgi?id=57209
1475         <rdar://problem/9195132>
1476         
1477         Tests: http/tests/uri/assign-path-with-leading-slash.html
1478                http/tests/uri/assign-path-without-leading-slash.html
1479
1480         * platform/KURL.cpp:
1481         (WebCore::KURL::setPath): If the new path does not have a leading slash, add one.
1482
1483 2011-03-28  Ryosuke Niwa  <rniwa@webkit.org>
1484
1485         Reviewed by Eric Seidel.
1486
1487         Extract functions to update logical width from computeInlineDirectionPositionsForLine
1488         https://bugs.webkit.org/show_bug.cgi?id=57213
1489
1490         Extracted updateLogicalWidthForLeftAlignedBlock, updateLogicalWidthForRightAlignedBlock,
1491         and updateLogicalWidthForCenterAlignedBlock from computeInlineDirectionPositionsForLine.
1492
1493         They are used to update logical widths, logical left, and total logical width for left,
1494         right, and center aligned blocks.
1495
1496         * rendering/RenderBlockLineLayout.cpp:
1497         (WebCore::updateLogicalWidthForLeftAlignedBlock):
1498         (WebCore::updateLogicalWidthForRightAlignedBlock):
1499         (WebCore::updateLogicalWidthForCenterAlignedBlock):
1500         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
1501
1502 2011-03-28  Evan Martin  <evan@chromium.org>
1503
1504         Reviewed by Ryosuke Niwa.
1505
1506         Refactor duplicate code in HTMLTextElement
1507         https://bugs.webkit.org/show_bug.cgi?id=57215
1508
1509         * html/HTMLTitleElement.cpp:
1510         (WebCore::HTMLTitleElement::childrenChanged):
1511         This method did an equivalent loop to the text() method on
1512         the same object.
1513
1514 2011-03-27  Fumitoshi Ukai  <ukai@chromium.org>
1515
1516         Reviewed by Alexey Proskuryakov.
1517
1518         Don't call WebSocket::didClose() more than once.
1519         https://bugs.webkit.org/show_bug.cgi?id=57081
1520
1521         If WebSocket close() is called, and connection is established, then
1522         it will call didClose() that resets m_channel to 0.
1523         After that, when connection is closed, WebSocketChannel will call
1524         didClose for the WebSocket instance.
1525
1526         Call WebSocketChannel::disconnect() before m_channel = 0 to make sure
1527         WebSocketChannel suppress the second didClose().
1528
1529         Test: http/tests/websocket/tests/close-unref-websocket.html
1530
1531         * websockets/WebSocket.cpp:
1532         (WebCore::WebSocket::didClose):
1533
1534 2011-03-27  Adam Barth  <abarth@webkit.org>
1535
1536         Reviewed by Eric Seidel.
1537
1538         Fix script-src redirect handling
1539         https://bugs.webkit.org/show_bug.cgi?id=57196
1540
1541         Resource-loading requirements in CSP apply to each hop in the redirect
1542         chain.  To make that work properly, we need to move enforcement into
1543         the loader.  Fortunately, we already have a choke-point in the loader
1544         for enforcing this kind of policy.
1545
1546         * dom/ScriptElement.cpp:
1547         (WebCore::ScriptElement::requestScript):
1548         * html/parser/HTMLDocumentParser.cpp:
1549         * html/parser/HTMLDocumentParser.h:
1550         * html/parser/HTMLScriptRunnerHost.h:
1551         * loader/cache/CachedResourceLoader.cpp:
1552         (WebCore::CachedResourceLoader::canRequest):
1553         * page/ContentSecurityPolicy.cpp:
1554         (WebCore::ContentSecurityPolicy::allowScriptFromSource):
1555         * page/ContentSecurityPolicy.h:
1556
1557 2011-03-27  Jer Noble  <jer.noble@apple.com>
1558
1559         Reviewed by Maciej Stachowiak.
1560
1561         Full Screen: disable keyboard access by default
1562         https://bugs.webkit.org/show_bug.cgi?id=56684
1563
1564         Pass whether keyboard access was requested up to ChromeClient when asking
1565         if fullscreen mode is supported.
1566
1567         * dom/Document.cpp:
1568         (WebCore::Document::webkitRequestFullScreenForElement):
1569         * page/ChromeClient.h:
1570         (WebCore::ChromeClient::supportsFullscreenForElement):
1571
1572 2011-03-27  Patrick Gansterer  <paroga@webkit.org>
1573
1574         Reviewed by Andreas Kling.
1575
1576         [CMake] Generate WebKitVersion.h
1577         https://bugs.webkit.org/show_bug.cgi?id=57128
1578
1579         This file will be used for the user agent string by the CMake based ports.
1580
1581         * CMakeLists.txt:
1582
1583 2011-03-27  Ben Taylor  <bentaylor.solx86@gmail.com>
1584
1585         Reviewed by Alexey Proskuryakov.
1586
1587         https://bugs.webkit.org/show_bug.cgi?id=57170  Fix last elements
1588         in an enum to remove a trailing comma. Sun Studio 12 CC errors out.
1589
1590         Compile fix only, no actual code change.
1591
1592         * dom/ExceptionCode.h:
1593         * editing/EditorInsertAction.h:
1594         * loader/FrameLoaderTypes.h:
1595         * platform/PlatformKeyboardEvent.h:
1596         * platform/ScrollTypes.h:
1597         * platform/graphics/BitmapImage.h:
1598         * platform/image-decoders/ImageDecoder.h:
1599         * platform/network/ProtectionSpace.h:
1600         * platform/network/ResourceHandleClient.h:
1601         * platform/network/ResourceRequestBase.h:
1602         * platform/text/TextCodec.h:
1603
1604 2011-03-27  Rob Buis  <rwlbuis@gmail.com>
1605
1606         Reviewed by Nikolas Zimmermann.
1607
1608         Text on path positioning at zero startOffset
1609         https://bugs.webkit.org/show_bug.cgi?id=56245
1610
1611         Since for length 0 no previous point is set, choose epsilon
1612         length to get normal at starting point of the path.
1613
1614         Test: svg/text/text-path-middle-align.svg
1615
1616         * platform/graphics/Path.cpp:
1617         (WebCore::Path::normalAngleAtLength):
1618
1619 2011-03-27  Ben Taylor  <bentaylor.solx86@gmail.com>
1620
1621         Reviewed by Oliver Hunt.
1622
1623         https://bugs.webkit.org/show_bug.cgi?id=57151, patch derived from set
1624         created by Thiago Macieria in bug https://bugs.webkit.org/show_bug.cgi?id=24932
1625
1626         Fix compile issue on Solaris 10/Sun Studio 12 regarding ambiguity on ?: functions
1627
1628         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1629         (WebCore::JSJavaScriptCallFrame::thisObject):
1630
1631 2011-03-26  Jer Noble  <jer.noble@apple.com>
1632
1633         Unreviewed build fix.
1634
1635         Fix a bug which was causing the "skip back" button to be missing, causing 
1636         the media layout tests to fail.
1637
1638         * rendering/RenderThemeMac.mm:
1639         (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
1640
1641 2011-03-26  Dan Bernstein  <mitz@apple.com>
1642
1643         Reviewed by Maciej Stachowiak.
1644
1645         <rdar://problem/9180716> REGRESSION (r80582): Angle bracket rendered upright in vertical mode
1646         https://bugs.webkit.org/show_bug.cgi?id=57169
1647
1648         Test: fast/blockflow/fallback-orientation.html
1649
1650         * platform/graphics/FontFastPath.cpp:
1651         (WebCore::Font::glyphDataForCharacter): If the font has vertical glyphs, use it, rather
1652         than continuing down the fallback list.
1653
1654 2011-03-26  Maciej Stachowiak  <mjs@apple.com>
1655
1656         Reviewed by Darin Adler.
1657
1658         Follow-up fix for crash with giant inline stylesheets - actually don't crash, and add test
1659         https://bugs.webkit.org/show_bug.cgi?id=56150
1660
1661         Test: fast/css/giant-stylesheet-crash.html
1662
1663         * dom/StyleElement.cpp:
1664         (WebCore::StyleElement::process):
1665
1666 2011-03-22  Jer Noble  <jer.noble@apple.com>
1667
1668         Reviewed by Eric Carlson.
1669
1670         Media controls must use full screen style when in new full screen mode.
1671         https://bugs.webkit.org/show_bug.cgi?id=56851
1672
1673         Add new full screen styles for the full screen media elements.
1674
1675         * DerivedSources.make: Add fullScreenQuickTime.css.
1676         * WebCore.xcodeproj/project.pbxproj: Ditto.
1677         * css/CSSStyleSelector.cpp: Removed loadFullScreenRulesIfNeeded().
1678         (WebCore::CSSStyleSelector::CSSStyleSelector): Ditto.
1679         (WebCore::CSSStyleSelector::styleForElement): Load full screen rules 
1680             if needed.
1681         * css/fullscreenQuickTime.css: Added.
1682         * css/mediaControls.css:
1683         * html/shadow/MediaControls.cpp:
1684         (WebCore::isFullScreen): Added.
1685         (WebCore::MediaControls::create): Add new full screen volume controls.
1686         (WebCore::MediaControls::updateStyle): Ditto.
1687         (WebCore::MediaControls::update): Ditto.
1688         (WebCore::MediaControls::updateVolumeSliderContainer): Ditto.
1689         (WebCore::MediaControls::forwardEvent): Ditto.
1690         * rendering/MediaControlElements.cpp:
1691         (WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement): Added.
1692         (WebCore::MediaControlFullscreenVolumeSliderElement::create): Added.
1693         (WebCore::MediaControlFullscreenVolumeSliderElement::shadowPseudoId): Added.
1694         (WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement): Addet
1695         (WebCore::MediaControlFullscreenVolumeMinButtonElement::create): Added.
1696         (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Added.
1697         (WebCore::MediaControlFullscreenVolumeMinButtonElement::shadowPseudoId): Added.
1698         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement): Added.
1699         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create): Added.
1700         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Added.
1701         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::shadowPseudoId): Added.
1702         * rendering/MediaControlElements.h:
1703             Added m_overridePosition.
1704         (WebCore::MediaControlVolumeSliderContainerElement::setOverridesPosition): Added.
1705         * rendering/MediaControlElements.h:
1706         (WebCore::MediaControlVolumeSliderContainerElement::overridesPosition): Added.
1707         * rendering/RenderTheme.h:
1708         (WebCore::RenderTheme::extraFullScreenStyleSheet): Added.
1709         * rendering/RenderThemeMac.h:
1710         * rendering/RenderThemeMac.mm:
1711         (WebCore::RenderThemeMac::extraFullScreenStyleSheet): Added.
1712         (WebCore::RenderThemeMac::shouldRenderMediaControlPart): Render seek forward and backward 
1713             buttons.
1714
1715 2011-03-26  Jer Noble  <jer.noble@apple.com>
1716
1717         Reviewed by Dan Bernstein.
1718
1719         RenderMedia should obey the view's flattening bit.
1720         https://bugs.webkit.org/show_bug.cgi?id=57156
1721
1722         Paint the current frame in software when the associated FrameView
1723         has its flattening bit set.
1724
1725         * rendering/RenderVideo.cpp:
1726         (WebCore::RenderVideo::paintReplaced):
1727
1728 2011-03-26  Patrick Gansterer  <paroga@webkit.org>
1729
1730         Unreviewed build fix for !ENABLE(DOM_STORAGE).
1731
1732         * storage/StorageTracker.cpp:
1733             Added #if ENABLE(DOM_STORAGE) like in the other storage files.
1734
1735 2011-03-26  Kwang Yul Seo  <skyul@company100.net>
1736
1737         Reviewed by Benjamin Poulain.
1738
1739         [Qt] Remove GraphicsLayerTextureMapper::nativeLayer
1740         https://bugs.webkit.org/show_bug.cgi?id=57141
1741
1742         GraphicsLayer::nativeLayer was removed in r73380.
1743
1744         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1745         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1746
1747 2011-03-26  Adam Barth  <abarth@webkit.org>
1748
1749         Reviewed by Eric Seidel.
1750
1751         Teach Content Security Policy how to parse source-list
1752         https://bugs.webkit.org/show_bug.cgi?id=54799
1753
1754         This patch is larger than I would like, but I wasn't sure how to make
1755         it any smaller while still being reasonably testable.  I've left out
1756         some features (such as host wildcarding and 'self') so I can add them
1757         in later patches with tests.
1758
1759         Test: http/tests/security/contentSecurityPolicy/source-list-parsing.html
1760
1761         * bindings/ScriptControllerBase.cpp:
1762         * dom/ScriptElement.cpp:
1763         * html/parser/HTMLDocumentParser.cpp:
1764         * loader/FrameLoader.cpp:
1765             - Add include explicitly now that we're not spamming the include
1766               everywhere.
1767         * dom/Document.cpp:
1768         (WebCore::Document::initSecurityContext):
1769             - We need to pass the SecurityOrigin object to
1770               ContentSecurityPolicy so that it can resolve implicit parts of
1771               source patterns, such as the scheme.
1772         * dom/Document.h:
1773             - Forward declare ContentSecurityPolicy rather than including the
1774               header.  Technically this could be a separate change, but I was
1775               getting annoyed at the world re-builds.
1776         * page/ContentSecurityPolicy.cpp:
1777         (WebCore::skipExactly):
1778         (WebCore::skipUtil):
1779         (WebCore::skipWhile):
1780             - Clean up these parser helper functions.  We might consider moving
1781               them to a more general location.  They're very helpful for
1782               writing secure HTTP header parsers.
1783         (WebCore::CSPSource::CSPSource):
1784             - New class to represent one source in a source-list.
1785         (WebCore::CSPSource::matches):
1786         (WebCore::CSPSource::schemeMatches):
1787         (WebCore::CSPSource::hostMatches):
1788         (WebCore::CSPSource::portMatches):
1789         (WebCore::CSPSource::isSchemeOnly):
1790             - Currently we represent scheme-only sources using with an empty
1791               m_host.  Another approach I considered was using another bool,
1792               but that seemed slighly messier.
1793         (WebCore::CSPSourceList::CSPSourceList):
1794             - CSPSourceList doesn't need to ref SecurityOrigin because
1795               CSPSourceList is owned by ContentSecurityPolicy, which holds a
1796               ref.
1797         (WebCore::CSPSourceList::parse):
1798         (WebCore::CSPSourceList::matches):
1799         (WebCore::CSPSourceList::parseSource):
1800         (WebCore::CSPSourceList::parseScheme):
1801         (WebCore::CSPSourceList::parseHost):
1802         (WebCore::CSPSourceList::parsePort):
1803             - A basic "segment and recurse" parser.  This parser causes us to
1804               take more branches than we need, but I don't think we need to
1805               squeeze every last ouch of performance out of this parser.  This
1806               approach is more simple than some of the other approaches I
1807               tried.
1808         (WebCore::CSPSourceList::addSourceSelf):
1809         (WebCore::CSPDirective::CSPDirective):
1810         (WebCore::CSPDirective::allows):
1811         (WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
1812         (WebCore::ContentSecurityPolicy::parse):
1813         (WebCore::ContentSecurityPolicy::parseDirective):
1814         (WebCore::ContentSecurityPolicy::addDirective):
1815             - I couldn't resist re-writing this parser to use the helper
1816               functions and to match the style of the source-list parser.
1817         * page/ContentSecurityPolicy.h:
1818         (WebCore::ContentSecurityPolicy::create):
1819             - Accept a SecurityOrigin context object.
1820
1821 2011-03-26  Patrick Gansterer  <paroga@webkit.org>
1822
1823         Unreviewed EFL and WinCE build fix for r81977.
1824
1825         * platform/graphics/FontPlatformData.h:
1826
1827 2011-03-26  Patrick Gansterer  <paroga@webkit.org>
1828
1829         Unreviewed WinCE build fix for r82000.
1830
1831         * platform/wince/FileSystemWinCE.cpp:
1832         (WebCore::openFile): Added missing function.
1833
1834 2011-03-25  Kevin Ollivier  <kevino@theolliviers.com>
1835
1836         [wx] Build fix, don't use the new FPD implementation yet, until we can merge ours with it.
1837
1838         * platform/graphics/FontPlatformData.h:
1839
1840 2011-03-25  Jer Noble  <jer.noble@apple.com>
1841
1842         Reviewed by Eric Carlson.
1843
1844         MediaPlayerPrivateQuickTimeVisualContext should use the Application Cache during load.
1845         https://bugs.webkit.org/show_bug.cgi?id=57047
1846
1847         No new tests.
1848         
1849         When loading a URL, checkk osee if the Appplication Cache has a version of that URL
1850         stored; if so, use the local path to that cached media instead of the remote URL.
1851
1852         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1853         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::loadInternal):
1854         * platform/graphics/win/QTMovie.cpp:
1855         (QTMovie::loadPath):
1856         * platform/graphics/win/QTMovie.h:
1857
1858 2011-03-25  Dan Bernstein  <mitz@apple.com>
1859
1860         Reviewed by Darin Adler.
1861
1862         <rdar://problem/9134330> Missing expansion before ideograph at the beginning or end of a text run
1863         https://bugs.webkit.org/show_bug.cgi?id=57106
1864
1865         Test: fast/text/justify-ideograph-leading-expansion.html
1866
1867         * platform/graphics/TextRun.h:
1868         Replaced TrailingExpansionBehavior enum with ExpansionBehavior flags.
1869         (WebCore::TextRun::TextRun): Constructors now take an expansionBehavior parameter.
1870         (WebCore::TextRun::allowsLeadingExpansion): Added this accessor.
1871         (WebCore::TextRun::allowsTrailingExpansion): Changed to use the m_expansionBehavior member.
1872         * platform/graphics/WidthIterator.cpp:
1873         (WebCore::WidthIterator::WidthIterator): Initialize m_isAfterExpansion from the TextRun, allowing
1874         leading expansion when appropriate.
1875         (WebCore::WidthIterator::advance): Moved the last-glyph-in-run check to only apply to expansion
1876         after the glyph, not expansion before the glyph, since that is not trailing expansion. Added code
1877         to handle expansion before the first glyph.
1878         * platform/graphics/mac/ComplexTextController.cpp:
1879         (WebCore::ComplexTextController::ComplexTextController): Initialize m_afterExpansion from the
1880         TextRun, allowing leading expansion when appropriate. Set m_runWidthSoFar to the leading expansion.
1881         (WebCore::ComplexTextController::offsetForPosition): Account for leading expansion.
1882         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Similar to WidthIterator::advance()
1883         * platform/graphics/mac/ComplexTextController.h: Added m_leadingExpansion member variable.
1884         * rendering/InlineBox.h:
1885         (WebCore::InlineBox::InlineBox): Renamed m_hasSelectedChildren to m_hasSelectedChildrenOrCanHaveLeadingExpansion
1886         to reflect the use of this bit by InlineTextBox.
1887         * rendering/InlineTextBox.cpp:
1888         (WebCore::InlineTextBox::selectionRect): Replaced calls to trailingExpansionBehavior() with expansionBehavior().
1889         (WebCore::InlineTextBox::paint): Ditto.
1890         (WebCore::InlineTextBox::paintSelection): Ditto.
1891         (WebCore::InlineTextBox::paintCompositionBackground): Ditto.
1892         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto.
1893         (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
1894         (WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto.
1895         (WebCore::InlineTextBox::offsetForPosition): Ditto.
1896         (WebCore::InlineTextBox::positionForOffset): Ditto.
1897         * rendering/InlineTextBox.h:
1898         (WebCore::InlineTextBox::canHaveLeadingExpansion): Added this accessor.
1899         (WebCore::InlineTextBox::setCanHaveLeadingExpansion): Ditto.
1900         (WebCore::InlineTextBox::expansionBehavior): Replaced trailingExpansionBehavior() with this function,
1901         which also considers canHaveLeadingExpansion().
1902         * rendering/RenderBlockLineLayout.cpp:
1903         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Call setCanHaveLeadingExpansion() on
1904         text boxes that can have leading expansion. Avoid negative expansion.
1905         * rendering/RootInlineBox.cpp:
1906         * rendering/RootInlineBox.h:
1907         (WebCore::RootInlineBox::hasSelectedChildren): Updated for renaming of the flag.
1908         (WebCore::RootInlineBox::setHasSelectedChildren): Ditto.
1909
1910 2011-03-23  Jer Noble  <jer.noble@apple.com>
1911
1912         Reviewed by Maciej Stachowiak.
1913
1914         MediaPlayerPrivateAVFoundation should use the Application Cache during load.
1915         https://bugs.webkit.org/show_bug.cgi?id=56997
1916
1917         No new tests.
1918
1919         When loading a URL, check to see if the Application Cache has a version of that URL
1920         stored; if so, use the local path to that cached media instead of the remote URL.
1921
1922         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1923         (WebCore::MediaPlayerPrivateAVFoundation::prepareToPlay): Check to see if the media should be loaded
1924             from the application cache.
1925         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1926         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
1927         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
1928         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForURL):
1929         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForCacheResource): Added.
1930         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Split out from createAVPlayerForURL.
1931
1932 2011-03-25  Ben Taylor  <bentaylor.solx86@gmail.com>
1933
1934         Reviewed by Darin Adler.
1935
1936         https://bugs.webkit.org/show_bug.cgi?id=57122. Solaris 10/SunStudio 12 expect
1937         both sides of a ?: operation to have the same types.  Extracted from original
1938         https://bugs.webkit.org/show_bug.cgi?id=24932, patch 13 of 17, and originally
1939         created by Thiago Macieira.
1940
1941         fixes a compile issue on Solaris 10/SunStudio 12
1942
1943         * loader/DocumentLoader.h:
1944         (WebCore::DocumentLoader::serverRedirectSourceForHistory):
1945         * loader/FrameLoader.cpp:
1946         (WebCore::FrameLoader::load):
1947         (WebCore::FrameLoader::loadWithNavigationAction):
1948
1949 2011-02-03  Jer Noble  <jer.noble@apple.com>
1950
1951         Reviewed by Maciej Stachowiak.
1952
1953         MediaPlayerPrivateQTKit should use the Application Cache during load.        
1954         https://bugs.webkit.org/show_bug.cgi?id=53818
1955
1956         No new tests.
1957
1958         When loading a URL, check to see if the Application Cache has a version of that URL
1959         stored; if so, use that data instead of the remote URL.
1960
1961         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1962         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1963         (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes):
1964         (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
1965         (WebCore::MediaPlayerPrivateQTKit::loadInternal):
1966
1967 2011-03-25  James Robinson  <jamesr@chromium.org>
1968
1969         Reviewed by Kenneth Russell.
1970
1971         [chromium] Move draw implementations to CCLayerImpl for everything except content layers
1972         https://bugs.webkit.org/show_bug.cgi?id=56793
1973
1974         Moves the implementation of the layer's draw() function from LayerChromium subclasses to CCLayerImpl subclasses for
1975         all layer types except content layers.  This gets us closer to decoupling the composite step itself from updating the layers.
1976
1977         The biggest change in this patch is adding a set of CCLayerImpl subclasses to implement the different drawing routines
1978         and moving the code from each XXXLayerChromium to CCXXXLayerImpl.  In order to render from the CCLayerImpl side all state
1979         needed at draw time also has to be synchronized, which is performed in pushPropertiesTo().
1980
1981         On the LayerRendererChromium side there are a few changes.  I've split the updateContents calls on LayerChromiums into two operations
1982         tentatively named 'paintContentsIfNeeded' and 'updateCompositorResources'.  paintContents() is used for any code that calls into WebKit in order to generate
1983         new pixel data.  It's expected that this call may take a long period of time and may involve "odd" side effects.  updateCompositorResources() is used for
1984         code that needs to update the compositor's texture data or other state.  It is not expected that this callback will take long (since it's just inserting
1985         commands into the GL command stream, ideally) and this call is expected to have access to the compositor's context, unlike paintContents().
1986
1987         The updateAndDrawLayers cycle now looks like this:
1988         1.) update the root content layer
1989         2.) update the root layer scrollbars
1990         3.) for each LayerChromium in tree order:
1991           a.) ensure a CCLayerImpl of the correct type exists for this layer
1992           b.) push all draw time properties from the LayerChromium to the CCLayerImpl
1993           c.) construct the appropriate draw transforms, render surfaces and render surface z-order sublayer lists
1994         4.) for each LayerChromium in tree order, paint the layer's contents
1995         5.) for each LayerChromium in tree order, update the associate compositor resources (textures, etc)
1996         6.) draw the root layer and its scrollbars
1997         7.) for each CCLayerImpl in render surface order, draw it
1998
1999         Step 3 should really happen after step 5, but right now painting a content layer requires knowledge of the render surface properties and draw transforms
2000         in order to paint.  We also currently push layer properties from LayerChromium->CCLayerImpls twice now - once at 3.b and once after 5 so we can pick
2001         up any texture updates.  This will also get fixed when the paint dependency on render surfaces is resolved.
2002
2003         I haven't modified the root layer or content layers in order to minimize conflicts with the other pending work in that area.
2004
2005         Tests: compositing/
2006
2007         * WebCore.gypi:
2008         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2009         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
2010         * platform/graphics/chromium/Canvas2DLayerChromium.h:
2011         * platform/graphics/chromium/CanvasLayerChromium.cpp:
2012         (WebCore::CanvasLayerChromium::createCCLayerImpl):
2013         (WebCore::CanvasLayerChromium::pushPropertiesTo):
2014         * platform/graphics/chromium/CanvasLayerChromium.h:
2015         * platform/graphics/chromium/ContentLayerChromium.cpp:
2016         (WebCore::ContentLayerChromium::requiresClippedUpdateRect):
2017         (WebCore::ContentLayerChromium::paintContentsIfDirty):
2018         (WebCore::ContentLayerChromium::updateCompositorResources):
2019         (WebCore::ContentLayerChromium::bindContentsTexture):
2020         * platform/graphics/chromium/ContentLayerChromium.h:
2021         * platform/graphics/chromium/ImageLayerChromium.cpp:
2022         (WebCore::ImageLayerChromium::paintContentsIfDirty):
2023         * platform/graphics/chromium/ImageLayerChromium.h:
2024         * platform/graphics/chromium/LayerChromium.cpp:
2025         (WebCore::LayerChromium::LayerChromium):
2026         (WebCore::LayerChromium::cleanupResources):
2027         (WebCore::LayerChromium::setLayerRenderer):
2028         (WebCore::LayerChromium::setName):
2029         (WebCore::LayerChromium::pushPropertiesTo):
2030         (WebCore::LayerChromium::dumpLayer):
2031         (WebCore::LayerChromium::createCCLayerImpl):
2032         (WebCore::LayerChromium::createCCLayerImplIfNeeded):
2033         (WebCore::LayerChromium::ccLayerImpl):
2034         (WebCore::LayerChromium::layerRenderer):
2035         * platform/graphics/chromium/LayerChromium.h:
2036         (WebCore::LayerChromium::paintContentsIfDirty):
2037         (WebCore::LayerChromium::updateCompositorResources):
2038         * platform/graphics/chromium/LayerRendererChromium.cpp:
2039         (WebCore::LayerRendererChromium::updateLayers):
2040         (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
2041         (WebCore::LayerRendererChromium::paintContentsRecursive):
2042         (WebCore::LayerRendererChromium::updateCompositorResourcesRecursive):
2043         (WebCore::LayerRendererChromium::drawLayer):
2044         (WebCore::LayerRendererChromium::initializeSharedObjects):
2045         * platform/graphics/chromium/LayerRendererChromium.h:
2046         (WebCore::LayerRendererChromium::canvasLayerProgram):
2047         (WebCore::LayerRendererChromium::pluginLayerProgram):
2048         (WebCore::LayerRendererChromium::videoLayerRGBAProgram):
2049         (WebCore::LayerRendererChromium::videoLayerYUVProgram):
2050         * platform/graphics/chromium/PluginLayerChromium.cpp:
2051         (WebCore::PluginLayerChromium::createCCLayerImpl):
2052         (WebCore::PluginLayerChromium::setTextureId):
2053         (WebCore::PluginLayerChromium::pushPropertiesTo):
2054         * platform/graphics/chromium/PluginLayerChromium.h:
2055         (WebCore::PluginLayerChromium::textureId):
2056         * platform/graphics/chromium/VideoLayerChromium.cpp:
2057         (WebCore::VideoLayerChromium::createCCLayerImpl):
2058         (WebCore::VideoLayerChromium::updateCompositorResources):
2059         (WebCore::VideoLayerChromium::pushPropertiesTo):
2060         * platform/graphics/chromium/VideoLayerChromium.h:
2061         * platform/graphics/chromium/WebGLLayerChromium.cpp:
2062         (WebCore::WebGLLayerChromium::updateCompositorResources):
2063         * platform/graphics/chromium/WebGLLayerChromium.h:
2064         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp.
2065         (WebCore::CCCanvasLayerImpl::CCCanvasLayerImpl):
2066         (WebCore::CCCanvasLayerImpl::~CCCanvasLayerImpl):
2067         (WebCore::CCCanvasLayerImpl::draw):
2068         (WebCore::CCCanvasLayerImpl::dumpLayerProperties):
2069         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h.
2070         (WebCore::CCCanvasLayerImpl::create):
2071         (WebCore::CCCanvasLayerImpl::setTextureId):
2072         (WebCore::CCCanvasLayerImpl::setPremultipliedAlpha):
2073         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2074         (WebCore::CCLayerImpl::descendantsDrawsContent):
2075         (WebCore::CCLayerImpl::updateCompositorResources):
2076         (WebCore::CCLayerImpl::writeIndent):
2077         * platform/graphics/chromium/cc/CCLayerImpl.h:
2078         (WebCore::CCLayerImpl::setAnchorPoint):
2079         (WebCore::CCLayerImpl::setAnchorPointZ):
2080         (WebCore::CCLayerImpl::setMasksToBounds):
2081         (WebCore::CCLayerImpl::setOpacity):
2082         (WebCore::CCLayerImpl::setPosition):
2083         (WebCore::CCLayerImpl::setPreserves3D):
2084         (WebCore::CCLayerImpl::setSublayerTransform):
2085         (WebCore::CCLayerImpl::setTransform):
2086         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp.
2087         (WebCore::CCPluginLayerImpl::CCPluginLayerImpl):
2088         (WebCore::CCPluginLayerImpl::~CCPluginLayerImpl):
2089         (WebCore::CCPluginLayerImpl::draw):
2090         (WebCore::CCPluginLayerImpl::dumpLayerProperties):
2091         * platform/graphics/chromium/cc/CCPluginLayerImpl.h: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h.
2092         (WebCore::CCPluginLayerImpl::create):
2093         (WebCore::CCPluginLayerImpl::setTextureId):
2094         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: Added.
2095         (WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
2096         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
2097         (WebCore::CCVideoLayerImpl::setTexture):
2098         (WebCore::CCVideoLayerImpl::draw):
2099         (WebCore::CCVideoLayerImpl::drawYUV):
2100         (WebCore::CCVideoLayerImpl::drawRGBA):
2101         (WebCore::CCVideoLayerImpl::dumpLayerProperties):
2102         * platform/graphics/chromium/cc/CCVideoLayerImpl.h: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h.
2103         (WebCore::CCVideoLayerImpl::create):
2104         (WebCore::CCVideoLayerImpl::setSkipsDraw):
2105         (WebCore::CCVideoLayerImpl::setFrameFormat):
2106
2107 2011-03-25  Oliver Hunt  <oliver@apple.com>
2108
2109         Reviewed by Darin Adler.
2110
2111         Allow defineOwnProperty to work on DOMObjects
2112         https://bugs.webkit.org/show_bug.cgi?id=57129
2113
2114         As other engines are allowing defineOwnProperty to be applied
2115         to host objects there's no reason for us to retain this
2116         restriction.
2117
2118         * bindings/js/JSDOMWrapper.cpp:
2119         * bindings/js/JSDOMWrapper.h:
2120
2121 2011-03-25  Andy Estes  <aestes@apple.com>
2122
2123         Reviewed by Adele Peterson.
2124
2125         REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
2126         https://bugs.webkit.org/show_bug.cgi?id=49016
2127
2128         AC_QuickTime.js uses the common <object>/<embed> paradigm to embed the 
2129         QuickTime plug-in in web pages. r70748 removed our mapping of classids 
2130         to MIME types, which causes WebKit to fall back from the object to the 
2131         embed tag when QuickTime is embedded by this script. The script emits 
2132         the following embed tag to embed a QuickTime movie with a poster frame: 
2133
2134         <embed src="poster-frame.png" target="quicktimeplayer" href="movie.mov"> 
2135
2136         The expectation is that a QuickTime plug-in is instantiated to display the 
2137         poster frame, since QuickTime registers for many common image MIME 
2138         types. This is how Gecko behaves for embed. However, WebKit prefers to 
2139         use its native image rendering for image embeds, in which case no movie 
2140         is played when the poster frame is clicked. 
2141
2142         Fix this by changing embed to check for a plug-in that can handle the 
2143         image type before rendering the image natively. This matches Gecko. 
2144
2145         Test: plugins/embed-prefers-plugins-for-images.html
2146
2147         * html/HTMLEmbedElement.cpp:
2148         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
2149         * html/HTMLObjectElement.cpp:
2150         (WebCore::HTMLObjectElement::HTMLObjectElement):
2151         (WebCore::HTMLObjectElement::parametersForPlugin):
2152         * html/HTMLPlugInImageElement.cpp:
2153         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2154         (WebCore::HTMLPlugInImageElement::isImageType):
2155         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
2156         * html/HTMLPlugInImageElement.h:
2157         (WebCore::HTMLPlugInImageElement::shouldPreferPlugInsForImages):
2158         * loader/EmptyClients.h:
2159         (WebCore::EmptyFrameLoaderClient::objectContentType):
2160         * loader/FrameLoader.cpp:
2161         (WebCore::FrameLoader::defaultObjectContentType):
2162         * loader/FrameLoader.h:
2163         * loader/FrameLoaderClient.h:
2164         * loader/SubframeLoader.cpp:
2165         (WebCore::SubframeLoader::resourceWillUsePlugin):
2166         (WebCore::SubframeLoader::requestPlugin):
2167         (WebCore::SubframeLoader::requestObject):
2168         (WebCore::SubframeLoader::shouldUsePlugin):
2169         * loader/SubframeLoader.h:
2170
2171 2011-03-23  Jer Noble  <jer.noble@apple.com>
2172
2173         Reviewed by Eric Carlson.
2174
2175         Application Cache should save audio/ and video/ mime types as flat files
2176         https://bugs.webkit.org/show_bug.cgi?id=53784
2177         <rdar://problem/8932473>
2178
2179         No new tests, as this behavior is not possible to test without changes to the MediaPlayer engines.
2180
2181         Store certain mime types as flat files alongside the Application Cache database.
2182         This requires plumbing the saved file path from ApplicationCacheStorage through
2183         to ApplicationCacheResource.
2184
2185         (WebCore::ApplicationCacheStorage::openDatabase): Modify the CacheResourceData schema and
2186             add a new DeletedCacheResources table, add a new CacheResourceDataDeleted trigger.
2187         (WebCore::ApplicationCacheStorage::store): Add the new path data when adding new rows in 
2188             CacheResourceData, and store media resources as flat files.
2189         (WebCore::ApplicationCacheStorage::loadCache): Pull the "path" column from CacheResourceData
2190             when loading cache items.
2191         (WebCore::ApplicationCacheStorage::remove): Call checkForDeletedResources.
2192         (WebCore::ApplicationCacheStorage::empty): Ditto.
2193         (WebCore::ApplicationCacheStorage::storeCopyOfCache): Ditto.
2194         (WebCore::ApplicationCacheStorage::deleteCacheGroup): Ditto.
2195         (WebCore::ApplicationCacheStorage::checkForDeletedResources): Walk through DeletedCacheResourceData
2196             looking for entries with non-empty "path" columns; if found, delete.
2197         (WebCore::ApplicationCacheStorage::flatFileAreaSize): Walk through CacheResourceData rows
2198             and sum the file size of those rows with flat file storage.
2199         (WebCore::ApplicationCacheStorage::verifySchemaVersion): Call deleteTables() instead of 
2200             clearAllTables() directly.
2201         (WebCore::ApplicationCacheStorage::deleteTables): Call empty() before deleting the tables,
2202             so that flat files get deleted.
2203         (WebCore::ApplicationCacheStorage::shouldStoreResourceAsFlatFile): Added.
2204         (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory): Added.
2205         * loader/appcache/ApplicationCacheStorage.h:
2206         * platform/win/FileSystemWin.cpp:
2207         (WebCore::openFile): Implement openFile on Windows.
2208
2209 2011-03-24  David Hyatt  <hyatt@apple.com>
2210
2211         Reviewed by Dan Bernstein.
2212
2213         https://bugs.webkit.org/show_bug.cgi?id=56909
2214         
2215         Add a simplified normal flow layout path optimization for overflow recomputation
2216         and for positioned objects inside relative positioned containers.
2217
2218         Currently there is an optimized code path for positioned objects, but as soon as
2219         we encounter a normal flow object in the containing block chain, we lose the
2220         optimization.
2221
2222         This patch adds a new type of style difference called SimplifiedLayout that is
2223         returned when only overflow needs to be recomputed. Whenever a transform changes,
2224         this is the hint returned now instead of a full layout.
2225         
2226         In addition, when positioned objects need layout and start marking up the
2227         containing block chain, we now propagate the fact that the layout is simplified
2228         all the way up to the root, even when we encounter normal flow containing
2229         blocks.
2230         
2231         The layoutOnlyPositionedObjects function has been renamed to simplifiedLayout()
2232         and is now used for all of these cases (in addition to what it handled before).
2233         
2234         The simplified layout optimization (even in ToT) did not work correctly when
2235         static distances needed to be recomputed. In order to make static distance
2236         computations work with simplified layout, positioned objects now always compute
2237         their static offsets, even if they explicitly specify left/top.  That way normal
2238         flow layout never has to re-run when the positioned object moves.  This makes
2239         movement of a positioned object along a single non-auto axis much faster when the
2240         other axis is auto. Because this code kicked in more often for absolutely positioned
2241         objects whose original display was inline, I went ahead and fixed the trailing space
2242         issue with those objects.  This causes a bunch of layout tests to progress.
2243
2244         Added fast/block/positioning/static-inline-position-dynamic.html and trailing-space-test.html.
2245
2246         * rendering/RenderBlock.cpp:
2247         (WebCore::RenderBlock::layoutBlock):
2248         (WebCore::RenderBlock::adjustPositionedBlock):
2249         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
2250         (WebCore::RenderBlock::simplifiedLayout):
2251         * rendering/RenderBlock.h:
2252         * rendering/RenderBlockLineLayout.cpp:
2253         (WebCore::setStaticPositions):
2254         (WebCore::RenderBlock::findNextLineBreak):
2255         * rendering/RenderBox.cpp:
2256         (WebCore::RenderBox::styleDidChange):
2257         (WebCore::RenderBox::positionLineBox):
2258         * rendering/RenderBoxModelObject.cpp:
2259         (WebCore::RenderBoxModelObject::styleWillChange):
2260         * rendering/RenderFlexibleBox.cpp:
2261         (WebCore::RenderFlexibleBox::layoutBlock):
2262         (WebCore::RenderFlexibleBox::layoutHorizontalBox):
2263         (WebCore::RenderFlexibleBox::layoutVerticalBox):
2264         * rendering/RenderObject.cpp:
2265         (WebCore::RenderObject::RenderObject):
2266         (WebCore::RenderObject::adjustStyleDifference):
2267         (WebCore::RenderObject::setStyle):
2268         (WebCore::RenderObject::styleDidChange):
2269         * rendering/RenderObject.h:
2270         (WebCore::RenderObject::needsLayout):
2271         (WebCore::RenderObject::needsPositionedMovementLayoutOnly):
2272         (WebCore::RenderObject::needsSimplifiedNormalFlowLayout):
2273         (WebCore::RenderObject::setNeedsLayout):
2274         (WebCore::RenderObject::setChildNeedsLayout):
2275         (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
2276         (WebCore::RenderObject::markContainingBlocksForLayout):
2277         * rendering/RenderTable.cpp:
2278         (WebCore::RenderTable::layout):
2279         * rendering/style/RenderStyle.cpp:
2280         (WebCore::RenderStyle::diff):
2281         * rendering/style/RenderStyleConstants.h:
2282         * rendering/svg/RenderSVGText.cpp:
2283         (WebCore::RenderSVGText::layout):
2284
2285 2011-03-25  Martin Robinson  <mrobinson@igalia.com>
2286
2287         Fix the GTK+ build until we can implement the new cross-platform
2288         FontPlatformData.h bits.
2289
2290         * platform/graphics/FontPlatformData.h: Include the proper old font headers.
2291         (WebCore::FontPlatformData::FontPlatformData): Eliminate GTK+ specific bits of this file
2292         which reference our obsolete font implementation.
2293         (WebCore::FontPlatformData::hash): Ditto.
2294
2295 2011-03-25  Steve Falkenburg  <sfalken@apple.com>
2296
2297         Reviewed by Brian Weinstein.
2298
2299         Microsoft Windows Presentation Foundation (WPF) plug-in complains about missing xpcom.dll
2300         https://bugs.webkit.org/show_bug.cgi?id=57119
2301         <rdar://problem/9054148>
2302         
2303         This plug-in from Microsoft links against xpcom.dll, which is a Firefox-specific DLL
2304         not available in WebKit. The plug-in is fairly widespread, since it was included in
2305         a Windows Update push at one point.
2306
2307         * plugins/win/PluginPackageWin.cpp:
2308         (WebCore::PluginPackage::isPluginBlacklisted): Blacklist npwpf.dll.
2309
2310 2011-03-25  Tony Chang  <tony@chromium.org>
2311
2312         Try to fix the chromium mac build.
2313         We used the mac FontPlatformData on chromium mac.
2314
2315         * WebCore.gyp/WebCore.gyp:
2316         * WebCore.gypi:
2317         * platform/graphics/FontPlatformData.h:
2318
2319 2011-03-25  Tony Chang  <tony@chromium.org>
2320
2321         Build fix:
2322         have chromium and qt use the correct FontPlatformData.h
2323         https://bugs.webkit.org/show_bug.cgi?id=57115
2324
2325         * platform/graphics/FontPlatformData.h:
2326
2327 2011-03-25  Beth Dakin  <bdakin@apple.com>
2328
2329         Reviewed by Dave Hyatt.
2330
2331         Fix for https://bugs.webkit.org/show_bug.cgi?id=57057 Overlay scrollbars in overflow 
2332         areas paint behind positive z-index content
2333         -and corresponding-
2334         <rdar://problem/9070500>
2335
2336         Since overlay scrollbars don't clip the scrollable content like other scrollbars do, 
2337         the only way to get them to paint on top of all possible scrollable content is to 
2338         make them paint on top of everything. To do this, this patch adds a second trip 
2339         through the layer tree if it contains overlay scrollbars that need painting.
2340
2341         After calling paint() on the rootLayer, call paintOverlayScrollers() if 
2342         containsDirtyOverlayScrollbars() is true. 
2343         * page/FrameView.cpp:
2344         (WebCore::FrameView::paintContents):
2345
2346         RenderLayer has two new member variable. m_containsDirtyOverlayScrollbars is a bool 
2347         that is set on the root layer when it has child layers that need overlay scrollbars 
2348         to be painted. m_cachedOverlayScrollbarOffset is an IntPoint to cache the tx and ty 
2349         of the overlay scrollbars on the first (normal) pass through the layer tree. This 
2350         prevents us from having to re-enter the render tree during the second (overlay-only) 
2351         pass. Finally, there is also a new paint flag: PaintLayerPaintingOverlayScrollbars.
2352         * rendering/RenderLayer.h:
2353         (WebCore::RenderLayer::containsDirtyOverlayScrollbars):
2354         (WebCore::RenderLayer::setContainsDirtyOverlayScrollbars):
2355         * rendering/RenderLayer.cpp:
2356         (WebCore::RenderLayer::RenderLayer):
2357         (WebCore::RenderLayer::paintOverflowControls):
2358         (WebCore::RenderLayer::paintOverlayScrollbars):
2359         (WebCore::RenderLayer::paintLayer):
2360
2361 2011-03-25  Jessie Berlin  <jberlin@apple.com>
2362
2363         Reviewed by Sam Weinig.
2364
2365         WebKit2: Need to be able to set and get the Cookie Storage Policy.
2366         https://bugs.webkit.org/show_bug.cgi?id=50780
2367
2368         * platform/network/cf/CookieStorageCFNet.cpp:
2369         (WebCore::privateCookieStorage):
2370         Rename privateBrowsingCookieStorage to privateCookieStorage.
2371         (WebCore::currentCookieStorage):
2372         Ditto.
2373         (WebCore::setCurrentCookieStorage):
2374         Ditto.
2375         (WebCore::setCookieStoragePrivateBrowsingEnabled):
2376         Ditto.
2377         (WebCore::defaultCookieStorage):
2378         Return the default cookie storage.
2379         (WebCore::privateBrowsingCookieStorage):
2380         Return privateCookieStorage().get()
2381         * platform/network/cf/CookieStorageCFNet.h:
2382
2383 2011-03-25  Emil A Eklund  <eae@chromium.org>
2384
2385         Reviewed by Dimitri Glazkov.
2386
2387         Text field "onchange" event is triggered if actual value unchanged
2388         https://bugs.webkit.org/show_bug.cgi?id=36314
2389
2390         Change RenderTextControl::subtreeHasChanged to only return true if the
2391         subtree has changed since the last event was triggered.
2392
2393         * html/HTMLFormControlElement.cpp:
2394         (WebCore::HTMLTextFormControlElement::insertedIntoDocument):
2395         (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
2396         * html/HTMLFormControlElement.h:
2397         (WebCore::HTMLTextFormControlElement::setTextAsOfLastFormControlChangeEvent):
2398         * html/HTMLInputElement.cpp:
2399         (WebCore::HTMLInputElement::setChecked):
2400         (WebCore::HTMLInputElement::setValue):
2401         * html/HTMLTextAreaElement.cpp:
2402         (WebCore::HTMLTextAreaElement::setValue):
2403         (WebCore::HTMLTextAreaElement::setNonDirtyValue):
2404
2405 2011-03-25  Brent Fulgham  <bfulgham@webkit.org>
2406
2407         Reviewed by David Hyatt.
2408
2409         Clean up FontPlatformData structure so that a single implementation
2410         is used across all ports.  This first patch works for the Windows
2411         build (both CG and WinCairo), and Cocoa.
2412
2413         * WebCore.vcproj/WebCore.vcproj:
2414         * platform/graphics/FontPlatformData.cpp: Added.
2415         (WebCore::FontPlatformData::FontPlatformData):
2416         (WebCore::FontPlatformData::operator=):
2417         * platform/graphics/FontPlatformData.h: Added.
2418         (WebCore::toCTFontRef):
2419         (WebCore::FontPlatformData::FontPlatformData):
2420         (WebCore::FontPlatformData::hfont):
2421         (WebCore::FontPlatformData::useGDI):
2422         (WebCore::FontPlatformData::font):
2423         (WebCore::FontPlatformData::cgFont):
2424         (WebCore::FontPlatformData::size):
2425         (WebCore::FontPlatformData::setSize):
2426         (WebCore::FontPlatformData::syntheticBold):
2427         (WebCore::FontPlatformData::syntheticOblique):
2428         (WebCore::FontPlatformData::isColorBitmapFont):
2429         (WebCore::FontPlatformData::orientation):
2430         (WebCore::FontPlatformData::textOrientation):
2431         (WebCore::FontPlatformData::widthVariant):
2432         (WebCore::FontPlatformData::setOrientation):
2433         (WebCore::FontPlatformData::scaledFont):
2434         (WebCore::FontPlatformData::fontFace):
2435         (WebCore::FontPlatformData::hash):
2436         (WebCore::FontPlatformData::operator==):
2437         (WebCore::FontPlatformData::isHashTableDeletedValue):
2438         (WebCore::FontPlatformData::hashTableDeletedFontValue):
2439         * platform/graphics/cg/FontPlatformData.h: Removed.
2440         * platform/graphics/cocoa/FontPlatformData.h: Removed.
2441         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2442         (WebCore::~FontPlatformData):
2443         (WebCore::FontPlatformData::platformDataInit):
2444         (WebCore::FontPlatformData::platformDataAssign):
2445         * platform/graphics/win/FontPlatformDataCGWin.cpp:
2446         (WebCore::FontPlatformData::FontPlatformData):
2447         (WebCore::FontPlatformData::~FontPlatformData):
2448         (WebCore::FontPlatformData::platformDataInit):
2449         (WebCore::FontPlatformData::platformDataAssign):
2450         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
2451         (WebCore::FontPlatformData::FontPlatformData):
2452         (WebCore::FontPlatformData::~FontPlatformData):
2453         (WebCore::FontPlatformData::platformDataInit):
2454         (WebCore::FontPlatformData::platformDataAssign):
2455         * platform/graphics/win/FontPlatformDataWin.cpp:
2456         (WebCore::FontPlatformData::FontPlatformData):
2457         * platform/graphics/win/cairo/FontPlatformData.h: Removed.
2458
2459 2011-03-25  Enrica Casucci  <enrica@apple.com>
2460
2461         Reviewed by Oliver Hunt.
2462
2463         Pasteboard data's RTF data doesn't always include URLs via NSLinkAttributeName.
2464         https://bugs.webkit.org/show_bug.cgi?id=57107
2465         <rdar://problem/9084267>
2466
2467         If the selection is at the beginning of content inside an anchor tag
2468         we move the selection start to include the anchor.
2469         
2470         * platform/mac/PasteboardMac.mm:
2471         (WebCore::Pasteboard::writeSelection): Modified to change the selection
2472         start according to the new rule.
2473
2474 2011-03-25  Pavel Feldman  <pfeldman@chromium.org>
2475
2476         Reviewed by Yury Semikhatsky.
2477
2478         Web Inspector: refactor Network domain's frame tree API
2479         https://bugs.webkit.org/show_bug.cgi?id=57103
2480
2481         * inspector/Inspector.json:
2482         * inspector/InspectorResourceAgent.cpp:
2483         (WebCore::buildObjectForFrameResource):
2484         (WebCore::buildObjectForCachedResource):
2485         (WebCore::InspectorResourceAgent::willSendRequest):
2486         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
2487         (WebCore::buildObjectForFrame):
2488         (WebCore::buildObjectForFrameTree):
2489         (WebCore::InspectorResourceAgent::didCommitLoad):
2490         (WebCore::InspectorResourceAgent::enable):
2491         * inspector/front-end/NetworkManager.js:
2492         (WebInspector.NetworkManager.prototype.requestContent):
2493         (WebInspector.NetworkDispatcher):
2494         (WebInspector.NetworkDispatcher.prototype.willSendRequest):
2495         (WebInspector.NetworkDispatcher.prototype.didReceiveResponse):
2496         (WebInspector.NetworkDispatcher.prototype.didLoadResourceFromMemoryCache):
2497         (WebInspector.NetworkDispatcher.prototype.frameDetachedFromParent):
2498         (WebInspector.NetworkDispatcher.prototype.didCommitLoadForFrame):
2499         (WebInspector.NetworkDispatcher.prototype.didCreateWebSocket):
2500         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
2501         (WebInspector.NetworkDispatcher.prototype._addFramesRecursively):
2502         (WebInspector.NetworkDispatcher.prototype._createResource):
2503         * inspector/front-end/ResourceTreeModel.js:
2504         (WebInspector.ResourceTreeModel.prototype.addOrUpdateFrame):
2505         (WebInspector.ResourceTreeModel.prototype.didCommitLoadForFrame):
2506         (WebInspector.ResourceTreeModel.prototype._clearChildFramesAndResources):
2507         (WebInspector.ResourceTreeModel.prototype._clearResources):
2508         * inspector/front-end/ResourcesPanel.js:
2509         (WebInspector.ResourcesPanel.prototype.addOrUpdateFrame):
2510         (WebInspector.ResourcesPanel.prototype.addResourceToFrame):
2511
2512 2011-03-25  Dave Hyatt  <hyatt@apple.com>
2513
2514         Reviewed by Adele Peterson.
2515
2516         REGRESSION(r77257): Only first page of a document is printed
2517         https://bugs.webkit.org/show_bug.cgi?id=56958
2518
2519         Test: printing/page-count-layout-overflow.html
2520
2521         * page/FrameView.cpp:
2522         (WebCore::FrameView::forceLayoutForPagination): Moved clearing of overflow
2523             to the right place.
2524
2525 2011-03-25  Benjamin Poulain  <benjamin.poulain@nokia.com>
2526
2527         Reviewed by Andreas Kling.
2528
2529         [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
2530         https://bugs.webkit.org/show_bug.cgi?id=57087
2531
2532         Use explicit conversion for string to avoid depending on the default codec
2533         installed by the user code.
2534
2535         * bridge/qt/qt_pixmapruntime.cpp:
2536         (JSC::Bindings::QtPixmapToDataUrlMethod::invoke):
2537         (JSC::Bindings::QtPixmapInstance::valueOf):
2538         * platform/qt/LanguageQt.cpp:
2539         (WebCore::platformDefaultLanguage):
2540         * platform/qt/PasteboardQt.cpp:
2541         (WebCore::Pasteboard::writeSelection):
2542         * plugins/qt/PluginPackageQt.cpp:
2543         (WebCore::initializeGtk):
2544         * plugins/qt/PluginViewQt.cpp:
2545         (WebCore::getPluginDisplay):
2546
2547 2011-03-25  Chang Shu  <cshu@webkit.org>
2548
2549         Reviewed by Ryosuke Niwa.
2550
2551         rename Node::isContentEditable and all call sites to rendererIsEditable
2552         https://bugs.webkit.org/show_bug.cgi?id=54290
2553
2554         This is part of the effort to separate JS API HTMLElement isContentEditable from
2555         internal Node::rendererIsEditable.
2556
2557         Code refactoring. No new tests.
2558
2559         * accessibility/AccessibilityRenderObject.cpp:
2560         (WebCore::AccessibilityRenderObject::isReadOnly):
2561         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
2562         * dom/Document.cpp:
2563         (WebCore::acceptsEditingFocus):
2564         * dom/Node.cpp:
2565         (WebCore::Node::rendererIsEditable):
2566         (WebCore::Node::shouldUseInputMethod):
2567         (WebCore::Node::canStartSelection):
2568         (WebCore::Node::rootEditableElement):
2569         * dom/Node.h:
2570         (WebCore::Node::isContentEditable):
2571         (WebCore::Node::rendererIsEditable):
2572         (WebCore::Node::rendererIsRichlyEditable):
2573         * dom/Position.cpp:
2574         (WebCore::nextRenderedEditable):
2575         (WebCore::previousRenderedEditable):
2576         (WebCore::Position::atEditingBoundary):
2577         (WebCore::Position::parentEditingBoundary):
2578         (WebCore::Position::upstream):
2579         (WebCore::Position::downstream):
2580         (WebCore::Position::isCandidate):
2581         * dom/PositionIterator.cpp:
2582         (WebCore::PositionIterator::isCandidate):
2583         * editing/AppendNodeCommand.cpp:
2584         (WebCore::AppendNodeCommand::AppendNodeCommand):
2585         (WebCore::AppendNodeCommand::doApply):
2586         (WebCore::AppendNodeCommand::doUnapply):
2587         * editing/ApplyStyleCommand.cpp:
2588         (WebCore::containsNonEditableRegion):
2589         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
2590         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
2591         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
2592         * editing/CompositeEditCommand.cpp:
2593         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
2594         * editing/DeleteButtonController.cpp:
2595         (WebCore::isDeletableElement):
2596         (WebCore::enclosingDeletableElement):
2597         * editing/DeleteFromTextNodeCommand.cpp:
2598         (WebCore::DeleteFromTextNodeCommand::doApply):
2599         (WebCore::DeleteFromTextNodeCommand::doUnapply):
2600         * editing/DeleteSelectionCommand.cpp:
2601         (WebCore::DeleteSelectionCommand::removeNode):
2602         * editing/Editor.cpp:
2603         (WebCore::Editor::canDeleteRange):
2604         (WebCore::Editor::markMisspellingsOrBadGrammar):
2605         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
2606         * editing/EditorCommand.cpp:
2607         (WebCore::verticalScrollDistance):
2608         * editing/FormatBlockCommand.cpp:
2609         (WebCore::enclosingBlockToSplitTreeTo):
2610         * editing/IndentOutdentCommand.cpp:
2611         (WebCore::IndentOutdentCommand::outdentParagraph):
2612         * editing/InsertIntoTextNodeCommand.cpp:
2613         (WebCore::InsertIntoTextNodeCommand::doApply):
2614         (WebCore::InsertIntoTextNodeCommand::doUnapply):
2615         * editing/InsertNodeBeforeCommand.cpp:
2616         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
2617         (WebCore::InsertNodeBeforeCommand::doApply):
2618         (WebCore::InsertNodeBeforeCommand::doUnapply):
2619         * editing/JoinTextNodesCommand.cpp:
2620         (WebCore::JoinTextNodesCommand::doApply):
2621         (WebCore::JoinTextNodesCommand::doUnapply):
2622         * editing/MergeIdenticalElementsCommand.cpp:
2623         (WebCore::MergeIdenticalElementsCommand::doApply):
2624         (WebCore::MergeIdenticalElementsCommand::doUnapply):
2625         * editing/RemoveNodeCommand.cpp:
2626         (WebCore::RemoveNodeCommand::doApply):
2627         (WebCore::RemoveNodeCommand::doUnapply):
2628         * editing/ReplaceSelectionCommand.cpp:
2629         (WebCore::ReplacementFragment::ReplacementFragment):
2630         * editing/SelectionController.cpp:
2631         (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
2632         (WebCore::SelectionController::setSelectionFromNone):
2633         * editing/SplitElementCommand.cpp:
2634         (WebCore::SplitElementCommand::executeApply):
2635         (WebCore::SplitElementCommand::doUnapply):
2636         * editing/SplitTextNodeCommand.cpp:
2637         (WebCore::SplitTextNodeCommand::doApply):
2638         (WebCore::SplitTextNodeCommand::doUnapply):
2639         (WebCore::SplitTextNodeCommand::doReapply):
2640         * editing/SplitTextNodeContainingElementCommand.cpp:
2641         (WebCore::SplitTextNodeContainingElementCommand::doApply):
2642         * editing/VisiblePosition.cpp:
2643         (WebCore::VisiblePosition::canonicalPosition):
2644         * editing/WrapContentsInDummySpanCommand.cpp:
2645         (WebCore::WrapContentsInDummySpanCommand::doUnapply):
2646         (WebCore::WrapContentsInDummySpanCommand::doReapply):
2647         * editing/htmlediting.cpp:
2648         (WebCore::highestEditableRoot):
2649         (WebCore::lowestEditableAncestor):
2650         (WebCore::isEditablePosition):
2651         (WebCore::isRichlyEditablePosition):
2652         (WebCore::firstEditablePositionAfterPositionInRoot):
2653         (WebCore::extendRangeToWrappingNodes):
2654         (WebCore::enclosingNodeWithTag):
2655         (WebCore::enclosingNodeOfType):
2656         (WebCore::highestEnclosingNodeOfType):
2657         (WebCore::canMergeLists):
2658         * editing/visible_units.cpp:
2659         (WebCore::previousLeafWithSameEditability):
2660         (WebCore::previousLinePosition):
2661         (WebCore::nextLeafWithSameEditability):
2662         (WebCore::nextLinePosition):
2663         (WebCore::startOfParagraph):
2664         (WebCore::endOfParagraph):
2665         * html/HTMLAnchorElement.cpp:
2666         (WebCore::HTMLAnchorElement::supportsFocus):
2667         (WebCore::HTMLAnchorElement::defaultEventHandler):
2668         (WebCore::HTMLAnchorElement::setActive):
2669         (WebCore::HTMLAnchorElement::canStartSelection):
2670         (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType):
2671         * html/HTMLBodyElement.cpp:
2672         (WebCore::HTMLBodyElement::supportsFocus):
2673         * html/HTMLElement.cpp:
2674         (WebCore::HTMLElement::supportsFocus):
2675         (WebCore::HTMLElement::isContentEditable):
2676         (WebCore::HTMLElement::contentEditable):
2677         * html/HTMLElement.h:
2678         * page/DragController.cpp:
2679         (WebCore::DragController::operationForLoad):
2680         (WebCore::DragController::canProcessDrag):
2681         * page/EventHandler.cpp:
2682         (WebCore::EventHandler::handleMouseReleaseEvent):
2683         (WebCore::EventHandler::selectCursor):
2684         * page/FocusController.cpp:
2685         (WebCore::relinquishesEditingFocus):
2686         * rendering/HitTestResult.cpp:
2687         (WebCore::HitTestResult::isContentEditable):
2688         * rendering/RenderBlock.cpp:
2689         (WebCore::positionForPointRespectingEditingBoundaries):
2690         (WebCore::RenderBlock::hasLineIfEmpty):
2691         * rendering/RenderBlockLineLayout.cpp:
2692         (WebCore::RenderBlock::addOverflowFromInlineChildren):
2693         * rendering/RenderBox.cpp:
2694         (WebCore::RenderBox::canBeProgramaticallyScrolled):
2695         * rendering/RenderObject.cpp:
2696         (WebCore::RenderObject::createVisiblePosition):
2697         * rendering/RootInlineBox.cpp:
2698         (WebCore::isEditableLeaf):
2699         * svg/SVGAElement.cpp:
2700         (WebCore::SVGAElement::supportsFocus):
2701
2702 2011-03-25  Maciej Stachowiak  <mjs@apple.com>
2703
2704         Reviewed by Antti Koivisto.
2705
2706         Crash when a wbr element is inserted inside mroot
2707         https://bugs.webkit.org/show_bug.cgi?id=56352
2708
2709         Test: mathml/wbr-in-mroot-crash.html
2710
2711         * rendering/mathml/RenderMathMLRoot.cpp:
2712         (WebCore::RenderMathMLRoot::layout): Look for the first box model child of the first
2713         child, instead of just assuming.
2714
2715 2011-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
2716
2717         Reviewed by Pavel Feldman.
2718
2719         XML Viewer: extensions can't render original XML
2720         https://bugs.webkit.org/show_bug.cgi?id=56263
2721
2722         Added source xml to transformed document, renamed onload function.
2723
2724         * xml/XMLTreeViewer.cpp:
2725         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
2726         * xml/XMLViewer.xsl:
2727
2728 2011-03-25  Benjamin Poulain  <benjamin.poulain@nokia.com>
2729
2730         Reviewed by Andreas Kling.
2731
2732         [Qt] Get rid of the invalid string conversion with ::fromAscii()
2733         https://bugs.webkit.org/show_bug.cgi?id=57102
2734
2735         Replace ::fromAscii() with ::fromLatin1() to make sure the codec does not depend on the user code.
2736
2737         * platform/network/qt/QNetworkReplyHandler.cpp:
2738         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2739         * platform/qt/CookieJarQt.cpp:
2740         (WebCore::cookies):
2741         (WebCore::cookieRequestHeaderFieldValue):
2742
2743 2011-03-25  Sheriff Bot  <webkit.review.bot@gmail.com>
2744
2745         Unreviewed, rolling out r81953.
2746         http://trac.webkit.org/changeset/81953
2747         https://bugs.webkit.org/show_bug.cgi?id=57096
2748
2749         "inspector test breakage: part 2/2" (Requested by apavlov on
2750         #webkit).
2751
2752         * inspector/Inspector.json:
2753         * inspector/InspectorCSSAgent.cpp:
2754         (WebCore::InspectorCSSAgent::getAllStyles):
2755         * inspector/InspectorCSSAgent.h:
2756         * inspector/InspectorStyleSheet.cpp:
2757         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2758         * inspector/InspectorStyleSheet.h:
2759         * inspector/front-end/AuditRules.js:
2760         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback):
2761         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback):
2762         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
2763         * inspector/front-end/CSSStyleModel.js:
2764         (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback):
2765         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
2766         (WebInspector.CSSStyleModel.prototype._onRevert):
2767         (WebInspector.CSSStyleSheet):
2768         (WebInspector.CSSStyleSheet.prototype.setText):
2769
2770 2011-03-15  Alexander Pavlov  <apavlov@chromium.org>
2771
2772         Reviewed by Pavel Feldman.
2773
2774         Web Inspector: Fix handling of the CSSAgent.setStyleSheetText() results in CSSStyleModel.js
2775         https://bugs.webkit.org/show_bug.cgi?id=56310
2776
2777         Instead of stylesheet ids, CSSAgent.getAllStyleSheets() now returns metainfo objects containing
2778         "styleSheetId", "sourceURL", "disabled", and "title" fields. The latter three are not returned
2779         by CSSAgent.getStyleSheet() anymore.
2780
2781         Test: inspector/styles/get-set-stylesheet-text.html
2782
2783         * inspector/Inspector.json:
2784         * inspector/InspectorCSSAgent.cpp:
2785         (WebCore::InspectorCSSAgent::getAllStyleSheets):
2786         * inspector/InspectorCSSAgent.h:
2787         * inspector/InspectorStyleSheet.cpp:
2788         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2789         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
2790         * inspector/InspectorStyleSheet.h:
2791         * inspector/front-end/AuditRules.js:
2792         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback):
2793         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback):
2794         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
2795         * inspector/front-end/CSSStyleModel.js:
2796         (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback):
2797         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
2798         (WebInspector.CSSStyleModel.prototype._onRevert):
2799         (WebInspector.CSSStyleSheet):
2800         (WebInspector.CSSStyleSheet.prototype.setText):
2801
2802 2011-03-25  Pavel Feldman  <pfeldman@chromium.org>
2803
2804         Reviewed by Yury Semikhatsky.
2805
2806         Web Inspector: extension server should not convert all resources to HAR when there are no extensions.
2807         https://bugs.webkit.org/show_bug.cgi?id=57044
2808
2809         * inspector/front-end/ExtensionServer.js:
2810         (WebInspector.ExtensionServer.prototype._notifyResourceFinished):
2811         (WebInspector.ExtensionServer.prototype._hasSubscribers):
2812
2813 2011-03-25  Leo Yang  <leo.yang@torchmobile.com.cn>
2814
2815         Reviewed by Nikolas Zimmermann.
2816
2817         SVG <use> element performance improvement
2818         https://bugs.webkit.org/show_bug.cgi?id=57077
2819
2820         SVG <use> element was expanding nesting <use> and <symbol> elements
2821         in an inefficient way. After it expanded an <use> or a <symbol>
2822         element it would restart expanding from the shadow tree root.
2823         This behavior was leading about 160 millions of calls to
2824         expandUseElementInShadowTree or expandSymbolElementInShadowTree for
2825         a single shadow tree which is illustrated by
2826         http://upload.wikimedia.org/wikipedia/commons/4/4e/Sierpinski_carpet_6.svg.
2827         But the effective calls, which really expand <use> or <symbol>
2828         elements, were about 5200; others were passing-by calls, which are
2829         recursively down to the children.
2830
2831         This patch is altering the expanding path to reduce the passing-by
2832         calls. It will expand elements in sibling chain where there is an
2833         effective call, because the effective call replaces element which is
2834         expanded and the replacement results lose of the sibling chain of
2835         the replaced on the upper recursion stack. With this patch the
2836         passing-by calls are reduced from about 160 millions to about 30
2837         thousands.
2838
2839         No functionality change, no new tests.
2840
2841         * svg/SVGUseElement.cpp:
2842         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2843         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
2844         * svg/SVGUseElement.h:
2845
2846 2011-03-25  Dominic Cooney  <dominicc@google.com>
2847
2848         Reviewed by Kent Tamura.
2849
2850         Makes keygen support autofocus attribute.
2851         https://bugs.webkit.org/show_bug.cgi?id=57091
2852
2853         Test: fast/forms/autofocus-keygen.html
2854
2855         * html/HTMLFormControlElement.cpp:
2856         (WebCore::HTMLFormControlElement::attach):
2857
2858 2011-03-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2859
2860         Reviewed by Antonio Gomes.
2861
2862         [EFL] Add sound / mute button to MediaControl UI
2863         https://bugs.webkit.org/show_bug.cgi?id=56726
2864
2865         Add sound / mute button to MediaControl UI.
2866
2867         * platform/efl/RenderThemeEfl.cpp:
2868         (WebCore::RenderThemeEfl::edjeGroupFromFormType):
2869         (WebCore::RenderThemeEfl::emitMediaButtonSignal):
2870         (WebCore::RenderThemeEfl::paintMediaMuteButton):
2871         * platform/efl/RenderThemeEfl.h:
2872
2873 2011-03-24  Nikolas Zimmermann  <nzimmermann@rim.com>
2874
2875         Reviewed by Darin Adler.
2876
2877         Introduce WTF HexNumber.h
2878         https://bugs.webkit.org/show_bug.cgi?id=56099
2879
2880         Introduce a set of functions that ease converting from a bye or a number to a hex string,
2881         replacing several of these conversions and String::format("%x") usages all over WebCore.
2882
2883         * ForwardingHeaders/wtf/HexNumber.h: Added.
2884         * css/CSSOMUtils.cpp:
2885         (WebCore::serializeCharacterAsCodePoint):
2886         * css/CSSParser.cpp:
2887         (WebCore::quoteCSSString):
2888         * inspector/InspectorResourceAgent.cpp:
2889         (WebCore::createReadableStringFromBinary):
2890         * platform/FileSystem.cpp:
2891         (WebCore::encodeForFileName):
2892         * platform/KURL.cpp:
2893         (WebCore::appendEscapedChar):
2894         * platform/UUID.cpp:
2895         (WebCore::createCanonicalUUIDString):
2896         * platform/graphics/Color.cpp:
2897         (WebCore::Color::serialized):
2898         * platform/network/FormDataBuilder.cpp:
2899         (WebCore::FormDataBuilder::encodeStringAsFormData):
2900         * rendering/RenderTreeAsText.cpp:
2901         (WebCore::quoteAndEscapeNonPrintables):
2902
2903 2011-03-24  Stephanie Lewis  <slewis@apple.com>
2904
2905         Reviewed by Geoff Garen.
2906
2907         <rdar://problem/9146716> REGRESSION: ~10 MB increase in memory under CachedScripts
2908         Add back a call to destroy decoded data after access.  Keep the SourceProviderCache 
2909         around as long as their are still clients to use it.
2910
2911         No new tests because there is no change in behavior.  Current tests pass.
2912
2913         * loader/cache/CachedScript.cpp:
2914         (WebCore::CachedScript::script):
2915         (WebCore::CachedScript::destroyDecodedData):
2916
2917 2011-03-24  Stephanie Lewis  <slewis@apple.com>
2918
2919         Reviewed by Geoff Garen.
2920
2921         https://bugs.webkit.org/show_bug.cgi?id=57073
2922         Rework the AtomicHTMLConstructor to reserve space for attributes based on the size of the attribute list.
2923         Saves 1.5 MB on Membuster.
2924
2925         No new tests because there was no change in behavior.  Current tests pass.
2926
2927         * html/parser/HTMLToken.h:
2928         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
2929         (WebCore::AtomicHTMLToken::initializeAttributes):
2930
2931 2011-03-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2932
2933         Unreviewed, rolling out r81916 and r81917.
2934         http://trac.webkit.org/changeset/81916
2935         http://trac.webkit.org/changeset/81917
2936         https://bugs.webkit.org/show_bug.cgi?id=57071
2937
2938         broke a test on platforms that do not have QuickTime installed
2939         (Requested by estes on #webkit).
2940
2941         * html/HTMLEmbedElement.cpp:
2942         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
2943         * html/HTMLObjectElement.cpp:
2944         (WebCore::HTMLObjectElement::HTMLObjectElement):
2945         (WebCore::HTMLObjectElement::parametersForPlugin):
2946         * html/HTMLPlugInImageElement.cpp:
2947         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2948         (WebCore::HTMLPlugInImageElement::isImageType):
2949         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
2950         * html/HTMLPlugInImageElement.h:
2951         * loader/EmptyClients.h:
2952         (WebCore::EmptyFrameLoaderClient::objectContentType):
2953         * loader/FrameLoader.cpp:
2954         (WebCore::FrameLoader::defaultObjectContentType):
2955         * loader/FrameLoader.h:
2956         * loader/FrameLoaderClient.h:
2957         * loader/SubframeLoader.cpp:
2958         (WebCore::SubframeLoader::resourceWillUsePlugin):
2959         (WebCore::SubframeLoader::requestObject):
2960         (WebCore::SubframeLoader::shouldUsePlugin):
2961         * loader/SubframeLoader.h:
2962
2963 2011-03-24  Dimitri Glazkov  <dglazkov@chromium.org>
2964
2965         Reviewed by Darin Adler.
2966
2967         Eliminate Node::dispatchGenericEvent.
2968         https://bugs.webkit.org/show_bug.cgi?id=57045
2969
2970         No functional change, covered by existing tests.
2971
2972         * dom/Node.cpp:
2973         (WebCore::Node::dispatchEvent): Combined with the body of dispatchGenericEvent,
2974             removed unnecessary extra refs and a stale comment.
2975         * dom/Node.h:
2976         * page/DOMWindow.cpp:
2977         (WebCore::DOMWindow::dispatchLoadEvent): Changed to use dispatchEvent.
2978         * svg/SVGElement.cpp:
2979         (WebCore::SVGElement::sendSVGLoadEventIfPossible): Ditto.
2980         * svg/SVGElementInstance.cpp:
2981         (WebCore::SVGElementInstance::dispatchEvent): Ditto. The code here still
2982             works thanks to SVG-aware retargeting in Node.
2983
2984 2011-03-24  Chris Rogers  <crogers@google.com>
2985
2986         Reviewed by Kenneth Russell.
2987
2988         web audio: Properly sample-rate convert audio assets in chromium port
2989         https://bugs.webkit.org/show_bug.cgi?id=56980
2990
2991         No new tests since audio API is not yet implemented.
2992
2993         * WebCore.gypi:
2994         * platform/audio/AudioBus.cpp:
2995         (WebCore::AudioBus::createBySampleRateConverting):
2996         (WebCore::AudioBus::createByMixingToMono):
2997         * platform/audio/AudioBus.h:
2998         * platform/audio/HRTFKernel.cpp:
2999         (WebCore::extractAverageGroupDelay):
3000         (WebCore::HRTFKernel::HRTFKernel):
3001         * platform/audio/SincResampler.cpp:
3002         * platform/audio/chromium/AudioBusChromium.cpp:
3003         (WebCore::AudioBus::loadPlatformResource):
3004         (WebCore::createBusFromInMemoryAudioFile):
3005
3006 2011-03-24  Rik Cabanier  <cabanier@adobe.com>
3007
3008         Reviewed by David Hyatt.
3009
3010         REGRESSION (r81625): fast/css/percentage-non-integer.html fails on Windows
3011         https://bugs.webkit.org/show_bug.cgi?id=56829
3012
3013         Test: fast/css/percentage-non-integer.html
3014
3015         * platform/Length.h:
3016         (WebCore::Length::calcValue):
3017         (WebCore::Length::calcMinValue):
3018         (WebCore::Length::calcFloatValue):
3019
3020 2011-03-24  Mihai Parparita  <mihaip@chromium.org>
3021
3022         Reviewed by James Robinson.
3023
3024         [Chromium] Vertical Japanese text is not displayed on Snow Leopard
3025         https://bugs.webkit.org/show_bug.cgi?id=56962
3026
3027         Make Snow Leopard check added by r80740 into a runtime check for
3028         Chromium, since it uses the same binary on both Leopard and Snow Leopard.
3029
3030         * platform/graphics/mac/FontMac.mm:
3031         (WebCore::hasBrokenCTFontGetVerticalTranslationsForGlyphs):
3032         (WebCore::showGlyphsWithAdvances):
3033
3034 2011-03-24  Brady Eidson  <beidson@apple.com>
3035
3036         Reviewed by Sam Weinig.
3037
3038         https://bugs.webkit.org/show_bug.cgi?id=57058
3039         Hookup the UIProcess WebIconDatabase to a WebCore::IconDatabase as its implementation
3040
3041         * loader/icon/IconDatabase.cpp:
3042         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL): Only add the DocumentLoader to the set if it's non-zero.
3043         (WebCore::IconDatabase::IconDatabase): Add more logging.
3044         (WebCore::IconDatabase::performURLImport): Dispatch the "didFinishURLImport" client callback using the following 3 methods.
3045         (WebCore::FinishedURLImport::FinishedURLImport):
3046         (WebCore::FinishedURLImport::performWork):
3047         (WebCore::IconDatabase::dispatchDidFinishURLImportOnMainThread):
3048
3049         * loader/icon/IconDatabase.h:
3050         (WebCore::IconDatabase::create): Expose a PassOwnPtr<> creator.
3051
3052         * WebCore.exp.in:
3053
3054 2011-03-23  Jer Noble  <jer.noble@apple.com>
3055
3056         Reviewed by Maciej Stachowiak.
3057
3058         Application Cache should save audio/ and video/ mime types as flat files
3059         https://bugs.webkit.org/show_bug.cgi?id=53784
3060         <rdar://problem/8932473>
3061
3062         No new tests.
3063
3064         ApplicationCacheResource::create() now takes an additional "path" parameter.  To facilitate 
3065         extracting this path information, two functions in ApplicationCacheHost have been made public.
3066
3067         * loader/appcache/ApplicationCacheGroup.cpp:
3068         (WebCore::ApplicationCacheGroup::didReceiveResponse): Pass along new "path" parameter.
3069         (WebCore::ApplicationCacheGroup::didFail): Ditto.
3070         * loader/appcache/ApplicationCacheHost.h:
3071         (WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache): Made public.
3072         (WebCore::ApplicationCacheHost::getApplicationCacheFallbackResource): Made public.
3073         * loader/appcache/ApplicationCacheResource.cpp:
3074         (WebCore::ApplicationCacheResource::ApplicationCacheResource): Add new "path" parameter.
3075         * loader/appcache/ApplicationCacheResource.h:
3076         (WebCore::ApplicationCacheResource::create): Ditto.
3077         (WebCore::ApplicationCacheResource::path): New accessor.
3078
3079 2011-03-24  Andy Estes  <aestes@apple.com>
3080
3081         Reviewed by Darin Adler.
3082
3083         REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
3084         https://bugs.webkit.org/show_bug.cgi?id=49016
3085
3086         AC_QuickTime.js uses the common <object>/<embed> paradigm to embed the
3087         QuickTime plug-in in web pages. r70748 removed our mapping of classids
3088         to MIME types, which causes WebKit to fall back from the object to the
3089         embed tag when QuickTime is embedded by this script. The script emits
3090         the following embed tag to embed a QuickTime movie with a poster frame:
3091
3092         <embed src="poster-frame.png" target="quicktimeplayer" href="movie.mov">
3093
3094         The expectation is that a QuickTime plug-in is instantiated to display the
3095         poster frame, since QuickTime registers for many common image MIME
3096         types. This is how Gecko behaves for embed. However, WebKit prefers to
3097         use its native image rendering for image embeds, in which case no movie
3098         is played when the poster frame is clicked.
3099
3100         Fix this by changing embed to check for a plug-in that can handle the
3101         image type before rendering the image natively. This matches Gecko.
3102
3103         Test: fast/images/embed-image-plugins-disabled.html
3104
3105         * html/HTMLObjectElement.cpp:
3106         (WebCore::HTMLObjectElement::parametersForPlugin):
3107         * html/HTMLPlugInImageElement.cpp:
3108         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
3109         (WebCore::HTMLPlugInImageElement::isImageType):
3110         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
3111         * html/HTMLPlugInImageElement.h:
3112         (WebCore::HTMLPlugInImageElement::preferPluginsForImages):
3113         * loader/EmptyClients.h:
3114         (WebCore::EmptyFrameLoaderClient::objectContentType):
3115         * loader/FrameLoader.cpp:
3116         (WebCore::FrameLoader::defaultObjectContentType):
3117         * loader/FrameLoader.h:
3118         * loader/FrameLoaderClient.h:
3119         * loader/SubframeLoader.cpp:
3120         (WebCore::SubframeLoader::resourceWillUsePlugin):
3121         (WebCore::SubframeLoader::requestPlugin):
3122         (WebCore::SubframeLoader::requestObject):
3123         (WebCore::SubframeLoader::shouldUsePlugin):
3124         * loader/SubframeLoader.h:
3125
3126 2011-03-24  Mike Reed  <reed@google.com>
3127
3128         Reviewed by James Robinson.
3129
3130         Move lifetime management of grContext from a global to being
3131         per-SharedGraphicsContext3D, which correctly is 1:1 with the
3132         underlying opengl context.
3133         https://bugs.webkit.org/show_bug.cgi?id=54330
3134
3135         No new tests. Existing <canvas> tests exercise this:
3136
3137         * platform/graphics/chromium/DrawingBufferChromium.cpp:
3138         (WebCore::DrawingBuffer::DrawingBuffer):
3139         (WebCore::DrawingBuffer::~DrawingBuffer):
3140         (WebCore::DrawingBuffer::publishToPlatformLayer):
3141         (WebCore::DrawingBuffer::setGrContext):
3142         * platform/graphics/gpu/DrawingBuffer.h:
3143         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
3144         (WebCore::SharedGraphicsContext3D::SharedGraphicsContext3D):
3145         (WebCore::SharedGraphicsContext3D::~SharedGraphicsContext3D):
3146         (WebCore::SharedGraphicsContext3D::getGrContext):
3147         * platform/graphics/gpu/SharedGraphicsContext3D.h:
3148         * platform/graphics/skia/PlatformContextSkia.cpp:
3149         (WebCore::PlatformContextSkia::~PlatformContextSkia):
3150         (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
3151
3152 2011-03-24  Dimitri Glazkov  <dglazkov@chromium.org>
3153
3154         Reviewed by Darin Adler.
3155
3156         Untangle dependency between event ancestor chain computation and InspectorDOMAgent.
3157         https://bugs.webkit.org/show_bug.cgi?id=57050
3158
3159         Inspector's list of event listeners does not need to invoke Node::getEventListeners,
3160         because it simply wants to collect all ancestors and never uses EventContext bits.
3161
3162         No functional change, covered by existing tests.
3163
3164         * dom/Node.cpp:
3165         (WebCore::getEventAncestors): Converted into a static function.
3166         (WebCore::Node::dispatchGenericEvent): Changed to pass node to getEventAncestors.
3167         * dom/Node.h: Removed decl, moved EventDispatchBehavior enum inside.
3168         * inspector/InspectorDOMAgent.cpp:
3169         (WebCore::InspectorDOMAgent::getEventListenersForNode): Replaced the call
3170             to getEventAncestors with a simple ancestor traversal loop.
3171
3172 2011-03-24  Adam Klein  <adamk@chromium.org>
3173
3174         Reviewed by David Levin.
3175
3176         [fileapi] Make FileError and FileException accessible from WorkerContext
3177         https://bugs.webkit.org/show_bug.cgi?id=57041
3178
3179         * workers/WorkerContext.idl:
3180
3181 2011-03-24  Sam Weinig  <sam@webkit.org>
3182
3183         Reviewed by Anders Carlsson.
3184
3185         Remove legacy version of findPlainText.
3186         https://bugs.webkit.org/show_bug.cgi?id=57056
3187
3188         * editing/TextIterator.cpp:
3189         * editing/TextIterator.h:
3190         Remove legacy overload of findPlainText that doesn't
3191         take an options parameter.
3192
3193 2011-03-24  Geoffrey Garen  <ggaren@apple.com>
3194
3195         Reviewed by Oliver Hunt.
3196
3197         Ensure that all compilation takes place within a dynamic global object scope
3198         https://bugs.webkit.org/show_bug.cgi?id=57054
3199
3200         * bindings/js/JSErrorHandler.cpp:
3201         (WebCore::JSErrorHandler::handleEvent):
3202         * bindings/js/JSEventListener.cpp:
3203         (WebCore::JSEventListener::handleEvent): Updated for signature change.
3204
3205 2011-03-24  John Bauman  <jbauman@chromium.org>
3206
3207         Reviewed by Kenneth Russell.
3208
3209         preserveDrawingBuffer=true is ignored
3210         https://bugs.webkit.org/show_bug.cgi?id=56987
3211
3212         Add code to the V8 and JSC bindings to support grabbing the value of
3213         preserveDrawingBuffer from the input context attributes. Also, in
3214         WebGLRenderingContext use the WebGLContextAttributes that were input
3215         directly, not those from the GraphicsContext3D which could have been
3216         changed.
3217
3218         No new tests, as this can't be tested with DRT. However, this works
3219         when tested manually.
3220
3221         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3222         (WebCore::JSHTMLCanvasElement::getContext):
3223         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3224         (WebCore::V8HTMLCanvasElement::getContextCallback):
3225         * html/canvas/WebGLRenderingContext.cpp:
3226         (WebCore::WebGLRenderingContext::clearIfComposited):
3227         (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
3228
3229 2011-03-24  Enrica Casucci  <enrica@apple.com>
3230
3231         Reviewed by Alexey Proskuryakov.
3232
3233         WebKit2:Services menu item to convert selected Simplified/Traditional Chinese Text is not working.
3234         https://bugs.webkit.org/show_bug.cgi?id=56975
3235         <rdar://problem/8915066>
3236         
3237         Adding support in WebCore to implement readSelectionFromPasteboard
3238         to support Mac OS X services from WebKit2.
3239
3240         * WebCore.exp.in:
3241         * editing/Editor.h:
3242         * editing/mac/EditorMac.mm:
3243         (WebCore::Editor::readSelectionFromPasteboard): Added entry point
3244         to call the paste functions with the specified pasteboard.
3245
3246 2011-03-24  Vsevolod Vlasov  <vsevik@chromium.org>
3247
3248         Reviewed by Pavel Feldman.
3249
3250         Web Inspector: Inspector does not show correct transfer size for synchronous requests
3251         https://bugs.webkit.org/show_bug.cgi?id=56951
3252
3253         Fixed transfer size for synchronous load.
3254
3255         Test: http/tests/inspector/network/network-size-sync.html
3256
3257         * loader/FrameLoader.cpp:
3258         (WebCore::FrameLoader::willLoadMediaElementURL):
3259         (WebCore::FrameLoader::commitProvisionalLoad):
3260         (WebCore::FrameLoader::loadResourceSynchronously):
3261         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
3262         * loader/ResourceLoadNotifier.cpp:
3263         (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages):
3264         * loader/ResourceLoadNotifier.h:
3265
3266 2011-03-24  Brady Eidson  <beidson@apple.com>
3267
3268         Reviewed by Adam Roben.
3269
3270         https://bugs.webkit.org/show_bug.cgi?id=57030
3271         REGRESSION (r81782): http/tests/inspector/extensions-resources-redirect.html sometimes crashes WebKit2's 
3272         web process while handling a WebIconDatabaseProxy::ReceivedIconLoadDecision message
3273
3274         The callback objects had some bogus ASSERTs and missed a relevant null check. If a callback was waiting on
3275         a message back from the UIProcess, but was invalidated from within the WebProcess in the meantime, it's
3276         perfectly valid to attempt to performCallback() after the callback function pointer has been cleared.
3277
3278         * loader/icon/IconDatabaseBase.h:
3279         (WebCore::EnumCallback::performCallback):
3280         (WebCore::EnumCallback::invalidate):
3281         (WebCore::EnumCallback::EnumCallback):
3282         (WebCore::ObjectCallback::performCallback):
3283         (WebCore::ObjectCallback::invalidate):
3284         (WebCore::ObjectCallback::ObjectCallback):
3285
3286 2011-03-24  Sam Weinig  <sam@webkit.org>
3287
3288         Reviewed by Darin Adler.
3289
3290         Dictionary text extraction is not correctly detecting word boundaries on bing.com
3291         <rdar://problem/9078569>
3292         https://bugs.webkit.org/show_bug.cgi?id=56995
3293
3294         * WebCore.exp.in:
3295         Add some editing related exports needed by WebKit2.
3296
3297 2011-03-24  Andy Estes  <aestes@apple.com>
3298
3299         Reviewed by Eric Seidel.
3300
3301         REGRESSION (r80231): Bad cast in HTMLTreeBuilder with closed </form> tags
3302         https://bugs.webkit.org/show_bug.cgi?id=56836
3303
3304         During fragment parsing, HTMLConstructionSite holds a reference to the
3305         fragment context's closest form ancestor. If a misnested form end tag is
3306         then encountered as the first node of the fragment, we will check to see
3307         if a corresponding form start tag is in scope even though no such tag
3308         exists. This led to isScope() walking the HTMLElementStack all the way
3309         to the root DocumentFragment and attempting to cast it to Element*.
3310
3311         Fix this by ensuring that the inScope() family of functions operate in
3312         terms of ContainerNodes to account for the fragment case.
3313
3314         Test: fast/parser/fragment-closest-form-ancestor.html
3315
3316         * html/parser/HTMLElementStack.cpp:
3317         (WebCore::HTMLNames::isRootNode):
3318         (WebCore::HTMLNames::isScopeMarker):
3319         (WebCore::HTMLNames::isTableScopeMarker):
3320         (WebCore::HTMLNames::isTableBodyScopeMarker):
3321         (WebCore::HTMLNames::isTableRowScopeMarker):
3322         (WebCore::HTMLElementStack::hasOnlyHTMLElementsInScope):
3323         (WebCore::HTMLElementStack::inScope):
3324
3325 2011-03-24  Enrica Casucci  <enrica@apple.com>
3326
3327         Reviewed by Darin Adler.
3328
3329         Repeated copy and paste-in-place operation results in increasingly verbose HTML.
3330         <rdar://problem/8690506>
3331         https://bugs.webkit.org/show_bug.cgi?id=56874
3332         
3333         When we calculate the style to apply at the insertion point we compare the initial
3334         style at the insertion point against the style calculated at the span we wrap the
3335         copied markup fragment with. We could end up with a series of unnecessary spans
3336         to remove the initial style that simply grow our markup.
3337         The consists in moving the insertion point outside any inline element that could
3338         affect the fragment being inserted when we are not pasting and matching the style.
3339
3340         Test: editing/pasteboard/paste-text-with-style.html
3341
3342         * editing/ReplaceSelectionCommand.cpp:
3343         (WebCore::isInlineNodeWithStyle): Added.
3344         (WebCore::ReplaceSelectionCommand::doApply): Added logic to change the insertion
3345         point according to the new rules.
3346
3347 2011-03-24  Benjamin Poulain  <benjamin.poulain@nokia.com>
3348
3349         Reviewed by Kenneth Rohde Christiansen.
3350
3351         [Qt] When we render WebGL offscreen, color conversion cost a lot of CPU cycles
3352         https://bugs.webkit.org/show_bug.cgi?id=40884
3353
3354         The software fallback is now only needed for corner cases like a manual rendering
3355         of the page to QImage.
3356
3357         Keeping the image with the last pixel values is no longer needed. Removing it reduce the
3358         performance for real-time rendering on software surface, but this case should no longer be
3359         supported.
3360
3361         The conversion from OpenGL color space and coordinates is done manually for performance. This
3362         also fix the bug of the inverted X axis due to the transformation.
3363
3364         The tests and benchmarks are done through Qt API tests.
3365
3366         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3367         (WebCore::swapBgrToRgb):
3368         (WebCore::GraphicsContext3DInternal::paint):
3369         (WebCore::GraphicsContext3D::reshape):
3370
3371 2011-03-24  Nat Duca  <nduca@chromium.org>
3372
3373         Reviewed by James Robinson.
3374
3375         [chromium] Remove bool that forces compositor HUD to always be enabled
3376         https://bugs.webkit.org/show_bug.cgi?id=57034
3377
3378         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
3379         (WebCore::CCHeadsUpDisplay::enabled):
3380
3381 2011-03-24  Nat Duca  <nduca@chromium.org>
3382
3383         Reviewed by Kenneth Russell.
3384
3385         [chromium] Add traceEvents to compositor
3386         https://bugs.webkit.org/show_bug.cgi?id=56965
3387
3388         * WebCore.gypi:
3389         * platform/chromium/TraceEvent.h: Added.
3390         (WebCore::internal::ScopeTracer::ScopeTracer):
3391         (WebCore::internal::ScopeTracer::~ScopeTracer):
3392         * platform/graphics/chromium/LayerRendererChromium.cpp:
3393         (WebCore::LayerRendererChromium::updateRootLayerContents):
3394         (WebCore::LayerRendererChromium::updateRootLayerScrollbars):
3395         (WebCore::LayerRendererChromium::updateLayers):
3396         (WebCore::LayerRendererChromium::drawLayers):
3397         (WebCore::LayerRendererChromium::finish):
3398         (WebCore::LayerRendererChromium::present):
3399         * platform/graphics/chromium/LayerTilerChromium.cpp:
3400         (WebCore::LayerTilerChromium::update):
3401
3402 2011-03-24  Pavel Feldman  <pfeldman@chromium.org>
3403
3404         Reviewed by Yury Semikhatsky.
3405
3406         Web Inspector: render XHRs matching JSON regex as JSON.
3407         https://bugs.webkit.org/show_bug.cgi?id=57035
3408
3409         * English.lproj/localizedStrings.js:
3410         * WebCore.gypi:
3411         * WebCore.vcproj/WebCore.vcproj:
3412         * inspector/front-end/NetworkItemView.js:
3413         (WebInspector.NetworkItemView):
3414         * inspector/front-end/RemoteObject.js:
3415         (WebInspector.LocalJSONObject.prototype.get description.switch.case):
3416         (WebInspector.LocalJSONObject.prototype.get description):
3417         (WebInspector.LocalJSONObject.prototype._concatenate):
3418         (WebInspector.LocalJSONObject.prototype.getProperties):
3419         (WebInspector.LocalJSONObject.prototype._children):
3420         * inspector/front-end/ResourceJSONView.js: Added.
3421         (WebInspector.ResourceJSONView):
3422         (WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.prototype.hasContent):
3423         (WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.prototype.show):
3424         (WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.prototype._initialize):
3425         * inspector/front-end/WebKit.qrc:
3426         * inspector/front-end/inspector.css:
3427         (.resource-view.json):
3428         * inspector/front-end/inspector.html:
3429
3430 2011-03-24  Dimitri Glazkov  <dglazkov@chromium.org>
3431
3432         Reviewed by Darin Adler.
3433
3434         Move media controls subtree creation into one method.
3435         https://bugs.webkit.org/show_bug.cgi?id=56969
3436
3437         Mechanical move, no changes in functionality.
3438
3439         The purpose of this patch is to align existing code closer with its
3440         future version, when MediaControls is an element whose tree is created
3441         at the instantiation.
3442
3443         * html/shadow/MediaControls.cpp:
3444         (WebCore::MediaControls::create): Added, consolidating all subtree generation logic into one place.
3445         (WebCore::MediaControls::update): Replaced methods with one call.
3446         * html/shadow/MediaControls.h: Updated decls.
3447         * rendering/MediaControlElements.cpp:
3448         (WebCore::MediaControlTimelineElement::create): Moved setting of attributes here.
3449         (WebCore::MediaControlVolumeSliderElement::create): Ditto.
3450
3451 2011-03-24  Steve Falkenburg  <sfalken@apple.com>
3452
3453         Reviewed by Darin Adler.
3454
3455         Use proper string method to generate webloc string.
3456         https://bugs.webkit.org/show_bug.cgi?id=57028
3457         <rdar://problem/9181955>
3458
3459         * platform/win/ClipboardUtilitiesWin.cpp:
3460         (WebCore::getWebLocData):
3461
3462 2011-03-24  Ben Taylor  <bentaylor.solx86@gmail.com>
3463
3464         Reviewed by Alexey Proskuryakov.
3465
3466         https://bugs.webkit.org/show_bug.cgi?id=32821
3467         Fix conditionals which had an int for one case and a pointer for another.
3468         Fix is similar to https://bugs.webkit.org/show_bug.cgi?id=56198
3469
3470         No new tests. Fix compilation on Solaris 10 with SunStudio 12 C++
3471
3472         * css/CSSComputedStyleDeclaration.cpp:
3473         (WebCore::CSSComputedStyleDeclaration::valueForShadow):
3474
3475 2011-03-24  Pavel Podivilov  <podivilov@chromium.org>
3476
3477         Reviewed by Yury Semikhatsky.
3478
3479         Web Inspector: provide live edit callback to source frame delegate.
3480         https://bugs.webkit.org/show_bug.cgi?id=57003
3481
3482         * inspector/front-end/DebuggerModel.js:
3483         (WebInspector.DebuggerModel.prototype.editScriptSource):
3484         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
3485         * inspector/front-end/DebuggerPresentationModel.js:
3486         (WebInspector.DebuggerPresentationModel):
3487         (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
3488         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource):
3489         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
3490         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
3491         (WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId):
3492         * inspector/front-end/ScriptsPanel.js:
3493         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
3494         (WebInspector.SourceFrameDelegateForScriptsPanel):
3495         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.canEditScriptSource):
3496         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource):
3497
3498 2011-03-24  Benjamin Poulain  <benjamin.poulain@nokia.com>
3499
3500         Reviewed by Andreas Kling.
3501
3502         Regression: WebKit does not build with Python 3 following 56807
3503         https://bugs.webkit.org/show_bug.cgi?id=56923
3504
3505         The module string does not have the function replace in Python 3. The str.replace function
3506         can do the same operation in this case and works with the versions 2 and 3.
3507
3508         * inspector/generate-inspector-idl:
3509
3510 2011-03-24  Pavel Feldman  <pfeldman@chromium.org>
3511
3512         Reviewed by Yury Semikhatsky.
3513
3514         Web Inspector: brush up Network agent API.
3515         https://bugs.webkit.org/show_bug.cgi?id=57001
3516
3517         * inspector/Inspector.json:
3518         * inspector/InspectorInstrumentation.cpp:
3519         (WebCore::InspectorInstrumentation::willSendRequestImpl):
3520         * inspector/InspectorInstrumentation.h:
3521         (WebCore::InspectorInstrumentation::willSendRequest):
3522         * inspector/InspectorResourceAgent.cpp:
3523         (WebCore::buildObjectForResourceRequest):
3524         (WebCore::buildObjectForResourceResponse):
3525         (WebCore::buildObjectForCachedResource):
3526         (WebCore::InspectorResourceAgent::willSendRequest):
3527         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
3528         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
3529         (WebCore::InspectorResourceAgent::setExtraHeaders):
3530         * inspector/InspectorResourceAgent.h:
3531         * inspector/TimelineRecordFactory.cpp:
3532         (WebCore::TimelineRecordFactory::createResourceReceiveResponseData):
3533         * inspector/front-end/NetworkManager.js:
3534         (WebInspector.NetworkDispatcher.prototype._updateResourceWithRequest):
3535         (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
3536         (WebInspector.NetworkDispatcher.prototype._updateResourceWithCachedResource):
3537         (WebInspector.NetworkDispatcher.prototype.willSendRequest):
3538         (WebInspector.NetworkDispatcher.prototype.didReceiveWebSocketHandshakeResponse):
3539         (WebInspector.NetworkDispatcher.prototype.didCloseWebSocket):
3540         * inspector/front-end/Resource.js:
3541         * inspector/front-end/TimelinePanel.js:
3542         (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
3543         * loader/ResourceLoadNotifier.cpp:
3544         (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
3545         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
3546         * loader/appcache/ApplicationCacheGroup.cpp:
3547         (WebCore::ApplicationCacheGroup::createResourceHandle):
3548
3549 2011-03-11  Steve Block  <steveblock@google.com>
3550
3551         Reviewed by Jeremy Orlow.
3552
3553         JNIType is not specific to JNI so should be renamed
3554         https://bugs.webkit.org/show_bug.cgi?id=56197
3555
3556         This patch renames JNIType to JavaType, renames the values of
3557         the enum, and moves it out of JNIUtility.h to its own file.
3558         Also renames the corresponding JavaField and JavaMethod getters.
3559
3560         No new tests, refactoring only.
3561
3562         * GNUmakefile.am:
3563         * WebCore.gypi:
3564         * WebCore.xcodeproj/project.pbxproj:
3565         * bridge/jni/JNIUtility.cpp:
3566         (JSC::Bindings::javaTypeFromClassName):
3567         (JSC::Bindings::signatureFromJavaType):
3568         (JSC::Bindings::javaTypeFromPrimitiveType):
3569         (JSC::Bindings::getJNIField):
3570         (JSC::Bindings::callJNIMethod):
3571         * bridge/jni/JNIUtility.h:
3572         * bridge/jni/JavaMethod.cpp:
3573         (JavaMethod::JavaMethod):
3574         (JavaMethod::signature):
3575         * bridge/jni/JavaMethod.h:
3576         (JSC::Bindings::JavaMethod::returnTypeClassName):
3577         (JSC::Bindings::JavaMethod::returnType):
3578         * bridge/jni/JavaType.h: Copied from Source/WebCore/bridge/jni/JavaMethod.h.
3579         * bridge/jni/jni_jsobject.mm:
3580         (JavaJSObject::toString):
3581         * bridge/jni/jni_objc.mm:
3582         (JSC::Bindings::dispatchJNICall):
3583         * bridge/jni/jsc/JNIUtilityPrivate.cpp:
3584         (JSC::Bindings::convertArrayInstanceToJavaArray):
3585         (JSC::Bindings::convertValueToJValue):
3586         * bridge/jni/jsc/JNIUtilityPrivate.h:
3587         * bridge/jni/jsc/JavaArrayJSC.cpp:
3588         (JavaArray::setValueAt):
3589         (JavaArray::valueAt):
3590         * bridge/jni/jsc/JavaClassJSC.cpp:
3591         * bridge/jni/jsc/JavaFieldJSC.cpp:
3592         (JavaField::JavaField):
3593         (JavaField::dispatchValueFromInstance):
3594         (JavaField::valueFromInstance):
3595         (JavaField::dispatchSetValueToInstance):
3596         (JavaField::setValueToInstance):
3597         * bridge/jni/jsc/JavaFieldJSC.h:
3598         (JSC::Bindings::JavaField::typeClassName):
3599         (JSC::Bindings::JavaField::type):
3600         * bridge/jni/jsc/JavaInstanceJSC.cpp:
3601         (JavaInstance::invokeMethod):
3602         * bridge/jni/v8/JNIUtilityPrivate.cpp:
3603         (JSC::Bindings::convertNPVariantToJValue):
3604         (JSC::Bindings::convertJValueToNPVariant):
3605         * bridge/jni/v8/JNIUtilityPrivate.h:
3606         * bridge/jni/v8/JavaFieldV8.cpp:
3607         (JavaField::JavaField):
3608         * bridge/jni/v8/JavaFieldV8.h:
3609         (JSC::Bindings::JavaField::typeClassName):
3610         (JSC::Bindings::JavaField::type):
3611         * bridge/jni/v8/JavaInstanceV8.cpp:
3612         (JavaInstance::invokeMethod):
3613         (JavaInstance::getField):
3614         * bridge/jni/v8/JavaNPObjectV8.cpp:
3615         (JSC::Bindings::JavaNPObjectInvoke):
3616         (JSC::Bindings::JavaNPObjectGetProperty):
3617
3618 2011-03-24  Ojan Vafai  <ojan@chromium.org>
3619
3620         Was being a little braindead when I committed this.
3621         Only simple selectors are allowed, but sibling selectors
3622         are sibling selectors.
3623
3624         * css/CSSStyleSelector.cpp:
3625         (WebCore::collectFeaturesFromList):
3626
3627 2011-03-23  MORITA Hajime  <morrita@google.com>
3628
3629         Reviewed by Kent Tamura.
3630
3631         Spellcheck feature specific symbols should be defined.
3632         https://bugs.webkit.org/show_bug.cgi?id=56818
3633         
3634         * Introduced USE(UNIFIED_TEXT_CHECKING), USE(GRAMMAR_CHECKING) and USE(AUTOMATIC_TEXT_REPLACEMENT)
3635         * Replaced a part of of BUILDING_ON_* conditionals with them.
3636
3637         Note that small amount of code path on Editor.cpp is now compiled under USE(GRAMMAR_CHECKING)
3638         because these code path is already built under non-Mac ports and
3639         Keeping them buildable for such platforms reduces the build breakage risk.
3640         These path is guarded by Settings thus should never get reached.
3641
3642         No new tests. No behavioral change.
3643
3644         * WebCore.gypi:
3645         * WebCore.pro:
3646         * WebCore.vcproj/WebCore.vcproj:
3647         * WebCore.xcodeproj/project.pbxproj:
3648         * editing/Editor.cpp:
3649         (WebCore::Editor::advanceToNextMisspelling):
3650         (WebCore::Editor::isSelectionUngrammatical):
3651         (WebCore::Editor::guessesForUngrammaticalSelection):
3652         (WebCore::Editor::guessesForMisspelledOrUngrammaticalSelection):
3653         (WebCore::Editor::markMisspellingsAfterTypingToWord):
3654         (WebCore::Editor::markMisspellingsOrBadGrammar):
3655         (WebCore::Editor::markBadGrammar):
3656         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
3657         (WebCore::Editor::changeBackToReplacedString):
3658         (WebCore::Editor::markMisspellingsAndBadGrammar):
3659         * editing/Editor.h:
3660         * editing/TextCheckingHelper.cpp:
3661         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
3662         (WebCore::TextCheckingHelper::findFirstGrammarDetail):
3663         (WebCore::TextCheckingHelper::findFirstBadGrammar):
3664         (WebCore::TextCheckingHelper::isUngrammatical):
3665         (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
3666         (WebCore::TextCheckingHelper::markAllBadGrammar):
3667         * loader/EmptyClients.h:
3668         * platform/text/TextCheckerClient.h:
3669         * platform/text/TextChecking.h: Added.
3670
3671 2011-03-23  Kent Tamura  <tkent@chromium.org>
3672
3673         Reviewed by Dimitri Glazkov.
3674
3675         [Chromium] Force to make validation bubble DIV position:absolute
3676         https://bugs.webkit.org/show_bug.cgi?id=56901
3677
3678         Test: fast/forms/interactive-validation-crash-by-style-override.html
3679
3680         * html/ValidationMessage.cpp:
3681         (WebCore::ValidationMessage::buildBubbleTree): Add position:absolute
3682           because we need to move the validation message to a good position.
3683         * rendering/RenderMenuList.cpp:
3684         (WebCore::RenderMenuList::addChild):
3685
3686 2011-03-23  Mike Lawther  <mikelawther@chromium.org>
3687
3688         Reviewed by Ojan Vafai.
3689
3690         flex/bison tokens and grammar for CSS calc
3691         https://bugs.webkit.org/show_bug.cgi?id=54412
3692
3693         Tests: css3/calc/calc-errors.html
3694                css3/calc/minmax-errors.html
3695                css3/calc/simple-calcs.html
3696                css3/calc/simple-minmax.html
3697
3698         * css/CSSGrammar.y:
3699         * css/CSSParserValues.cpp:
3700         (WebCore::CSSParserValueList::insertValueAt):
3701         (WebCore::CSSParserValueList::extend):
3702         * css/CSSParserValues.h:
3703         * css/tokenizer.flex:
3704
3705 2011-03-23  Adam Klein  <adamk@chromium.org>
3706
3707         Reviewed by David Levin.
3708
3709         Fix resolveLocalFileSystemURL (and sync version) error codes to match the spec
3710         https://bugs.webkit.org/show_bug.cgi?id=56961
3711
3712         See error code listing in the Files & Directories spec:
3713         http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#widl-LocalFileSystemSync-resolveLocalFileSystemSyncURL
3714
3715         Note that the spec currently only specifies errors for the sync
3716         version; I've used the same codes for the async version.
3717
3718         * page/DOMWindow.cpp:
3719         (WebCore::DOMWindow::resolveLocalFileSystemURL):
3720         * workers/WorkerContext.cpp:
3721         (WebCore::WorkerContext::resolveLocalFileSystemURL):
3722         (WebCore::WorkerContext::resolveLocalFileSystemSyncURL):
3723
3724 2011-03-23  Jia Pu  <jpu@apple.com>
3725
3726         Reviewed by Darin Adler.
3727
3728         Hook up new AppKit autocorrection UI with WK2.
3729         https://bugs.webkit.org/show_bug.cgi?id=56055
3730         <rdar://problem/8947463>
3731
3732         This patch is to enable WK2 to utilize autocorrection UI on Mac OS X. It contains following
3733         major changes:
3734
3735         1. All but one autocorrection related message is synchronous. Since dismissing autocorrection
3736         panel can potentially cause editing to occur, a synchronous dismissCorrectionPanelSoon() function
3737         is introduced to ensure all editing commands occur in correct order.
3738
3739         2. Additional condition variable is needed to implement dismissCorrectionPanelSoon().
3740         To improve maintainability, CorrectionPanel class is introduced to manage the
3741         internal state related to correction panel. This change is applied to both WK1 and WK2.
3742
3743         3. EditorClient::isShowingCorrectionPanel() has been removed. The original purpose is to allow
3744         editor to know when to handle ESC key event. Now this is handled internally in AppKit, so
3745         EditorClient::isShowingCorrectionPanel() isn't necessary anymore.
3746
3747         4. The Editor* argument in EditorClient::showCorrectionPanel() has been removed, since we can
3748         access object via WebView or WKView.
3749
3750         * editing/Editor.cpp:
3751         (WebCore::Editor::markMisspellingsAfterTypingToWord):
3752         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
3753         (WebCore::Editor::correctionPanelTimerFired):
3754         (WebCore::Editor::dismissCorrectionPanel):
3755         (WebCore::Editor::dismissCorrectionPanelSoon):
3756         (WebCore::Editor::applyAutocorrectionBeforeTypingIfAppropriate):
3757         * editing/Editor.h:
3758         * editing/EditorCommand.cpp:
3759         (WebCore::createCommandMap):
3760         * loader/EmptyClients.h:
3761         (WebCore::EmptyEditorClient::showCorrectionPanel):
3762         (WebCore::EmptyEditorClient::dismissCorrectionPanelSoon):
3763         * manual-tests/autocorrection/close-window-when-correction-is-shown.html: Added.
3764         * page/EditorClient.h:
3765
3766 2011-03-22  Ojan Vafai  <ojan@chromium.org>
3767
3768         Reviewed by Antti Koivisto.
3769
3770         move :not over to using selectorList instead of simpleSelector
3771         https://bugs.webkit.org/show_bug.cgi?id=56894
3772
3773         Saves memory and simplifies code.
3774
3775         No new tests since existing tests cover this code.
3776
3777         * css/CSSGrammar.y:
3778         Also removed extranenous calls to updateLastSelectorLineAndPosition in
3779         simple_selector_list. These happened to work, but are only actually
3780         needed in selector_list.
3781         * css/CSSParserValues.h:
3782         * css/CSSSelector.cpp:
3783         (WebCore::CSSSelector::specificityForOneSelector):
3784         Removed null-check. The parser null-checks, I don't see why we need to here.
3785         (WebCore::CSSSelector::selectorText):
3786         Ditto.
3787         (WebCore::CSSSelector::setArgument):
3788         (WebCore::CSSSelector::isSimple):
3789         * css/CSSSelector.h:
3790         * css/CSSSelectorList.cpp:
3791         (WebCore::forEachTagSelector):
3792         * css/CSSStyleSelector.cpp:
3793         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
3794         (WebCore::collectFeaturesFromSelector):
3795         (WebCore::collectFeaturesFromList):
3796
3797 2011-03-23  Carol Szabo  <carol.szabo@nokia.com>
3798
3799         Reviewed by David Hyatt.
3800
3801         Made sure that renderers displaying counters are invalidated upon
3802         counter destruction.
3803
3804         Assertion and incorrect rendering of counters.
3805         https://bugs.webkit.org/show_bug.cgi?id=56896
3806
3807         Test: fast/css/counters/2displays.html
3808
3809         * rendering/CounterNode.cpp:
3810         (WebCore::CounterNode::~CounterNode):
3811         Added to make sure that its display renderers are always reset when
3812         the node is deleted.
3813         (WebCore::CounterNode::resetRenderers):
3814         Fixed bug that would prevent reset of second and subsequent
3815         display renderers.
3816         * rendering/CounterNode.h:
3817         * rendering/RenderCounter.cpp:
3818         (WebCore::destroyCounterNodeWithoutMapRemoval):
3819         removed unnecessary calls to resetRenderers() as the CounterNode
3820         destructor takes care of that now.
3821
3822 2011-03-23  Brian Weinstein  <bweinstein@apple.com>
3823
3824         Reviewed by Maciej Stachowiak.
3825
3826         WebKit2: Need API to manage the Media Cache
3827         https://bugs.webkit.org/show_bug.cgi?id=56878
3828         <rdar://problem/9082503>
3829
3830         Add functions that need to be exported.
3831
3832         * WebCore.exp.in:
3833
3834 2011-03-23  Robert Kroeger  <rjkroege@chromium.org>
3835
3836         Reviewed by James Robinson.
3837
3838         Correct use of ENABLE() Macro
3839
3840         In http://trac.webkit.org/changeset/81618, I mis-used the ENABLE()
3841         macro. This patch corrects.
3842
3843         https://bugs.webkit.org/show_bug.cgi?id=56964
3844
3845         * page/EventHandler.cpp:
3846         (WebCore::EventHandler::EventHandler):
3847         (WebCore::EventHandler::handleTouchEvent):
3848         * page/EventHandler.h:
3849
3850 2011-03-23  Jer Noble  <jer.noble@apple.com>
3851
3852         Reviewed by Simon Fraser.
3853
3854         Scrubbing <video> with HTTP Live Stream resizes element to 0x0
3855         https://bugs.webkit.org/show_bug.cgi?id=55702
3856
3857         QTKit will occasionally set the natural size of a QTMovie to 0x0 while scrubbing
3858         an HTTP Live Stream.  So we will cache the last valid value returned by QTKit
3859         and use that as our naturalSize until a new valid value is returned.
3860
3861         Unfortunately, QTKit will also fail to generate a notification when the natural size
3862         changes, so we are forced to cache the natural size from within naturalSize(), which
3863         is a const function, necessitating a const_cast to set m_cachedNaturalSize.
3864
3865         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Added m_cachedNaturalSize.
3866         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3867         (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit): Initialize m_cachedNaturalSize.
3868         (WebCore::MediaPlayerPrivateQTKit::naturalSize): 
3869
3870 2011-03-23  Alexey Proskuryakov  <ap@apple.com>
3871
3872         Build fix.
3873
3874         * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3875         Removed a stray parenthesis.
3876
3877 2011-03-23  Alexey Proskuryakov  <ap@apple.com>
3878
3879         Reviewed by Maciej Stachowiak.
3880
3881         REGRESSION: Infinite recursion in recursiveCheckLoadComplete()/checkLoadCompleteForThisFrame()/stopLoading()
3882         https://bugs.webkit.org/show_bug.cgi?id=56978
3883         <rdar://problem/9041670>
3884
3885         No new tests, because there is no known way to reproduce.
3886
3887         Removed strange code that was trying to stop a non-loading provisional document loader and
3888         even its subframes (?!). Added assertions to catch it if we can actually be loading here in
3889         some sense.
3890         Rewrote a condition for clarity - starting with r43148, it was acting as an opposite of a
3891         recursion guard (but that didn't cause immediate problems then).
3892
3893         * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3894
3895 2011-03-23  Brady Eidson  <beidson@apple.com>
3896
3897         Attempt to fix the build for platforms that have the icon database 
3898         disabled but still provide settings API for it...?
3899
3900         * loader/icon/IconDatabase.h:
3901         (WebCore::IconDatabase::defaultDatabaseFilename):
3902
3903 2011-03-23  Mark Rowe  <mrowe@apple.com>
3904
3905         Fix the build.
3906
3907         * WebCore.exp.in: Export the new version of IconDatabase::open.
3908
3909 2011-03-23  Brady Eidson  <beidson@apple.com>
3910
3911         Reviewed by Sam Weinig.
3912
3913         Change IconDatabase opening to allow for arbitrary filenames
3914         https://bugs.webkit.org/show_bug.cgi?id=56977
3915
3916         * WebCore.exp.in:
3917         * loader/icon/IconDatabase.cpp:
3918         (WebCore::IconDatabase::open):
3919         * loader/icon/IconDatabase.h:
3920         * loader/icon/IconDatabaseBase.cpp:
3921         (WebCore::IconDatabaseBase::open):
3922         * loader/icon/IconDatabaseBase.h:
3923         * loader/icon/IconDatabaseClient.h:
3924
3925 2011-03-23  Kenneth Russell  <kbr@google.com>
3926
3927         Reviewed by James Robinson.
3928
3929         [chromium] WebGLRenderingContext and other DOMWindow properties should remain if WebGL is disabled
3930         https://bugs.webkit.org/show_bug.cgi?id=56947
3931
3932         Removed the RuntimeEnabledFeatures setting for WebGL and the
3933         EnabledAtRuntime extended attribute from the WebGL-related
3934         properties on the DOMWindow. WebGL support is now controlled
3935         exclusively through the page's Settings.
3936
3937         No new tests; tested manually in Chromium with --disable-webgl
3938         command line argument and blacklist.
3939
3940         * bindings/generic/RuntimeEnabledFeatures.cpp:
3941         * bindings/generic/RuntimeEnabledFeatures.h:
3942         * page/DOMWindow.idl:
3943
3944 2011-03-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3945
3946         Unreviewed, rolling out r81802.
3947         http://trac.webkit.org/changeset/81802
3948         https://bugs.webkit.org/show_bug.cgi?id=56963
3949
3950         Broke a layout test, and this fix is not trivial. (Requested
3951         by dhyatt on #webkit).
3952
3953         * rendering/RenderBlock.cpp:
3954         (WebCore::RenderBlock::layoutBlock):
3955         (WebCore::RenderBlock::layoutOnlyPositionedObjects):
3956         * rendering/RenderBlock.h:
3957         * rendering/RenderBox.cpp:
3958         (WebCore::RenderBox::styleDidChange):
3959         * rendering/RenderBoxModelObject.cpp:
3960         (WebCore::RenderBoxModelObject::styleWillChange):
3961         * rendering/RenderFlexibleBox.cpp:
3962         (WebCore::RenderFlexibleBox::layoutBlock):
3963         * rendering/RenderObject.cpp:
3964         (WebCore::RenderObject::RenderObject):
3965         (WebCore::RenderObject::adjustStyleDifference):
3966         (WebCore::RenderObject::setStyle):
3967         (WebCore::RenderObject::styleDidChange):
3968         * rendering/RenderObject.h:
3969         (WebCore::RenderObject::needsLayout):
3970         (WebCore::RenderObject::needsPositionedMovementLayoutOnly):
3971         (WebCore::RenderObject::setNeedsLayout):
3972         (WebCore::RenderObject::setChildNeedsLayout):
3973         (WebCore::RenderObject::markContainingBlocksForLayout):
3974         * rendering/RenderTable.cpp:
3975         (WebCore::RenderTable::layout):
3976         * rendering/style/RenderStyle.cpp:
3977         (WebCore::RenderStyle::diff):
3978         * rendering/style/RenderStyleConstants.h:
3979         * rendering/svg/RenderSVGText.cpp:
3980         (WebCore::RenderSVGText::layout):
3981
3982 2011-03-23  Luiz Agostini  <luiz.agostini@openbossa.org>
3983
3984         Reviewed by David Hyatt.
3985
3986         REGRESSION(81035): crash in RenderDetails::removeChild
3987         https://bugs.webkit.org/show_bug.cgi?id=56773
3988
3989         Test: fast/html/details-children-merge-crash.html
3990
3991         Preventing merging of RenderDetails's anonymous children.
3992
3993         * rendering/RenderBlock.cpp:
3994         (WebCore::canMergeContiguousAnonymousBlocks):
3995
3996         Fixing RenderDetails::removeChild and cleaning m_marker in RenderDetails::destroy.
3997
3998         * rendering/RenderDetails.cpp:
3999         (WebCore::RenderDetails::destroy):
4000         (WebCore::RenderDetails::removeChild):
4001
4002 2011-03-23  Xiaomei Ji  <xji@chromium.org>
4003
4004         Reviewed by David Hyatt.
4005
4006         Preserve unicode-bidi:bidi-override in anonymous block.
4007         https://bugs.webkit.org/show_bug.cgi?id=21440
4008
4009         unicode-bidi:bidi-override should be preserved in anonymous block
4010         according to http://www.w3.org/TR/CSS21/visuren.html#propdef-unicode-bidi.
4011
4012         Introduce a helper function RenderStyle()::createAnonymousStyle() which
4013         creates a default RenderStyle, inherits the inherited style from parent,
4014         and inherit unicode-bidi:bidi-override from parent.
4015         And replace the style creation when anonymous block is created.
4016
4017         Note: the TABLE releated anonymous blocks are untouched, including:
4018         TABLE, TABLE_CELL, TABLE_ROW, TABLE_ROW_GROUP anonymous blocks created in
4019         RenderObject, RenderTable, RenderTableRow, and RenderTableSection,
4020         due to the expected behavior is not clear.
4021         Please refer to https://bugs.webkit.org/show_bug.cgi?id=56594.
4022         
4023         Test: fast/css/bidi-override-in-anonymous-block.html
4024
4025         * rendering/RenderBlock.cpp:
4026         (WebCore::RenderBlock::styleDidChange):
4027         (WebCore::RenderBlock::removeChild):
4028         (WebCore::RenderBlock::createAnonymousBlock):
4029         (WebCore::RenderBlock::createAnonymousColumnsBlock):
4030         (WebCore::RenderBlock::createAnonymousColumnSpanBlock):
4031         * rendering/RenderInline.cpp:
4032         (WebCore::RenderInline::addChildIgnoringContinuation):
4033         * rendering/RenderRubyRun.cpp:
4034         (WebCore::RenderRubyRun::createRubyBase):
4035         (WebCore::RenderRubyRun::staticCreateRubyRun):
4036         * rendering/style/RenderStyle.cpp:
4037         (WebCore::RenderStyle::createAnonymousStyle):
4038         * rendering/style/RenderStyle.h:
4039