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