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