Source/WebCore: Crash due to bad data in SVGDocumentExtensions m_pendingResources
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-09-10  Ken Buchanan <kenrb@chromium.org>
2
3         Crash due to bad data in SVGDocumentExtensions m_pendingResources
4         https://bugs.webkit.org/show_bug.cgi?id=67488
5
6         Reviewed by Nikolas Zimmermann.
7
8         Resolving a crash condition caused by the deletion of
9         elements while pending resource entries for those elements are still
10         recorded.
11
12         * rendering/svg/RenderSVGResourceContainer.cpp:
13         (WebCore::RenderSVGResourceContainer::registerResource)
14         * svg/SVGDocumentExtensions.h:
15         (WebCore::SVGDocumentExtensions::isElementInPendingResources)
16         * svg/SVGDocumentExtensions.cpp:
17         (WebCore::SVGDocumentExtensions::addPendingResource)
18         (WebCore::SVGDocumentExtensions::isElementInPendingResources)
19         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources)
20         * svg/SVGStyledElement.h:
21         (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible)
22         * svg/SVGStyledElement.cpp:
23         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded)
24         (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible)
25         * svg/SVGUseElement.cpp:
26         (WebCore::SVGUseElement::svgAttributeChanged)
27
28 2011-09-10  Adam Barth  <abarth@webkit.org>
29
30         Remove DocumentWriter::deprecatedFrameEncoding()
31         https://bugs.webkit.org/show_bug.cgi?id=67882
32
33         Reviewed by Eric Seidel.
34
35         Three years ago, in http://trac.webkit.org/changeset/39026, Alexey
36         Proskuryakov added ContentDispositionEncodingFallbackArray to work
37         around a web site compatibility issue with a non-ASCII file name
38         becoming garbled when received in the Content-Disposition header.
39
40         Since that time, there has been copious discussion of this topic among
41         browser vendors, in the IETF, and in the broader web community.  For
42         example, here is a Stack Overflow thread about this topic:
43
44         http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http
45
46         Eric Lawrence has written a blog post that summarizes IE's perspective
47         on this issue:
48
49         http://blogs.msdn.com/b/ieinternals/archive/2010/06/07/content-disposition-attachment-and-international-unicode-characters.aspx
50
51         The current consensus is that browsers should implement RFC 6266,
52         which is a new RFC that updates the definition of the
53         Content-Disposition header.  Chrome and Firefox have both implemented
54         RFC 6266 and have encountered only one issue, which was then fixed by
55         the web site operator.  IE has also implemented RFC 6266, but I don't
56         have detailed information about their compatibility experience.
57
58         This patch add explicit PLATFORM #ifdefs around the quirky
59         implementation previously used in Apple's Mac and Windows ports.  This
60         code is already only used on Apple's ports, so this patch introduces no
61         functional changes.  It does, however, discourage other ports from
62         adopting this quirk.  IMHO, Apple should remove this quirk as soon as
63         compatibility allows and converge behavior with the other major browser
64         vendors.
65
66         See bug for manual test (the bug manifests in Safari download UI).
67
68         * loader/DocumentWriter.cpp:
69         * loader/DocumentWriter.h:
70         * loader/FrameLoader.cpp:
71         (WebCore::FrameLoader::addExtraFieldsToRequest):
72         * platform/network/ResourceRequestBase.cpp:
73         (WebCore::ResourceRequestBase::adopt):
74         (WebCore::ResourceRequestBase::copyData):
75         * platform/network/ResourceRequestBase.h:
76
77 2011-09-09  Beth Dakin  <bdakin@apple.com>
78
79         Attempted Leopard build fix.
80
81         * rendering/RenderImage.cpp:
82         (WebCore::RenderImage::paintReplaced):
83         * rendering/RenderLayer.cpp:
84         (WebCore::RenderLayer::drawPlatformResizerImage):
85
86 2011-09-09  Beth Dakin  <bdakin@apple.com>
87
88         Fix for https://bugs.webkit.org/show_bug.cgi?id=67819
89         Use high resolution platform images when the deviceScaleFactor > 1
90         -and corresponding-
91         <rdar://problem/10003098>
92
93         Reviewed by Darin Adler.
94
95         Add all of the new high resolution images. I also removed some tiffs from the 
96         project and replaced them with png equivalents (that are already checked into 
97         WebCore anyway). Since the high resolution images are pngs, it makes sense to use 
98         pngs for all of the images that load through Image::loadPlatformResource()
99         * WebCore.xcodeproj/project.pbxproj:
100         * platform/graphics/mac/ImageMac.mm:
101         (WebCore::Image::loadPlatformResource):
102
103         Load the @2x resource for deviceScaleFactors >= 2.
104         * editing/DeleteButtonController.cpp:
105         (WebCore::DeleteButtonController::createDeletionUI):
106
107         CachedImage::brokenImage() is no longer a static helper function, but a real 
108         member function. It also now loads the @2x resource for deviceScaleFactors >= 2 
109         and takes a parameter for the deviceScaleFactor. When CachedImage::image() returns 
110         the brokenImage(), it just returns the 1x version. brokenImage() has to be called 
111         directly to reliably return the deviceScaleFactor-appropriate resource.
112         * loader/cache/CachedImage.cpp:
113         (WebCore::CachedImage::brokenImage):
114         (WebCore::CachedImage::image):
115         * loader/cache/CachedImage.h:
116         * rendering/RenderLayer.cpp:
117         (WebCore::RenderLayer::drawPlatformResizerImage):
118         (WebCore::RenderLayer::paintResizer):
119         * rendering/RenderLayer.h:
120
121         New static function to retrieve the deviceScaleFactor for callers that do not have 
122         direct access to a Page.
123         * page/Page.cpp:
124         (WebCore::Page::deviceScaleFactor):
125         * page/Page.h:
126
127         Call CachedImage::brokenImage() for the broken-image image at an accurate 
128         resolution.
129         * rendering/RenderImage.cpp:
130         (WebCore::RenderImage::imageSizeForError):
131         (WebCore::RenderImage::paintReplaced):
132
133 2011-09-09  Erik Arvidsson  <arv@chromium.org>
134
135         Move Element.contains to Node
136         https://bugs.webkit.org/show_bug.cgi?id=67651
137
138         Reviewed by Darin Adler.
139
140         This moves the contains method from Element to Node as in the DOM4 working draft: 
141         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-contains
142
143         This also special cases Document contains to make it O(1) instead of O(depth).
144
145         Tests: fast/dom/Node/contains-method.html
146                perf/document-contains.html
147
148         * bindings/objc/PublicDOMInterfaces.h: Move contains from DOMElement to DOMNode.
149         * dom/Element.idl:
150         * dom/Node.cpp:
151         (WebCore::Node::contains): Added document special case.
152         * dom/Node.idl:
153         * editing/DeleteSelectionCommand.cpp:
154         (WebCore::DeleteSelectionCommand::mergeParagraphs): Added a null check.
155
156 2011-09-09  Tim Horton  <timothy_horton@apple.com>
157
158         Text rendered with a simple (i.e. 0px blur) shadow inside a transparency layer has a double shadow
159         https://bugs.webkit.org/show_bug.cgi?id=67543
160         <rdar://problem/10070536>
161
162         Reviewed by Darin Adler.
163
164         Generalize (begin|end)TransparencyLayer, which now forward
165         through to (begin|end)PlatformTransparencyLayer, so that
166         isInTransparencyLayer can exist on every platform.
167
168         Make use of isInTransparencyLayer in FontMac to disable
169         "simple" shadow drawing when the text is being rendered
170         into a transparency layer.
171
172         Test: svg/custom/simple-text-double-shadow.svg
173
174         * platform/graphics/GraphicsContext.cpp:
175         (WebCore::GraphicsContext::GraphicsContext):
176         (WebCore::GraphicsContext::~GraphicsContext):
177         (WebCore::GraphicsContext::beginTransparencyLayer):
178         (WebCore::GraphicsContext::endTransparencyLayer):
179         (WebCore::GraphicsContext::isInTransparencyLayer):
180         * platform/graphics/GraphicsContext.h:
181         * platform/graphics/cairo/GraphicsContextCairo.cpp:
182         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
183         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
184         (WebCore::GraphicsContext::supportsTransparencyLayers):
185         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
186         * platform/graphics/cg/GraphicsContextCG.cpp:
187         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
188         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
189         (WebCore::GraphicsContext::supportsTransparencyLayers):
190         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
191         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
192         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
193         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
194         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
195         (WebCore::GraphicsContext::supportsTransparencyLayers):
196         * platform/graphics/mac/FontMac.mm:
197         (WebCore::Font::drawGlyphs):
198         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
199         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
200         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
201         (WebCore::GraphicsContext::supportsTransparencyLayers):
202         * platform/graphics/qt/GraphicsContextQt.cpp:
203         (WebCore::GraphicsContext::isInTransparencyLayer):
204         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
205         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
206         (WebCore::GraphicsContext::supportsTransparencyLayers):
207         * platform/graphics/skia/GraphicsContextSkia.cpp:
208         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
209         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
210         (WebCore::GraphicsContext::supportsTransparencyLayers):
211         * platform/graphics/win/FontCGWin.cpp:
212         (WebCore::drawGDIGlyphs):
213         * platform/graphics/win/GraphicsContextCGWin.cpp:
214         (WebCore::GraphicsContext::releaseWindowsContext):
215         * platform/graphics/win/GraphicsContextCairoWin.cpp:
216         (WebCore::GraphicsContext::releaseWindowsContext):
217         * platform/graphics/win/GraphicsContextWin.cpp:
218         (WebCore::GraphicsContext::getWindowsContext):
219         * platform/graphics/wince/GraphicsContextWinCE.cpp:
220         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
221         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
222         (WebCore::GraphicsContext::supportsTransparencyLayers):
223         * platform/graphics/wx/GraphicsContextWx.cpp:
224         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
225         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
226         (WebCore::GraphicsContext::supportsTransparencyLayers):
227         * platform/win/ScrollbarThemeWin.cpp:
228         * plugins/win/PluginViewWin.cpp:
229         * rendering/RenderThemeWin.cpp:
230
231 2011-09-09  Julien Chaffraix  <jchaffraix@webkit.org>
232
233         [V8] V8WebKitPoint::constructorCallback leaks
234         https://bugs.webkit.org/show_bug.cgi?id=67865
235
236         Reviewed by Adam Barth.
237
238         Covered by fast/js/instanceof-XMLHttpRequest.html under Valgrind.
239
240         * bindings/v8/custom/V8WebKitPointConstructor.cpp:
241         (WebCore::V8WebKitPoint::constructorCallback): Changed the code
242         to use a RefPtr (per our usual style). Also use toV8 that will
243         take care of properly wrapping the object.
244
245 2011-09-09  Chris Rogers  <crogers@google.com>
246
247         HRTFDatabaseLoader should not call WTF::waitForThreadCompletion() more than once
248         https://bugs.webkit.org/show_bug.cgi?id=67866
249
250         Reviewed by David Levin.
251
252         No new tests since this is difficult to test.
253         This is designed to fix existing webaudio layout test failures.
254
255         * platform/audio/HRTFDatabaseLoader.cpp:
256         (WebCore::HRTFDatabaseLoader::HRTFDatabaseLoader):
257         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
258         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
259         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
260         * platform/audio/HRTFDatabaseLoader.h:
261
262 2011-09-09  Jessie Berlin  <jberlin@apple.com>
263
264         Cookies are not available after turning off Private Browsing after the last window has been
265         closed.
266         https://bugs.webkit.org/show_bug.cgi?id=67874
267
268         Reviewed by Darin Adler.
269
270         The private browsing storage session is a global setting that is being incorrectly set on a
271         per-page basis (see http://webkit.org/b/67870).
272
273         In this case, the global value was getting out of sync with the per-page setting:
274         1. The global value was getting set to true when setPrivateBrowsingEnabled(true) was called.
275         2. All Pages were then closed, destroying their Settings objects.
276         3. When a new Page was created, a new Settings object was created and its
277            m_privateBrowsingEnabled value was getting set to false.
278         4. The WebPage settings were then applied to the new Settings object, resulting in
279            setPrivateBrowsingEnabled(false) to be called.
280         5. An if (m_privateBrowsingEnabled == privateBrowsingEnabled) early return prevented the
281            global value for the storage session from being destroyed.
282
283         * page/Settings.cpp:
284         (WebCore::Settings::setPrivateBrowsingEnabled):
285         Move the early return to be after setting the global private browsing values, and add a
286         clearer comment + FIXME.
287
288 2011-09-09  Kentaro Hara  <haraken@google.com>
289
290         Generate a WebKitCSSMatrix constructor of V8 using the IDL 'Constructor' extended attribute
291         https://bugs.webkit.org/show_bug.cgi?id=67458
292
293         Reviewed by Adam Barth.
294
295         Added a 'CallWithNullValue' extended attribute.
296         If a parameter is optional and missing, 'CallWithDefaultValue'
297         handles it as a string "undefined". On the other hand,
298         'CallWithNullValue' handles it as a null string
299         (Note: not a string "null", but a null string).
300
301         Tests: fast/dom/Window/custom-constructors.html
302                transforms/svg-vs-css.xhtml
303                transforms/cssmatrix-2d-interface.xhtml
304                transforms/cssmatrix-3d-interface.xhtmlGenerate a WebKitCSSMatrix constructor
305
306         * WebCore.gypi: Removed V8WebKitCSSMatrixConstructor.cpp.
307         * WebCore.pro: Removed V8WebKitCSSMatrixConstructor.cpp.
308         * bindings/scripts/CodeGeneratorV8.pm:
309         (GenerateParametersCheck): If the 'CallWithNullValue' extended attribute is set, we call MAYBE_MISSING_PARAMETER() with MissingIsEmpty mode to obtain a maybe missing parameter. Otherwise, we call MAYBE_MISSING_PARAMETER() with MissingIsUndefined mode.
310         (RequiresCustomSignature):
311         * bindings/scripts/test/V8/V8TestInterface.cpp: Updated test results.
312         (WebCore::V8TestInterface::constructorCallback):
313         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: Ditto.
314         (WebCore::TestMediaQueryListListenerInternal::methodCallback):
315         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
316         (WebCore::TestObjInternal::voidMethodWithArgsCallback):
317         (WebCore::TestObjInternal::intMethodWithArgsCallback):
318         (WebCore::TestObjInternal::objMethodWithArgsCallback):
319         (WebCore::TestObjInternal::methodThatRequiresAllArgsCallback):
320         (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback):
321         (WebCore::TestObjInternal::optionsObjectCallback):
322         (WebCore::TestObjInternal::customArgsAndExceptionCallback):
323         (WebCore::TestObjInternal::withDynamicFrameAndArgCallback):
324         (WebCore::TestObjInternal::withDynamicFrameAndOptionalArgCallback):
325         (WebCore::TestObjInternal::withDynamicFrameAndUserGestureCallback):
326         (WebCore::TestObjInternal::withDynamicFrameAndUserGestureASADCallback):
327         (WebCore::TestObjInternal::methodWithOptionalArgCallback):
328         (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback):
329         (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
330         (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback):
331         (WebCore::TestObjInternal::overloadedMethod1Callback):
332         (WebCore::TestObjInternal::overloadedMethod2Callback):
333         (WebCore::TestObjInternal::overloadedMethod3Callback):
334         (WebCore::TestObjInternal::overloadedMethod4Callback):
335         (WebCore::TestObjInternal::classMethodWithOptionalCallback):
336         (WebCore::TestObjInternal::enabledAtRuntimeMethod1Callback):
337         (WebCore::TestObjInternal::enabledAtRuntimeMethod2Callback):
338         * bindings/v8/V8Binding.h:
339         (WebCore::V8ParameterBase::prepareBase): The fact that V8ParameterBase does not have any object means that we do not need to prepare anything, i.e. we should just return true in this case.
340         (WebCore::::prepare): If V8ParameterBase does not have any object, then we set a null string.
341         * bindings/v8/custom/V8BindingMacros.h: MAYBE_MISSING_PARAMETER() returns the parameter of a given index if the parameter exists. If the parameter does not exist and MissingIsUndefined is set, this macro returns an object that represents undefined. If the parameter does not exist and MissingIsEmpty is set, this macro returns an empty object.
342         * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp: Removed.
343         * css/WebKitCSSMatrix.idl: Added the 'Constructor' extended attribute.
344
345 2011-09-09  Geoffrey Garen  <ggaren@apple.com>
346
347         Reviewed by Dan Bernstein.
348
349         Removed ENABLE(SINGLE_THREADED) support, since it is always false
350         https://bugs.webkit.org/show_bug.cgi?id=67862
351
352         Next step toward making the baseline platform assumption that threads exist.
353
354         * WebCore.pri:
355         * features.pri: 
356         * platform/sql/SQLiteDatabase.cpp:
357         (WebCore::SQLiteDatabase::interrupt): Removed now-dead code.
358
359 2011-09-09  Fady Samuel  <fsamuel@chromium.org>
360
361         Move pageScaleFactor code from Frame.{h|cpp} to Page.{h|cpp}
362         https://bugs.webkit.org/show_bug.cgi?id=67250
363
364         Reviewed by Simon Fraser.
365
366         No new tests because there's no change in functionality.
367
368         * WebCore.exp.in:
369         * css/CSSStyleSelector.cpp:
370         (WebCore::CSSStyleSelector::styleForDocument):
371         * dom/Element.cpp:
372         (WebCore::Element::getClientRects):
373         (WebCore::Element::getBoundingClientRect):
374         * dom/Range.cpp:
375         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale):
376         * loader/HistoryController.cpp:
377         (WebCore::HistoryController::restoreScrollPositionAndViewState):
378         * page/Frame.cpp:
379         (WebCore::Frame::Frame):
380         (WebCore::Frame::pageScaleFactor):
381         * page/Frame.h:
382         * page/Page.cpp:
383         (WebCore::Page::Page):
384         (WebCore::Page::setPageScaleFactor):
385         * page/Page.h:
386         (WebCore::Page::pageScaleFactor):
387         * rendering/RenderLayerCompositor.cpp:
388         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
389         (WebCore::RenderLayerCompositor::pageScaleFactor):
390         * rendering/RenderView.cpp:
391         (WebCore::RenderView::paintBoxDecorations):
392
393 2011-09-09  Dominic Mazzoni  <dmazzoni@google.com>
394
395         AX: Images within anchors causes crash
396         https://bugs.webkit.org/show_bug.cgi?id=44149
397
398         Reviewed by Chris Fleizach.
399
400         Fixes the way parent RenderObject of an AccessibilityRenderObject
401         is computed in the presence of adjacent continuations.
402
403         Test: accessibility/div-within-anchors-causes-crash.html
404
405         * accessibility/AccessibilityRenderObject.cpp:
406         (WebCore::AccessibilityRenderObject::renderParentObject):
407
408 2011-09-09  Kulanthaivel Palanichamy  <kulanthaivel@codeaurora.org>
409
410         CSS rules not being applied when a hidden field is inserted between an input[type=checkbox] and a label
411         https://bugs.webkit.org/show_bug.cgi?id=66887
412
413         Reviewed by David Hyatt.
414
415         Test: fast/css/adjacent-sibling-selector.html
416
417         This patch addresses the problem of elements not getting their style recomputed
418         when they are affected by direct adjacent sibling rules and one of their sibling in
419         their corresponding rules is modified dynamically.
420
421         * css/CSSStyleSelector.cpp:
422         (WebCore::CSSStyleSelector::canShareStyleWithElement):
423         (WebCore::parentStylePreventsSharing):
424         * css/SelectorChecker.cpp:
425         (WebCore::SelectorChecker::checkSelector):
426         * dom/Element.cpp:
427         (WebCore::Element::recalcStyle):
428         (WebCore::checkForSiblingStyleChanges):
429         * rendering/style/RenderStyle.cpp:
430         (WebCore::RenderStyle::RenderStyle):
431         * rendering/style/RenderStyle.h:
432         (WebCore::InheritedFlags::affectedByDirectAdjacentRules):
433         (WebCore::InheritedFlags::setAffectedByDirectAdjacentRules):
434
435 2011-09-09  Rafael Antognolli  <antognolli@profusion.mobi>
436
437         Make the EFL port use the correct rendering file.
438         https://bugs.webkit.org/show_bug.cgi?id=66323
439
440         Reviewed by Martin Robinson.
441
442         When compiling with Pango support, the EFL port should use
443         FontPango.cpp instead of FontEfl.cpp (which is just full of stubs).
444
445         No new functionality so no new tests.
446
447         * CMakeListsEfl.txt:
448
449 2011-09-09  Chris Rogers  <crogers@google.com>
450
451         AudioBufferSourceNode must validate AudioBuffer in .buffer attribute setter
452         https://bugs.webkit.org/show_bug.cgi?id=67749
453
454         Reviewed by Kenneth Russell.
455
456         Test: webaudio/audiobuffersource-channels.html
457
458         * WebCore.gypi:
459         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
460         (WebCore::JSAudioBufferSourceNode::setBuffer):
461         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp: Copied from Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp.
462         (WebCore::V8AudioBufferSourceNode::bufferAccessorSetter):
463         * webaudio/AudioBufferSourceNode.cpp:
464         (WebCore::AudioBufferSourceNode::setBuffer):
465         * webaudio/AudioBufferSourceNode.h:
466         * webaudio/AudioBufferSourceNode.idl:
467
468 2011-09-09  Dan Bernstein  <mitz@apple.com>
469
470         RenderBlock::addOverhangingFloats() takes superfluous parameters
471         https://bugs.webkit.org/show_bug.cgi?id=67863
472
473         Reviewed by Dave Hyatt.
474
475         No new tests, because behavior is unchanged.
476
477         * rendering/RenderBlock.cpp:
478         (WebCore::RenderBlock::layoutBlock):
479         (WebCore::RenderBlock::layoutBlockChild):
480         (WebCore::RenderBlock::addOverhangingFloats): Removed the logical{Left, Top}Offset parameters,
481         since they were always the inverse of the logical{Left, Top}() of the child parameter.
482         * rendering/RenderBlock.h:
483
484 2011-09-09  Rafael Antognolli  <antognolli@profusion.mobi>
485
486         Add replacement functions for gdk ones.
487         https://bugs.webkit.org/show_bug.cgi?id=66323
488
489         Reviewed by Martin Robinson.
490
491         This will allow the EFL port to don't depend on gdk anymore.
492
493         No new functionality so no new tests.
494
495         * CMakeListsEfl.txt:
496         * platform/graphics/cairo/CairoUtilities.cpp:
497         (WebCore::appendRegionToCairoContext):
498         * platform/graphics/cairo/CairoUtilities.h:
499         * platform/graphics/pango/FontPango.cpp:
500         (WebCore::drawGlyphsShadow):
501         (WebCore::Font::drawComplexText):
502         * platform/graphics/pango/PangoUtilities.cpp: Added.
503         (WebCore::getLineClipRegionFromLayoutIter):
504         (WebCore::getClipRegionFromPangoLayoutLine):
505         * platform/graphics/pango/PangoUtilities.h: Added.
506
507 2011-09-09  Mark Hahnenberg  <mhahnenberg@apple.com>
508
509         Unzip initialization lists and constructors in JSCell hierarchy (5/7)
510         https://bugs.webkit.org/show_bug.cgi?id=67420
511
512         Reviewed by Geoffrey Garen.
513
514         No new tests.
515
516         Completed the fifth level of the refactoring to add finishCreation() 
517         methods to all classes within the JSCell hierarchy with non-trivial 
518         constructor bodies.
519
520         This primarily consists of pushing the calls to finishCreation() down 
521         into the constructors of the subclasses of the second level of the hierarchy 
522         as well as pulling the finishCreation() calls out into the class's corresponding
523         create() method if it has one.  Doing both simultaneously allows us to 
524         maintain the invariant that the finishCreation() method chain is called exactly 
525         once during the creation of an object, since calling it any other number of 
526         times (0, 2, or more) will cause an assertion failure.
527
528         * WebCore.exp.in:
529         * bindings/js/JSDOMBinding.h:
530         (WebCore::DOMConstructorObject::DOMConstructorObject):
531         * bindings/js/JSDOMGlobalObject.cpp:
532         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
533         (WebCore::JSDOMGlobalObject::finishCreation):
534         * bindings/js/JSDOMGlobalObject.h:
535         * bindings/js/JSDOMWindowShell.cpp:
536         * bindings/js/JSDOMWindowShell.h:
537         (WebCore::JSDOMWindowShell::create):
538         * bindings/js/JSDOMWrapper.h:
539         (WebCore::JSDOMWrapper::JSDOMWrapper):
540         * bindings/scripts/CodeGeneratorJS.pm:
541         (GenerateImplementation):
542         * bindings/scripts/test/JS/JSTestInterface.cpp:
543         (WebCore::JSTestInterface::JSTestInterface):
544         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
545         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
546         * bindings/scripts/test/JS/JSTestObj.cpp:
547         (WebCore::JSTestObj::JSTestObj):
548         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
549         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
550         * bridge/c/CRuntimeObject.cpp:
551         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
552         (JSC::Bindings::CRuntimeObject::finishCreation):
553         * bridge/c/CRuntimeObject.h:
554         * bridge/jni/jsc/JavaRuntimeObject.cpp:
555         (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
556         (JSC::Bindings::JavaRuntimeObject::finishCreation):
557         * bridge/jni/jsc/JavaRuntimeObject.h:
558         * bridge/objc/ObjCRuntimeObject.h:
559         * bridge/objc/ObjCRuntimeObject.mm:
560         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
561         (JSC::Bindings::ObjCRuntimeObject::finishCreation):
562         * bridge/objc/objc_runtime.h:
563         (JSC::Bindings::ObjcFallbackObjectImp::create):
564         * bridge/objc/objc_runtime.mm:
565         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
566         * bridge/qt/qt_instance.cpp:
567         (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
568         * bridge/qt/qt_pixmapruntime.cpp:
569         (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
570         * bridge/qt/qt_runtime.cpp:
571         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
572         (JSC::Bindings::QtRuntimeMethod::finishCreation):
573         * bridge/qt/qt_runtime.h:
574         * bridge/runtime_array.cpp:
575         (JSC::RuntimeArray::RuntimeArray):
576         * bridge/runtime_array.h:
577         (JSC::RuntimeArray::create):
578         * bridge/runtime_method.cpp:
579         (JSC::RuntimeMethod::RuntimeMethod):
580         (JSC::RuntimeMethod::finishCreation):
581         * bridge/runtime_method.h:
582         * bridge/runtime_object.cpp:
583         (JSC::Bindings::RuntimeObject::RuntimeObject):
584         * bridge/runtime_object.h:
585         (JSC::Bindings::RuntimeObject::create):
586
587 2011-09-09  Rafael Antognolli  <antognolli@profusion.mobi>
588
589         Rename FontGtk.cpp to FontPango.cpp
590         https://bugs.webkit.org/show_bug.cgi?id=66323
591
592         Reviewed by Martin Robinson.
593
594         This file will be used by the EFL port too, and since it's not GTK
595         specific anymore, rename it to something better.
596
597         No new functionality so no new tests.
598
599         * GNUmakefile.list.am:
600         * platform/graphics/pango/FontPango.cpp: Renamed from Source/WebCore/platform/graphics/gtk/FontGtk.cpp.
601
602 2011-09-09  Adam Klein  <adamk@chromium.org>
603
604         Initialize ExceptionCode in Element::removeAttribute
605         https://bugs.webkit.org/show_bug.cgi?id=67820
606
607         Reviewed by Darin Adler.
608
609         Silences valgrind warning reported in http://crbug.com/76490.
610
611         No new tests since this would only very occasionally be flaky,
612         and in the codepath in the valgrind report, the ec is ignored anyway.
613
614         * dom/Element.cpp:
615         (WebCore::Element::removeAttribute): Initialize ec to 0.
616
617 2011-09-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
618
619         [Qt] Remove common.pri
620         https://bugs.webkit.org/show_bug.cgi?id=67814
621
622         Reviewed by Andreas Kling.
623
624         No new tests, no change in functionality.
625
626         * CodeGenerators.pri:
627         * WebCore.pri:
628
629 2011-09-09  Dominic Mazzoni  <dmazzoni@google.com>
630
631         Assert being hit in AccessibilityRenderObject::addChildren()
632         https://bugs.webkit.org/show_bug.cgi?id=61805
633
634         Reviewed by Chris Fleizach.
635
636         Fix nextSibling and previousSibling to handle adjacent continuations
637         properly, otherwise nodes end up appearing in the accessibility
638         tree twice (or a debug assertion could be raised).
639
640         Test: accessibility/adjacent-continuations-cause-assertion-failure.html
641
642         * accessibility/AccessibilityRenderObject.cpp:
643         (WebCore::AccessibilityRenderObject::previousSibling):
644         (WebCore::AccessibilityRenderObject::nextSibling):
645
646 2011-09-08  Kentaro Hara  <haraken@google.com>
647
648         Implement a WebKitAnimationEvent constructor.
649         https://bugs.webkit.org/show_bug.cgi?id=67825
650
651         Reviewed by Sam Weinig.
652
653         There is no spec for the WebKitAnimationEvent constructor
654         since it is WebKit-specific. However, based on the current
655         IDL of initWebKitAnimationEvent(), the constructor IDL
656         should be as follows.
657
658         [Constructor(DOMString type, optional WebKitAnimationEventInit eventInitDict)]
659         interface WebKitAnimationEvent : Event {
660             ...;
661         }
662
663         dictionary WebKitAnimationEventInit : EventInit {
664             DOMString animationName;
665             double elapsedTime;
666         }
667
668         Test: fast/events/constructors/webkit-animation-event-constructor.html
669
670         * bindings/generic/EventConstructors.h: Added a definition for the WebKitAnimationEvent constructor.
671         * bindings/js/JSEventConstructors.cpp: Added #includes for WebKitAnimationEvent.
672         * dom/WebKitAnimationEvent.cpp:
673         (WebCore::WebKitAnimationEventInit::WebKitAnimationEventInit):
674         (WebCore::WebKitAnimationEvent::WebKitAnimationEvent):
675         * dom/WebKitAnimationEvent.h: Added a definition for WebKitAnimationEventInit.
676         (WebCore::WebKitAnimationEvent::create):
677         * dom/WebKitAnimationEvent.idl: Makes WebKitAnimationEvent constructible.
678
679 2011-09-08  Abhishek Arya  <inferno@chromium.org>
680
681         :before content rendering issues with list markers and run-ins.
682         https://bugs.webkit.org/show_bug.cgi?id=67735
683
684         1) Remove the isAnonymous checks for run-in detection since the
685         run-in can belong to a node.
686         2) When the parent has block children, then the list marker will
687         be enclosed in an anonymous block. In that case, for going to the
688         next list marker, we need to traverse one level up. We don't need
689         this check when searching for generated run-in (loop 2), since we
690         know parent will have inline children, so the list marker wont be
691         enclosed in an anonymous block.
692
693         Reviewed by Dave Hyatt.
694
695         Tests: fast/lists/list-marker-before-content-table.html
696                fast/runin/runin-generated-before-content.html
697
698         * rendering/RenderObjectChildList.cpp:
699         (WebCore::RenderObjectChildList::beforePseudoElementRenderer):
700
701 2011-09-09  Pavel Podivilov  <podivilov@chromium.org>
702
703         Web Inspector: introduce JavaScriptSourceFrame class.
704         https://bugs.webkit.org/show_bug.cgi?id=67838
705
706         SourceFrame should not deal with JavaScript debugging since it is a base class for all source frame implementations.
707
708         Reviewed by Pavel Feldman.
709
710         * WebCore.gypi:
711         * WebCore.vcproj/WebCore.vcproj:
712         * inspector/front-end/JavaScriptSourceFrame.js: Added.
713         (WebInspector.JavaScriptSourceFrame):
714         (WebInspector.SourceFrameDelegateForScriptsPanel): moved from ScriptsPanel.js
715         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent):
716         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggingSupported):
717         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setBreakpoint):
718         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.updateBreakpoint):
719         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.removeBreakpoint):
720         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.findBreakpoint):
721         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.continueToLine):
722         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.canEditScriptSource):
723         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSource):
724         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSourceIsBeingEdited):
725         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggerPaused):
726         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame):
727         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.releaseEvaluationResult):
728         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName):
729         * inspector/front-end/ScriptsPanel.js:
730         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
731         * inspector/front-end/WebKit.qrc:
732         * inspector/front-end/inspector.html:
733
734 2011-09-09  Sheriff Bot  <webkit.review.bot@gmail.com>
735
736         Unreviewed, rolling out r94845.
737         http://trac.webkit.org/changeset/94845
738         https://bugs.webkit.org/show_bug.cgi?id=67839
739
740         This patch kicked Qt-SL bots, but we don't need this
741         modification. (Requested by ossy_ on #webkit).
742
743         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
744         * platform/mac/WebVideoFullscreenController.mm:
745         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
746
747 2011-09-09  Csaba Osztrogonác  <ossy@webkit.org>
748
749         [Qt][Mac]REGRESSION(r94774): Build is broken
750         https://bugs.webkit.org/show_bug.cgi?id=67799
751
752         It seems these files didn't rebuilt because of a
753         dependency bug. Touch them to trigger a rebuild.
754
755         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
756         * platform/mac/WebVideoFullscreenController.mm:
757         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
758
759 2011-09-09  Alexander Pavlov  <apavlov@chromium.org>
760
761         Unreviewed, Chromium valgrind build fix.
762
763         Web Inspector: [Chromium] Valgrind signals use of uninitialized field in InspectorStyleSheetForInlineStyle
764         https://bugs.webkit.org/show_bug.cgi?id=67837
765
766         * inspector/InspectorStyleSheet.cpp:
767         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
768
769 2011-09-09  Sheriff Bot  <webkit.review.bot@gmail.com>
770
771         Unreviewed, rolling out r94536.
772         http://trac.webkit.org/changeset/94536
773         https://bugs.webkit.org/show_bug.cgi?id=67836
774
775         breaks absoluteLocation() of RelatedMouseEvent (Requested by
776         jknotten on #webkit).
777
778         * dom/MouseRelatedEvent.cpp:
779         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
780
781 2011-09-08  Alexander Pavlov  <apavlov@chromium.org>
782
783         Web Inspector: live edit both for JS and CSS is not discoverable.
784         https://bugs.webkit.org/show_bug.cgi?id=65962
785
786         Add the "Edit" button to SourceFrame, so that resources/scripts can be edited both in the
787         Resources and the Scripts panels. The button is grayed out if the resource/script is not editable.
788
789         Reviewed by Yury Semikhatsky.
790
791         * inspector/front-end/Images/statusbarButtonGlyphs.png:
792         * inspector/front-end/ResourceView.js:
793         (WebInspector.EditableResourceSourceFrame.prototype.canEditSource):
794         * inspector/front-end/ScriptsPanel.js:
795         (WebInspector.ScriptsPanel.prototype.get statusBarItems):
796         (WebInspector.ScriptsPanel.prototype.set visibleView):
797         * inspector/front-end/SourceFrame.js:
798         (WebInspector.SourceFrame):
799         (WebInspector.SourceFrame.prototype.get statusBarItems):
800         (WebInspector.SourceFrame.prototype._initializeTextViewer):
801         (WebInspector.SourceFrame.prototype._editButtonClicked):
802         (WebInspector.SourceFrame.prototype.canEditSource):
803         (WebInspector.SourceFrame.prototype.startEditing):
804         (WebInspector.SourceFrame.prototype.commitEditing):
805         (WebInspector.SourceFrame.prototype._setReadOnly):
806         (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick):
807         * inspector/front-end/TextViewer.js:
808         (WebInspector.TextEditorMainPanel.prototype.set readOnly):
809         (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing):
810         * inspector/front-end/inspector.css:
811         (button.edit-source-status-bar-item .glyph):
812         (button.edit-source-status-bar-item.toggled-on .glyph):
813
814 2011-09-09  Shinya Kawanaka  <shinyak@google.com>
815
816         Crashes in WebCore::AppendNodeCommand::create().
817         https://bugs.webkit.org/show_bug.cgi?id=67767
818
819         Reviewed by Darin Adler.
820
821         In CompositeEditCommand::closeParagraphUnderNewElement(), lastNode could be a non Element node.
822         The current code assumes lastNode is an Element node. This patch checks it.
823
824         Test: editing/execCommand/ident-crashes-topnode-is-text.html
825
826         * editing/CompositeEditCommand.cpp:
827         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): Added an element node check.
828
829 2011-09-09  Shinya Kawanaka  <shinyak@google.com>
830
831         Crashes in WebCore::ApplyStyleCommand.doApply()
832         https://bugs.webkit.org/show_bug.cgi?id=67765
833
834         Reviewed by Ryosuke Niwa.
835
836         WebCore::enclosingBlock may return null, but ApplyStyleCommand::applyBlockStyle did not check it. This patch make it to be checked.
837
838         Test: editing/style/remove-format-without-enclosing-block.html
839
840         * editing/ApplyStyleCommand.cpp:
841         (WebCore::ApplyStyleCommand::applyBlockStyle): Added null check.
842
843 2011-09-09  James Simonsen  <simonjam@chromium.org>
844
845         [Chromium] Fix leak of Skia stream with custom CSS fonts
846         https://bugs.webkit.org/show_bug.cgi?id=67815
847
848         Reviewed by Adam Barth.
849
850         Test: fast/css/font-face-opentype.html under valgrind
851
852         * platform/graphics/mac/FontCustomPlatformData.cpp:
853         (WebCore::createFontCustomPlatformData):
854         * platform/graphics/skia/FontCustomPlatformData.cpp:
855         (WebCore::createFontCustomPlatformData):
856
857 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
858
859         Push more code from HTMLInputElement::setValue to TextFieldInputType::setValue
860         https://bugs.webkit.org/show_bug.cgi?id=67742
861
862         Reviewed by Darin Adler.
863
864         Moved more code in HTMLInputElement::setValue to TextFieldInputType::setValue, and merged
865         InputType::valueChanged into InputType::setValue. Also introduced
866         InputType::dispatchChangeEventInResponseToSetValue to be overridden by TextFieldInputType.
867
868         * html/BaseButtonInputType.cpp:
869         (WebCore::BaseButtonInputType::setValue):
870         * html/BaseButtonInputType.h:
871         * html/BaseCheckableInputType.cpp:
872         (WebCore::BaseCheckableInputType::setValue):
873         * html/BaseCheckableInputType.h:
874         * html/ColorInputType.cpp:
875         * html/ColorInputType.h:
876         * html/FileInputType.cpp:
877         (WebCore::FileInputType::setValue):
878         * html/FileInputType.h:
879         * html/HTMLInputElement.cpp:
880         (WebCore::HTMLInputElement::setValue):
881         * html/HTMLInputElement.h:
882         (WebCore::HTMLInputElement::cacheSelectionInResponseToSetValue):
883         * html/HiddenInputType.cpp:
884         (WebCore::HiddenInputType::setValue):
885         * html/HiddenInputType.h:
886         * html/InputType.cpp:
887         (WebCore::InputType::setValue):
888         (WebCore::InputType::dispatchChangeEventInResponseToSetValue):
889         * html/InputType.h:
890         * html/RangeInputType.cpp:
891         (WebCore::RangeInputType::setValue):
892         * html/RangeInputType.h:
893         * html/TextFieldInputType.cpp:
894         (WebCore::TextFieldInputType::setValue):
895         (WebCore::TextFieldInputType::dispatchChangeEventInResponseToSetValue):
896         * html/TextFieldInputType.h:
897
898 2011-09-08  Annie Sullivan  <sullivan@chromium.org>
899
900         Crashes in WebCore::InsertNodeBeforeCommand constructor.
901         https://bugs.webkit.org/show_bug.cgi?id=67763
902
903         Reviewed by Ryosuke Niwa.
904
905         Changes editableRootForPosition() to use the position's containerNode instead of deprecatedNode so that
906         positions which are before or after a given node cannot return that node as the editable root.
907
908         Test: editing/inserting/insert-paragraph-selection-outside-contenteditable.html
909
910         * editing/htmlediting.cpp:
911         (WebCore::editableRootForPosition): use containerNode instead of deprecatedNode.
912
913 2011-09-08  James Weatherall  <wez@chromium.org>
914
915         Release the reference to the HTMLPlugInElement's script object, when the element is removed from the document.  This breaks a cyclical reference that would otherwise cause the element to be retained until the document is torn down.
916         https://bugs.webkit.org/show_bug.cgi?id=66181
917
918         Reviewed by Anders Carlsson.
919
920         No new tests - no functional change.
921
922         * html/HTMLPlugInElement.cpp:
923         (WebCore::HTMLPlugInElement::removedFromDocument):
924         * html/HTMLPlugInElement.h:
925
926 2011-09-08  Daniel Bates  <dbates@webkit.org>
927
928         XSS filter bypass via non-standard URL encoding
929         https://bugs.webkit.org/show_bug.cgi?id=66588
930
931         Reviewed by Adam Barth.
932
933         Tests: http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair.html
934                http/tests/security/xssAuditor/script-tag-with-16bit-unicode.html
935                http/tests/security/xssAuditor/script-tag-with-16bit-unicode2.html
936                http/tests/security/xssAuditor/script-tag-with-16bit-unicode3.html
937                http/tests/security/xssAuditor/script-tag-with-16bit-unicode4.html
938                http/tests/security/xssAuditor/script-tag-with-16bit-unicode5.html
939                http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode.html
940                http/tests/security/xssAuditor/window-open-without-url-should-not-assert.html
941
942         Implement support for decoding non-standard 16-bit Unicode escape sequences of
943         the form %u26C4 as described in <http://www.w3.org/International/iri-edit/draft-duerst-iri.html#anchor29>.
944
945         See also <http://en.wikipedia.org/wiki/Percent-encoding#Non-standard_implementations>.
946
947         * GNUmakefile.list.am: Added DecodeEscapeSequences.h.
948         * WebCore.gypi: Ditto.
949         * WebCore.pro: Ditto.
950         * WebCore.vcproj/WebCore.vcproj: Ditto.
951         * WebCore.xcodeproj/project.pbxproj: Ditto.
952         * html/parser/XSSAuditor.cpp:
953         (WebCore::decode16BitUnicodeEscapeSequences): Added.
954         (WebCore::decodeStandardURLEscapeSequences): Added.
955         (WebCore::fullyDecodeString): Modified to call decode16BitUnicodeEscapeSequences().
956         (WebCore::XSSAuditor::init): Modified to return early when the URL of the document
957         is the empty string. This can happen when opening a new browser window or calling
958         window.open("").
959         * platform/KURL.cpp:
960         (WebCore::decodeURLEscapeSequences): Abstracted code into template-function decodeEscapeSequences().
961         This function just calls decodeEscapeSequences<URLEscapeSequence>().
962         * platform/text/DecodeEscapeSequences.h: Added.
963         (WebCore::Unicode16BitEscapeSequence::findInString):
964         (WebCore::Unicode16BitEscapeSequence::matchStringPrefix):
965         (WebCore::Unicode16BitEscapeSequence::decodeRun):
966         (WebCore::URLEscapeSequence::findInString):
967         (WebCore::URLEscapeSequence::matchStringPrefix):
968         (WebCore::URLEscapeSequence::decodeRun):
969         (WebCore::decodeEscapeSequences):
970
971 2011-09-08  Adam Barth  <abarth@webkit.org>
972
973         DocumentWriter::deprecatedFrameEncoding doesn't need to refert to Settings
974         https://bugs.webkit.org/show_bug.cgi?id=67812
975
976         Reviewed by Eric Seidel.
977
978         The one caller of this function does this work already.
979
980         * loader/DocumentWriter.cpp:
981         (WebCore::DocumentWriter::deprecatedFrameEncoding):
982
983 2011-09-08  Adam Klein  <adamk@chromium.org>
984
985         Always zero-out m_sortedTextBoxesPosition to avoid uninitialized read in TextIterator
986         https://bugs.webkit.org/show_bug.cgi?id=67810
987
988         Reviewed by Tony Chang.
989
990         Reported as a valgrind failure in http://crbug.com/84777.
991
992         No possible change in behavior, so no tests. The unitialized read
993         could never have an impact:
994
995            if (m_sortedTextBoxesPosition + 1 < m_sortedTextBoxes.size()) ...
996
997         Since m_sortedTextBoxes.size() will be zero here if
998         m_sortedTextBoxesPosition is uninitialized, and they're both unsigned,
999         so no possible value of m_sortedTextBoxesPosition could be < 0.
1000
1001         * editing/TextIterator.cpp:
1002         (WebCore::TextIterator::TextIterator):
1003
1004 2011-09-08  Tony Chang  <tony@chromium.org>
1005
1006         Cleanup of switch statements with default cases
1007         https://bugs.webkit.org/show_bug.cgi?id=67808
1008
1009         Reviewed by Adam Barth.
1010
1011         No new tests, just a small refactoring.
1012
1013         * page/WebKitAnimation.cpp:
1014         (WebCore::WebKitAnimation::fillMode):
1015         * platform/audio/Distance.cpp:
1016         (WebCore::DistanceEffect::gain):
1017
1018 2011-09-08  Eric Seidel  <eric@webkit.org>
1019
1020         [BiDi] Add support for the BDI element
1021         https://bugs.webkit.org/show_bug.cgi?id=50913
1022
1023         Reviewed by Ryosuke Niwa.
1024
1025         This patch is ridiculously trivial now that we have unicode-bidi: isolate support in WebKit.
1026
1027         Test: css3/bdi-element.html
1028
1029         * css/html.css:
1030         (bdi):
1031
1032 2011-09-08  David Levin  <levin@chromium.org>
1033
1034         [chromium] KURL::copy doesn't produce something usable on another thread.
1035         https://bugs.webkit.org/show_bug.cgi?id=67809
1036
1037         Reviewed by Adam Barth.
1038
1039         No new functionality exposed so no new test. This was caught by testing code: the thread
1040         sanitizer run in Chromium (http://code.google.com/p/chromium/issues/detail?id=93708).
1041
1042         * platform/KURLGoogle.cpp:
1043         (WebCore::KURLGooglePrivate::copyTo): Clear out the invalid String so that it will
1044         not be used on another thread.
1045
1046 2011-09-08  Alexey Proskuryakov  <ap@apple.com>
1047
1048         REGRESSION (r66874): Missing RefPtr in ScriptController
1049         https://bugs.webkit.org/show_bug.cgi?id=67748
1050
1051         Reviewed by Adam Barth.
1052
1053         * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeScript):
1054
1055 2011-09-08  Adam Barth  <abarth@webkit.org>
1056
1057         Second attempt to fix Chromium build.
1058
1059         * dom/Document.h:
1060
1061 2011-09-08  Oliver Hunt  <oliver@apple.com>
1062
1063         Use bump allocator for initial property storage
1064         https://bugs.webkit.org/show_bug.cgi?id=67494
1065
1066         Reviewed by Geoffrey Garen.
1067
1068         Add a forwarding header.
1069
1070         * ForwardingHeaders/runtime/StorageBarrier.h: Added.
1071
1072 2011-09-08  Roland Steiner  <rolandsteiner@chromium.org>
1073
1074         Unreviewed, rolling out r94809.
1075         http://trac.webkit.org/changeset/94809
1076         https://bugs.webkit.org/show_bug.cgi?id=67718
1077
1078         commit _still_ premature, despite CQ eagerness
1079
1080         * html/HTMLAttributeNames.in:
1081         * html/HTMLStyleElement.cpp:
1082         * html/HTMLStyleElement.h:
1083         * html/HTMLStyleElement.idl:
1084
1085 2011-09-08  Sam Weinig  <sam@webkit.org>
1086
1087         Remove the Completion object from JSC, I have never liked it
1088         https://bugs.webkit.org/show_bug.cgi?id=67755
1089
1090         Reviewed by Gavin Barraclough.
1091
1092         * bindings/js/JSDOMBinding.cpp:
1093         (WebCore::reportException):
1094         * bindings/js/JSEventListener.cpp:
1095         (WebCore::JSEventListener::handleEvent):
1096         * bindings/js/JSInjectedScriptManager.cpp:
1097         (WebCore::InjectedScriptManager::createInjectedScript):
1098         * bindings/js/JSMainThreadExecState.h:
1099         (WebCore::JSMainThreadExecState::evaluate):
1100         * bindings/js/ScriptController.cpp:
1101         (WebCore::ScriptController::evaluateInWorld):
1102         * bindings/js/WorkerScriptController.cpp:
1103         (WebCore::WorkerScriptController::evaluate):
1104         * bindings/objc/WebScriptObject.mm:
1105         (-[WebScriptObject evaluateWebScript:]):
1106         * bridge/NP_jsobject.cpp:
1107         (_NPN_Evaluate):
1108         * bridge/jni/jni_jsobject.mm:
1109         (JavaJSObject::eval):
1110
1111 2011-09-08  Adam Barth  <abarth@webkit.org>
1112
1113         Inline DocumentWriter::encoding() into it's only caller: deprecatedFrameEncoding()
1114         https://bugs.webkit.org/show_bug.cgi?id=67807
1115
1116         Reviewed by Eric Seidel.
1117
1118         This function is super nutty.  We don't want any more folks to call it
1119         thinking that it does something sane.
1120
1121         * loader/DocumentWriter.cpp:
1122         (WebCore::DocumentWriter::deprecatedFrameEncoding):
1123         * loader/DocumentWriter.h:
1124
1125 2011-09-08  Roland Steiner  <rolandsteiner@chromium.org>
1126
1127         <style scoped>: Add 'scoped' attribute
1128         https://bugs.webkit.org/show_bug.cgi?id=67718
1129
1130         Add 'scoped' attribute to IDL and attribute list,
1131         implement and test setting/resetting of the attribute.
1132
1133         Reviewed by Dimitri Glazkov.
1134
1135         Test: fast/css/style-scoped/basic-attribute.html
1136
1137         * html/HTMLAttributeNames.in:
1138         * html/HTMLStyleElement.cpp:
1139         (WebCore::HTMLStyleElement::scoped):
1140         (WebCore::HTMLStyleElement::setScoped):
1141         (WebCore::HTMLStyleElement::scopingElement):
1142         * html/HTMLStyleElement.h:
1143         * html/HTMLStyleElement.idl:
1144
1145 2011-09-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1146
1147         Unreviewed, rolling out r94781.
1148         http://trac.webkit.org/changeset/94781
1149         https://bugs.webkit.org/show_bug.cgi?id=67806
1150
1151         Broke Objective-C binding on Mac (Requested by rniwa on
1152         #webkit).
1153
1154         * dom/Element.idl:
1155         * dom/Node.cpp:
1156         (WebCore::Node::contains):
1157         * dom/Node.idl:
1158         * editing/DeleteSelectionCommand.cpp:
1159         (WebCore::DeleteSelectionCommand::mergeParagraphs):
1160
1161 2011-09-08  Eric Seidel  <eric@webkit.org>
1162
1163         Remove DocumentWriter::setDecoder as a grep of WebKit shows no callers
1164         https://bugs.webkit.org/show_bug.cgi?id=67803
1165
1166         Reviewed by Adam Barth.
1167
1168         Smells like dead code.
1169
1170         * loader/DocumentWriter.cpp:
1171         * loader/DocumentWriter.h:
1172
1173 2011-09-08  Shinya Kawanaka  <shinyak@google.com>
1174
1175         Crashes in WebCore::ReplaceSelectionCommand::doApply
1176         https://bugs.webkit.org/show_bug.cgi?id=67762
1177
1178         Reviewed by Ryosuke Niwa.
1179
1180         WebCore::enclosingBlock may return null, but its return value was not checked. This patch checks it.
1181
1182         Tests: editing/inserting/insert-without-enclosing-block.html
1183
1184         * editing/ReplaceSelectionCommand.cpp:
1185         (WebCore::ReplaceSelectionCommand::doApply): Added null check.
1186
1187 2011-09-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1188
1189         Unreviewed, rolling out r94784.
1190         http://trac.webkit.org/changeset/94784
1191         https://bugs.webkit.org/show_bug.cgi?id=67796
1192
1193         Commit was premature (Requested by rolandsteiner on #webkit).
1194
1195         * html/HTMLAttributeNames.in:
1196         * html/HTMLStyleElement.cpp:
1197         * html/HTMLStyleElement.h:
1198         * html/HTMLStyleElement.idl:
1199
1200 2011-09-08  W. James MacLean  <wjmaclean@chromium.org>
1201
1202         [chromium] Add backend compositor support for rescaling (zooming) textures during zoom animation.
1203         https://bugs.webkit.org/show_bug.cgi?id=66472
1204
1205         This patch contains plumbing from Internals to WebViewImpl that can be removed
1206         at a later time when the zoom animator code is complete.
1207
1208         Reviewed by James Robinson.
1209
1210         Test: platform/chromium/compositing/zoom-animator-scale-test.html
1211
1212         * page/Settings.cpp:
1213         (WebCore::Settings::Settings):
1214         * page/Settings.h:
1215         (WebCore::Settings::setZoomAnimatorScale):
1216         (WebCore::Settings::zoomAnimatorScale):
1217         * platform/graphics/chromium/LayerRendererChromium.cpp:
1218         (WebCore::LayerRendererChromium::LayerRendererChromium):
1219         (WebCore::LayerRendererChromium::drawLayersInternal):
1220         * platform/graphics/chromium/LayerRendererChromium.h:
1221         (WebCore::LayerRendererChromium::setZoomAnimatorScale):
1222         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1223         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1224         (WebCore::CCLayerTreeHost::commitTo):
1225         (WebCore::CCLayerTreeHost::setZoomAnimatorScale):
1226         (WebCore::CCLayerTreeHost::updateLayers):
1227         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1228         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1229         (WebCore::CCLayerTreeHostImpl::setZoomAnimatorScale):
1230         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1231         * testing/Internals.cpp:
1232         (WebCore::Internals::setZoomAnimatorScale):
1233         * testing/Internals.h:
1234         * testing/Internals.idl:
1235
1236 2011-09-08  Eric Carlson  <eric.carlson@apple.com>
1237
1238         HTMLMediaElement is missing initialTime attribute
1239         https://bugs.webkit.org/show_bug.cgi?id=67791
1240
1241         Reviewed by Darin Adler.
1242
1243         Test: media/media-initialTime.html
1244
1245         * html/HTMLMediaElement.cpp:
1246         (WebCore::HTMLMediaElement::initialTime):
1247         * html/HTMLMediaElement.h:
1248         * html/HTMLMediaElement.idl:
1249         * platform/graphics/MediaPlayer.cpp:
1250         (WebCore::MediaPlayer::initialTime):
1251         * platform/graphics/MediaPlayer.h:
1252         * platform/graphics/MediaPlayerPrivate.h:
1253         (WebCore::MediaPlayerPrivateInterface::initialTime):
1254
1255 2011-09-03  Robert Hogan  <robert@webkit.org>
1256
1257         Elements with position:absolute don't move to correct position after images load
1258         https://bugs.webkit.org/show_bug.cgi?id=54611
1259
1260         Reviewed by Simon Fraser.
1261
1262         Test: fast/block/positioning/absolute-layout-after-image-load.html
1263
1264         In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, 
1265         this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires 
1266         the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. 
1267         There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. 
1268
1269         Note: Although the issue is encountered only on first load without a fragment identifier, it 
1270         happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so 
1271         because scrolling to the fragment always happens before the image has loaded, rendering the page 
1272         and clearing the initial dirty bits in the positioned element's renderer. When the image finally 
1273         loads in this scenario, the positioned element is otherwise clean and relies on the above code to get 
1274         re-rendered.
1275
1276         Note: This was originally landed in r94755 but positioned-float-layout-after-image-load.html exposed
1277               an ASSERT bug, unrelated to this change, and was rolled out. That issue is tracked separately
1278               in bug 67759.
1279
1280         * rendering/RenderBlock.cpp:
1281         (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when 
1282                                                          deciding whether to mark children for layout
1283
1284 2011-09-08  Roland Steiner  <rolandsteiner@chromium.org>
1285
1286         <style scoped>: Add 'scoped' attribute
1287         https://bugs.webkit.org/show_bug.cgi?id=67718
1288
1289         Add 'scoped' attribute to IDL and attribute list,
1290         implement and test setting/resetting of the attribute.
1291
1292         Reviewed by Dimitri Glazkov.
1293
1294         Test: fast/css/style-scoped/basic-attribute.html
1295
1296         * html/HTMLAttributeNames.in:
1297         * html/HTMLStyleElement.cpp:
1298         (WebCore::HTMLStyleElement::scoped):
1299         (WebCore::HTMLStyleElement::setScoped):
1300         (WebCore::HTMLStyleElement::scopingElement):
1301         * html/HTMLStyleElement.h:
1302         * html/HTMLStyleElement.idl:
1303
1304 2011-09-08  Erik Arvidsson  <arv@chromium.org>
1305
1306         Move Element.contains to Node
1307         https://bugs.webkit.org/show_bug.cgi?id=67651
1308
1309         Reviewed by Darin Adler.
1310
1311         This moves the contains method from Element to Node as in the DOM4 working draft: 
1312         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-contains
1313
1314         This also special cases Document contains to make it O(1) instead of O(depth).
1315
1316         Tests: fast/dom/Node/contains-method.html
1317                perf/document-contains.html
1318
1319         * dom/Element.idl:
1320         * dom/Node.cpp:
1321         (WebCore::Node::contains): Added document special case.
1322         * dom/Node.idl:
1323         * editing/DeleteSelectionCommand.cpp:
1324         (WebCore::DeleteSelectionCommand::mergeParagraphs): Added a null check.
1325
1326 2011-09-08  Chris Rogers  <crogers@google.com>
1327
1328         Check AudioContext createChannelMerger() for thread safety
1329         https://bugs.webkit.org/show_bug.cgi?id=67247
1330
1331         Reviewed by Kenneth Russell.
1332
1333         Test: webaudio/audiochannelmerger-stereo.html
1334
1335         * webaudio/AudioChannelMerger.cpp:
1336         (WebCore::AudioChannelMerger::process):
1337         (WebCore::AudioChannelMerger::checkNumberOfChannelsForInput):
1338         * webaudio/AudioChannelMerger.h:
1339
1340 2011-09-08  Ned Holbrook  <nholbrook@apple.com>
1341
1342         Refactor hyphen measurement
1343         https://bugs.webkit.org/show_bug.cgi?id=67728
1344
1345         Reviewed by Darin Adler.
1346
1347         No new tests, purely refactoring.
1348
1349         * rendering/RenderBlockLineLayout.cpp:
1350         (WebCore::measureHyphenWidth): Added.
1351         (WebCore::setLogicalWidthForTextRun): Use measureHyphenWidth().
1352         (WebCore::tryHyphenating): Ditto.
1353         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Ditto.
1354
1355 2011-09-08  Julien Chaffraix  <jchaffraix@webkit.org>
1356
1357         Remove LayoutStateDisabler instances from RenderLayer
1358         https://bugs.webkit.org/show_bug.cgi?id=66896
1359
1360         Reviewed by Simon Fraser.
1361
1362         As part of r93614, scrollTo does not call updateLayerPositions anymore.
1363         This means that we don't need to disable LayoutState from the scrolling code
1364         in RenderLayer.
1365
1366         This change is covered by the existing tests.
1367
1368         * rendering/RenderLayer.cpp:
1369         (WebCore::RenderLayer::updateLayerPositions): Updated the comment
1370         that was not accurate anymore. Also explained what is wrong with
1371         LayoutState vs RenderLayer now. Note that the ASSERT is still
1372         valid and will not trigger as the remaining calls to updateLayerPositions
1373         are done *outside* layout() where LayoutState is not set (thus disabled).
1374
1375         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed
1376         2 LayoutStateDisabler surrounding scrollToOffset.
1377
1378 2011-09-08  Julien Chaffraix  <jchaffraix@webkit.org>
1379
1380         Factor out the code to get the first non-null RenderTableSection in RenderTable
1381         https://bugs.webkit.org/show_bug.cgi?id=66972
1382
1383         Reviewed by Darin Adler.
1384
1385         Refactoring only, covered by existing tests.
1386
1387         * accessibility/AccessibilityTable.cpp:
1388         (WebCore::AccessibilityTable::addChildren):
1389         (WebCore::AccessibilityTable::cellForColumnAndRow):
1390         * accessibility/AccessibilityTableCell.cpp:
1391         (WebCore::AccessibilityTableCell::rowIndexRange):
1392         Updated those for the signature change in sectionBelow. Also added
1393         a FIXME where topSection should be used instead of iterating
1394         over the section (and likely missing some corner cases).
1395
1396         * rendering/FixedTableLayout.cpp:
1397         (WebCore::FixedTableLayout::calcWidthArray):
1398         * rendering/RenderTable.cpp:
1399         (WebCore::RenderTable::calcBorderStart):
1400         (WebCore::RenderTable::calcBorderEnd):
1401         (WebCore::RenderTable::outerBorderBefore):
1402         (WebCore::RenderTable::sectionAbove):
1403         (WebCore::RenderTable::sectionBelow):
1404         (WebCore::RenderTable::firstLineBoxBaseline):
1405         Updated all those functions to use the newly added functions. Also changed
1406         the variable names to match the functions.
1407
1408         (WebCore::RenderTable::layout):
1409         (WebCore::RenderTable::topNonEmptySection): Newly added function
1410         that returns the top non null section of the table that has at least a
1411         row.
1412
1413         (WebCore::RenderTable::cellAbove):
1414         (WebCore::RenderTable::cellBelow):
1415         Update the signature of those 2 functions to take an enum as it makes the
1416         rest of the code more readable.
1417
1418         * rendering/RenderTable.h:
1419         (WebCore::RenderTable::topSection): Newly added function to return
1420         the top non null section in the table.
1421
1422 2011-04-19  Eric Seidel  <eric@webkit.org>
1423
1424         Reviewed by Ryosuke Niwa.
1425
1426         [BiDi] [CSS3] MASTER: Add support for the unicode-bidi:isolate CSS property
1427         https://bugs.webkit.org/show_bug.cgi?id=50912
1428
1429         This patch adds support for CSS3 unicode-bidi: isolate property, under the -webkit- vendor prefix.
1430         Parsing support was added in a previous patch, this wires up the RenderStyle values
1431         to code changes in the BidiResolver.
1432
1433         The effect of this patch is that it makes it possible to "isolate" runs of text
1434         so that their RTL-ness or LTR-ness does not bleed out into the rest of your text
1435         and effect layout.  This is important because many unicode characters (like parenthesis, ':', '-', etc.)
1436         do not have intrinsic directionality and are affected by whatever characters come before/after.
1437         If you have usernames which include RTL text, if you inject those usernames in your page
1438         you might end up with nearby characters moving!
1439         (like 'RTL USERNAME - my awesome site' as a title, could end up as
1440         'my awesome site - USERNAME RTL' when correct would be 'USERNAME RTL - my awesome site'.)
1441         This patch makes it possible to wrap sections of text in isolated spans, so that
1442         they correctly order all their RTL/LTR contents, but also correctly participate in the
1443         larger RTL/LTR ordering without affecting nearby characters.
1444
1445         Because much of this code is old and rarely touched, I've included extra background
1446         information in hopes of expanding my set of potential reviewers:
1447
1448         WebKit uses the standard "Unicode Bidi Algorithm" henceforth known as the UBA.
1449         The UBA is defined at http://unicode.org/reports/tr9/ for those not faint of heart.
1450
1451         Text layout is done per-block (<div>, <p>, etc), and begins with a string of text
1452         (which in our case comes from the rendering tree) and a specified width.
1453         First:  Text is measured and wrapped into lines.
1454         Second: The UBA is run over the lines of text.
1455         Third:  WebKit builds InlineBoxes (its linebox tree) and eventually render the text.
1456
1457         This patch modifies our UBA to ignore all text content inside "isolated" inlines (treating them as neutral characters)
1458         and then adds another step after running the UBA, where we run the UBA recursively on any
1459         previously identified "isolated" content.
1460
1461         The result of the UBA is an ordered list of "runs" of text with the RTL runs
1462         correctly RTL and the LTR runs LTR.
1463
1464         The UBA does three things:
1465         1.  It assigns a "class" to each character in a text stream (like neutral, strongly-RTL, strongly-LTR, etc.)
1466         2.  Divides the text stream up into "runs" of characters of the same directionality (all RTL, all LTR).
1467         3.  Re-orders those runs.
1468
1469         The UBA in WebKit is implemented by BidiResolver<T> in BidiResolver.h
1470
1471         The InlineBidiResolver (BidiResolver specialization which knows about the rendering tree)
1472         walks along its InlineIterators, looking at each character and running the
1473         Unicode Bidi Algorithm (UBA).  It walks through the rendering tree subtree under
1474         a block, using a (poorly named) bidiNext function which returns the next inline object.
1475         Each inline object (or text character there-in) has a corresponding meaning in the UBA
1476         such as a "strong RTL" character or a "neutral" character.  The UBA reads these sequence
1477         of characters, and figures out what direction (RTL or LTR) to assign to any neutral
1478         characters it encounters, based on surrounding characters.
1479
1480         As the InlineBidiResolver is walking the rendering tree, the InlineIterator::advance()
1481         function calls bidiNext(), which in turn can call notifyObserverEnteredObject/notifyObserverWillExitObject
1482         notifying InlineBidiResolver that it is entering or exiting an "isolated"
1483         span, at which point it will either start or stop ignoring the stream of characters
1484         from the InlineIterator.  When the InlineBidiResolver is ignoring the stream of
1485         characters, instead of creating separate BidiRuns at each RTL/LTR boundary
1486         as it normally would, it instead creates one "fake" run for the entire
1487         isolated span.  These fake runs participate in the normal UBA run ordering process,
1488         but after the main UBA, a second pass is made where we examine
1489         the list of isolatedRuns() and run the UBA on each of them, replacing the fake
1490         run we previously inserted, with the resulting list of runs from that inner UBA run.
1491         The way it "ignores" characters is by treating them all as neutral when inside an isolate.
1492         Thus all the characters end up grouped in a single run, but their directionality (as a group)
1493         is correctly affected by any surrounding strong characters.
1494
1495         If you understood that last paragraph, than the rest of the change is just plumbing.
1496
1497         I added a huge number of FIXMEs to this code, because this code has a variety of
1498         design choices (or lack there of) which make some of this very difficult.
1499
1500         For example the bidiNext iterator function has two sets of mutually exclusive
1501         parameters and can be used optionally with or without an observer.  Prior to this
1502         change there was only ever one object which cared about observing a walk over inlines
1503         and that was InlineBidiResolver.  This patch (regretfully) templatizes bidiNext
1504         to support a new Observer type.  The correct fix would be to rip bidiNext into
1505         multiple functions and rip need for observation out of InlineBidiResolver.
1506         Unfortunately I've tried both in separate bugs and failed.  This code is very very
1507         old and very poorly understood.  We're slowly moving forward, this is another tiny step.
1508
1509         This is my fourth iteration of this patch (I'm happy to do more!), but I believe
1510         it's a good compromise between fixing all of the design gotcha's of our bidi
1511         system and doing the minimum amount to add this killer CSS feature.
1512
1513         I ran the PLT.  (It averaged 0.2% faster with this change, but I attribute that to noise).
1514
1515         Test: css3/unicode-bidi-isolate-basic.html and css3/unicode-bidi-isolate-aharon.html
1516
1517         * platform/text/BidiResolver.h:
1518         (WebCore::BidiCharacterRun::setNext):
1519          - Needed by the new replaceRunWithRuns function.
1520         (WebCore::BidiResolver::BidiResolver):
1521         (WebCore::BidiResolver::~BidiResolver):
1522         (WebCore::BidiResolver::enterIsolate):
1523         (WebCore::BidiResolver::exitIsolate):
1524         (WebCore::BidiResolver::inIsolate):
1525         (WebCore::BidiResolver::isolatedRuns):
1526          - Used to track isolated spans of text as they're encoutered.
1527            They're stuffed away here to be processed recursively
1528            after the main UBA has done its thang.
1529         (WebCore::::appendRun):
1530         (WebCore::::embed):
1531         (WebCore::::commitExplicitEmbedding):
1532         (WebCore::::createBidiRunsForLine):
1533         * platform/text/BidiRunList.h:
1534         (WebCore::::replaceRunWithRuns):
1535          - This effectively takes all the runs from one runlist and adds them to
1536            this one, replacing the fake run we inserted during a previous pass of the UBA.
1537          - This RunList now owns the runs, so we call clear() on the other RunList
1538            so that we don't end up double-freeing the runs.
1539         (WebCore::::clear):
1540          - This allows us to "take" runs from another run list and then clear it.
1541         * rendering/BidiRun.h:
1542         (WebCore::BidiRun::object):
1543         * rendering/InlineIterator.h:
1544         (WebCore::InlineIterator::object):
1545         (WebCore::InlineIterator::offset):
1546         (WebCore::notifyObserverEnteredObject): Mostly just renaming and adding a FIXME about plaintext.
1547         (WebCore::notifyObserverWillExitObject): Mostly just renaming.
1548         (WebCore::addPlaceholderRunForIsolatedInline):
1549         (WebCore::isIsolatedInline):
1550         (WebCore::InlineBidiResolver::appendRun):
1551         * rendering/RenderBlockLineLayout.cpp:
1552         (WebCore::statusWithDirection):
1553         (WebCore::constructBidiRuns):
1554          - This is the heavy-lifting of this change.  This function
1555            runs the UBA recursively on all the previously identified isolated spans.
1556          - If we encounter more isolated spans in our run, we just add them to the
1557            main list an keep going.  Because the runs are linked lists and we have
1558            direct pointers to our placeholder objects, we don't care what order
1559            we process the placeholders in, so long as when we're done, they're all processed.
1560         (WebCore::RenderBlock::layoutInlineChildren):
1561
1562 2011-09-08  Kentaro Hara  <haraken@google.com>
1563
1564         Implement a ProgressEvent constructor for JSC
1565         https://bugs.webkit.org/show_bug.cgi?id=67537
1566
1567         Reviewed by Sam Weinig.
1568
1569         The spec for the ProgressEvent constructor is here:
1570         http://www.w3.org/TR/progress-events/#interface-progressevent
1571
1572         Test: fast/events/constructors/progress-event-constructor.html
1573
1574         * bindings/generic/EventConstructors.h: Added a definition for the ProgressEvent constructor.
1575         * bindings/js/JSDictionary.cpp:
1576         (WebCore::JSDictionary::convertValue): Converts an ECMA-262 Number into an IDL unsigned long long value. Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long
1577         * bindings/js/JSEventConstructors.cpp: Added #includes for ProgressEvent.
1578         * dom/ProgressEvent.cpp:
1579         (WebCore::ProgressEventInit::ProgressEventInit):
1580         (WebCore::ProgressEvent::ProgressEvent):
1581         * dom/ProgressEvent.h: Added a definition for ProgressEventInit.
1582         (WebCore::ProgressEvent::create):
1583         * dom/ProgressEvent.idl: Makes ProgressEvent constructible.
1584
1585 2011-09-08  Ryosuke Niwa  <rniwa@webkit.org>
1586
1587         Make bindings tests quiet after r94701.
1588
1589         * bindings/scripts/test/JS/JSTestInterface.cpp:
1590         * bindings/scripts/test/JS/JSTestInterface.h:
1591         (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
1592         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1593         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1594         (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
1595         * bindings/scripts/test/JS/JSTestObj.cpp:
1596         * bindings/scripts/test/JS/JSTestObj.h:
1597         (WebCore::JSTestObjPrototype::JSTestObjPrototype):
1598         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1599         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1600         (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
1601
1602 2011-09-07  Pavel Podivilov  <podivilov@chromium.org>
1603
1604         Web Inspector: get rid of RawSourceCode.createSourceMappingIfNeeded.
1605         https://bugs.webkit.org/show_bug.cgi?id=67717
1606
1607         Listen to SourceMappingUpdated event instead of using createSourceMappingIfNeeded.
1608
1609         Reviewed by Yury Semikhatsky.
1610
1611         * inspector/front-end/DebuggerPresentationModel.js:
1612         (WebInspector.DebuggerPresentationModel):
1613         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor):
1614         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
1615         (WebInspector.DebuggerPresentationModel.prototype._updateSourceMapping):
1616         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
1617         (WebInspector.DebuggerPresentationModel.prototype._restoreConsoleMessages):
1618         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
1619         (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded):
1620         (WebInspector.DebuggerPresentationModel.prototype._createPresentationMessage):
1621         (WebInspector.DebuggerPresentationModel.prototype._consoleCleared):
1622         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
1623         (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode):
1624         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
1625         (WebInspector.PresentationCallFrame.prototype.sourceLine.sourceMappingUpdated):
1626         (WebInspector.PresentationCallFrame.prototype.sourceLine):
1627         * inspector/front-end/SourceFile.js:
1628
1629 2011-09-06  Pavel Podivilov  <podivilov@chromium.org>
1630
1631         Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode.
1632         https://bugs.webkit.org/show_bug.cgi?id=67647
1633
1634         1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything.
1635         2) Add RawSourceCode unit tests.
1636         3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now).
1637
1638         Reviewed by Yury Semikhatsky.
1639
1640         Test: inspector/debugger/raw-source-code.html
1641
1642         * inspector/front-end/DebuggerPresentationModel.js:
1643         (WebInspector.DebuggerPresentationModel):
1644         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
1645         (WebInspector.DebuggerPresentationModel.prototype._addScript):
1646         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
1647         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
1648         (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId):
1649         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
1650         * inspector/front-end/ScriptsPanel.js:
1651         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
1652         * inspector/front-end/SourceFile.js:
1653         (WebInspector.RawSourceCode):
1654         (WebInspector.RawSourceCode.prototype.get uiSourceCode):
1655         (WebInspector.RawSourceCode.prototype.setFormatted):
1656         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
1657         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
1658
1659 2011-09-08  Alexander Pavlov  <apavlov@chromium.org>
1660
1661         Web Inspector: [REGRESSION] Clear console shortcut Ctrl + L broken
1662         https://bugs.webkit.org/show_bug.cgi?id=67711
1663
1664         Reviewed by Yury Semikhatsky.
1665
1666         * inspector/front-end/ConsoleView.js:
1667         (WebInspector.ConsoleView.prototype._consoleCleared):
1668         (WebInspector.ConsoleView.prototype._registerShortcuts):
1669         (WebInspector.ConsoleView.prototype._promptKeyDown):
1670
1671 2011-09-08  Andras Becsi  <andras.becsi@nokia.com>
1672
1673         [Qt] Build fails with strict compiler
1674         https://bugs.webkit.org/show_bug.cgi?id=67778
1675
1676         Reviewed by Csaba Osztrogonác.
1677
1678         No new tests needed.
1679
1680         * platform/graphics/TiledBackingStore.cpp:
1681         (WebCore::TiledBackingStore::resizeEdgeTiles): Remove unused contentsRect variable
1682         which's usage was removed in r94681 to fix the build with [-Werror=unused-but-set-variable].
1683
1684 2011-09-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1685
1686         Unreviewed, rolling out r94695.
1687         http://trac.webkit.org/changeset/94695
1688         https://bugs.webkit.org/show_bug.cgi?id=67776
1689
1690         Hitting an assertion on Snow Leopard, Qt, GTK (Requested by
1691         Zoltan on #webkit).
1692
1693         * rendering/RenderBlock.cpp:
1694         (WebCore::RenderBlock::positionedFloatsNeedRelayout):
1695         (WebCore::RenderBlock::layoutPositionedObjects):
1696
1697 2011-09-08  Alexander Pavlov  <apavlov@chromium.org>
1698
1699         Unreviewed, strip trailing whitespace in the Web Inspector frontend (*.js and *.css).
1700
1701         * inspector/front-end/ApplicationCacheItemsView.js:
1702         * inspector/front-end/AuditResultView.js:
1703         * inspector/front-end/BinarySearch.js:
1704         * inspector/front-end/CSSStyleModel.js:
1705         * inspector/front-end/ConsoleMessage.js:
1706         * inspector/front-end/ConsoleModel.js:
1707         * inspector/front-end/ConsoleView.js:
1708         * inspector/front-end/CookieItemsView.js:
1709         * inspector/front-end/CookieParser.js:
1710         * inspector/front-end/DOMAgent.js:
1711         * inspector/front-end/DOMStorage.js:
1712         * inspector/front-end/DOMStorageItemsView.js:
1713         * inspector/front-end/DataGrid.js:
1714         * inspector/front-end/Database.js:
1715         * inspector/front-end/DatabaseQueryView.js:
1716         * inspector/front-end/DetailedHeapshotGridNodes.js:
1717         * inspector/front-end/DetailedHeapshotView.js:
1718         * inspector/front-end/ElementsTreeOutline.js:
1719         * inspector/front-end/EmptyView.js:
1720         * inspector/front-end/EventListenersSidebarPane.js:
1721         * inspector/front-end/ExtensionCommon.js:
1722         * inspector/front-end/GoToLineDialog.js:
1723         * inspector/front-end/HeapSnapshot.js:
1724         * inspector/front-end/HeapSnapshotProxy.js:
1725         * inspector/front-end/HeapSnapshotWorkerDispatcher.js:
1726         * inspector/front-end/ImageView.js:
1727         * inspector/front-end/InjectedFakeWorker.js:
1728         * inspector/front-end/InspectorFrontendHostStub.js:
1729         * inspector/front-end/MetricsSidebarPane.js:
1730         * inspector/front-end/NetworkManager.js:
1731         * inspector/front-end/NetworkPanel.js:
1732         * inspector/front-end/ObjectPropertiesSection.js:
1733         * inspector/front-end/PartialQuickSort.js:
1734         * inspector/front-end/ProfileView.js:
1735         * inspector/front-end/ProfilesPanel.js:
1736         * inspector/front-end/RemoteObject.js:
1737         * inspector/front-end/Resource.js:
1738         * inspector/front-end/ResourceCategory.js:
1739         * inspector/front-end/ResourceHTMLView.js:
1740         * inspector/front-end/ResourceHeadersView.js:
1741         * inspector/front-end/ResourceJSONView.js:
1742         * inspector/front-end/ResourceTimingView.js:
1743         * inspector/front-end/ResourceTreeModel.js:
1744         * inspector/front-end/ResourceView.js:
1745         * inspector/front-end/ResourcesPanel.js:
1746         * inspector/front-end/SearchController.js:
1747         * inspector/front-end/SettingsScreen.js:
1748         * inspector/front-end/ShortcutsScreen.js:
1749         * inspector/front-end/SourceCSSTokenizer.js:
1750         * inspector/front-end/SourceHTMLTokenizer.js:
1751         * inspector/front-end/SourceJavaScriptTokenizer.js:
1752         * inspector/front-end/StatusBarButton.js:
1753         * inspector/front-end/TextEditorModel.js:
1754         * inspector/front-end/TimelineGrid.js:
1755         * inspector/front-end/View.js:
1756         * inspector/front-end/heapProfiler.css:
1757         * inspector/front-end/inspector.css:
1758         * inspector/front-end/inspector.js:
1759         * inspector/front-end/inspectorSyntaxHighlight.css:
1760         * inspector/front-end/networkPanel.css:
1761         * inspector/front-end/treeoutline.js:
1762         * inspector/front-end/utilities.js:
1763
1764 2011-09-07  Andrey Kosyakov  <caseq@chromium.org>
1765
1766         Web Inspector: trying to scroll mouse wheel when in TextViewer's gutter pane causes EventException::DISPATCH_REQUEST_ERR
1767         https://bugs.webkit.org/show_bug.cgi?id=67715
1768
1769         Reviewed by Yury Semikhatsky.
1770
1771         - avoid exception on attempt to dispatch an event that is being dispatched by cloning the event.
1772
1773         * inspector/front-end/TextViewer.js:
1774         (WebInspector.TextViewer.forwardWheelEvent):
1775         (WebInspector.TextViewer):
1776
1777 2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1778
1779         Unreviewed, rolling out r94674 and r94689.
1780         http://trac.webkit.org/changeset/94674
1781         http://trac.webkit.org/changeset/94689
1782         https://bugs.webkit.org/show_bug.cgi?id=67754
1783
1784         Broke inspector/debugger/script-formatter.html (Requested by
1785         rniwa on #webkit).
1786
1787         * inspector/front-end/DebuggerPresentationModel.js:
1788         (WebInspector.DebuggerPresentationModel):
1789         (WebInspector.DebuggerPresentationModel.prototype.addSourceMappingListener):
1790         (WebInspector.DebuggerPresentationModel.prototype.removeSourceMappingListener):
1791         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
1792         (WebInspector.DebuggerPresentationModel.prototype._addScript):
1793         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
1794         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
1795         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
1796         (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId):
1797         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
1798         * inspector/front-end/ScriptsPanel.js:
1799         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
1800         * inspector/front-end/SourceFile.js:
1801         (WebInspector.RawSourceCode):
1802         (WebInspector.RawSourceCode.prototype.get uiSourceCode):
1803         (WebInspector.RawSourceCode.prototype.get rawSourceCode):
1804         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
1805         (WebInspector.RawSourceCode.prototype.requestContent):
1806         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
1807
1808 2011-09-07  Julien Chaffraix  <jchaffraix@webkit.org>
1809
1810         offsetFromRoot optimization is disabled after r93837
1811         https://bugs.webkit.org/show_bug.cgi?id=67677
1812
1813         Reviewed by Simon Fraser.
1814
1815         Unfortunately not covered by any test as it does not change updateLayerPosition complexity (it is still O(n^2)
1816         because of clippedOverflowRectForRepaint). However it is a noticeable slowdown on some use cases but we don't
1817         have a good test harness to cover such slowdown.
1818
1819         * rendering/RenderLayer.cpp:
1820         (WebCore::RenderLayer::updateLayerPositions): Pass offsetFromRoot as not doing so means that we miss
1821         the optimization altogether.
1822
1823         (WebCore::RenderLayer::computeRepaintRects):
1824         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
1825         * rendering/RenderLayer.h:
1826         Renamed |cachedOffset| to |offsetFromRoot| to be consistent with our latest renaming.
1827
1828 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
1829
1830         Windows build fix after r94737.
1831
1832         * rendering/RenderBlock.cpp:
1833         (WebCore::RenderBlock::adjustRectForColumns):
1834
1835 2011-09-07  Dan Bernstein  <mitz@apple.com>
1836
1837         Removed hyphenation function implementations for an usupported build configuration.
1838
1839         Reviewed by Sam Weinig.
1840
1841         * platform/text/cf/HyphenationCF.cpp:
1842
1843 2011-09-07  David Hyatt  <hyatt@apple.com>
1844
1845         https://bugs.webkit.org/show_bug.cgi?id=67739
1846
1847         adjustRectForColumns is O(# of columns) when it can be O(1). Fix the slow performance of this
1848         function by removing the loop and just computing the start and end column for a repaint rect
1849         and uniting everything in between.
1850
1851         Reviewed by Dan Bernstein.
1852
1853         * rendering/RenderBlock.cpp:
1854         (WebCore::RenderBlock::adjustRectForColumns):
1855
1856 2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1857
1858         Unreviewed, rolling out r94714 and r94723.
1859         http://trac.webkit.org/changeset/94714
1860         http://trac.webkit.org/changeset/94723
1861         https://bugs.webkit.org/show_bug.cgi?id=67746
1862
1863         breaks gtk-linux tests with assertion failure (Requested by
1864         thorton on #webkit).
1865
1866         * platform/graphics/GraphicsContext.cpp:
1867         (WebCore::GraphicsContext::GraphicsContext):
1868         (WebCore::GraphicsContext::~GraphicsContext):
1869         * platform/graphics/GraphicsContext.h:
1870         (WebCore::GraphicsContext::inTransparencyLayer):
1871         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1872         (WebCore::GraphicsContext::beginTransparencyLayer):
1873         (WebCore::GraphicsContext::endTransparencyLayer):
1874         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1875         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
1876         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
1877         * platform/graphics/cg/GraphicsContextCG.cpp:
1878         (WebCore::GraphicsContext::beginTransparencyLayer):
1879         (WebCore::GraphicsContext::endTransparencyLayer):
1880         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
1881         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1882         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
1883         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
1884         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
1885         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
1886         (WebCore::GraphicsContext::beginTransparencyLayer):
1887         (WebCore::GraphicsContext::endTransparencyLayer):
1888         * platform/graphics/mac/FontMac.mm:
1889         (WebCore::Font::drawGlyphs):
1890         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
1891         (WebCore::GraphicsContext::beginTransparencyLayer):
1892         (WebCore::GraphicsContext::endTransparencyLayer):
1893         * platform/graphics/qt/GraphicsContextQt.cpp:
1894         (WebCore::GraphicsContext::inTransparencyLayer):
1895         (WebCore::GraphicsContext::beginTransparencyLayer):
1896         (WebCore::GraphicsContext::endTransparencyLayer):
1897         * platform/graphics/skia/GraphicsContextSkia.cpp:
1898         (WebCore::GraphicsContext::beginTransparencyLayer):
1899         (WebCore::GraphicsContext::endTransparencyLayer):
1900         * platform/graphics/win/FontCGWin.cpp:
1901         (WebCore::drawGDIGlyphs):
1902         * platform/graphics/win/GraphicsContextCGWin.cpp:
1903         (WebCore::GraphicsContext::releaseWindowsContext):
1904         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1905         (WebCore::GraphicsContext::releaseWindowsContext):
1906         * platform/graphics/win/GraphicsContextWin.cpp:
1907         (WebCore::GraphicsContext::inTransparencyLayer):
1908         (WebCore::GraphicsContext::getWindowsContext):
1909         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1910         (WebCore::GraphicsContext::beginTransparencyLayer):
1911         (WebCore::GraphicsContext::endTransparencyLayer):
1912         * platform/graphics/wx/GraphicsContextWx.cpp:
1913         (WebCore::GraphicsContext::beginTransparencyLayer):
1914         (WebCore::GraphicsContext::endTransparencyLayer):
1915         * platform/win/ScrollbarThemeWin.cpp:
1916         (WebCore::ScrollbarThemeWin::paintTrackPiece):
1917         (WebCore::ScrollbarThemeWin::paintButton):
1918         (WebCore::ScrollbarThemeWin::paintThumb):
1919         * plugins/win/PluginViewWin.cpp:
1920         (WebCore::PluginView::paint):
1921         * rendering/RenderThemeWin.cpp:
1922         (WebCore::drawControl):
1923
1924 2011-09-07  Chris Fleizach  <cfleizach@apple.com>
1925
1926         Changes to aria-hidden don't change VO navigation
1927         https://bugs.webkit.org/show_bug.cgi?id=67722
1928
1929         Reviewed by Darin Adler.
1930
1931         When altering aria-hidden, WebCore needs to update the children caches of 
1932         affected elements. However, for elements that were children, but ignored, their
1933         caches did not get updated, and stale information would be propagated.
1934
1935         The fix is to always clearChildren() when a parent is asking for children. This 
1936         ensures information is always up to date when the parent itself is asking for new data.
1937
1938         Test: accessibility/aria-hidden-updates-alldescendants.html
1939
1940         * accessibility/AccessibilityObject.h:
1941         * accessibility/AccessibilityRenderObject.cpp:
1942         (WebCore::AccessibilityRenderObject::ariaIsHidden):
1943         (WebCore::AccessibilityRenderObject::childrenChanged):
1944         (WebCore::AccessibilityRenderObject::addChildren):
1945
1946 2011-09-07  Tim Horton  <timothy_horton@apple.com>
1947
1948         Text rendered with a simple (i.e. 0px blur) shadow inside a transparency layer has a double shadow
1949         https://bugs.webkit.org/show_bug.cgi?id=67543
1950         <rdar://problem/10070536>
1951
1952         Reviewed by Simon Fraser.
1953
1954         Generalize (begin|end)TransparencyLayer, which now forward
1955         through to (begin|end)PlatformTransparencyLayer, so that
1956         isInTransparencyLayer can exist on every platform.
1957
1958         Make use of isInTransparencyLayer in FontMac to disable
1959         "simple" shadow drawing when the text is being rendered
1960         into a transparency layer.
1961
1962         Test: svg/custom/simple-text-double-shadow.svg
1963
1964         * platform/graphics/GraphicsContext.cpp:
1965         (WebCore::GraphicsContext::GraphicsContext):
1966         (WebCore::GraphicsContext::~GraphicsContext):
1967         (WebCore::GraphicsContext::beginTransparencyLayer):
1968         (WebCore::GraphicsContext::endTransparencyLayer):
1969         (WebCore::GraphicsContext::isInTransparencyLayer):
1970         * platform/graphics/GraphicsContext.h:
1971         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1972         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1973         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1974         (WebCore::GraphicsContext::supportsTransparencyLayers):
1975         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1976         * platform/graphics/cg/GraphicsContextCG.cpp:
1977         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1978         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1979         (WebCore::GraphicsContext::supportsTransparencyLayers):
1980         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
1981         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1982         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
1983         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1984         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1985         (WebCore::GraphicsContext::supportsTransparencyLayers):
1986         * platform/graphics/mac/FontMac.mm:
1987         (WebCore::Font::drawGlyphs):
1988         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
1989         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1990         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1991         (WebCore::GraphicsContext::supportsTransparencyLayers):
1992         * platform/graphics/qt/GraphicsContextQt.cpp:
1993         (WebCore::GraphicsContext::isInTransparencyLayer):
1994         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1995         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1996         (WebCore::GraphicsContext::supportsTransparencyLayers):
1997         * platform/graphics/skia/GraphicsContextSkia.cpp:
1998         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1999         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2000         (WebCore::GraphicsContext::supportsTransparencyLayers):
2001         * platform/graphics/win/FontCGWin.cpp:
2002         (WebCore::drawGDIGlyphs):
2003         * platform/graphics/win/GraphicsContextCGWin.cpp:
2004         (WebCore::GraphicsContext::releaseWindowsContext):
2005         * platform/graphics/win/GraphicsContextCairoWin.cpp:
2006         (WebCore::GraphicsContext::releaseWindowsContext):
2007         * platform/graphics/win/GraphicsContextWin.cpp:
2008         (WebCore::GraphicsContext::getWindowsContext):
2009         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2010         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2011         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2012         (WebCore::GraphicsContext::supportsTransparencyLayers):
2013         * platform/graphics/wx/GraphicsContextWx.cpp:
2014         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2015         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2016         (WebCore::GraphicsContext::supportsTransparencyLayers):
2017         * platform/win/ScrollbarThemeWin.cpp:
2018         * plugins/win/PluginViewWin.cpp:
2019         * rendering/RenderThemeWin.cpp:
2020
2021 2011-09-07  Dan Bernstein  <mitz@apple.com>
2022
2023         <rdar://problem/8881922> Support the hyphenate-limit-lines property
2024         https://bugs.webkit.org/show_bug.cgi?id=67730
2025
2026         Reviewed by Dave Hyatt.
2027
2028         Tests: fast/css/parsing-hyphenate-limit-lines.html
2029                fast/text/hyphenate-limit-lines.html
2030
2031         * css/CSSComputedStyleDeclaration.cpp:
2032         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added hyphenate-limit-lines.
2033         * css/CSSParser.cpp:
2034         (WebCore::CSSParser::parseValue): Ditto. Valid values are non-negative integers and the keyword
2035         "no-limit".
2036         * css/CSSPropertyNames.in: Added -webkit-hyphenate-limit-lines.
2037         * css/CSSStyleSelector.cpp:
2038         (WebCore::CSSStyleSelector::applyProperty): Added hyphenate-limit-lines.
2039         * css/CSSValueKeywords.in: Added the "no-limit" value keyword.
2040         * rendering/RenderBlock.h:
2041         * rendering/RenderBlockLineLayout.cpp:
2042         (WebCore::RenderBlock::layoutRunsAndFloats): Count the number of consecutive hyphenated lines
2043         before the start line and pass it to layoutRunsAndFloatsInRange().
2044         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Keep track of the number of consecutive
2045         hyphenated lines before the current line and pass it to LineBreaker::nextLineBreak().
2046         (WebCore::tryHyphenating): Added parameters for the number of consecutive hyphenated lines before
2047         the current line and the limit on consecutive hyphenated lines, and an early return if the limit
2048         has been reached.
2049         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Added a parameter for the number of consecutive
2050         hyphenated lines before the current line, which is passed through to tryHyphenating, along with
2051         the value of hyphenate-limit-lines.
2052         * rendering/RootInlineBox.cpp:
2053         (WebCore::RootInlineBox::isHyphenated): Added. Returns true if the line was hyphenated.
2054         * rendering/RootInlineBox.h:
2055         * rendering/style/RenderStyle.h:
2056         (WebCore::InheritedFlags::hyphenationLimitLines): Added this getter.
2057         (WebCore::InheritedFlags::setHyphenationLimitLines): Added this setter.
2058         (WebCore::InheritedFlags::initialHyphenationLimitLines): Added. The initial value is -1,
2059         corresponding to "no-limit".
2060         * rendering/style/StyleRareInheritedData.cpp:
2061         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Initialize new member variable.
2062         (WebCore::StyleRareInheritedData::operator==): Compare new member variable.
2063         * rendering/style/StyleRareInheritedData.h:
2064
2065 2011-09-02  Ojan Vafai  <ojan@chromium.org>
2066
2067         split overrideSize into overrideHeight and overrideWidth
2068         https://bugs.webkit.org/show_bug.cgi?id=67550
2069
2070         Reviewed by Sam Weinig.
2071
2072         All uses of overrideSize only set one of the width or the height.
2073         This change removes a bool from RenderObject and removes some
2074         flexbox specific logic from RenderBox.
2075
2076         The only downside is that we have two global maps where we used
2077         to have one.
2078
2079         No functional changes so existing tests are sufficient.
2080
2081         * rendering/RenderBox.cpp:
2082         (WebCore::RenderBox::hasOverrideHeight):
2083         (WebCore::RenderBox::hasOverrideWidth):
2084         (WebCore::RenderBox::setOverrideHeight):
2085         (WebCore::RenderBox::setOverrideWidth):
2086         (WebCore::RenderBox::clearOverrideSize):
2087         (WebCore::RenderBox::overrideWidth):
2088         (WebCore::RenderBox::overrideHeight):
2089         (WebCore::RenderBox::computeLogicalWidth):
2090         (WebCore::RenderBox::computeLogicalHeight):
2091         (WebCore::RenderBox::computePercentageLogicalHeight):
2092         * rendering/RenderBox.h:
2093         * rendering/RenderDeprecatedFlexibleBox.cpp:
2094         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2095         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2096         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
2097         * rendering/RenderFlexibleBox.cpp:
2098         (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenHorizontal):
2099         * rendering/RenderObject.cpp:
2100         (WebCore::RenderObject::RenderObject):
2101         * rendering/RenderObject.h:
2102         * rendering/RenderTableCell.cpp:
2103         (WebCore::RenderTableCell::setOverrideHeightFromRowHeight):
2104         * rendering/RenderTableCell.h:
2105         * rendering/RenderTableSection.cpp:
2106         (WebCore::RenderTableSection::calcRowLogicalHeight):
2107         (WebCore::RenderTableSection::layoutRows):
2108
2109 2011-09-07  Alexei Svitkine  <asvitkine@chromium.org>
2110
2111         Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path.
2112         https://bugs.webkit.org/show_bug.cgi?id=67511
2113
2114         Reviewed by Dimitri Glazkov.
2115
2116         Tests: platform/chromium-mac/rubberbanding/overhang-e.html
2117                platform/chromium-mac/rubberbanding/overhang-n.html
2118                platform/chromium-mac/rubberbanding/overhang-ne.html
2119                platform/chromium-mac/rubberbanding/overhang-nw.html
2120                platform/chromium-mac/rubberbanding/overhang-s.html
2121                platform/chromium-mac/rubberbanding/overhang-se.html
2122                platform/chromium-mac/rubberbanding/overhang-sw.html
2123                platform/chromium-mac/rubberbanding/overhang-w.html
2124
2125         * WebCore.exp.in:
2126         * platform/ScrollableArea.h:
2127         * testing/Internals.cpp:
2128         (WebCore::Internals::setScrollViewPosition):
2129         * testing/Internals.h:
2130         * testing/Internals.idl:
2131
2132 2011-09-07  David Reveman  <reveman@chromium.org>
2133
2134         [Chromium] Render surface anti-aliasing.
2135         https://bugs.webkit.org/show_bug.cgi?id=66437
2136
2137         Reviewed by James Robinson.
2138
2139         Add CCLayerQuad class and CCLayerQuad::Edge subclass to allow
2140         edge computations to be shared between tiled layers and render
2141         surfaces. Move isCCW utility function to FloatQuad class and
2142         add to2dTransform method to TransformationMatrix class. Add
2143         necessary anti-aliasing shaders for render surfaces and use them
2144         to avoid aliased edges.
2145
2146         Tests: compositing/reflections/nested-reflection-transformed.html (existing)
2147
2148         * WebCore.gypi:
2149         * platform/graphics/FloatQuad.cpp:
2150         (WebCore::FloatQuad::isCounterclockwise):
2151         * platform/graphics/FloatQuad.h:
2152         * platform/graphics/chromium/LayerChromium.cpp:
2153         (WebCore::LayerChromium::drawTexturedQuad):
2154         * platform/graphics/chromium/LayerChromium.h:
2155         * platform/graphics/chromium/LayerRendererChromium.cpp:
2156         (WebCore::LayerRendererChromium::LayerRendererChromium):
2157         (WebCore::LayerRendererChromium::headsUpDisplayProgram):
2158         (WebCore::LayerRendererChromium::renderSurfaceProgram):
2159         (WebCore::LayerRendererChromium::renderSurfaceProgramAA):
2160         (WebCore::LayerRendererChromium::renderSurfaceMaskProgram):
2161         (WebCore::LayerRendererChromium::renderSurfaceMaskProgramAA):
2162         (WebCore::LayerRendererChromium::tilerProgramSwizzle):
2163         (WebCore::LayerRendererChromium::canvasLayerProgram):
2164         (WebCore::LayerRendererChromium::pluginLayerProgram):
2165         (WebCore::LayerRendererChromium::videoLayerRGBAProgram):
2166         (WebCore::LayerRendererChromium::videoLayerYUVProgram):
2167         (WebCore::LayerRendererChromium::cleanupSharedObjects):
2168         * platform/graphics/chromium/LayerRendererChromium.h:
2169         (WebCore::LayerRendererChromium::sharedGeometryQuad):
2170         * platform/graphics/chromium/ShaderChromium.cpp:
2171         (WebCore::VertexShaderQuad::VertexShaderQuad):
2172         (WebCore::VertexShaderQuad::init):
2173         (WebCore::VertexShaderQuad::getShaderString):
2174         (WebCore::FragmentShaderRGBATexAlphaAA::FragmentShaderRGBATexAlphaAA):
2175         (WebCore::FragmentShaderRGBATexAlphaAA::init):
2176         (WebCore::FragmentShaderRGBATexAlphaAA::getShaderString):
2177         (WebCore::FragmentTexClampAlphaAABinding::FragmentTexClampAlphaAABinding):
2178         (WebCore::FragmentTexClampAlphaAABinding::init):
2179         (WebCore::FragmentShaderRGBATexClampAlphaAA::getShaderString):
2180         (WebCore::FragmentShaderRGBATexClampSwizzleAlphaAA::getShaderString):
2181         (WebCore::FragmentShaderRGBATexAlphaMaskAA::FragmentShaderRGBATexAlphaMaskAA):
2182         (WebCore::FragmentShaderRGBATexAlphaMaskAA::init):
2183         (WebCore::FragmentShaderRGBATexAlphaMaskAA::getShaderString):
2184         * platform/graphics/chromium/ShaderChromium.h:
2185         (WebCore::VertexShaderQuad::matrixLocation):
2186         (WebCore::VertexShaderQuad::pointLocation):
2187         (WebCore::FragmentShaderRGBATexAlphaAA::alphaLocation):
2188         (WebCore::FragmentShaderRGBATexAlphaAA::samplerLocation):
2189         (WebCore::FragmentShaderRGBATexAlphaAA::edgeLocation):
2190         (WebCore::FragmentShaderRGBATexAlphaMaskAA::alphaLocation):
2191         (WebCore::FragmentShaderRGBATexAlphaMaskAA::samplerLocation):
2192         (WebCore::FragmentShaderRGBATexAlphaMaskAA::maskSamplerLocation):
2193         (WebCore::FragmentShaderRGBATexAlphaMaskAA::edgeLocation):
2194         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
2195         (WebCore::CCCanvasLayerImpl::draw):
2196         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2197         (WebCore::CCHeadsUpDisplay::draw):
2198         * platform/graphics/chromium/cc/CCLayerQuad.cpp: Added.
2199         (WebCore::CCLayerQuad::Edge::Edge):
2200         (WebCore::CCLayerQuad::CCLayerQuad):
2201         (WebCore::CCLayerQuad::floatQuad):
2202         (WebCore::CCLayerQuad::toFloatArray):
2203         * platform/graphics/chromium/cc/CCLayerQuad.h: Added.
2204         (WebCore::CCLayerQuad::Edge::Edge):
2205         (WebCore::CCLayerQuad::Edge::x):
2206         (WebCore::CCLayerQuad::Edge::y):
2207         (WebCore::CCLayerQuad::Edge::z):
2208         (WebCore::CCLayerQuad::Edge::setX):
2209         (WebCore::CCLayerQuad::Edge::setY):
2210         (WebCore::CCLayerQuad::Edge::setZ):
2211         (WebCore::CCLayerQuad::Edge::set):
2212         (WebCore::CCLayerQuad::Edge::moveX):
2213         (WebCore::CCLayerQuad::Edge::moveY):
2214         (WebCore::CCLayerQuad::Edge::moveZ):
2215         (WebCore::CCLayerQuad::Edge::move):
2216         (WebCore::CCLayerQuad::Edge::scaleX):
2217         (WebCore::CCLayerQuad::Edge::scaleY):
2218         (WebCore::CCLayerQuad::Edge::scaleZ):
2219         (WebCore::CCLayerQuad::Edge::scale):
2220         (WebCore::CCLayerQuad::Edge::intersect):
2221         (WebCore::CCLayerQuad::CCLayerQuad):
2222         (WebCore::CCLayerQuad::left):
2223         (WebCore::CCLayerQuad::top):
2224         (WebCore::CCLayerQuad::right):
2225         (WebCore::CCLayerQuad::bottom):
2226         (WebCore::CCLayerQuad::inflateX):
2227         (WebCore::CCLayerQuad::inflateY):
2228         (WebCore::CCLayerQuad::inflate):
2229         (WebCore::CCLayerQuad::inflateAntiAliasingDistance):
2230         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
2231         (WebCore::CCPluginLayerImpl::draw):
2232         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2233         (WebCore::CCRenderSurface::draw):
2234         (WebCore::CCRenderSurface::drawLayer):
2235         (WebCore::CCRenderSurface::drawSurface):
2236         * platform/graphics/chromium/cc/CCRenderSurface.h:
2237         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2238         (WebCore::CCTiledLayerImpl::draw):
2239         (WebCore::CCTiledLayerImpl::drawTiles):
2240         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2241         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2242         (WebCore::CCVideoLayerImpl::drawYUV):
2243         (WebCore::CCVideoLayerImpl::drawRGBA):
2244         * platform/graphics/transforms/TransformationMatrix.cpp:
2245         (WebCore::TransformationMatrix::to2dTransform):
2246         * platform/graphics/transforms/TransformationMatrix.h:
2247
2248 2011-09-06  Oliver Hunt  <oliver@apple.com>
2249
2250         Remove JSObjectWithGlobalObject
2251         https://bugs.webkit.org/show_bug.cgi?id=67689
2252
2253         Reviewed by Geoff Garen.
2254
2255         Remove use of anonymous storage and JSObjectWithGlobalObject for
2256         accessing a JSObject's global object now that they're available
2257         on the object's structure.
2258
2259         * bindings/js/JSDOMWindowShell.cpp:
2260         (WebCore::JSDOMWindowShell::setWindow):
2261         * bindings/js/JSDOMWrapper.h:
2262         (WebCore::JSDOMWrapper::globalObject):
2263         (WebCore::JSDOMWrapper::JSDOMWrapper):
2264         * bindings/js/WorkerScriptController.cpp:
2265         (WebCore::WorkerScriptController::initScript):
2266         * bindings/scripts/CodeGeneratorJS.pm:
2267         (GenerateHeader):
2268         (GenerateImplementation):
2269         * bridge/objc/objc_runtime.h:
2270         * bridge/objc/objc_runtime.mm:
2271         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
2272         (JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
2273         * bridge/runtime_object.cpp:
2274         (JSC::Bindings::RuntimeObject::RuntimeObject):
2275         (JSC::Bindings::RuntimeObject::finishCreation):
2276         * bridge/runtime_object.h:
2277
2278 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
2279
2280         Mac build fix after r94694.
2281
2282         * WebCore.xcodeproj/project.pbxproj:
2283
2284 2011-09-07  Tim Horton  <timothy_horton@apple.com>
2285
2286         FELighting is using width instead of height to determine skip for parallel(n>2) case
2287         https://bugs.webkit.org/show_bug.cgi?id=67719
2288         <rdar://problem/10086178>
2289
2290         Reviewed by Dirk Schulze.
2291
2292         No new tests, because the bug only exhibits under conditions which are currently
2293         impossible by default (using more than 2 cores) on some platforms.
2294
2295         * platform/graphics/filters/FELighting.cpp:
2296         (WebCore::FELighting::platformApplyGeneric):
2297
2298 2011-09-07  W. James MacLean  <wjmaclean@chromium.org>
2299
2300         Eliminate motion jitter in animated, blurred SVG image
2301         https://bugs.webkit.org/show_bug.cgi?id=67503
2302
2303         Fixes filter shear-free transform applied to SVG images.
2304
2305         In applyResource() the shearFreeAbsoluteTransform is applied to the drawing region,
2306         which is based on the object bounding box (which doesn't move). For a rotation
2307         around the centre of the box, this should really just be the identity matrix,
2308         since the BB should neither change size nor location. So really, we're just interested
2309         in the scale change of the BB here, and not in moving it.
2310
2311         This impacts how slices are extracted, and affects the {x|y}Mid and {x|y}Max extractions
2312         for vertical and horizontal slices, so the test verifies these.
2313
2314         Reviewed by Dirk Schulze.
2315
2316         Test: svg/W3C-SVG-1.1-SE/filters-image-05-f.svg
2317
2318         * rendering/svg/RenderSVGResourceFilter.cpp:
2319         (WebCore::RenderSVGResourceFilter::applyResource):
2320
2321 2011-09-03  Robert Hogan  <robert@webkit.org>
2322
2323         Elements with position:absolute don't move to correct position after images load
2324         https://bugs.webkit.org/show_bug.cgi?id=54611
2325
2326         Reviewed by Simon Fraser.
2327
2328         Test: fast/block/positioning/absolute-layout-after-image-load.html
2329               fast/block/positioning/positioned-float-layout-after-image-load.html
2330
2331         In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, 
2332         this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires 
2333         the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. 
2334         There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. Do the same
2335         for positioned floats in RenderBlock::positionedFloatsNeedRelayout(), although currently layoutPositionedObjects()
2336         takes care of it this at least ensures no regression in future.
2337
2338         Note: Although the issue is encountered only on first load without a fragment identifier, it 
2339         happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so 
2340         because scrolling to the fragment always happens before the image has loaded, rendering the page 
2341         and clearing the initial dirty bits in the positioned element's renderer. When the image finally 
2342         loads in this scenario, the positioned element is otherwise clean and relies on the above code to get 
2343         re-rendered.
2344
2345         * rendering/RenderBlock.cpp:
2346         (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when 
2347                                                          deciding whether to mark children for layout
2348         (WebCore::RenderBlock::positionedFloatsNeedRelayout): ditto
2349
2350 2011-09-07  Anna Cavender  <annacc@chromium.org>
2351
2352         Moving platform/track to html/track to avoid layering violation.
2353         https://bugs.webkit.org/show_bug.cgi?id=67680
2354
2355         Reviewed by Adam Barth.
2356
2357         No new tests. No new functionality.
2358
2359         * CMakeLists.txt:
2360         * GNUmakefile.am:
2361         * GNUmakefile.list.am:
2362         * WebCore.gyp/WebCore.gyp:
2363         * WebCore.gypi:
2364         * WebCore.pri:
2365         * WebCore.pro:
2366         * html/track/CueParser.cpp: Renamed from Source/WebCore/platform/track/CueParser.cpp.
2367         * html/track/CueParser.h: Renamed from Source/WebCore/platform/track/CueParser.h.
2368         * html/track/CueParserPrivate.h: Renamed from Source/WebCore/platform/track/CueParserPrivate.h.
2369         * html/track/WebVTTParser.cpp: Renamed from Source/WebCore/platform/track/WebVTTParser.cpp.
2370         * html/track/WebVTTParser.h: Renamed from Source/WebCore/platform/track/WebVTTParser.h.
2371         * html/track/WebVTTToken.h: Renamed from Source/WebCore/platform/track/WebVTTToken.h.
2372         * html/track/WebVTTTokenizer.cpp: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.cpp.
2373         * html/track/WebVTTTokenizer.h: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.h.
2374
2375 2011-09-07  David Hyatt  <hyatt@apple.com>
2376
2377         https://bugs.webkit.org/show_bug.cgi?id=67286
2378
2379         REGRESSION: css2.1/t090204-display-change-01-b-ao.html fails after r94084.
2380
2381         Make sure that the trailing floats line box explicitly sets the line top with leading and line bottom with
2382         leading to just be the block height.
2383
2384         Reviewed by Dan Bernstein.
2385
2386         * rendering/RenderBlockLineLayout.cpp:
2387         (WebCore::RenderBlock::linkToEndLineIfNeeded):
2388
2389 2011-09-06  Abhishek Arya  <inferno@chromium.org>
2390
2391         Null owningRenderer crash in RenderScrollbar::updateScrollbarParts.
2392         https://bugs.webkit.org/show_bug.cgi?id=67669
2393
2394         Reviewed by James Robinson.
2395
2396         Owning renderer can be cleared for custom scrollbars in clearOwningRenderer()
2397         call. We need a null check in updateScrollbarParts, so that we do not crash.
2398
2399         No tests since issue seen in crash reports only and I donot know a way to
2400         reproduce.
2401
2402         * rendering/RenderScrollbar.cpp:
2403         (WebCore::RenderScrollbar::updateScrollbarParts):
2404
2405 2011-09-05  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2406
2407         [Qt][WK2] Make TiledDrawingArea request tiles only in the direction the viewport is panned to.
2408         https://bugs.webkit.org/show_bug.cgi?id=67606
2409
2410         Reviewed by Noam Rosenthal.
2411
2412         TiledBackingStore previously used different values for horizontal and vertial multiplication
2413         to calculate the cover area.
2414         This patch replaces this mechanism, used to give a bigger panning range to vertical panning,
2415         with the possibility to use the motion vector of the viewport to request tiles ahead instead.
2416         This allows economies on rendering resources as tiles won't be rendered beside the trajectory
2417         of the viewport.
2418
2419         * platform/graphics/TiledBackingStore.cpp:
2420         (WebCore::TiledBackingStore::TiledBackingStore):
2421         (WebCore::TiledBackingStore::setKeepAndCoverAreaMultipliers):
2422         (WebCore::TiledBackingStore::setCoverAreaFocusVector):
2423         (WebCore::TiledBackingStore::createTiles):
2424         (WebCore::TiledBackingStore::calculateKeepRect):
2425         (WebCore::TiledBackingStore::calculateCoverRect):
2426         * platform/graphics/TiledBackingStore.h:
2427         (WebCore::TiledBackingStore::getKeepAndCoverAreaMultipliers):
2428
2429 2011-09-01  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2430
2431         [Qt] TiledBackingStore: Import the resizeEdgeTiles logic from TiledDrawindAreaProxy.
2432         https://bugs.webkit.org/show_bug.cgi?id=67416
2433
2434         Reviewed by Kenneth Rohde Christiansen.
2435
2436         Original code by Antti Koivisto.
2437         With the current code, when the page is layouted during load, edge tiles will
2438         get removed instead of continuing to show their front buffer while the tile
2439         is being rendered for the new size.
2440
2441         * platform/graphics/Tile.h:
2442         * platform/graphics/TiledBackingStore.cpp:
2443         (WebCore::TiledBackingStore::createTiles):
2444         (WebCore::TiledBackingStore::resizeEdgeTiles):
2445         * platform/graphics/TiledBackingStore.h:
2446         * platform/graphics/qt/TileQt.cpp:
2447         (WebCore::TileQt::resize):
2448         * platform/graphics/qt/TileQt.h:
2449
2450 2011-09-07  Tim Horton  <timothy_horton@apple.com>
2451
2452         Don't round-trip through TransformationMatrix in SVGImageBufferTools::clearAffineTransform2DRotation
2453         https://bugs.webkit.org/show_bug.cgi?id=67242
2454         <rdar://problem/10069770>
2455
2456         Reviewed by Dirk Schulze.
2457
2458         No new tests, minor performance improvement.
2459
2460         * platform/graphics/transforms/AffineTransform.cpp:
2461         (WebCore::AffineTransform::blend):
2462         (WebCore::AffineTransform::decompose):
2463         (WebCore::AffineTransform::recompose):
2464         * platform/graphics/transforms/AffineTransform.h:
2465         * rendering/svg/SVGImageBufferTools.cpp:
2466         (WebCore::SVGImageBufferTools::clear2DRotation):
2467
2468 2011-09-06  Pavel Podivilov  <podivilov@chromium.org>
2469
2470         Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode.
2471         https://bugs.webkit.org/show_bug.cgi?id=67647
2472
2473         1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything.
2474         2) Add RawSourceCode unit tests.
2475         3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now).
2476
2477         Reviewed by Yury Semikhatsky.
2478
2479         Test: inspector/debugger/raw-source-code.html
2480
2481         * inspector/front-end/DebuggerPresentationModel.js:
2482         (WebInspector.DebuggerPresentationModel):
2483         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
2484         (WebInspector.DebuggerPresentationModel.prototype._addScript):
2485         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
2486         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
2487         (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId):
2488         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
2489         * inspector/front-end/ScriptsPanel.js:
2490         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
2491         * inspector/front-end/SourceFile.js:
2492         (WebInspector.RawSourceCode):
2493         (WebInspector.RawSourceCode.prototype.get uiSourceCode):
2494         (WebInspector.RawSourceCode.prototype.setFormatted):
2495         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
2496         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
2497
2498 2011-09-07  Alexander Pavlov  <apavlov@chromium.org>
2499
2500         Web Inspector: Implement circular tabbing through the Styles sidebar pane contents
2501         https://bugs.webkit.org/show_bug.cgi?id=67127
2502
2503         Reviewed by Yury Semikhatsky.
2504
2505         * inspector/front-end/Section.js:
2506         (WebInspector.Section.prototype.get firstSibling):
2507         (WebInspector.Section.prototype.get lastSibling):
2508         * inspector/front-end/StylesSidebarPane.js:
2509         (WebInspector.StylePropertiesSection.prototype.nextEditableSibling):
2510         (WebInspector.StylePropertiesSection.prototype.previousEditableSibling):
2511         (WebInspector.StylePropertiesSection.prototype.startEditingSelector):
2512         (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector):
2513         (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback):
2514         (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
2515         (WebInspector.StylePropertyTreeElement.prototype):
2516         (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection):
2517
2518 2011-09-02  Andrey Kosyakov  <caseq@chromium.org>
2519
2520         Web Inspector: [Extensions API] expose console API
2521         https://bugs.webkit.org/show_bug.cgi?id=67506
2522
2523         Reviewed by Pavel Feldman.
2524
2525         Test: inspector/extensions/extensions-console.html
2526
2527         * inspector/front-end/ConsoleMessage.js:
2528         (WebInspector.ConsoleMessage.prototype.get text):
2529         (WebInspector.ConsoleMessage.prototype.get parameters):
2530         * inspector/front-end/ExtensionAPI.js:
2531         (WebInspector.injectedExtensionAPI.InspectorExtensionAPI):
2532         (WebInspector.injectedExtensionAPI):
2533         (WebInspector.injectedExtensionAPI.Console.prototype.getMessages):
2534         (WebInspector.injectedExtensionAPI.Console.prototype.addMessage):
2535         (WebInspector.injectedExtensionAPI.Console.prototype.get MessageLevel):
2536         (WebInspector.injectedExtensionAPI.Network.dispatchRequestEvent):
2537         (WebInspector.injectedExtensionAPI.Network):
2538         (WebInspector.injectedExtensionAPI.AuditCategoryImpl.dispatchAuditEvent):
2539         (WebInspector.injectedExtensionAPI.AuditCategoryImpl):
2540         (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceEvent):
2541         (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceContentEvent):
2542         (WebInspector.injectedExtensionAPI.InspectedWindow):
2543         * inspector/front-end/ExtensionCommon.js:
2544         (WebInspector.commonExtensionSymbols):
2545         * inspector/front-end/ExtensionServer.js:
2546         (WebInspector.ExtensionServer):
2547         (WebInspector.ExtensionServer.prototype._notifyConsoleMessageAdded):
2548         (WebInspector.ExtensionServer.prototype._onGetConsoleMessages):
2549         (WebInspector.ExtensionServer.prototype._onAddConsoleMessage):
2550         (WebInspector.ExtensionServer.prototype._makeConsoleMessage):
2551         (WebInspector.ExtensionServer.prototype._makeConsoleMessage.convertParameter):
2552         (WebInspector.ExtensionServer.prototype._dispatchCallback):
2553         (WebInspector.ExtensionServer.prototype.initExtensions):
2554
2555 2011-09-05  Andrey Kosyakov  <caseq@chromium.org>
2556
2557         Web Inspector: disable popover when a mouse button is pressed
2558         https://bugs.webkit.org/show_bug.cgi?id=67610
2559
2560         Reviewed by Pavel Feldman.
2561
2562         - disable popover when a mouse button is pressed
2563         - disable popover in a SourceFrame when the source is being edited
2564
2565         * inspector/front-end/Popover.js:
2566         (WebInspector.PopoverHelper):
2567         (WebInspector.PopoverHelper.prototype._mouseUp):
2568         (WebInspector.PopoverHelper.prototype._mouseDown):
2569         (WebInspector.PopoverHelper.prototype._handleMouseAction):
2570         * inspector/front-end/SourceFrame.js:
2571         (WebInspector.SourceFrame.prototype._onHidePopover):
2572         (WebInspector.SourceFrame.prototype.doubleClick):
2573
2574 2011-09-07  Antti Koivisto  <antti@apple.com>
2575
2576         https://bugs.webkit.org/show_bug.cgi?id=67634
2577         De-virtualize styleForRenderer()
2578
2579         Reviewed by Sam Weinig.
2580         
2581         This has performance and code clarity benefits.
2582
2583         - move styleForRenderer from Node to Element
2584         - get rid of the now unnecessary NodeRenderingContext parameter
2585         - de-virtualize, add virtual customStyleForRenderer()
2586
2587         * dom/Element.cpp:
2588         (WebCore::Element::customStyleForRenderer):
2589         (WebCore::Element::styleForRenderer):
2590         (WebCore::Element::recalcStyle):
2591         * dom/Element.h:
2592         * dom/Node.cpp:
2593         * dom/Node.h:
2594         (WebCore::Node::hasCustomWillOrDidRecalcStyle):
2595         (WebCore::Node::setHasCustomWillOrDidRecalcStyle):
2596         (WebCore::Node::hasCustomStyleForRenderer):
2597         (WebCore::Node::setHasCustomStyleForRenderer):
2598         
2599             Move styleForRenderer, add customStyleForRenderer, add a bit.
2600         
2601         * dom/NodeRenderingContext.cpp:
2602         (WebCore::NodeRendererFactory::createRendererAndStyle): 
2603         
2604             Handle non-element case separately since styleForRenderer was moved from Node to Element.
2605
2606         * html/HTMLNoScriptElement.cpp:
2607         (WebCore::HTMLNoScriptElement::HTMLNoScriptElement):
2608         (WebCore::HTMLNoScriptElement::customStyleForRenderer):
2609         * html/HTMLNoScriptElement.h:
2610         
2611             Move a strange XHTMLMP special case to where it belongs.
2612
2613         * html/HTMLOptGroupElement.cpp:
2614         (WebCore::HTMLOptGroupElement::attach):
2615         * html/HTMLOptionElement.cpp:
2616         (WebCore::HTMLOptionElement::attach):
2617         * html/HTMLTitleElement.cpp:
2618         (WebCore::HTMLTitleElement::textWithDirection):
2619         * html/shadow/TextControlInnerElements.cpp:
2620         (WebCore::TextControlInnerElement::TextControlInnerElement):
2621         (WebCore::TextControlInnerElement::customStyleForRenderer):
2622         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
2623         (WebCore::TextControlInnerTextElement::customStyleForRenderer):
2624         * html/shadow/TextControlInnerElements.h:
2625         * rendering/svg/SVGShadowTreeElements.cpp:
2626         (WebCore::SVGShadowTreeContainerElement::customStyleForRenderer):
2627         * rendering/svg/SVGShadowTreeElements.h:
2628         * svg/SVGElement.cpp:
2629         (WebCore::SVGElement::SVGElement):
2630         (WebCore::SVGElement::customStyleForRenderer):
2631         * svg/SVGElement.h:
2632         
2633             Adopt customStyleForRenderer().
2634
2635 2011-09-07  Ryosuke Niwa  <rniwa@webkit.org>
2636
2637         Change event is not fired for input[type=number] when the user reverts a change made by script
2638         https://bugs.webkit.org/show_bug.cgi?id=67697
2639
2640         Reviewed by Kent Tamura.
2641
2642         The bug was caused by HTMLInputElement::setValue not calling setTextAsOfLastFormControlChangeEvent
2643         for text fields other than type=text.
2644
2645         Also fixed a that stepUpFromRenderer does not call setTextAsOfLastFormControlChangeEvent at appropriate
2646         timing due to setValueAsNumber always passing sendChangeEvent=false to setValue by propagating values
2647         through setValueAsNumber and applyStep. This refactoring allows us to remove calls to dispatch* in
2648         stepUpFromRenderer because they're now called in setValueAsNumber or applyStep.
2649
2650         Test: fast/forms/number-input-changeevent.html
2651
2652         * html/BaseDateAndTimeInputType.cpp:
2653         (WebCore::BaseDateAndTimeInputType::setValueAsNumber):
2654         * html/BaseDateAndTimeInputType.h:
2655         * html/HTMLInputElement.cpp:
2656         (WebCore::HTMLInputElement::applyStep):
2657         (WebCore::HTMLInputElement::stepUp):
2658         (WebCore::HTMLInputElement::stepDown):
2659         (WebCore::HTMLInputElement::setValue):
2660         (WebCore::HTMLInputElement::setValueAsNumber):
2661         (WebCore::HTMLInputElement::stepUpFromRenderer):
2662         * html/HTMLInputElement.h:
2663         * html/InputType.cpp:
2664         (WebCore::InputType::setValueAsNumber):
2665         * html/InputType.h:
2666         * html/NumberInputType.cpp:
2667         (WebCore::NumberInputType::setValueAsNumber):
2668         * html/NumberInputType.h:
2669         * html/RangeInputType.cpp:
2670         (WebCore::RangeInputType::setValueAsNumber):
2671         (WebCore::RangeInputType::handleKeydownEvent):
2672         * html/RangeInputType.h:
2673
2674 2011-09-07  Antti Koivisto  <antti@apple.com>
2675
2676         Try to fix Qt build by moving the Qt specific include (which is not really allowed here!).
2677
2678         Not reviewed.
2679
2680         * css/CSSStyleSelector.cpp:
2681         * css/SelectorChecker.cpp:
2682         (WebCore::SelectorChecker::determineLinkStateSlowCase):
2683
2684 2011-09-07  Antti Koivisto  <antti@apple.com>
2685
2686         Move SelectorChecker out from CSSStyleSelector scope
2687         https://bugs.webkit.org/show_bug.cgi?id=67648
2688
2689         Reviewed by Sam Weinig.
2690
2691         - Move SelectorChecker to SelectorChecker.h/cpp
2692         - Make private functions private
2693         - Make members private, add accessors
2694         - Move m_sameOriginOnly to CSSStyleSelector as it is not used by SelectorChecker
2695
2696         * CMakeLists.txt:
2697         * GNUmakefile.list.am:
2698         * WebCore.gypi:
2699         * WebCore.pro:
2700         * WebCore.vcproj/WebCore.vcproj:
2701         * WebCore.xcodeproj/project.pbxproj:
2702         * css/CSSStyleSelector.cpp:
2703         (WebCore::CSSStyleSelector::CSSStyleSelector):
2704         (WebCore::CSSStyleSelector::matchRules):
2705         (WebCore::CSSStyleSelector::matchRulesForList):
2706         (WebCore::CSSStyleSelector::sortMatchedRules):
2707         (WebCore::CSSStyleSelector::initForStyleResolve):
2708         (WebCore::CSSStyleSelector::matchUARules):
2709         (WebCore::CSSStyleSelector::styleForElement):
2710         (WebCore::CSSStyleSelector::pseudoStyleForElement):
2711         (WebCore::CSSStyleSelector::styleForPage):
2712         (WebCore::CSSStyleSelector::adjustRenderStyle):
2713         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement):
2714         (WebCore::CSSStyleSelector::checkSelector):
2715         (WebCore::RuleData::RuleData):
2716         (WebCore::CSSStyleSelector::applyProperty):
2717         (WebCore::CSSStyleSelector::checkForGenericFamilyChange):
2718         (WebCore::CSSStyleSelector::setFontSize):
2719         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
2720         * css/CSSStyleSelector.h:
2721         (WebCore::CSSStyleSelector::style):
2722         (WebCore::CSSStyleSelector::parentStyle):
2723         (WebCore::CSSStyleSelector::rootElementStyle):
2724         (WebCore::CSSStyleSelector::element):
2725         (WebCore::CSSStyleSelector::fontDescription):
2726         (WebCore::CSSStyleSelector::parentFontDescription):
2727         (WebCore::CSSStyleSelector::setFontDescription):
2728         (WebCore::CSSStyleSelector::setZoom):
2729         (WebCore::CSSStyleSelector::setEffectiveZoom):
2730         (WebCore::CSSStyleSelector::setTextSizeAdjust):
2731         (WebCore::CSSStyleSelector::setStyle):
2732         (WebCore::CSSStyleSelector::fontSelector):
2733         (WebCore::CSSStyleSelector::allVisitedStateChanged):
2734         (WebCore::CSSStyleSelector::visitedStateChanged):
2735         (WebCore::CSSStyleSelector::usesSiblingRules):
2736         (WebCore::CSSStyleSelector::usesFirstLineRules):
2737         (WebCore::CSSStyleSelector::usesBeforeAfterRules):
2738         (WebCore::CSSStyleSelector::usesLinkRules):
2739         (WebCore::CSSStyleSelector::addMatchedRule):
2740         (WebCore::CSSStyleSelector::isRightPage):
2741         (WebCore::CSSStyleSelector::ParentStackFrame::ParentStackFrame):
2742         (WebCore::CSSStyleSelector::styleNotYetAvailable):
2743         * css/SelectorChecker.cpp: Added.
2744         (WebCore::SelectorChecker::SelectorChecker):
2745         (WebCore::linkAttribute):
2746         (WebCore::SelectorChecker::determineLinkStateSlowCase):
2747         (WebCore::SelectorChecker::checkSelector):
2748         (WebCore::SelectorChecker::fastCheckSelector):
2749         (WebCore::SelectorChecker::isFastCheckableSelector):
2750         (WebCore::addLocalNameToSet):
2751         (WebCore::createHtmlCaseInsensitiveAttributesSet):
2752         (WebCore::htmlAttributeHasCaseInsensitiveValue):
2753         (WebCore::attributeQualifiedNameMatches):
2754         (WebCore::attributeValueMatches):
2755         (WebCore::anyAttributeMatches):
2756         (WebCore::SelectorChecker::checkOneSelector):
2757         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
2758         (WebCore::SelectorChecker::allVisitedStateChanged):
2759         (WebCore::SelectorChecker::visitedStateChanged):
2760         * css/SelectorChecker.h: Added.
2761         (WebCore::SelectorChecker::document):
2762         (WebCore::SelectorChecker::strictParsing):
2763         (WebCore::SelectorChecker::isCollectingRulesOnly):
2764         (WebCore::SelectorChecker::setCollectingRulesOnly):
2765         (WebCore::SelectorChecker::isMatchingVisitedPseudoClass):
2766         (WebCore::SelectorChecker::setMatchingVisitedPseudoClass):
2767         (WebCore::SelectorChecker::pseudoStyle):
2768         (WebCore::SelectorChecker::setPseudoStyle):
2769         (WebCore::SelectorChecker::hasUnknownPseudoElements):
2770         (WebCore::SelectorChecker::clearHasUnknownPseudoElements):
2771         (WebCore::SelectorChecker::determineLinkState):
2772         * dom/Element.cpp:
2773         (WebCore::Element::webkitMatchesSelector):
2774         * dom/SelectorQuery.cpp:
2775         (WebCore::SelectorQuery::SelectorQuery):
2776         * dom/SelectorQuery.h:
2777
2778 2011-09-07  Dmitry Lomov  <dslomov@google.com>
2779
2780         https://bugs.webkit.org/show_bug.cgi?id=67413 
2781         [Chromium]Web Inspector: inspected page with dedicated worker crashes on refresh.
2782         This patch enforces lifetime ordering between WorkerInspectorController and WorkerScriptController.
2783
2784         Reviewed by Yury Semikhatsky.
2785
2786         * workers/WorkerContext.cpp:
2787         (WebCore::WorkerContext::clearInspector):
2788         * workers/WorkerContext.h:
2789         * workers/WorkerThread.cpp:
2790         (WebCore::WorkerThreadShutdownFinishTask::performTask):
2791
2792 2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2793
2794         Unreviewed, rolling out r94627 and r94632.
2795         http://trac.webkit.org/changeset/94627
2796         http://trac.webkit.org/changeset/94632
2797         https://bugs.webkit.org/show_bug.cgi?id=67698
2798
2799         It broke tests on GTK and Qt (Requested by Ossy on #webkit).
2800
2801         * WebCore.exp.in:
2802         * bindings/js/JSDOMBinding.h:
2803         (WebCore::DOMConstructorObject::DOMConstructorObject):
2804         * bindings/js/JSDOMGlobalObject.cpp:
2805         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
2806         * bindings/js/JSDOMGlobalObject.h:
2807         * bindings/js/JSDOMWindowShell.cpp:
2808         (WebCore::JSDOMWindowShell::create):
2809         * bindings/js/JSDOMWindowShell.h:
2810         * bindings/js/JSDOMWrapper.h:
2811         (WebCore::JSDOMWrapper::JSDOMWrapper):
2812         * bindings/scripts/CodeGeneratorJS.pm:
2813         (GenerateImplementation):
2814         * bindings/scripts/test/JS/JSTestInterface.cpp:
2815         (WebCore::JSTestInterface::JSTestInterface):
2816         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2817         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
2818         * bindings/scripts/test/JS/JSTestObj.cpp:
2819         (WebCore::JSTestObj::JSTestObj):
2820         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2821         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
2822         * bridge/c/CRuntimeObject.cpp:
2823         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
2824         * bridge/c/CRuntimeObject.h:
2825         * bridge/jni/jsc/JavaRuntimeObject.cpp:
2826         (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
2827         * bridge/jni/jsc/JavaRuntimeObject.h:
2828         * bridge/objc/ObjCRuntimeObject.h:
2829         * bridge/objc/ObjCRuntimeObject.mm:
2830         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
2831         * bridge/objc/objc_runtime.h:
2832         (JSC::Bindings::ObjcFallbackObjectImp::create):
2833         * bridge/objc/objc_runtime.mm:
2834         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
2835         * bridge/qt/qt_instance.cpp:
2836         (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
2837         * bridge/qt/qt_pixmapruntime.cpp:
2838         (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
2839         * bridge/qt/qt_runtime.cpp:
2840         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
2841         * bridge/qt/qt_runtime.h:
2842         * bridge/runtime_array.cpp:
2843         (JSC::RuntimeArray::RuntimeArray):
2844         * bridge/runtime_array.h:
2845         (JSC::RuntimeArray::create):
2846         * bridge/runtime_method.cpp:
2847         (JSC::RuntimeMethod::RuntimeMethod):
2848         * bridge/runtime_method.h:
2849         * bridge/runtime_object.cpp:
2850         (JSC::Bindings::RuntimeObject::RuntimeObject):
2851         * bridge/runtime_object.h:
2852         (JSC::Bindings::RuntimeObject::create):
2853
2854 2011-08-31  Yury Semikhatsky  <yurys@chromium.org>
2855
2856         fast/workers/worker-script-error.html fails on Chromium after r94061
2857         https://bugs.webkit.org/show_bug.cgi?id=67206
2858
2859         Default action should be prevented if window.onerror returned true and stay
2860         not prevented otherwise.
2861
2862         Reviewed by Dmitry Titov.
2863
2864         Tests: fast/events/window-onerror14.html
2865                fast/events/window-onerror15.html
2866                fast/events/window-onerror16.html
2867
2868         * bindings/v8/V8AbstractEventListener.cpp:
2869         (WebCore::V8AbstractEventListener::invokeEventHandler):
2870         (WebCore::V8AbstractEventListener::shouldPreventDefault): allow specific
2871         event listeners to decide when to prevent default action based on the handler
2872         return value.
2873         * bindings/v8/V8AbstractEventListener.h:
2874         * bindings/v8/V8WindowErrorHandler.cpp:
2875         (WebCore::V8WindowErrorHandler::callListenerFunction):
2876         (WebCore::V8WindowErrorHandler::shouldPreventDefault):
2877         * bindings/v8/V8WindowErrorHandler.h:
2878         * bindings/v8/V8WorkerContextErrorHandler.cpp:
2879         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
2880         (WebCore::V8WorkerContextErrorHandler::shouldPreventDefault):
2881         * bindings/v8/V8WorkerContextErrorHandler.h:
2882
2883 2011-09-06  Xianzhu Wang  <wangxianzhu@chromium.org>
2884
2885         Replace usages of Vector<UChar> with existing StringBuilder
2886         https://bugs.webkit.org/show_bug.cgi?id=67079
2887
2888         Reviewed by Gavin Barraclough.
2889
2890         No new tests. All existing unit tests and layout tests should run
2891         as before.
2892
2893         * css/CSSOMUtils.cpp:
2894         (WebCore::appendCharacter):
2895         (WebCore::serializeCharacter):
2896         (WebCore::serializeCharacterAsCodePoint):
2897         (WebCore::serializeIdentifier):
2898         (WebCore::serializeString):
2899         * css/CSSOMUtils.h:
2900         * css/CSSPrimitiveValue.cpp:
2901         (WebCore::CSSPrimitiveValue::cssText):
2902         * css/CSSStyleSelector.cpp:
2903         (WebCore::CSSStyleSelector::SelectorChecker::determineLinkStateSlowCase):
2904         * css/CSSWrapShapes.cpp:
2905         (WebCore::CSSWrapShapeRect::cssText):
2906         (WebCore::CSSWrapShapeCircle::cssText):
2907         (WebCore::CSSWrapShapeEllipse::cssText):
2908         (WebCore::CSSWrapShapePolygon::cssText):
2909         * editing/HTMLInterchange.cpp:
2910         (WebCore::convertHTMLTextToInterchangeFormat):
2911         * editing/MarkupAccumulator.cpp:
2912         (WebCore::appendCharactersReplacingEntities):
2913         (WebCore::MarkupAccumulator::serializeNodes):
2914         (WebCore::MarkupAccumulator::appendStartTag):
2915         (WebCore::MarkupAccumulator::appendEndTag):
2916         (WebCore::MarkupAccumulator::concatenateMarkup):
2917         (WebCore::MarkupAccumulator::appendAttributeValue):
2918         (WebCore::MarkupAccumulator::appendCustomAttributes):
2919         (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
2920         (WebCore::MarkupAccumulator::appendNodeValue):
2921         (WebCore::MarkupAccumulator::appendNamespace):
2922         (WebCore::MarkupAccumulator::appendText):
2923         (WebCore::MarkupAccumulator::appendComment):
2924         (WebCore::MarkupAccumulator::appendDocumentType):
2925         (WebCore::MarkupAccumulator::appendProcessingInstruction):
2926         (WebCore::MarkupAccumulator::appendElement):
2927         (WebCore::MarkupAccumulator::appendOpenTag):
2928         (WebCore::MarkupAccumulator::appendCloseTag):
2929         (WebCore::MarkupAccumulator::appendAttribute):
2930         (WebCore::MarkupAccumulator::appendCDATASection):
2931         (WebCore::MarkupAccumulator::appendStartMarkup):
2932         (WebCore::MarkupAccumulator::appendEndMarkup):
2933         * editing/MarkupAccumulator.h:
2934         * editing/markup.cpp:
2935         (WebCore::StyledMarkupAccumulator::appendElement):
2936         (WebCore::StyledMarkupAccumulator::wrapWithNode):
2937         (WebCore::StyledMarkupAccumulator::wrapWithStyleNode):
2938         (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag):
2939         (WebCore::StyledMarkupAccumulator::takeResults):
2940         (WebCore::StyledMarkupAccumulator::appendText):
2941         (WebCore::urlToMarkup):
2942         * html/DOMTokenList.cpp:
2943         (WebCore::DOMTokenList::removeToken):
2944         * html/HTMLFontElement.cpp:
2945         (WebCore::parseFontSize):
2946         * html/HTMLTextFormControlElement.cpp:
2947         (WebCore::HTMLTextFormControlElement::strippedPlaceholder):
2948         * html/parser/CSSPreloadScanner.cpp:
2949         (WebCore::CSSPreloadScanner::emitRule):
2950         * html/parser/CSSPreloadScanner.h:
2951         * html/parser/HTMLEntityParser.cpp:
2952         (WebCore::consumeHTMLEntity):
2953         * html/parser/HTMLEntityParser.h:
2954         * html/parser/HTMLParserIdioms.cpp:
2955         (WebCore::parseHTMLInteger):
2956         (WebCore::parseHTMLNonNegativeInteger):
2957         * html/parser/HTMLTokenizer.cpp:
2958         (WebCore::HTMLTokenizer::processEntity):
2959         (WebCore::HTMLTokenizer::nextToken):
2960         * html/parser/HTMLTreeBuilder.cpp:
2961         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::giveRemainingTo):
2962         (WebCore::HTMLTreeBuilder::defaultForInTableText):
2963         * html/parser/HTMLTreeBuilder.h:
2964         * inspector/InspectorValues.cpp:
2965         (WebCore::InspectorValue::toJSONString):
2966         (WebCore::InspectorValue::writeJSON):
2967         (WebCore::InspectorBasicValue::writeJSON):
2968         (WebCore::InspectorString::writeJSON):
2969         (WebCore::InspectorObject::writeJSON):
2970         (WebCore::InspectorArray::writeJSON):
2971         * inspector/InspectorValues.h:
2972         * loader/CrossOriginAccessControl.cpp:
2973         (WebCore::createAccessControlPreflightRequest):
2974         * loader/appcache/ApplicationCacheStorage.cpp:
2975         (WebCore::ApplicationCacheStorage::store):
2976         * page/Chrome.cpp:
2977         (WebCore::Chrome::setToolTip):
2978         * page/PageSerializer.cpp:
2979         (WebCore::SerializerMarkupAccumulator::appendText):
2980         (WebCore::SerializerMarkupAccumulator::appendElement):
2981         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
2982         * page/SecurityOrigin.cpp:
2983         (WebCore::SecurityOrigin::toString):
2984         * platform/KURL.cpp:
2985         (WebCore::KURL::deprecatedString):
2986         (WebCore::decodeURLEscapeSequences):
2987         * platform/LinkHash.cpp:
2988         (WebCore::squeezeOutNullCharacters):
2989         (WebCore::cleanSlashDotDotSlashes):
2990         (WebCore::mergeDoubleSlashes):
2991         (WebCore::cleanSlashDotSlashes):
2992         (WebCore::cleanPath):
2993         (WebCore::visitedURLInline):
2994         (WebCore::visitedURL):
2995         (WebCore::visitedLinkHash):
2996         * platform/LinkHash.h:
2997         * platform/gtk/DataObjectGtk.cpp:
2998         (WebCore::DataObjectGtk::setURL):
2999         * platform/network/HTTPParsers.cpp:
3000         (WebCore::extractMIMETypeFromMediaType):
3001         * platform/text/TextCodecICU.cpp:
3002         (WebCore::TextCodecICU::decode):
3003         * platform/text/TextStream.cpp:
3004         (WebCore::TextStream::operator<<):
3005         (WebCore::TextStream::release):
3006         * platform/text/TextStream.h:
3007         * plugins/PluginStream.cpp:
3008         (WebCore::PluginStream::startStream):
3009         * rendering/InlineTextBox.cpp:
3010         (WebCore::adjustCharactersAndLengthForHyphen):
3011         * rendering/InlineTextBox.h:
3012         (WebCore::BufferForAppendingHyphen::BufferForAppendingHyphen):
3013         * rendering/RenderListItem.cpp:
3014         (WebCore::RenderListItem::markerTextWithSuffix):
3015         * rendering/RenderListMarker.cpp:
3016         (WebCore::toSymbolic):
3017         (WebCore::RenderListMarker::paint):
3018         (WebCore::RenderListMarker::suffix):
3019         * rendering/RenderTreeAsText.cpp:
3020         (WebCore::quoteAndEscapeNonPrintables):
3021         * rendering/mathml/RenderMathMLFenced.cpp:
3022         (WebCore::RenderMathMLFenced::updateFromElement):
3023         * storage/IDBLevelDBCoding.cpp:
3024         (WebCore::IDBLevelDBCoding::decodeString):
3025         * xml/XMLHttpRequest.cpp:
3026         (WebCore::XMLHttpRequest::getAllResponseHeaders):
3027         * xml/XPathFunctions.cpp:
3028         (WebCore::XPath::FunId::evaluate):
3029         (WebCore::XPath::FunConcat::evaluate):
3030         * xml/XPathUtil.cpp:
3031         (WebCore::XPath::stringValue):
3032         * xml/XSLTProcessorLibxslt.cpp:
3033         (WebCore::writeToStringBuilder):
3034         (WebCore::saveResultToString):
3035         * xml/parser/CharacterReferenceParserInlineMethods.h:
3036         (WebCore::unconsumeCharacters):
3037         (WebCore::consumeCharacterReference):
3038         * xml/parser/XMLCharacterReferenceParser.cpp:
3039         (WebCore::consumeXMLCharacterReference):
3040         * xml/parser/XMLCharacterReferenceParser.h:
3041         * xml/parser/XMLTokenizer.cpp:
3042         (WebCore::XMLTokenizer::nextToken):
3043
3044 2011-09-05  Kent Tamura  <tkent@chromium.org>
3045
3046         REGRESSION (Safari 5.1 - ToT): File input retains its file icon when the value is reset
3047         https://bugs.webkit.org/show_bug.cgi?id=67567
3048
3049         Reviewed by Dimitri Glazkov.
3050
3051         - Introduce InputType::setValue(), which is called by HTMLInputElement::setValue().
3052         - Clear m_icon in FileInputType::setValue().
3053
3054         Tests: fast/forms/file/file-reset-in-change-expected.html
3055                fast/forms/file/file-reset-in-change.html
3056
3057         * html/BaseButtonInputType.cpp:
3058         (WebCore::BaseButtonInputType::setValue):
3059         Implemenation for the "default" mode.
3060         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default
3061         * html/BaseButtonInputType.h:
3062         * html/BaseCheckableInputType.cpp:
3063         (WebCore::BaseCheckableInputType::setValue):
3064         Implemenation for the "default/on" mode.
3065         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default-on
3066         * html/BaseCheckableInputType.h:
3067         * html/FileInputType.cpp:
3068         (WebCore::FileInputType::setValue):
3069         Implemenation for the "filename" mode, and clearing m_icon.
3070         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-filename
3071         * html/FileInputType.h:
3072         * html/HTMLInputElement.cpp:
3073         (WebCore::HTMLInputElement::setValue):
3074         Move some code to InputType::setValue().
3075         (WebCore::HTMLInputElement::setValueInternal): A helper for InputType::setValue().
3076         * html/HTMLInputElement.h:
3077         * html/HiddenInputType.cpp:
3078         (WebCore::HiddenInputType::setValue):
3079         Implementation for the "default" mode.
3080         * html/HiddenInputType.h:
3081         * html/InputType.cpp:
3082         (WebCore::InputType::setValue):
3083         Implementation for the "value" mode.
3084         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-value
3085         * html/InputType.h:
3086         * html/TextFieldInputType.cpp:
3087         (WebCore::TextFieldInputType::setValue):
3088         In addition to the "value" mode processing, updates placeholder visibililty.
3089         * html/TextFieldInputType.h:
3090
3091 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
3092
3093         REGRESSION(r94274): The inner text value of an input element is not updated when input.value is set
3094         https://bugs.webkit.org/show_bug.cgi?id=67681
3095
3096         Reviewed by Kent Tamura.
3097
3098         The bug was caused by HTMLInputElement::setValue's not clearing m_suggestedValue before updateInnerTextValue is called.
3099         Since updateInnerTextValue uses the suggested value when one is present, we need to clear m_suggestedValue in advance.
3100
3101         Test: fast/forms/suggested-value-after-setvalue.html
3102
3103         * html/HTMLInputElement.cpp:
3104         (WebCore::HTMLInputElement::setValue):
3105
3106 2011-09-06  Adam Barth  <abarth@webkit.org>
3107
3108         Attempt to fix GTK build.
3109
3110         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
3111         (WebKit::createHTMLElementWrapper):
3112
3113 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
3114
3115         fast/forms/suggested-value-crash.html crashes on Windows
3116         https://bugs.webkit.org/show_bug.cgi?id=67688
3117
3118         Reviewed by Adam Barth.
3119
3120         The crash was caused because functions in internals were accessing uninitialized QualifiedNames.
3121         Fixed the bug by avoiding to link to inputTag and textareaTag. Instead, we resort to toInputElement
3122         and string comparison.
3123
3124         * testing/Internals.cpp:
3125         (WebCore::Internals::wasLastChangeUserEdit):
3126         (WebCore::Internals::suggestedValue):
3127         (WebCore::Internals::setSuggestedValue):
3128
3129 2011-09-06  Mark Hahnenberg  <mhahnenberg@apple.com>
3130
3131         Unzip initialization lists and constructors in JSCell hierarchy (5/7)
3132         https://bugs.webkit.org/show_bug.cgi?id=67420
3133
3134         Reviewed by Geoffrey Garen.
3135
3136         No new tests.
3137
3138         Completed the fifth level of the refactoring to add finishCreation() 
3139         methods to all classes within the JSCell hierarchy with non-trivial 
3140         constructor bodies.
3141
3142         This primarily consists of pushing the calls to finishCreation() down 
3143         into the constructors of the subclasses of the second level of the hierarchy 
3144         as well as pulling the finishCreation() calls out into the class's corresponding
3145         create() method if it has one.  Doing both simultaneously allows us to 
3146         maintain the invariant that the finishCreation() method chain is called exactly 
3147         once during the creation of an object, since calling it any other number of 
3148         times (0, 2, or more) will cause an assertion failure.
3149
3150         * WebCore.exp.in:
3151         * bindings/js/JSDOMBinding.h:
3152         (WebCore::DOMConstructorObject::DOMConstructorObject):
3153         * bindings/js/JSDOMGlobalObject.cpp:
3154         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
3155         (WebCore::JSDOMGlobalObject::finishCreation):
3156         * bindings/js/JSDOMGlobalObject.h:
3157         * bindings/js/JSDOMWindowShell.cpp:
3158         * bindings/js/JSDOMWindowShell.h:
3159         (WebCore::JSDOMWindowShell::create):
3160         * bindings/js/JSDOMWrapper.h:
3161         (WebCore::JSDOMWrapper::JSDOMWrapper):
3162         * bindings/scripts/CodeGeneratorJS.pm:
3163         (GenerateImplementation):
3164         * bindings/scripts/test/JS/JSTestInterface.cpp:
3165         (WebCore::JSTestInterface::JSTestInterface):
3166         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3167         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
3168         * bindings/scripts/test/JS/JSTestObj.cpp:
3169         (WebCore::JSTestObj::JSTestObj):
3170         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3171         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
3172         * bridge/c/CRuntimeObject.cpp:
3173         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
3174         (JSC::Bindings::CRuntimeObject::finishCreation):
3175         * bridge/c/CRuntimeObject.h:
3176         * bridge/jni/jsc/JavaRuntimeObject.cpp:
3177         (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
3178         (JSC::Bindings::JavaRuntimeObject::finishCreation):
3179         * bridge/jni/jsc/JavaRuntimeObject.h:
3180         * bridge/objc/ObjCRuntimeObject.h:
3181         * bridge/objc/ObjCRuntimeObject.mm:
3182         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
3183         (JSC::Bindings::ObjCRuntimeObject::finishCreation):
3184         * bridge/objc/objc_runtime.h:
3185         (JSC::Bindings::ObjcFallbackObjectImp::create):
3186         * bridge/objc/objc_runtime.mm:
3187         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
3188         * bridge/qt/qt_instance.cpp:
3189         (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
3190         * bridge/qt/qt_pixmapruntime.cpp:
3191         (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
3192         * bridge/qt/qt_runtime.cpp:
3193         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
3194         (JSC::Bindings::QtRuntimeMethod::finishCreation):
3195         * bridge/qt/qt_runtime.h:
3196         * bridge/runtime_array.cpp:
3197         (JSC::RuntimeArray::RuntimeArray):
3198         * bridge/runtime_array.h:
3199         (JSC::RuntimeArray::create):
3200         * bridge/runtime_method.cpp:
3201         (JSC::RuntimeMethod::RuntimeMethod):
3202         (JSC::RuntimeMethod::finishCreation):
3203         * bridge/runtime_method.h:
3204         * bridge/runtime_object.cpp:
3205         (JSC::Bindings::RuntimeObject::RuntimeObject):
3206         * bridge/runtime_object.h:
3207         (JSC::Bindings::RuntimeObject::create):
3208
3209 2011-09-06  Luke Macpherson   <macpherson@chromium.org>
3210
3211         Implement list style properties in CSSStyleApplyProperty.
3212         https://bugs.webkit.org/show_bug.cgi?id=67103
3213
3214         Reviewed by Eric Seidel.
3215
3216         No new tests / no behavioral changes.
3217
3218         * css/CSSStyleApplyProperty.cpp:
3219         Add class to wrap call to CSSStyleSelector::styleImage().
3220         (WebCore::ApplyPropertyStyleImage::ApplyPropertyStyleImage):
3221         (WebCore::ApplyPropertyStyleImage::applyValue):
3222         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3223         Initialize handlers for list style properties.
3224         * css/CSSStyleSelector.cpp:
3225         (WebCore::CSSStyleSelector::applyProperty):
3226         Remove existing property implementations.
3227
3228 2011-09-06  Alexis Menard  <alexis.menard@openbossa.org>
3229
3230         [Qt] Move away from QPointer as it is slow and it has a replacement QWeakPointer.
3231         https://bugs.webkit.org/show_bug.cgi?id=67673
3232
3233         Reviewed by Ariya Hidayat.
3234
3235         Move away from QPointer to QWeakPointer, it is faster.
3236
3237         No new tests, the existing ones should cover.
3238
3239         * bridge/qt/qt_instance.cpp:
3240         (JSC::Bindings::QtInstance::~QtInstance):
3241         (JSC::Bindings::QtInstance::getClass):
3242         (JSC::Bindings::QtField::name):
3243         (JSC::Bindings::QtField::valueFromInstance):
3244         * bridge/qt/qt_instance.h:
3245         (JSC::Bindings::QtInstance::getObject):
3246         * bridge/qt/qt_runtime.h:
3247         * platform/qt/SharedTimerQt.cpp:
3248         (WebCore::SharedTimerQt::inst):
3249
3250 2011-09-06  Oliver Hunt  <oliver@apple.com>
3251
3252         Update expected results of bindings tests.
3253
3254         * bindings/scripts/test/JS/JSTestInterface.cpp:
3255         (WebCore::JSTestInterfaceConstructor::createStructure):
3256         (WebCore::JSTestInterface::createPrototype):
3257         * bindings/scripts/test/JS/JSTestInterface.h:
3258         (WebCore::JSTestInterface::createStructure):
3259         (WebCore::JSTestInterfacePrototype::createStructure):
3260         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3261         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
3262         (WebCore::JSTestMediaQueryListListener::createPrototype):
3263         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3264         (WebCore::JSTestMediaQueryListListener::createStructure):
3265         (WebCore::JSTestMediaQueryListListenerPrototype::createStructure):
3266         * bindings/scripts/test/JS/JSTestObj.cpp:
3267         (WebCore::JSTestObjConstructor::createStructure):
3268         (WebCore::JSTestObj::createPrototype):
3269         * bindings/scripts/test/JS/JSTestObj.h:
3270         (WebCore::JSTestObj::createStructure):
3271         (WebCore::JSTestObjPrototype::createStructure):
3272         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3273         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
3274         (WebCore::JSTestSerializedScriptValueInterface::createPrototype):
3275         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3276         (WebCore::JSTestSerializedScriptValueInterface::createStructure):
3277         (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
3278
3279 2011-09-06  Eric Seidel  <eric@webkit.org>
3280
3281         Remove window.HTMLBlockquoteElement per HTML5 (and DOM Core 1)
3282         https://bugs.webkit.org/show_bug.cgi?id=67678
3283
3284         Reviewed by Darin Adler.
3285
3286         This is why we can't have nice things.
3287
3288         There was some confusion in the original DOM HTML 1 spec about
3289         the existence of HTMlBlockquoteElement which was clarified by
3290         a later errata, removing HTMLBlockquoteElement:
3291         http://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html
3292         "This interface is an error and must be ignored. The Interface HTMLQuoteElement is used for both the Q and BLOCKQUOTE elements"
3293
3294         Le sigh.  Personally I think having a separate HTMLBlockquoteElement
3295         is clearer, but thats not how the web works.  Removed it and updated test results.
3296
3297         * CMakeLists.txt:
3298         * CodeGenerators.pri:
3299         * DerivedSources.cpp:
3300         * DerivedSources.make:
3301         * GNUmakefile.list.am:
3302         * WebCore.gypi:
3303         * WebCore.pro:
3304         * WebCore.vcproj/WebCore.vcproj:
3305         * WebCore.xcodeproj/project.pbxproj:
3306         * bindings/gobject/GNUmakefile.am:
3307         * editing/IndentOutdentCommand.cpp:
3308         * html/HTMLBlockquoteElement.cpp: Removed.
3309         * html/HTMLBlockquoteElement.h: Removed.
3310         * html/HTMLBlockquoteElement.idl: Removed.
3311         * html/HTMLElementsAllInOne.cpp:
3312         * html/HTMLQuoteElement.cpp:
3313         (WebCore::HTMLQuoteElement::HTMLQuoteElement):
3314         (WebCore::HTMLQuoteElement::insertedIntoDocument):
3315         * html/HTMLTagNames.in:
3316         * page/DOMWindow.idl:
3317
3318 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
3319
3320         Rename confirmCompositionWithoutDisturbingSelection to cancelComposition
3321         https://bugs.webkit.org/show_bug.cgi?id=67569
3322
3323         Reviewed by Antonio Gomes.
3324
3325         Renamed Editor::confirmCompositionWithoutDisturbingSelection to Editor::cancelComposition.
3326         Also renamed the shared function from confirmComposition to setComposition.
3327
3328         * WebCore.exp.in:
3329         * editing/Editor.cpp:
3330         (WebCore::Editor::confirmComposition):
3331         (WebCore::Editor::cancelComposition):
3332         (WebCore::Editor::setComposition):
3333         * editing/Editor.h:
3334
3335 2011-09-06  Sam Weinig  <sam@webkit.org>
3336
3337         WebVTTTokenizer files in the wrong place in the Xcode project.
3338
3339         * WebCore.xcodeproj/project.pbxproj:
3340         Move WebVTTTokenizer files so they are in the right place in the project.
3341
3342 2011-09-06  Chris Rogers  <crogers@google.com>
3343
3344         MediaElementAudioSourceNode destruction triggers ASSERTS
3345         https://bugs.webkit.org/show_bug.cgi?id=67665
3346
3347         Reviewed by Nate Chapin.
3348
3349         Test: webaudio/mediaelementaudiosourcenode-gc.html
3350
3351         * html/HTMLMediaElement.cpp:
3352         (WebCore::HTMLMediaElement::setAudioSourceNode):
3353         * webaudio/AudioContext.cpp:
3354         (WebCore::AudioContext::uninitializeDispatch):
3355         (WebCore::AudioContext::stop):
3356         * webaudio/AudioContext.h:
3357
3358 2011-09-05  Oliver Hunt  <oliver@apple.com>
3359
3360         An object's structure should reference the global object responsible for its creation
3361         https://bugs.webkit.org/show_bug.cgi?id=67624
3362
3363         Reviewed by Gavin Barraclough.
3364
3365         Update calls to Structure::create() to pass the globalObject in,
3366         and update the CodeGenerator to generate appropriate createStructure
3367         methods.
3368
3369         * bindings/js/JSAudioConstructor.h:
3370         (WebCore::JSAudioConstructor::createStructure):
3371         * bindings/js/JSDOMBinding.h:
3372         (WebCore::DOMConstructorObject::createStructure):
3373         (WebCore::getDOMStructure):
3374         * bindings/js/JSDOMGlobalObject.h:
3375         (WebCore::JSDOMGlobalObject::createStructure):
3376         (WebCore::getDOMConstructor):
3377         * bindings/js/JSDOMWindowBase.h:
3378         (WebCore::JSDOMWindowBase::createStructure):
3379         * bindings/js/JSDOMWindowShell.cpp:
3380         (WebCore::JSDOMWindowShell::setWindow):
3381         * bindings/js/JSDOMWindowShell.h:
3382         (WebCore::JSDOMWindowShell::createStructure):
3383         * bindings/js/JSDOMWrapper.h:
3384         (WebCore::JSDOMWrapper::createStructure):
3385         * bindings/js/JSImageConstructor.h:
3386         (WebCore::JSImageConstructor::createStructure):
3387         * bindings/js/JSImageDataCustom.cpp:
3388         (WebCore::toJS):
3389         * bindings/js/JSOptionConstructor.h:
3390         (WebCore::JSOptionConstructor::createStructure):
3391         * bindings/js/JSWorkerContextBase.h:
3392         (WebCore::JSWorkerContextBase::createStructure):
3393         * bindings/js/WorkerScriptController.cpp:
3394         (WebCore::WorkerScriptController::initScript):
3395         * bindings/scripts/CodeGeneratorJS.pm:
3396         (GenerateHeader):
3397         (GenerateImplementation):
3398         (GenerateConstructorDeclaration):
3399         * bridge/c/CRuntimeObject.h:
3400         (JSC::Bindings::CRuntimeObject::createStructure):
3401         * bridge/c/c_instance.cpp:
3402         (JSC::Bindings::CRuntimeMethod::createStructure):
3403         * bridge/jni/jsc/JavaInstanceJSC.cpp:
3404         (JavaRuntimeMethod::createStructure):
3405         * bridge/jni/jsc/JavaRuntimeObject.h:
3406         (JSC::Bindings::JavaRuntimeObject::createStructure):
3407         * bridge/objc/ObjCRuntimeObject.h:
3408         (JSC::Bindings::ObjCRuntimeObject::createStructure):
3409         * bridge/objc/objc_instance.mm:
3410         (ObjCRuntimeMethod::createStructure):
3411         * bridge/objc/objc_runtime.h:
3412         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
3413         * bridge/runtime_array.h:
3414         (JSC::RuntimeArray::createStructure):
3415         * bridge/runtime_method.h:
3416         (JSC::RuntimeMethod::createStructure):
3417         * bridge/runtime_object.h:
3418         (JSC::Bindings::RuntimeObject::createStructure):
3419
3420 2011-09-06  Anders Carlsson  <andersca@apple.com>
3421
3422         Move NPAPI headers in bridge to plugins
3423         https://bugs.webkit.org/show_bug.cgi?id=67661
3424
3425         Reviewed by Darin Adler.
3426
3427         * WebCore.gypi:
3428         * WebCore.pro:
3429         * WebCore.vcproj/WebCore.vcproj:
3430         * WebCore.xcodeproj/project.pbxproj:
3431         Update build systems.
3432
3433         * bridge/npapi.h: Removed.
3434         * bridge/npruntime.h: Removed.
3435         * bridge/nptypes.h: Removed.
3436         * plugins/npapi.h: Copied from Source/WebCore/bridge/npapi.h.
3437         * plugins/npruntime.h: Copied from Source/WebCore/bridge/npruntime.h.
3438         * plugins/nptypes.h: Copied from Source/WebCore/bridge/nptypes.h.
3439
3440 2011-09-06  David Hyatt  <hyatt@apple.com>
3441
3442         https://bugs.webkit.org/show_bug.cgi?id=67672
3443         
3444         Improve background-size parsing. Make it actually dump auto values properly, and also make it omit
3445         auto if it is the second value. Fix the parsing to not create a value list when only a singleton value
3446         is specified.
3447
3448         Reviewed by Beth Dakin.
3449
3450         Covered well by existing tests.
3451
3452         * css/CSSComputedStyleDeclaration.cpp:
3453         (WebCore::fillSizeToCSSValue):
3454         * css/CSSParser.cpp:
3455         (WebCore::CSSParser::parseFillSize):
3456         * css/CSSStyleSelector.cpp:
3457         (WebCore::CSSStyleSelector::mapFillSize):
3458
3459 2011-09-06  David Hyatt  <hyatt@apple.com>
3460
3461         https://bugs.webkit.org/show_bug.cgi?id=67657
3462         
3463         Implement border-image-width. This patch stops short of converting -webkit-border-image to a shorthand.
3464         I'll do that in the next patch.
3465
3466         Note that unlike the -webkit-border-image syntax, border-image-width does not actually set the border
3467         width values. It simply makes cuts into the border image drawing area (which for now is just the border
3468         box, but that will change once border-image-outset is implemented).
3469         
3470         This means we need additional storage for the slices, since they are now separate from the border widths.
3471         
3472         For backwards compatibility, -webkit-border-image will continue to set the border widths when
3473         border-image-width is specified in the -webkit-border-image shorthand.
3474
3475         Reviewed by Beth Dakin.
3476
3477         Added new tests in fast/borders.
3478
3479         * css/CSSBorderImageSliceValue.cpp:
3480         (WebCore::CSSBorderImageSliceValue::CSSBorderImageSliceValue):
3481         (WebCore::CSSBorderImageSliceValue::cssText):
3482         * css/CSSBorderImageSliceValue.h:
3483         (WebCore::CSSBorderImageSliceValue::create):
3484         (WebCore::CSSBorderImageSliceValue::slices):
3485         Rename slices() to imageSlices() and add borderSlices() and m_borderSlices to hold the desired cuts
3486         for the border image drawing area. Converted the slices over to the new Quad primitive value (a RectBase
3487         subclass that is identical to Rect but dumps as a quad instead of a rect primitive).
3488
3489         * css/CSSBorderImageValue.cpp:
3490         (WebCore::CSSBorderImageValue::CSSBorderImageValue):
3491         (WebCore::CSSBorderImageValue::cssText):
3492         * css/CSSBorderImageValue.h:
3493         (WebCore::CSSBorderImageValue::create):
3494         Make CSSBorderImageValue take the border slices during construction now.
3495     
3496         * css/CSSComputedStyleDeclaration.cpp:
3497         (WebCore::valueForNinePieceImageSlice):
3498         (WebCore::valueForNinePieceImageWidth):
3499         (WebCore::valueForNinePieceImageRepeat):
3500         (WebCore::valueForNinePieceImage):
3501         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3502         Add support for computed style via valueForNinePieceImageWidth. Patch all of the border image properties
3503         to dump the most compact form possible for the property values, e.g., "stretch stretch" becomes "stretch."
3504
3505         * css/CSSParser.cpp:
3506         (WebCore::CSSParser::parseValue):
3507         (WebCore::CSSParser::parseReflect):
3508         (WebCore::BorderImageParseContext::BorderImageParseContext):
3509         (WebCore::BorderImageParseContext::commitImageSlice):
3510         (WebCore::BorderImageParseContext::commitBorderWidth):
3511         (WebCore::BorderImageParseContext::commitBorderImage):
3512         (WebCore::CSSParser::parseBorderImage):
3513         (WebCore::isBorderImageRepeatKeyword):
3514         (WebCore::CSSParser::parseBorderImageRepeat):
3515         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
3516         (WebCore::CSSParser::parseBorderImageSlice):
3517         (WebCore::BorderImageWidthParseContext::BorderImageWidthParseContext):
3518         (WebCore::BorderImageWidthParseContext::allowNumber):
3519         (WebCore::BorderImageWidthParseContext::allowFinalCommit):
3520         (WebCore::BorderImageWidthParseContext::top):
3521         (WebCore::BorderImageWidthParseContext::commitNumber):
3522         (WebCore::BorderImageWidthParseContext::setAllowFinalCommit):
3523         (WebCore::BorderImageWidthParseContext::setTop):
3524         (WebCore::BorderImageWidthParseContext::commitBorderImageWidth):
3525         (WebCore::CSSParser::parseBorderImageWidth):
3526         * css/CSSParser.h:
3527         Modify the border-image code to pass off border-image-width parsing to parseBorderImageWidth.
3528
3529         * css/CSSPrimitiveValue.cpp:
3530         (WebCore::isValidCSSUnitTypeForDoubleConversion):
3531         (WebCore::CSSPrimitiveValue::init):
3532         (WebCore::CSSPrimitiveValue::cleanup):
3533         (WebCore::CSSPrimitiveValue::getQuadValue):
3534         (WebCore::CSSPrimitiveValue::cssText):
3535         * css/CSSPrimitiveValue.h:
3536         (WebCore::CSSPrimitiveValue::getQuadValue):
3537         Add the new Quad value to CSSPrimitiveValue.
3538     
3539         * css/CSSPropertyNames.in:
3540         Add the new properties for border-image-width and -webkit-mask-box-image-width.
3541
3542         * css/CSSStyleSelector.cpp:
3543         (WebCore::CSSStyleSelector::applyProperty):
3544         (WebCore::CSSStyleSelector::mapNinePieceImage):
3545         (WebCore::CSSStyleSelector::mapNinePieceImageSlice):
3546         (WebCore::CSSStyleSelector::mapNinePieceImageWidth):
3547         (WebCore::CSSStyleSelector::loadPendingImages):
3548         * css/CSSStyleSelector.h:
3549         Add the code to map the image width into border slices.
3550     
3551         * css/Rect.h:
3552         (WebCore::RectBase::top):
3553         (WebCore::RectBase::right):
3554         (WebCore::RectBase::bottom):
3555         (WebCore::RectBase::left):
3556         (WebCore::RectBase::setTop):
3557         (WebCore::RectBase::setRight):
3558         (WebCore::RectBase::setBottom):
3559         (WebCore::RectBase::setLeft):
3560         (WebCore::RectBase::RectBase):
3561         (WebCore::RectBase::~RectBase):
3562         (WebCore::Rect::create):
3563         (WebCore::Rect::Rect):
3564         (WebCore::Quad::create):
3565         (WebCore::Quad::Quad):
3566         Adding the new Quad value.
3567
3568         * rendering/RenderBoxModelObject.cpp:
3569         (WebCore::computeBorderImageSide):
3570         (WebCore::RenderBoxModelObject::paintNinePieceImage):
3571         Modify painting to treat the border slices as separate from the border widths.
3572         
3573         * rendering/style/NinePieceImage.cpp:
3574         (WebCore::NinePieceImage::operator==):
3575         * rendering/style/NinePieceImage.h:
3576         (WebCore::NinePieceImage::NinePieceImage):
3577         (WebCore::NinePieceImage::imageSlices):
3578         (WebCore::NinePieceImage::setImageSlices):
3579         (WebCore::NinePieceImage::borderSlices):
3580         (WebCore::NinePieceImage::setBorderSlices):
3581         (WebCore::NinePieceImage::copyImageSlicesFrom):
3582         (WebCore::NinePieceImage::copyBorderSlicesFrom):
3583         * rendering/style/StyleRareNonInheritedData.cpp:
3584         Add the border slices.
3585         
3586         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3587         * rendering/style/StyleReflection.h:
3588         (WebCore::StyleReflection::StyleReflection):
3589         Make sure masks and reflections default border-image-width to auto instead of 1, since that matches
3590         old behavior.
3591
3592 2011-09-06  Noel Gordon  <noel.gordon@gmail.com>
3593
3594         [chromium skia] JPEGImageEncoder: hoist constants out of the encoding loop
3595         https://bugs.webkit.org/show_bug.cgi?id=67589
3596
3597         Reviewed by Kenneth Russell.
3598
3599         Change the row converter function signatures to be the same.  Call them via a function
3600         pointer during the encoding loop.  Minor webkit style cleanup, remove unused include.
3601
3602         No new tests.  Covered by existing canvas 2d and 3d tests.
3603         canvas/philip/tests/toDataURL.jpeg.alpha.html
3604         fast/canvas/webgl/premultiplyalpha-test.html
3605
3606         * platform/image-encoders/skia/JPEGImageEncoder.cpp:  Remove SkUnPreMultiply.h (not used).
3607         (WebCore::preMultipliedBGRAtoRGB):  Use unsigned char* instead of void* for pixels.
3608         (WebCore::RGBAtoRGB):  pixels & pixelCount to match the preMultipliedBGRAtoRGB() signature.
3609         (WebCore::encodePixels):  Move constants out of the encoding loop: use a function pointer
3610         to call preMultipliedBGRAtoRGB or RGBAtoRGB (now they have identical signatures), define
3611         and use pixelRowStride constant.
3612         (WebCore::JPEGImageEncoder::encode):
3613
3614 2011-09-06  Aaron Colwell  <acolwell@chromium.org>
3615
3616         Allow MediaSource API to be enabled at runtime.
3617         https://bugs.webkit.org/show_bug.cgi?id=67306
3618
3619         Reviewed by Eric Carlson.
3620
3621         * bindings/generic/RuntimeEnabledFeatures.cpp:
3622         * bindings/generic/RuntimeEnabledFeatures.h:
3623         (WebCore::RuntimeEnabledFeatures::webkitMediaSourceEnabled):
3624         (WebCore::RuntimeEnabledFeatures::setWebkitMediaSourceEnabled):
3625         * html/HTMLMediaElement.idl:
3626
3627 2011-09-06  Mike Reed  <reed@google.com>
3628
3629         [skia] never draw with GDI, so that all text can be gpu-accelerated
3630         https://bugs.webkit.org/show_bug.cgi?id=65203
3631
3632         Reviewed by Kenneth Russell.
3633
3634         * platform/graphics/chromium/FontChromiumWin.cpp:
3635         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter):
3636         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter):
3637         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
3638         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter):
3639         (WebCore::drawGlyphsWin):
3640         (WebCore::Font::drawComplexText):
3641         * platform/graphics/chromium/UniscribeHelper.cpp:
3642         (WebCore::UniscribeHelper::draw):
3643         * platform/graphics/skia/PlatformContextSkia.cpp:
3644         * platform/graphics/skia/PlatformContextSkia.h:
3645         * platform/graphics/skia/SkiaFontWin.cpp:
3646         (WebCore::skiaDrawText):
3647         * platform/graphics/skia/SkiaFontWin.h:
3648
3649 2011-09-06  Nat Duca  <nduca@chromium.org>
3650
3651         [chromium] REGRESSION(94353): requestAnimationFrame not throttled in compositing path
3652         https://bugs.webkit.org/show_bug.cgi?id=67621
3653
3654         CCSingleThreadProxy should not perform layout when called
3655         via the compositeImmediately path. Doing so makes it look
3656         like frame rate is unbounded.
3657
3658         Reviewed by James Robinson.
3659
3660         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3661         (WebCore::CCSingleThreadProxy::compositeAndReadback):
3662         (WebCore::CCSingleThreadProxy::compositeImmediately):
3663         (WebCore::CCSingleThreadProxy::commitIfNeeded):
3664         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
3665
3666 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
3667
3668         REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium
3669         https://bugs.webkit.org/show_bug.cgi?id=67453
3670
3671         Reviewed by Kent Tamura.
3672
3673         Fixed the bug by updating inner text value in setSuggestedValue.
3674
3675         Also added a suggestedValue and setSuggestedValue on window.internals for testing purposes.
3676
3677         Test: fast/forms/suggested-value.html
3678
3679         * WebCore.exp.in:
3680         * testing/Internals.cpp:
3681         (WebCore::Internals::suggestedValue):
3682         (WebCore::Internals::setSuggestedValue):
3683         * testing/Internals.h:
3684         * testing/Internals.idl:
3685
3686 2011-09-06  Eric Carlson  <eric.carlson@apple.com>
3687
3688         load() does not reset the resource selection algorithm
3689         https://bugs.webkit.org/show_bug.cgi?id=64917
3690
3691         Reviewed by Darin Adler.
3692
3693         Test: media/video-source-load.html
3694
3695         * html/HTMLMediaElement.cpp:
3696         (WebCore::HTMLMediaElement::selectMediaResource): Reset m_nextChildNodeToConsider, update
3697             comments and rearrange logic to more closely match logic in spec.
3698         (WebCore::HTMLMediaElement::noneSupported): Update comments.
3699
3700 2011-09-06  Abhishek Arya  <inferno@chromium.org>
3701
3702         Style not propagated to anonymous boxes and anonymous
3703         inline-blocks.
3704         https://bugs.webkit.org/show_bug.cgi?id=67364
3705
3706         Reviewed by James Robinson.
3707
3708         Share propagateStyleToAnonymousChildren with RenderBlock::styleDidChange.
3709
3710         * rendering/RenderBlock.cpp:
3711         (WebCore::RenderBlock::styleDidChange):
3712         * rendering/RenderObject.cpp:
3713         (WebCore::RenderObject::propagateStyleToAnonymousChildren):
3714         * rendering/RenderObject.h:
3715
3716 2011-09-06  Robin Cao  <robin.cao@torchmobile.com.cn>
3717
3718         [skia] States of GraphicsContext may never be restored after clipToImageBuffer
3719         https://bugs.webkit.org/show_bug.cgi?id=67358
3720
3721         beginLayerClippedToImage/applyClipFromImage are mismatched when clipping to
3722         an empty ImageBuffer, which will make states of GraphicsContext incorrect.
3723
3724         Reviewed by James Robinson.
3725
3726         Test: fast/repaint/background-clip-text.html
3727
3728         * platform/graphics/skia/PlatformContextSkia.cpp:
3729         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
3730
3731 2011-09-06  Raphael Kubo da Costa  <kubo@profusion.mobi>
3732
3733         [EFL] Do not allocate memory for extremely large surfaces.
3734         https://bugs.webkit.org/show_bug.cgi?id=65192
3735
3736         Reviewed by Martin Robinson.
3737
3738         So far, RenderThemeEfl tried to allocate a buffer and a cairo surface
3739         the size of the whole form element passed to it.
3740
3741         In the case of
3742         fast/overflow/overflow-height-float-not-removed-crash.html and others,
3743         this meant extremely large widgets, which crashed the code.
3744
3745         We now only render the widgets if they are smaller than some hardcoded
3746         and sufficiently large values which should work in most cases.
3747
3748         No new tests, as this was uncovered by existing ones.
3749
3750         * platform/efl/RenderThemeEfl.cpp:
3751         (WebCore::RenderThemeEfl::isFormElementTooLargeToDisplay):
3752         (WebCore::RenderThemeEfl::cacheThemePartNew):
3753         (WebCore::RenderThemeEfl::paintThemePart):
3754         * platform/efl/RenderThemeEfl.h:
3755
3756 2011-08-30  Pavel Podivilov  <podivilov@chromium.org>
3757
3758         Web Inspector: implement source map v3 consumer.
3759         https://bugs.webkit.org/show_bug.cgi?id=67205
3760
3761         Reviewed by Yury Semikhatsky.
3762
3763         Test: inspector/debugger/compiler-source-mapping.html
3764
3765         * WebCore.gypi:
3766         * WebCore.vcproj/WebCore.vcproj:
3767         * inspector/front-end/CompilerSourceMapping.js: Added.
3768         (WebInspector.CompilerSourceMapping):
3769         (WebInspector.CompilerSourceMapping.prototype.compiledLocationToSourceLocation):
3770         (WebInspector.CompilerSourceMapping.prototype.sourceLocationToCompiledLocation):
3771         (WebInspector.CompilerSourceMapping.prototype.get sources):
3772         (WebInspector.ClosureCompilerSourceMapping):
3773         (WebInspector.ClosureCompilerSourceMapping.prototype.compiledLocationToSourceLocation):
3774         (WebInspector.ClosureCompilerSourceMapping.prototype.sourceLocationToCompiledLocation):
3775         (WebInspector.ClosureCompilerSourceMapping.prototype.get sources):
3776         (WebInspector.ClosureCompilerSourceMapping.prototype._findMapping):
3777         (WebInspector.ClosureCompilerSourceMapping.prototype._parsePayload):
3778         (WebInspector.ClosureCompilerSourceMapping.prototype._isSeparator):
3779         (WebInspector.ClosureCompilerSourceMapping.prototype._decodeVLQ):
3780         (WebInspector.ClosureCompilerSourceMapping.StringCharIterator):
3781         (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.next):
3782         (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.peek):
3783         (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.hasNext):
3784         * inspector/front-end/WebKit.qrc:
3785         * inspector/front-end/inspector.html:
3786
3787 2011-09-05  Pavel Podivilov  <podivilov@chromium.org>
3788
3789         Web Inspector: re-implement RawSourceCode.
3790         https://bugs.webkit.org/show_bug.cgi?id=67609
3791
3792         RawSourceCode content and source mapping loading logic is too complex, re-implement it using simpler semantics:
3793         1) Initially, RawSourceCode doesn't have any content or mapping because content loading and
3794         formatting operations are asynchronous, it only has scripts metadata. We don't update UI right
3795         after RawSourceCode creation until full RawSourceCode representation is ready (content + mapping).
3796         2) When RawSourceCode representation is ready (e.g. resource is finished, or content is formatted
3797         if in pretty-print mode) we dispatch SourceMappingUpdated event to notify the listeners that
3798         source code should be shown to user and raw locations should be converted to ui locations
3799         (to show breakpoins, messages, call frames etc in UI). At this moment, all source file's content
3800         is ready for loading and source mapping is available.
3801         3) Later, RawSourceCode representation may change again, e.g. if pretty-print mode is toggled, or
3802         blocked resource is finished etc., in that case SourceMappingUpdated is dispatched again to update
3803         source code, links and decorations in UI.
3804
3805         Reviewed by Yury Semikhatsky.
3806
3807         * inspector/front-end/DebuggerPresentationModel.js:
3808         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
3809         (WebInspector.DebuggerPresentationModel.prototype._addScript):
3810         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
3811         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
3812         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation):
3813         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage):
3814         (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode):
3815         * inspector/front-end/ScriptsPanel.js:
3816         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
3817         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
3818         * inspector/front-end/SourceFile.js:
3819         (WebInspector.RawSourceCode):
3820         (WebInspector.RawSourceCode.prototype.addScript):
3821         (WebInspector.RawSourceCode.prototype.contentEdited):
3822         (WebInspector.RawSourceCode.prototype._resourceFinished):
3823         (WebInspector.RawSourceCode.prototype.requestContent):
3824         (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.sourceMappingUpdated):
3825         (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded):
3826         (WebInspector.RawSourceCode.prototype.forceLoadContent):
3827         (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping):
3828         (WebInspector.RawSourceCode.prototype._updateSourceMapping):
3829         (WebInspector.RawSourceCode.prototype._createContentProvider):
3830         (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent):
3831         (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent):
3832         (WebInspector.RawSourceCode.prototype._createSourceMapping):
3833         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
3834         (WebInspector.StaticContentProvider):
3835         (WebInspector.StaticContentProvider.prototype.requestContent):
3836
3837 2011-09-06  Csaba Osztrogonác  <ossy@webkit.org>
3838
3839         Unreviewed, rolling out r94564.
3840         http://trac.webkit.org/changeset/94564
3841         https://bugs.webkit.org/show_bug.cgi?id=67555
3842
3843         It broke many tests
3844
3845         * svg/SVGTRefElement.cpp:
3846         (WebCore::SVGTRefElement::svgAttributeChanged):
3847
3848 2011-09-06  Rob Buis  <rbuis@rim.com>
3849
3850         use after free in WebCore::SVGTRefElement::updateReferencedText
3851         https://bugs.webkit.org/show_bug.cgi?id=67555
3852
3853         Reviewed by Nikolas Zimmermann.
3854
3855         Do not install event listener if tref is not part of any document.
3856
3857         Test: svg/custom/tref-clone-crash.html
3858
3859         * svg/SVGTRefElement.cpp:
3860         (WebCore::SVGTRefElement::svgAttributeChanged):
3861
3862 2011-09-06  Sheriff Bot  <webkit.review.bot@gmail.com>
3863
3864         Unreviewed, rolling out r94560.
3865         http://trac.webkit.org/changeset/94560
3866         https://bugs.webkit.org/show_bug.cgi?id=67636
3867
3868         It made inspector/debugger/script-formatter.html flakey
3869         (Requested by Ossy on #webkit).
3870
3871         * inspector/front-end/BreakpointManager.js:
3872         (WebInspector.BreakpointManager.prototype.set reset):
3873         * inspector/front-end/DebuggerPresentationModel.js:
3874         (WebInspector.DebuggerPresentationModel.prototype._addScript.didCreateSourceMapping):
3875         (WebInspector.DebuggerPresentationModel.prototype._addScript):
3876         (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeReplaced):
3877         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
3878         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation):
3879         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage):
3880         (WebInspector.PresenationCallFrame.prototype.select):
3881         * inspector/front-end/ScriptsPanel.js:
3882         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
3883         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
3884         * inspector/front-end/SourceFile.js:
3885         (WebInspector.RawSourceCode):
3886         (WebInspector.RawSourceCode.prototype.addScript):
3887         (WebInspector.RawSourceCode.prototype.contentEdited):
3888         (WebInspector.RawSourceCode.prototype.requestContent):
3889         (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.didRequestContent):
3890         (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded):
3891         (WebInspector.RawSourceCode.prototype._setContentProvider):
3892         (WebInspector.RawSourceCode.prototype.forceLoadContent):
3893         (WebInspector.RawSourceCode.prototype._reload):
3894         (WebInspector.RawSourceCode.prototype._requestContent):
3895         (WebInspector.RawSourceCode.prototype._loadResourceContent):
3896         (WebInspector.RawSourceCode.prototype._loadScriptContent):
3897         (WebInspector.RawSourceCode.prototype._loadAndConcatenateScriptsContent):
3898         (WebInspector.RawSourceCode.prototype._didRequestContent):
3899         (WebInspector.RawSourceCode.prototype._hasPendingResource):
3900         (WebInspector.FormattedContentProvider):
3901         (WebInspector.FormattedContentProvider.prototype.requestContent.didRequestContent.didFormatContent):
3902         (WebInspector.FormattedContentProvider.prototype.requestContent):
3903
3904 2011-09-06  Antti Koivisto  <antti@apple.com>
3905
3906         https://bugs.webkit.org/show_bug.cgi?id=67480
3907         [Chromium] [REGRESSION] Layout Test svg/batik/text/textStyles.svg is failing
3908
3909         Reviewed by Dimitri Glazkov.
3910
3911         The text node needs willRecalcStyle mechanism too.
3912
3913         * dom/Text.cpp:
3914         (WebCore::Text::recalcTextStyle):
3915         * dom/Text.h:
3916         (WebCore::Text::willRecalcTextStyle):
3917         * svg/SVGTRefElement.cpp:
3918         (WebCore::SVGTRefElement::SVGTRefElement):
3919         (WebCore::SVGShadowText::SVGShadowText):
3920         (WebCore::SVGShadowText::willRecalcTextStyle):
3921
3922 2011-09-05  Pavel Podivilov  <podivilov@chromium.org>
3923
3924         Web Inspector: re-implement RawSourceCode.
3925         https://bugs.webkit.org/show_bug.cgi?id=67609
3926
3927         RawSourceCode content and source mapping loading logic is too complex, re-implement it using simpler semantics:
3928         1) Initially, RawSourceCode doesn't have any content or mapping because content loading and
3929         formatting operations are asynchronous, it only has scripts metadata. We don't update UI right
3930         after RawSourceCode creation until full RawSourceCode representation is ready (content + mapping).
3931         2) When RawSourceCode representation is ready (e.g. resource is finished, or content is formatted
3932         if in pretty-print mode) we dispatch SourceMappingUpdated event to notify the listeners that
3933         source code should be shown to user and raw locations should be converted to ui locations
3934         (to show breakpoins, messages, call frames etc in UI). At this moment, all source file's content
3935         is ready for loading and source mapping is available.
3936         3) Later, RawSourceCode representation may change again, e.g. if pretty-print mode is toggled, or
3937         blocked resource is finished etc., in that case SourceMappingUpdated is dispatched again to update
3938         source code, links and decorations in UI.
3939
3940         Reviewed by Yury Semikhatsky.
3941
3942         * inspector/front-end/DebuggerPresentationModel.js:
3943         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
3944         (WebInspector.DebuggerPresentationModel.prototype._addScript):
3945         (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated):
3946         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
3947         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation):
3948         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage):
3949         (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode):
3950         * inspector/front-end/ScriptsPanel.js:
3951         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
3952         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
3953         * inspector/front-end/SourceFile.js:
3954         (WebInspector.RawSourceCode):
3955         (WebInspector.RawSourceCode.prototype.addScript):
3956         (WebInspector.RawSourceCode.prototype.contentEdited):
3957         (WebInspector.RawSourceCode.prototype._resourceFinished):
3958         (WebInspector.RawSourceCode.prototype.requestContent):
3959         (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.sourceMappingUpdated):
3960         (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded):
3961         (WebInspector.RawSourceCode.prototype.forceLoadContent):
3962         (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping):
3963         (WebInspector.RawSourceCode.prototype._updateSourceMapping):
3964         (WebInspector.RawSourceCode.prototype._createContentProvider):
3965         (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent):
3966         (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent):
3967         (WebInspector.RawSourceCode.prototype._createSourceMapping):
3968         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
3969         (WebInspector.StaticContentProvider):
3970         (WebInspector.StaticContentProvider.prototype.requestContent):
3971
3972 2011-09-06  Dirk Schulze  <krit@webkit.org>
3973
3974         Return to transform multiplication: motion transform * other transforms
3975         https://bugs.webkit.org/show_bug.cgi?id=67601
3976
3977         Reviewed by Nikolas Zimmermann.
3978         
3979         Right now we take the current transform of a transformable SVG element, post multiply the animation transform
3980         and post multiply the motion transform to the other both:
3981
3982           transform * animation transform * motion transform
3983
3984         We switched to this behavior with the clean up of AffineTransform.
3985         While the specification of SVG demands us to do so, no other SVG viewer is doing it that way. Now switching back to:
3986
3987           motion transform * transform * animation transform
3988
3989         This is done by other SVG viewers as well. While their is no consense about how to multiply the different transforms
3990         on the SVG WG, their is a consense that the current specified behavior is unwanted. See
3991         http://lists.w3.org/Archives/Public/www-svg/2011Jan/0055.html for more details.
3992
3993         We pass the following tests of the official W3C SVG test suite again now:
3994
3995         - animate-elem-24-t.svg
3996         - animate-elem-30-t.svg
3997
3998         * svg/SVGStyledTransform