46e124633bcf7a35f6a95e7547a79733603a57d6
[WebKit-https.git] / WebCore / ChangeLog
1 2010-11-08  Simon Fraser  <simon.fraser@apple.com>
2
3         Reviewed by Dan Bernstein.
4
5         Media objects in nested iframes showing above everything else in TinyMCE
6         https://bugs.webkit.org/show_bug.cgi?id=44877
7
8         Tests: compositing/iframes/become-composited-nested-iframes.html
9                compositing/iframes/overlapped-nested-iframes.html
10         
11         The overlap testing logic that connects compositing across iframe boundaries
12         needed to be educated about nestd iframes, for platforms (i.e. Mac) where iframes
13         are allowed to be independently composited.
14         
15         Also fix a bug that could cause iframes (and possibly other elements) that share
16         style to fail to become composited.
17
18         * css/CSSStyleSelector.cpp:
19         (WebCore::CSSStyleSelector::canShareStyleWithElement): Disable style sharing for elements
20         that force synethetic style updates in order to gain RenderLayers, so they can become
21         composited. This is tested by become-composited-nested-iframes.html, though it is very
22         timing-dependent.
23         
24         * page/FrameView.h:
25         * page/FrameView.cpp:
26         (WebCore::FrameView::hasCompositedContentIncludingDescendants): New method that
27         is a "deep" version of hasCompositedContent() on platforms where that is necessary to ask.
28         
29         (WebCore::FrameView::hasCompositingAncestor): New method.
30         (WebCore::FrameView::setIsOverlapped): If we can have independently composited iframes,
31         we need to force all descendant iframes to update so that compositing gets hooked up across
32         nested iframes.
33         
34         (WebCore::FrameView::isOverlappedIncludingAncestors): New method, only called on platforms
35         where allowsIndependentlyCompositedIFrames() is true.
36
37         * rendering/RenderLayerCompositor.h:
38         * rendering/RenderLayerCompositor.cpp:
39         (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedIFrames): Utility method that
40         returns true if an iframe can be a compositing root.
41         
42         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingIFrame): Make use of
43         allowsIndependentlyCompositedIFrames().
44         
45         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): We need to notify all
46         descendant frames, not just children.
47         
48         * rendering/RenderObject.cpp:
49         (WebCore::RenderObject::setStyle): Add assert to ensure that we don't do style sharing
50         for elements that play tricks with synthetic style changes.
51
52         * rendering/RenderWidget.cpp:
53         (WebCore::RenderWidget::paint): Run overlap testing if a frame has any composited
54         descendants.
55
56 2010-11-08  Darin Adler  <darin@apple.com>
57
58         Reviewed by Alexey Proskuryakov.
59
60         Incorrect image map used when multiple maps have the same name
61         https://bugs.webkit.org/show_bug.cgi?id=49086
62
63         Tests: fast/images/image-map-multiple.html
64                fast/images/image-map-multiple-xhtml.xhtml
65
66         Factored out the code used to look up elements by id and reused it
67         to look up maps by name. It handles multiple elements efficiently.
68
69         * dom/Document.cpp:
70         (WebCore::Document::DocumentOrderedMap::clear): Added.
71         (WebCore::Document::DocumentOrderedMap::add): Added. Has code that
72         was formerly in addElementById.
73         (WebCore::Document::DocumentOrderedMap::remove): Added. Has code that
74         was formerly in removeElementById.
75         (WebCore::Document::DocumentOrderedMap::get): Added. Has code that
76         was formerly in getElementById.
77         (WebCore::keyMatchesId): Added.
78         (WebCore::Document::getElementById): Use DocumentOrderedMap::get.
79         (WebCore::Document::addElementById): Use DocumentOrderedMap::add.
80         (WebCore::Document::removeElementById): Use DocumentOrderedMap::remove.
81         (WebCore::Document::addImageMap): Use DocumentOrderedMap::add.
82         (WebCore::Document::removeImageMap): Use DocumentOrderedMap::remove.
83         (WebCore::keyMatchesMapName): Added.
84         (WebCore::keyMatchesLowercasedMapName): Added.
85         (WebCore::Document::getImageMap): Use DocumentOrderedMap::get.
86
87         * dom/Document.h: Added DocumentOrderedMap class, used inside the
88         Document class. Changed m_imageMapsByName to be a DocumentOrderedMap.
89         Changed m_elementsById to be a DocumentOrderedMap. Eliminated
90         m_duplicateIds, since DocumentOrderedMap now has that internally.
91
92 2010-11-08  Alexey Proskuryakov  <ap@apple.com>
93
94         Reviewed by Darin Adler.
95
96         https://bugs.webkit.org/show_bug.cgi?id=48685
97         Notify UI process about focused frame
98
99         * WebCore.xcodeproj/project.pbxproj: Adding developmentRegion back.
100
101         * loader/EmptyClients.h: (WebCore::EmptyChromeClient::focusedFrameChanged):
102         * page/Chrome.cpp: (WebCore::Chrome::focusedFrameChanged):
103         * page/Chrome.h:
104         * page/ChromeClient.h:
105         Added a new Chrome client notification.
106
107         * page/FocusController.cpp: (WebCore::FocusController::setFocusedFrame): Notify chrome.
108
109 2010-11-08  Anders Carlsson  <andersca@apple.com>
110
111         Reviewed by Adam Roben.
112
113         Remove use of HIGetScaleFactor
114         https://bugs.webkit.org/show_bug.cgi?id=49186
115         <rdar://problem/8618410>
116
117         Scale factors can vary on a display-by-display basis and it doesn't make sense
118         to compute scale factor event coordinates like this.
119
120         * plugins/mac/PluginViewMac.mm:
121         (WebCore::PluginView::globalMousePosForPlugin):
122
123 2010-11-08  Noam Rosenthal  <noam.rosenthal@nokia.com>
124
125         Reviewed by Kenneth Rohde Christiansen.
126
127         [Texmap] [Qt] Texture mapper initial implementation
128         https://bugs.webkit.org/show_bug.cgi?id=47070
129
130         Make the necessary changes in TextureMapperNode in preparation of making it possible to paint it
131         from a different thread.
132         The main problematic part was the cache, which made it so that textures can become invalid and have to
133         be rerendered from content during paint. This is solved here by creating a pack/unpack function for
134         textures, which lets a texture archive its data away from video memory, or do whatever the platform
135         thinks is right for freeing memory without needing to re-render again from content (which cannot be
136         made thread safe).
137
138         After this change, TextureMapperNode moved to its own file, and has 2 entry points: paint and syncCompositingState.
139         The idea is that syncCompositingState has to be called in the UI thread, paint can be called from a different
140         thread, and they should block each other.
141
142         The new test tests the cache code-path, to show that the pack/unpack technique works for cases where it
143         kicks in.
144
145         Test: compositing/layer-creation/many-layers.html
146
147         * WebCore.pro:
148         * platform/graphics/opengl/TextureMapperGL.cpp:
149         (WebCore::BitmapTextureGL::~BitmapTextureGL):
150         (WebCore::BitmapTextureGL::BitmapTextureGL):
151         (WebCore::TextureMapperGL::TextureMapperGL):
152         (WebCore::TextureMapperGL::drawTexture):
153         * platform/graphics/opengl/TextureMapperGL.h:
154         (WebCore::TextureMapperGL::create):
155         * platform/graphics/qt/TextureMapperQt.cpp:
156         (WebCore::BitmapTextureQt::pack):
157         (WebCore::BitmapTextureQt::unpack):
158         (WebCore::TextureMapper::create):
159         (WebCore::BitmapTextureQt::BitmapTextureQt):
160         * platform/graphics/qt/TextureMapperQt.h: Added.
161
162 2010-11-08  Simon Fraser  <simon.fraser@apple.com>
163
164         Reviewed by Sam Weinig.
165
166         Allow applets to participate in accelerated compositing
167         https://bugs.webkit.org/show_bug.cgi?id=49117
168         <rdar://problem/8625819>
169         
170         Add RenderApplet to the list of renderers that can optionally get RenderLayers,
171         and be composited for some reason.
172
173         Not currently testable.
174
175         * rendering/RenderApplet.h: Outdented the class declaration.
176
177         * rendering/RenderApplet.cpp:
178         (WebCore::RenderApplet::requiresLayer): Return true if the underlying widget
179         has a platform layer.
180         (WebCore::RenderApplet::allowsAcceleratedCompositing): Check the widget to see
181         if it has a platform layer.
182
183         * rendering/RenderLayer.cpp:
184         (WebCore::RenderLayer::shouldBeNormalFlowOnly): Reformat, and add isApplet().
185         (WebCore::RenderLayer::isSelfPaintingLayer): Reformat, and add isApplet().
186         * rendering/RenderLayerBacking.cpp:
187         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Use 'renderer' local variable
188         for efficiency. Now check for embedded objects and applets.
189         * rendering/RenderLayerCompositor.cpp:
190         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin): Check for embedded objects and applets.
191
192 2010-11-08  Xan Lopez  <xlopez@igalia.com>
193
194         Reviewed by Martin Robinson.
195
196         * GNUmakefile.am: add missing files to fix distcheck.
197
198 2010-11-08  Alexander Pavlov  <apavlov@chromium.org>
199
200         Reviewed by David Hyatt.
201
202         getPropertyValue("background") causes crash
203         https://bugs.webkit.org/show_bug.cgi?id=49055
204
205         Test: fast/css/background-norepeat-crash.html
206
207         * css/CSSMutableStyleDeclaration.cpp:
208         (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue):
209
210 2010-11-08  Martin Robinson  <mrobinson@igalia.com>
211
212         Reviewed by Xan Lopez.
213
214         [GTK] Wrapped DOM bindings GObjects do not disconnect event listeners when they die
215         https://bugs.webkit.org/show_bug.cgi?id=49136
216
217         When GObjects are finalized and freed, disconnect their event listeners, so that
218         WebCore does not try to fire signals on dead GObjects. We do this by holding a weak
219         reference to the GObject in the signal listener. When the weak reference notification
220         callback is executed, we disconnect the event listener.
221
222         No new tests; this fix is proved by prevention of crashes in soon to be
223         landed editing delegate signals, which are covered by the layout tests.
224
225         * bindings/gobject/GObjectEventListener.cpp:
226         (WebCore::GObjectEventListener::GObjectEventListener): Updated the constructor.
227         (WebCore::GObjectEventListener::~GObjectEventListener): Disconnect the weak reference
228         if the GObject is still alive.
229         (WebCore::GObjectEventListener::gobjectDestroyed): When the GObject is destroyed,
230         disconnect the appropriate event listener.
231         (WebCore::GObjectEventListener::handleEvent): Changes to reflect use of CString
232         instead of WebCore string.
233         * bindings/gobject/GObjectEventListener.h:
234         (WebCore::GObjectEventListener::addEventListener): Changed create to addEventListener,
235         so that the connection and disconnection is an internal contract to the class.
236         (WebCore::GObjectEventListener::gobjectDestroyedCallback): Added.
237         * bindings/scripts/CodeGeneratorGObject.pm: Modified the code generate to use
238         GObjectEventListener::addEventListener and no longer call addEventListener on
239         its own.
240
241 2010-11-08  Adam Roben  <aroben@apple.com>
242
243         Windows Release build fix after r71514
244
245         The build was failing due to an alignment error. Strangely, depending
246         on the order of SVGStaticPropertyTearOff's members, the build will
247         either fail in Release (as it does before this change), or Debug (as it
248         did before r71514), but not both.
249
250         * svg/properties/SVGStaticPropertyTearOff.h:
251         (WebCore::SVGStaticPropertyTearOff::SVGStaticPropertyTearOff): Copied
252         the #pragma pack trick from JSSVGPODTypeWrapper.h, which has similar
253         issues.
254
255 2010-11-08  Yury Semikhatsky  <yurys@chromium.org>
256
257         Reviewed by Pavel Feldman.
258
259         Web Inspector: decouple ScriptArguments from ScriptCallStack
260         https://bugs.webkit.org/show_bug.cgi?id=48058
261
262         ScriptCallFrame and ScriptCallStack are now the same for both JSC and V8.
263         The factory functions that allow to create ScriptCallStack from VM-specific
264         objects are defined in ScriptCallStackFactory.cpp.
265
266         ScriptArguments class is used for passing arguments from JS code to the native
267         part.
268
269         No new tests. This refactoring is covered with existing Console tests.
270
271         * Android.jscbindings.mk:
272         * Android.v8bindings.mk:
273         * CMakeLists.txt:
274         * GNUmakefile.am:
275         * WebCore.gypi:
276         * WebCore.pro:
277         * WebCore.vcproj/WebCore.vcproj:
278         * WebCore.xcodeproj/project.pbxproj:
279         * bindings/js/JSBindingsAllInOne.cpp:
280         * bindings/js/JSConsoleCustom.cpp:
281         (WebCore::JSConsole::profile):
282         (WebCore::JSConsole::profileEnd):
283         * bindings/js/ScriptCallStackFactory.cpp: Renamed from WebCore/bindings/js/ScriptCallStack.cpp.
284         (WebCore::createScriptCallStack):
285         (WebCore::createScriptArguments):
286         (WebCore::ScriptCallStack::stackTrace):
287         * bindings/js/ScriptCallStackFactory.h: Copied from WebCore/bindings/js/ScriptCallFrame.cpp.
288         * bindings/js/ScriptState.cpp:
289         (WebCore::ScriptStateProtectedPtr::~ScriptStateProtectedPtr):
290         (WebCore::ScriptStateProtectedPtr::ScriptStateProtectedPtr):
291         (WebCore::ScriptStateProtectedPtr::get):
292         * bindings/js/ScriptState.h:
293         * bindings/scripts/CodeGeneratorJS.pm:
294         * bindings/scripts/CodeGeneratorV8.pm:
295         * bindings/scripts/test/JS/JSTestObj.cpp:
296         (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
297         * bindings/scripts/test/V8/V8TestObj.cpp:
298         (WebCore::TestObjInternal::customArgsAndExceptionCallback):
299         * bindings/v8/ScriptCallFrame.h: Removed.
300         * bindings/v8/ScriptCallStack.h: Removed.
301         * bindings/v8/ScriptCallStackFactory.cpp: Renamed from WebCore/bindings/v8/ScriptCallStack.cpp.
302         (WebCore::toScriptCallFrame):
303         (WebCore::toScriptCallFramesVector):
304         (WebCore::createScriptCallStack):
305         (WebCore::createScriptArguments):
306         (WebCore::ScriptCallStack::stackTrace):
307         * bindings/v8/ScriptCallStackFactory.h: Copied from WebCore/bindings/js/ScriptCallFrame.cpp.
308         * bindings/v8/ScriptController.cpp:
309         (WebCore::ScriptController::setCaptureCallStackForUncaughtExceptions):
310         * bindings/v8/ScriptState.h:
311         (WebCore::ScriptStateProtectedPtr::get):
312         * bindings/v8/V8ConsoleMessage.cpp:
313         (WebCore::V8ConsoleMessage::handler):
314         (WebCore::V8ConsoleMessage::dispatchNow):
315         * bindings/v8/V8ConsoleMessage.h:
316         * bindings/v8/custom/V8ConsoleCustom.cpp:
317         (WebCore::V8Console::traceCallback):
318         (WebCore::V8Console::assertCallback):
319         (WebCore::V8Console::profileCallback):
320         (WebCore::V8Console::profileEndCallback):
321         * dom/NodeFilter.h:
322         * inspector/ConsoleMessage.cpp:
323         (WebCore::ConsoleMessage::ConsoleMessage):
324         (WebCore::ConsoleMessage::addToFrontend):
325         (WebCore::ConsoleMessage::updateRepeatCountInConsole):
326         (WebCore::ConsoleMessage::isEqual):
327         * inspector/ConsoleMessage.h:
328         * inspector/InspectorController.cpp:
329         (WebCore::InspectorController::addMessageToConsole):
330         (WebCore::InspectorController::startGroup):
331         * inspector/InspectorController.h:
332         * inspector/ScriptArguments.cpp: Copied from WebCore/bindings/v8/ScriptCallFrame.cpp.
333         (WebCore::ScriptArguments::ScriptArguments):
334         (WebCore::ScriptArguments::~ScriptArguments):
335         (WebCore::ScriptArguments::argumentAt):
336         (WebCore::ScriptArguments::globalState):
337         (WebCore::ScriptArguments::getFirstArgumentAsString):
338         (WebCore::ScriptArguments::isEqual):
339         * inspector/ScriptArguments.h: Copied from WebCore/bindings/js/ScriptCallFrame.h.
340         (WebCore::ScriptArguments::argumentCount):
341         * inspector/ScriptCallFrame.cpp: Renamed from WebCore/bindings/v8/ScriptCallFrame.cpp.
342         (WebCore::ScriptCallFrame::ScriptCallFrame):
343         (WebCore::ScriptCallFrame::~ScriptCallFrame):
344         (WebCore::ScriptCallFrame::isEqual):
345         (WebCore::ScriptCallFrame::buildInspectorObject):
346         * inspector/ScriptCallFrame.h: Renamed from WebCore/bindings/js/ScriptCallFrame.h.
347         (WebCore::ScriptCallFrame::functionName):
348         (WebCore::ScriptCallFrame::sourceURL):
349         (WebCore::ScriptCallFrame::lineNumber):
350         * inspector/ScriptCallStack.cpp: Renamed from WebCore/bindings/js/ScriptCallFrame.cpp.
351         (WebCore::ScriptCallStack::ScriptCallStack):
352         (WebCore::ScriptCallStack::~ScriptCallStack):
353         (WebCore::ScriptCallStack::at):
354         (WebCore::ScriptCallStack::size):
355         (WebCore::ScriptCallStack::isEqual):
356         (WebCore::ScriptCallStack::buildInspectorObject):
357         * inspector/ScriptCallStack.h: Renamed from WebCore/bindings/js/ScriptCallStack.h.
358         * page/Console.cpp:
359         (WebCore::Console::addMessage):
360         (WebCore::Console::debug):
361         (WebCore::Console::error):
362         (WebCore::Console::info):
363         (WebCore::Console::log):
364         (WebCore::Console::dir):
365         (WebCore::Console::dirxml):
366         (WebCore::Console::trace):
367         (WebCore::Console::assertCondition):
368         (WebCore::Console::count):
369         (WebCore::Console::markTimeline):
370         (WebCore::Console::profile):
371         (WebCore::Console::profileEnd):
372         (WebCore::Console::timeEnd):
373         (WebCore::Console::group):
374         (WebCore::Console::groupCollapsed):
375         (WebCore::Console::shouldCaptureFullStackTrace):
376         (WebCore::Console::warn):
377         * page/Console.h:
378         (WebCore::Console::profiles):
379         * page/Console.idl:
380
381 2010-11-08  Nikolas Zimmermann  <nzimmermann@rim.com>
382
383         Not reviewed. Build fix.
384         
385         Attempt to fix windows builds after r71512. Swap order of members to avoid warning C4121.
386
387         * svg/properties/SVGStaticPropertyTearOff.h:
388         (WebCore::SVGStaticPropertyTearOff::SVGStaticPropertyTearOff):
389
390 2010-11-08  Mikhail Naganov  <mnaganov@chromium.org>
391
392         Unreviewed. Fix Qt build after r71511.
393
394         * inspector/InspectorController.cpp:
395         (WebCore::InspectorController::restoreInspectorStateFromCookie):
396
397 2010-11-08  Nikolas Zimmermann  <nzimmermann@rim.com>
398
399         Reviewed by Dirk Schulze.
400
401         Convert SVGPoint/SVGPointList to the new SVGPropertyTearOff concept
402         https://bugs.webkit.org/show_bug.cgi?id=49067
403
404         Remove SVGAnimatedPoints interface, not reachable through bindings anyway, it was just another MI interface, that
405         now has been integrated into SVGPolylineElement/SVGPolygonElement, simplfying the generation and avoiding virtual
406         calls in SVGPolylineElement/SVGPolygonElement.
407
408         Remove the need to use manual XML <-> SVG DOM synchronization. The points/animatedPoints methods now create
409         SVGListPropertyTearOffs, thus using the same synchronization/expose-to-bindings concept like all other
410         animated properties.
411
412         Convert SVGPoint/SVGPointList to use the new SVGPropertyTearOff concept, adapted all code, as SVGPointList
413         is now a plain Vector<FloatPoint>. Enable StrictTypeChecking for SVGPoint.
414
415         Test: svg/dom/SVGPoint.html
416
417         * Android.derived.v8bindings.mk: Remove SVGAnimatedPoints (and IDL generation).
418         * Android.mk: Ditto.
419         * CMakeLists.txt: Ditto.
420         * DerivedSources.make: Ditto.
421         * GNUmakefile.am: Ditto. Add SVGStaticPropertyTearOff.h to build.
422         * WebCore.gypi: Ditto.
423         * WebCore.order: Remove SVGAnimatedPoints symbols.
424         * WebCore.pro: Remove SVGAnimatedPoints (and IDL generation). Add SVGStaticPropertyTearOff.h to build.
425         * WebCore.vcproj/WebCore.vcproj: Ditto.
426         * WebCore.xcodeproj/project.pbxproj: Ditto.
427         * bindings/objc/DOMSVG.h: Remove DOMSVGAnimatedPoints include.
428         * bindings/scripts/CodeGenerator.pm: Adapt code converting SVGPoint/SVGPointList to use the new SVGPropertyTearOff concepts.
429         * bindings/scripts/CodeGeneratorJS.pm: Ditto.
430         * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
431         * bindings/scripts/CodeGeneratorV8.pm: Ditto.
432         * rendering/SVGRenderTreeAsText.cpp: Adapt for SVGPolyElement API change, use pointList() instead of points() (which is only used for bindings now).
433         (WebCore::operator<<):
434         * svg/SVGAllInOne.cpp: Remove SVGAnimatedPoints.cpp.
435         * svg/SVGAnimateElement.cpp: Adapt for SVGPointList API change, it's not refcounted anymore.
436         (WebCore::SVGAnimateElement::calculateAnimatedValue):
437         (WebCore::SVGAnimateElement::calculateFromAndToValues):
438         (WebCore::SVGAnimateElement::applyResultsToTarget):
439         * svg/SVGAnimateElement.h:  Ditto.
440         * svg/SVGAnimatedPoints.cpp: Removed.
441         * svg/SVGAnimatedPoints.h: Removed.
442         * svg/SVGAnimatedPoints.idl: Removed.
443         * svg/SVGParserUtilities.cpp: Adapt for SVGPointList API change, it's not refcounted anymore.
444         (WebCore::pointsListFromSVGData):
445         * svg/SVGParserUtilities.h: Ditto.
446         * svg/SVGPoint.idl: Remove PODType marker, and add StrictTypeChecking for x/y attributes.
447         * svg/SVGPointList.cpp: SVGPointList is now a plain Vector<FloatPoint>, rewrite.
448         (WebCore::SVGPointList::valueAsString):
449         (WebCore::SVGPointList::createAnimated):
450         * svg/SVGPointList.h: Ditto.
451         (WebCore::SVGPointList::SVGPointList):
452         * svg/SVGPolyElement.cpp: Remove manual SVG <-> XML DOM synchronization. Now handles through the SVGAnimatedPropertyTearOff concept.
453         (WebCore::SVGPolyElement::parseMappedAttribute):
454         (WebCore::SVGPolyElement::svgAttributeChanged):
455         (WebCore::SVGPolyElement::synchronizeProperty):
456         (WebCore::SVGPolyElement::synchronizePoints):
457         (WebCore::SVGPolyElement::points):
458         (WebCore::SVGPolyElement::animatedPoints):
459         * svg/SVGPolyElement.h: Reindented.
460         (WebCore::SVGPolyElement::pointList):
461         (WebCore::SVGPolyElement::isValid):
462         (WebCore::SVGPolyElement::supportsMarkers):
463         * svg/SVGPolygonElement.cpp: Adapt for SVGPointList API change.
464         (WebCore::SVGPolygonElement::toPathData):
465         * svg/SVGPolygonElement.idl: Remove SVGAnimatedPoints inheritance.
466         * svg/SVGPolylineElement.cpp: Adapt for SVGPointList API change.
467         (WebCore::SVGPolylineElement::toPathData):
468         * svg/SVGPolylineElement.idl: Remove SVGAnimatedPoints inheritance.
469         * svg/SVGSVGElement.cpp:
470         (WebCore::SVGSVGElement::setCurrentTranslate): Use updateCurrentTranslate().
471         (WebCore::SVGSVGElement::updateCurrentTranslate): Added, only used by the bindings, after changing a value of SVGStaticPropertyTearOff object.
472         * svg/SVGSVGElement.h:
473         (WebCore::SVGSVGElement::currentTranslate): Return reference to m_translation.
474         * svg/properties/SVGPropertyTearOff.h: Made constructors protected, as SVGStaticPropertyTearOff inherits from it.
475         (WebCore::SVGPropertyTearOff::commitChange):
476         * svg/properties/SVGPropertyTraits.h: Add SVGPointList handing.
477         * svg/properties/SVGStaticPropertyTearOff.h: Added. Used for SVGProperty types returned by attributes, that are not associated with a SVGAnimatedProperty. (SVGSVGElement::currentTranslate).
478         (WebCore::SVGStaticPropertyTearOff::create):
479         (WebCore::SVGStaticPropertyTearOff::commitChange):
480         (WebCore::SVGStaticPropertyTearOff::SVGStaticPropertyTearOff):
481
482 2010-11-08  Mikhail Naganov  <mnaganov@chromium.org>
483
484         Reviewed by Adam Barth.
485
486         Web Inspector [Chromium]: Make CPU profiling to survive navigation.
487
488         https://bugs.webkit.org/show_bug.cgi?id=48843
489
490         * inspector/Inspector.idl:
491         * inspector/InspectorController.cpp:
492         (WebCore::InspectorController::restoreInspectorStateFromCookie):
493         (WebCore::InspectorController::reuseFrontend):
494         (WebCore::InspectorController::disconnectFrontend):
495         (WebCore::InspectorController::populateScriptObjects):
496         (WebCore::InspectorController::restoreProfiler):
497         (WebCore::InspectorController::didCommitLoad):
498         (WebCore::InspectorController::startUserInitiatedProfiling):
499         (WebCore::InspectorController::stopUserInitiatedProfiling):
500         * inspector/InspectorController.h:
501         (WebCore::InspectorController::startProfiling):
502         (WebCore::InspectorController::stopProfiling):
503         * inspector/InspectorProfilerAgent.cpp:
504         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
505         (WebCore::InspectorProfilerAgent::stopUserInitiatedProfiling):
506         * inspector/InspectorProfilerAgent.h:
507         * inspector/InspectorState.cpp:
508         (WebCore::InspectorState::InspectorState):
509         * inspector/InspectorState.h:
510         * inspector/front-end/ProfilesPanel.js:
511         (WebInspector.ProfilesPanel.prototype.hasTemporaryProfile):
512         (WebInspector.ProfilesPanel.prototype.hasProfile):
513         * inspector/front-end/inspector.js:
514         (WebInspector.setRecordingProfile):
515
516 2010-11-08  Renata Hodovan  <reni@webkit.org>
517
518         Reviewed by Nikolas Zimmermann.
519
520         SVGFEConvolveMatrixElement doesn't support dynamic invalidation
521         https://bugs.webkit.org/show_bug.cgi?id=47660
522
523         Wrap orderX and orderY into the common order property according to the w3 standard and remove them from svnattrs.in.
524         The patch implements the orderXIdentifier and orderYIdentifier getter functions to reach
525         properly the orderX and orderY components of order property from SVG DOM.
526
527         Tests: svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-bias-prop.html
528                svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-divisor-prop.html
529                svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-edgeMode-prop.html
530                svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-in-prop.html
531                svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelMatrix-prop.html
532                svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-kernelUnitLength-prop.html
533                svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-order-prop.html
534                svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-preserveAlpha-prop.html
535                svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetX-prop.html
536                svg/dynamic-updates/SVGFEConvolveMatrixElement-svgdom-targetY-prop.html
537
538         * svg/SVGFEConvolveMatrixElement.cpp:
539         (WebCore::SVGFEConvolveMatrixElement::orderXIdentifier):
540         (WebCore::SVGFEConvolveMatrixElement::orderYIdentifier):
541         * svg/SVGFEConvolveMatrixElement.h:
542         * svg/svgattrs.in:
543
544 2010-11-08  Adam Barth  <abarth@webkit.org>
545
546         Reviewed by Antti Koivisto.
547
548         Rename CachedResourceLoader::m_doc to CachedResourceLoader::m_document
549         https://bugs.webkit.org/show_bug.cgi?id=49163
550
551         The usual convention is to use "document", not "doc" to refer to the
552         document.
553
554         * css/CSSCursorImageValue.cpp:
555         (WebCore::CSSCursorImageValue::cachedImage):
556         * dom/XMLDocumentParserLibxml2.cpp:
557         (WebCore::shouldAllowExternalLoad):
558         * loader/cache/CachedResourceLoader.cpp:
559         (WebCore::CachedResourceLoader::CachedResourceLoader):
560         (WebCore::CachedResourceLoader::frame):
561         (WebCore::CachedResourceLoader::requestImage):
562         (WebCore::CachedResourceLoader::canRequest):
563         (WebCore::CachedResourceLoader::requestResource):
564         (WebCore::CachedResourceLoader::printAccessDeniedMessage):
565         (WebCore::CachedResourceLoader::preload):
566         (WebCore::CachedResourceLoader::checkForPendingPreloads):
567         (WebCore::CachedResourceLoader::requestPreload):
568         * loader/cache/CachedResourceLoader.h:
569         (WebCore::CachedResourceLoader::document):
570         * loader/cache/MemoryCache.cpp:
571         (WebCore::MemoryCache::requestResource):
572         * loader/loader.cpp:
573         (WebCore::Loader::load):
574         (WebCore::Loader::Host::servePendingRequests):
575         (WebCore::Loader::Host::didFinishLoading):
576         (WebCore::Loader::Host::didFail):
577         * xml/XSLTProcessorLibxslt.cpp:
578         (WebCore::docLoaderFunc):
579
580 2010-11-07  Adam Barth  <abarth@webkit.org>
581
582         Unreviewed.  Remove some unneeded includes.
583
584         * loader/FrameLoader.cpp:
585         * loader/PlaceholderDocument.cpp:
586
587 2010-11-07  Adam Barth  <abarth@webkit.org>
588
589         Reviewed by Eric Seidel.
590
591         Rename Cache to MemoryCache
592         https://bugs.webkit.org/show_bug.cgi?id=49159
593
594         So sayeth the diagram.
595
596         * Android.mk:
597         * CMakeLists.txt:
598         * GNUmakefile.am:
599         * WebCore.gypi:
600         * WebCore.pro:
601         * WebCore.vcproj/WebCore.vcproj:
602         * WebCore.xcodeproj/project.pbxproj:
603         * css/CSSImageValue.cpp:
604         * dom/ContainerNode.cpp:
605         * history/PageCache.cpp:
606         * inspector/InspectorCSSStore.h:
607         * inspector/InspectorResourceAgent.cpp:
608         * loader/FrameLoader.cpp:
609         * loader/archive/cf/LegacyWebArchive.cpp:
610         * loader/cache/Cache.cpp: Removed.
611         * loader/cache/Cache.h: Removed.
612         * loader/cache/CachedCSSStyleSheet.cpp:
613         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
614         * loader/cache/CachedFont.cpp:
615         * loader/cache/CachedFont.h:
616         * loader/cache/CachedImage.cpp:
617         (WebCore::CachedImage::destroyDecodedData):
618         * loader/cache/CachedImage.h:
619         * loader/cache/CachedResource.cpp:
620         * loader/cache/CachedResource.h:
621         * loader/cache/CachedResourceLoader.cpp:
622         * loader/cache/CachedResourceLoader.h:
623         * loader/cache/CachedScript.cpp:
624         (WebCore::CachedScript::destroyDecodedData):
625         * loader/cache/MemoryCache.cpp: Copied from WebCore/loader/cache/Cache.cpp.
626         (WebCore::cache):
627         (WebCore::MemoryCache::MemoryCache):
628         (WebCore::MemoryCache::requestResource):
629         (WebCore::MemoryCache::requestUserCSSStyleSheet):
630         (WebCore::MemoryCache::revalidateResource):
631         (WebCore::MemoryCache::revalidationSucceeded):
632         (WebCore::MemoryCache::revalidationFailed):
633         (WebCore::MemoryCache::resourceForURL):
634         (WebCore::MemoryCache::deadCapacity):
635         (WebCore::MemoryCache::liveCapacity):
636         (WebCore::MemoryCache::pruneLiveResources):
637         (WebCore::MemoryCache::pruneDeadResources):
638         (WebCore::MemoryCache::setCapacities):
639         (WebCore::MemoryCache::makeResourcePurgeable):
640         (WebCore::MemoryCache::evict):
641         (WebCore::MemoryCache::addCachedResourceLoader):
642         (WebCore::MemoryCache::removeCachedResourceLoader):
643         (WebCore::MemoryCache::lruListFor):
644         (WebCore::MemoryCache::removeFromLRUList):
645         (WebCore::MemoryCache::insertInLRUList):
646         (WebCore::MemoryCache::resourceAccessed):
647         (WebCore::MemoryCache::removeFromLiveDecodedResourcesList):
648         (WebCore::MemoryCache::insertInLiveDecodedResourcesList):
649         (WebCore::MemoryCache::addToLiveResourcesSize):
650         (WebCore::MemoryCache::removeFromLiveResourcesSize):
651         (WebCore::MemoryCache::adjustSize):
652         (WebCore::MemoryCache::TypeStatistic::addResource):
653         (WebCore::MemoryCache::getStatistics):
654         (WebCore::MemoryCache::setDisabled):
655         (WebCore::MemoryCache::dumpStats):
656         (WebCore::MemoryCache::dumpLRULists):
657         * loader/cache/MemoryCache.h: Copied from WebCore/loader/cache/Cache.h.
658         (WebCore::MemoryCache::shouldMakeResourcePurgeableOnEviction):
659         * loader/loader.cpp:
660         * page/EventSource.cpp:
661         * page/Settings.h:
662         * xml/XMLHttpRequest.cpp:
663         (WebCore::XMLHttpRequest::createRequest):
664
665 2010-11-07  Eric Seidel  <eric@webkit.org>
666
667         Unreviewed.  Attempt to fix the windows build.
668
669         Move the rest of the cache-related files into loader/cache
670         https://bugs.webkit.org/show_bug.cgi?id=49156
671
672         * WebCore.vcproj/WebCoreCommon.vsprops:
673         * WebCore.vcproj/copyForwardingHeaders.cmd:
674
675 2010-11-07  Eric Seidel  <eric@webkit.org>
676
677         Reviewed by Adam Barth.
678
679         Move the rest of the cache-related files into loader/cache
680         https://bugs.webkit.org/show_bug.cgi?id=49156
681
682         * GNUmakefile.am:
683         * WebCore.gypi:
684         * WebCore.vcproj/WebCore.vcproj:
685         * WebCore.xcodeproj/project.pbxproj:
686         * loader/CachePolicy.h: Removed.
687         * loader/CachedCSSStyleSheet.cpp: Removed.
688         * loader/CachedCSSStyleSheet.h: Removed.
689         * loader/CachedFont.cpp: Removed.
690         * loader/CachedFont.h: Removed.
691         * loader/CachedImage.cpp: Removed.
692         * loader/CachedImage.h: Removed.
693         * loader/CachedResource.cpp: Removed.
694         * loader/CachedResource.h: Removed.
695         * loader/CachedResourceClient.h: Removed.
696         * loader/CachedResourceClientWalker.cpp: Removed.
697         * loader/CachedResourceClientWalker.h: Removed.
698         * loader/CachedResourceHandle.cpp: Removed.
699         * loader/CachedResourceHandle.h: Removed.
700         * loader/CachedResourceLoader.cpp: Removed.
701         * loader/CachedResourceLoader.h: Removed.
702         * loader/CachedScript.cpp: Removed.
703         * loader/CachedScript.h: Removed.
704         * loader/CachedXSLStyleSheet.cpp: Removed.
705         * loader/CachedXSLStyleSheet.h: Removed.
706         * loader/cache/CachePolicy.h: Copied from WebCore/loader/CachePolicy.h.
707         * loader/cache/CachedCSSStyleSheet.cpp: Copied from WebCore/loader/CachedCSSStyleSheet.cpp.
708         * loader/cache/CachedCSSStyleSheet.h: Copied from WebCore/loader/CachedCSSStyleSheet.h.
709         * loader/cache/CachedFont.cpp: Copied from WebCore/loader/CachedFont.cpp.
710         * loader/cache/CachedFont.h: Copied from WebCore/loader/CachedFont.h.
711         * loader/cache/CachedImage.cpp: Copied from WebCore/loader/CachedImage.cpp.
712         * loader/cache/CachedImage.h: Copied from WebCore/loader/CachedImage.h.
713         * loader/cache/CachedResource.cpp: Copied from WebCore/loader/CachedResource.cpp.
714         * loader/cache/CachedResource.h: Copied from WebCore/loader/CachedResource.h.
715         * loader/cache/CachedResourceClient.h: Copied from WebCore/loader/CachedResourceClient.h.
716         * loader/cache/CachedResourceClientWalker.cpp: Copied from WebCore/loader/CachedResourceClientWalker.cpp.
717         * loader/cache/CachedResourceClientWalker.h: Copied from WebCore/loader/CachedResourceClientWalker.h.
718         * loader/cache/CachedResourceHandle.cpp: Copied from WebCore/loader/CachedResourceHandle.cpp.
719         * loader/cache/CachedResourceHandle.h: Copied from WebCore/loader/CachedResourceHandle.h.
720         * loader/cache/CachedResourceLoader.cpp: Copied from WebCore/loader/CachedResourceLoader.cpp.
721         * loader/cache/CachedResourceLoader.h: Copied from WebCore/loader/CachedResourceLoader.h.
722         * loader/cache/CachedScript.cpp: Copied from WebCore/loader/CachedScript.cpp.
723         * loader/cache/CachedScript.h: Copied from WebCore/loader/CachedScript.h.
724         * loader/cache/CachedXSLStyleSheet.cpp: Copied from WebCore/loader/CachedXSLStyleSheet.cpp.
725         * loader/cache/CachedXSLStyleSheet.h: Copied from WebCore/loader/CachedXSLStyleSheet.h.
726
727 2010-11-07  Adam Barth  <abarth@webkit.org>
728
729         Reviewed by Eric Seidel.
730
731         Rename X-Purpose to Purpose
732         https://bugs.webkit.org/show_bug.cgi?id=47802
733
734         As requested by IETF HTTP WG.  This patch is part of a larger movement
735         in the HTTP community to move away from X- headers.  Various senior
736         folks at the IETF believe they're a failed experiment:
737
738         http://tools.ietf.org/html/draft-saintandre-xdash-considered-harmful
739
740         * loader/loader.cpp:
741         (WebCore::Loader::Host::servePendingRequests):
742
743 2010-11-07  Daniel Bates  <dbates@rim.com>
744
745         Reviewed by Adam Barth.
746
747         Assert that a non-null PassRefPtr<Document> has a non-null frame in Frame::setDocument()
748         https://bugs.webkit.org/show_bug.cgi?id=49152
749
750         Add an ASSERT to ensure that a non-null Document has a non-null Frame
751         in Frame::setDocument().
752
753         Currently, whenever Frame::setDocument() is called with a non-null
754         Document the Document has a non-null Frame. We should assert this
755         invariant.
756
757         * page/Frame.cpp:
758         (WebCore::Frame::setDocument):
759
760 2010-11-07  Eric Seidel  <eric@webkit.org>
761
762         Reviewed by Adam Barth.
763
764         Move Cache.* into loader/cache in as a start to cleaning up loader/
765         https://bugs.webkit.org/show_bug.cgi?id=49153
766
767         * Android.mk:
768         * CMakeLists.txt:
769         * GNUmakefile.am:
770         * WebCore.gypi:
771         * WebCore.pro:
772         * WebCore.vcproj/WebCore.vcproj:
773         * WebCore.xcodeproj/project.pbxproj:
774         * loader/cache/Cache.cpp: Renamed from WebCore/loader/Cache.cpp.
775         (WebCore::cache):
776         (WebCore::Cache::Cache):
777         (WebCore::createResource):
778         (WebCore::Cache::requestResource):
779         (WebCore::Cache::requestUserCSSStyleSheet):
780         (WebCore::Cache::revalidateResource):
781         (WebCore::Cache::revalidationSucceeded):
782         (WebCore::Cache::revalidationFailed):
783         (WebCore::Cache::resourceForURL):
784         (WebCore::Cache::deadCapacity):
785         (WebCore::Cache::liveCapacity):
786         (WebCore::Cache::pruneLiveResources):
787         (WebCore::Cache::pruneDeadResources):
788         (WebCore::Cache::setCapacities):
789         (WebCore::Cache::makeResourcePurgeable):
790         (WebCore::Cache::evict):
791         (WebCore::Cache::addCachedResourceLoader):
792         (WebCore::Cache::removeCachedResourceLoader):
793         (WebCore::fastLog2):
794         (WebCore::Cache::lruListFor):
795         (WebCore::Cache::removeFromLRUList):
796         (WebCore::Cache::insertInLRUList):
797         (WebCore::Cache::resourceAccessed):
798         (WebCore::Cache::removeFromLiveDecodedResourcesList):
799         (WebCore::Cache::insertInLiveDecodedResourcesList):
800         (WebCore::Cache::addToLiveResourcesSize):
801         (WebCore::Cache::removeFromLiveResourcesSize):
802         (WebCore::Cache::adjustSize):
803         (WebCore::Cache::TypeStatistic::addResource):
804         (WebCore::Cache::getStatistics):
805         (WebCore::Cache::setDisabled):
806         (WebCore::Cache::dumpStats):
807         (WebCore::Cache::dumpLRULists):
808         * loader/cache/Cache.h: Renamed from WebCore/loader/Cache.h.
809         (WebCore::Cache::LRUList::LRUList):
810         (WebCore::Cache::TypeStatistic::TypeStatistic):
811         (WebCore::Cache::loader):
812         (WebCore::Cache::disabled):
813         (WebCore::Cache::setPruneEnabled):
814         (WebCore::Cache::prune):
815         (WebCore::Cache::setDeadDecodedDataDeletionInterval):
816         (WebCore::Cache::deadDecodedDataDeletionInterval):
817         (WebCore::Cache::remove):
818         (WebCore::Cache::shouldMakeResourcePurgeableOnEviction):
819
820 2010-11-05  Helder Correia  <helder@sencha.com>
821
822         Reviewed by Andreas Kling.
823
824         [Qt] box-shadow does not blur (is solid) when using border-radius
825         https://bugs.webkit.org/show_bug.cgi?id=46327
826
827         Implement blurred box-shadow when styling with border-radius.
828         This change is related to https://bugs.webkit.org/show_bug.cgi?id=44488
829
830         * platform/graphics/qt/GraphicsContextQt.cpp:
831         (WebCore::GraphicsContext::fillRoundedRect):
832
833 2010-11-07  John Reck  <jreck@google.com>
834
835         Reviewed by Steve Block.
836
837         Implements navigator.language for Android
838         https://bugs.webkit.org/show_bug.cgi?id=49099
839         
840         Android was previously hardcoding the value for WebCore::platformDefaultLanguage().
841         This patch removes the hardcoding and calls into the PlatformBridge to get the
842         correct language based off of the user's settings.
843
844         No new tests needed, this is already covered
845
846         * Android.mk:
847         * platform/android/LanguageAndroid.cpp: Added.
848         (WebCore::platformDefaultLanguage):
849         * platform/android/PlatformBridge.h:
850         * platform/android/TemporaryLinkStubs.cpp:
851
852 2010-11-07  Robert Hogan  <robert@webkit.org>
853
854         Reviewed by Andreas Kling.
855
856         [qt] screenDepthPerComponent returns the wrong value
857
858         Return best estimate of the number of bits per color
859         rather than screen depth.
860
861         Add a layout test to sanity check screenDepthPerComponent.
862
863         https://bugs.webkit.org/show_bug.cgi?id=20289
864
865         Test: fast/css/media-rule-screenDepthPerComponent.html
866
867         * platform/qt/PlatformScreenQt.cpp:
868         (WebCore::screenDepthPerComponent):
869
870 2010-11-07  Chang Shu  <chang.shu@nokia.com>
871
872         Reviewed by Antonio Gomes.
873
874         Add a helper function to avoid duplicated code.
875         https://bugs.webkit.org/show_bug.cgi?id=49085
876
877         * dom/SelectElement.cpp:
878         * editing/SelectionController.cpp:
879         (WebCore::SelectionController::modify):
880         * html/HTMLInputElement.cpp:
881         (WebCore::HTMLInputElement::isKeyboardFocusable):
882         * page/EventHandler.cpp:
883         (WebCore::EventHandler::defaultArrowEventHandler):
884         * page/SpatialNavigation.cpp:
885         (WebCore::isSpatialNavigationEnabled):
886         * page/SpatialNavigation.h:
887
888 2010-11-06  Pavel Feldman  <pfeldman@chromium.org>
889
890         Reviewed by Simon Fraser.
891
892         Web Inspector: Some image resources don't display the image when selected in the Resources panel.
893         https://bugs.webkit.org/show_bug.cgi?id=48935
894
895         Marked resources loaded from memory cache as finished.
896
897         * inspector/front-end/ResourceManager.js:
898         (WebInspector.ResourceManager.prototype.didLoadResourceFromMemoryCache):
899
900 2010-11-06  Pavel Feldman  <pfeldman@chromium.org>
901
902         Reviewed by Timothy Hatcher.
903
904         Web Inspector: XHR logging is not checked in context menu after browser restart.
905         https://bugs.webkit.org/show_bug.cgi?id=49133
906
907         * inspector/InspectorState.cpp:
908         (WebCore::InspectorState::InspectorState):
909
910 2010-11-06  Ryosuke Niwa  <rniwa@webkit.org>
911
912         Unreviewed Windows build fix.
913
914         * editing/EditingAllInOne.cpp: Added EditingStyle.cpp
915
916 2010-11-04  Ryosuke Niwa  <rniwa@webkit.org>
917
918         Reviewed by Darin Adler.
919
920         Bug 46335 - Add EditingStyle
921         https://bugs.webkit.org/show_bug.cgi?id=46335
922
923         Added EditingStyle to WebCore/editing.  This class is intended to encapsulate getPropertiesNotIn, removeNonEditingProperties,
924         editingStyleAtPosition, and prepareEditingStyleToApplyAt in ApplyStyleCommand.cpp once deployed everywhere.
925         Deployed it in typing styles.
926
927         No new tests are added since this is a refactoring in progress.
928
929         * CMakeLists.txt: Added EditingStyle.cpp
930         * GNUmakefile.am: Added EditingStyle.cpp and EditingStyle.h
931         * WebCore.gypi: Ditto.
932         * WebCore.pro: Ditto.
933         * WebCore.xcodeproj/project.pbxproj: Ditto.
934         * editing/CompositeEditCommand.cpp:
935         (WebCore::CompositeEditCommand::moveParagraphs): Calls editingStyleIncludingTypingStyle.
936         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Uses EditingStyle.
937         * editing/DeleteSelectionCommand.cpp:
938         (WebCore::DeleteSelectionCommand::saveTypingStyleState): Ditto.
939         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Ditto.
940         * editing/DeleteSelectionCommand.h:
941         * editing/EditingStyle.cpp: Added.
942         (WebCore::editingStyleFromComputedStyle): Added.
943         (WebCore::EditingStyle::EditingStyle): Added.
944         (WebCore::EditingStyle::init): Added; a clone of ApplyStyleCommand::editingStyleAtPosition.
945         (WebCore::EditingStyle::removeTextFillAndStrokeColorsIfNeeded): Extracted from init.
946         (WebCore::EditingStyle::replaceFontSizeByKeywordIfPossible): Extracted from init.
947         (WebCore::EditingStyle::isEmpty): Added.
948         (WebCore::EditingStyle::setStyle): Added.
949         (WebCore::EditingStyle::clear): Added.
950         (WebCore::EditingStyle::removeBlockProperties): Added.
951         (WebCore::EditingStyle::prepareToApplyAt): Added.
952         (WebCore::editingStyleIncludingTypingStyle): Added.
953         * editing/EditingStyle.h: Added.
954         (WebCore::EditingStyle::create): Added.
955         (WebCore::EditingStyle::style): Added.
956         * editing/RemoveFormatCommand.cpp:
957         (WebCore::RemoveFormatCommand::doApply): Uses EditingStyle.
958         * editing/SelectionController.h:
959         (WebCore::SelectionController::typingStyle): Uses EditingStyle.
960         (WebCore::SelectionController::clearTypingStyle): Uses EditingStyle.
961         (WebCore::SelectionController::setTypingStyle): Uses EditingStyle.
962         * rendering/style/RenderStyle.h: Added EditingStyle as a friend.
963
964 2010-11-05  David Hyatt  <hyatt@apple.com>
965
966         Reviewed by Dan Bernstein and Simon Fraser.
967
968         https://bugs.webkit.org/show_bug.cgi?id=47237
969         
970         Make selection work with vertical text.  This patch fixes a bug in the computation of lineTop.  For lines
971         with positive leading, lineTop was incorrectly including the top leading.  Since the flipping of lines
972         for "lr" and "bt" writing modes involved flipping using lineTop and lineBottom, an incorrect lineTop meant
973         that those modes were mis-rendering.  This is why the Japanese "lr" text examples have the first line smushed
974         too far against the border.
975         
976         Fixing lineTop to no longer incorrectly include top leading has implications for editing.  I ended up
977         rewriting positionForPoint to exactly match selection, since that seemed to be the most intuitive
978         behavior.  I got rid of the verticalClickFudgeFactor and now just use selectionTop and selectionBottom
979         instead of lineTop and lineBottom.  I am pretty sure the code used selectionTop in a previous incarnation
980         anyway and that I moved away from it when I implemented lineTop and lineBottom.  The code then grew
981         more complicated from people trying to work with lineTop and lineBottom, but going back to selectionTop
982         and selectionBottom is the right behavior I think.  One editing test has been updated after this change
983         (editing/selection/after-line-break.html), and one DOM test has been changed to not hit test past the
984         bottom of a line (fast/dom/Document/CaretRangeFromPoint/basic.html).
985         
986         I patched selection painting of InlineTextBoxes so that the leading going up to the next line box is used
987         for "lr" and "bt" modes instead of the previous box.  This makes sense for English text, but we may want
988         a different policy for Japanese text eventually (possibly just splitting the difference instead).  Leaving it
989         this way for now, and we can collect feedback on the design.
990         
991         I rewrote all of the selection gap painting code to be writing-mode aware.  During the course of rewriting this
992         code I noticed a bug in the logicalLeftSelectionOffset and logicalRightSelectionOffset functions where there
993         was a coordinate space mismatch on a comparison.  Fixing this improves the repaint/selection-clear.html test.
994
995         Added new tests in fast/blockflow/.
996
997         * rendering/InlineFlowBox.cpp:
998         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
999         * rendering/InlineFlowBox.h:
1000         * rendering/InlineTextBox.cpp:
1001         (WebCore::InlineTextBox::selectionBottom):
1002         (WebCore::InlineTextBox::paintSelection):
1003         (WebCore::InlineTextBox::paintCompositionBackground):
1004         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
1005         (WebCore::InlineTextBox::paintTextMatchMarker):
1006         * rendering/InlineTextBox.h:
1007         * rendering/RenderBlock.cpp:
1008         (WebCore::RenderBlock::selectionGapRectsForRepaint):
1009         (WebCore::RenderBlock::paintSelection):
1010         (WebCore::clipOutPositionedObjects):
1011         (WebCore::blockDirectionOffset):
1012         (WebCore::inlineDirectionOffset):
1013         (WebCore::RenderBlock::logicalRectToPhysicalRect):
1014         (WebCore::RenderBlock::selectionGaps):
1015         (WebCore::RenderBlock::inlineSelectionGaps):
1016         (WebCore::RenderBlock::blockSelectionGaps):
1017         (WebCore::RenderBlock::blockSelectionGap):
1018         (WebCore::RenderBlock::logicalLeftSelectionGap):
1019         (WebCore::RenderBlock::logicalRightSelectionGap):
1020         (WebCore::RenderBlock::logicalLeftSelectionOffset):
1021         (WebCore::RenderBlock::logicalRightSelectionOffset):
1022         * rendering/RenderBlock.h:
1023         * rendering/RenderBox.cpp:
1024         (WebCore::RenderBox::flipForWritingMode):
1025         * rendering/RenderBox.h:
1026         (WebCore::RenderBox::logicalBottom):
1027         * rendering/RootInlineBox.cpp:
1028         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
1029         (WebCore::RootInlineBox::lineSelectionGap):
1030         (WebCore::RootInlineBox::selectionTop):
1031         (WebCore::RootInlineBox::selectionBottom):
1032         * rendering/RootInlineBox.h:
1033
1034 2010-11-05  Simon Fraser  <simon.fraser@apple.com>
1035
1036         Just put things back the way they were. Too many mysterious linker errors.
1037
1038 2010-11-05  Simon Fraser  <simon.fraser@apple.com>
1039
1040         Undo most of the previous commit since the compiler seems to have trouble
1041         with an inlined operator++ in debug builds.
1042
1043         * platform/DeprecatedPtrListImpl.cpp:
1044         (WebCore::DeprecatedPtrListImplIterator::operator++):
1045         * platform/DeprecatedPtrListImpl.h:
1046
1047 2010-11-05  Simon Fraser  <simon.fraser@apple.com>
1048
1049         Reviewed by Dave Hyatt.
1050
1051         Inline some DeprecatedPtrListImplIterator methods for performance
1052         https://bugs.webkit.org/show_bug.cgi?id=49124
1053
1054         This is a ~4% performance improvement on some Peacekeepr "Community" tests.
1055
1056         * platform/DeprecatedPtrListImpl.cpp:
1057         * platform/DeprecatedPtrListImpl.h:
1058         (WebCore::DeprecatedListNode::DeprecatedListNode):
1059         (WebCore::DeprecatedPtrListImplIterator::current):
1060         (WebCore::DeprecatedPtrListImplIterator::operator++):
1061
1062 2010-11-05  Adam Barth  <abarth@webkit.org>
1063
1064         Reviewed by Eric Seidel.
1065
1066         Gray-scale PNGs with color profiles don't decode properly on Chromium Mac
1067         https://bugs.webkit.org/show_bug.cgi?id=49110
1068
1069         Applying the color profile from this PNG was causing the image to
1070         triple in width.  This seems to be because both the PNG decoder and
1071         CoreGraphics were trying to expand the gray-scale image to RGB.  To fix
1072         this issue, I've disabled color profile support for gray-scale PNGs.
1073
1074         Test: fast/images/gray-scale-png-with-color-profile.html
1075
1076         * platform/image-decoders/png/PNGImageDecoder.cpp:
1077         (WebCore::PNGImageDecoder::headerAvailable):
1078
1079 2010-11-05  Jian Li  <jianli@chromium.org>
1080
1081         Reviewed by Dmitry Titov.
1082
1083         Need to check if page is detached in Frame::transferChildFrameToNewDocument to avoid occasional crash
1084         https://bugs.webkit.org/show_bug.cgi?id=49116
1085
1086         The fix is to add the check.
1087
1088         * page/Frame.cpp:
1089         (WebCore::Frame::transferChildFrameToNewDocument):
1090
1091 2010-11-04  Enrica Casucci  <enrica@apple.com>
1092
1093         Reviewed by Adele Peterson.
1094
1095         Pasting large amounts of plain text in a text area is very slow
1096         https://bugs.webkit.org/show_bug.cgi?id=49040
1097         <rdar://problem/7640912>
1098         
1099         The optimization consists in skipping the ApplyStyle command when
1100         pasting into a text area or into an element that has -webkit-user-modify: read-write-plaintext-only.
1101         The biggest performance hit comes from iterating through
1102         a large number of paragraph when no style change is needed.
1103         A further step will be to improve the paragraph iteration when it
1104         can't be avoided.
1105         
1106         * editing/ReplaceSelectionCommand.cpp:
1107         (WebCore::ReplaceSelectionCommand::doApply): Check if the selection
1108         is in a text form control or in an element that has -webkit-user-modify: read-write-plaintext-only
1109         and force no style matching.
1110
1111 2010-11-05  Ryosuke Niwa  <rniwa@webkit.org>
1112
1113         Reviewed by David Levin.
1114
1115         JSCallbackData::invokeCallback triggers layout from a worker thread
1116         https://bugs.webkit.org/show_bug.cgi?id=49096
1117
1118         Fixed the bug by only calling updateStyleForAllDocuments when the context is document in
1119         JSCallbackData::invokeCallback.
1120
1121         No new tests are added since many of existing workers tests hit the added assertion in debug builds.
1122
1123         * bindings/js/JSCallbackData.cpp:
1124         (WebCore::JSCallbackData::invokeCallback): No longer calls updateStyleForAllDocuments unconditionally.
1125         * dom/Document.cpp:
1126         (WebCore::Document::updateStyleIfNeeded): Added ASSERT(isMainThread()).
1127         (WebCore::Document::updateStyleForAllDocuments): Ditto.
1128         (WebCore::Document::updateLayout): Ditto.
1129
1130 2010-11-05  Ilya Sherman  <isherman@chromium.org>
1131
1132         Reviewed by Simon Fraser.
1133
1134         Querying selection start and end should be const
1135         https://bugs.webkit.org/show_bug.cgi?id=48786
1136
1137         * rendering/RenderTextControl.cpp:
1138         (WebCore::RenderTextControl::selectionStart):
1139         (WebCore::RenderTextControl::selectionEnd):
1140         (WebCore::RenderTextControl::visiblePositionForIndex):
1141         (WebCore::RenderTextControl::indexForVisiblePosition):
1142         * rendering/RenderTextControl.h:
1143
1144 2010-11-05  Chris Marrin  <cmarrin@apple.com>
1145
1146         Reviewed by Simon Fraser.
1147
1148         Move resumeAnimations/suspendAnimations from Frame to AnimationController.
1149         https://bugs.webkit.org/show_bug.cgi?id=49073
1150
1151         Changed the name of suspendAnimations/resumeAnimations to
1152         suspendAnimationsInDocument/resumeAnimationsInDocument. These are no
1153         longer exported, but have the same functionality as before. I then
1154         added new suspendAnimations/resumeAnimations function which take
1155         no params and suspend/resume on the frame owning the animation
1156         controller and all its child frames. These are the functions that
1157         are now exported. I then changed all the platform specific WebKit
1158         code to use these functions.
1159
1160         * WebCore.exp.in:
1161         * page/Frame.cpp:
1162         * page/Frame.h:
1163         * page/animation/AnimationController.cpp:
1164         (WebCore::AnimationControllerPrivate::suspendAnimations):
1165         (WebCore::AnimationControllerPrivate::resumeAnimations):
1166
1167 2010-11-04  Zhenyao Mo  <zmo@google.com>
1168
1169         Reviewed by Kenneth Russell.
1170
1171         Need to simulate DEPTH_STENCIL in framebufferRenderbuffer / getFramebufferAttachmentParameter
1172         https://bugs.webkit.org/show_bug.cgi?id=49020
1173
1174         * html/canvas/WebGLFramebuffer.cpp:
1175         (WebCore::WebGLFramebuffer::getAttachment): Return the attached renderbuffer/texture.
1176         (WebCore::WebGLFramebuffer::isIncomplete): Add an extra parameter deciding whether we should check internal format matching the attachment point or not.
1177         (WebCore::WebGLFramebuffer::onAccess): Pass extra parameter in isIncomplete.
1178         * html/canvas/WebGLFramebuffer.h:
1179         * html/canvas/WebGLRenderingContext.cpp:
1180         (WebCore::WebGLRenderingContext::checkFramebufferStatus): Pass extra parameter in isIncomplete.
1181         (WebCore::WebGLRenderingContext::framebufferRenderbuffer): Emulate DEPTH_STENCIL_ATTACHMENT; re-attach previously conflicted buffers upon detachment.
1182         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Throw an error when conflicted attachments exist.
1183         (WebCore::WebGLRenderingContext::renderbufferStorage): Map DEPTH_STENCIL to DEPTH24_STENCIL8.
1184         * platform/graphics/Extensions3D.h: Add DEPTH24_STENCIL8 enum and update the documentation.
1185         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1186         (WebCore::GraphicsContext3D::framebufferRenderbuffer): Remove emulation code at this level.
1187
1188 2010-11-05  Chris Guillory  <chris.guillory@google.com>
1189
1190         Reviewed by Chris Fleizach.
1191
1192         Keep a reference to the scrollbar in accessibility scrollbar.
1193         https://bugs.webkit.org/show_bug.cgi?id=48896
1194
1195         * accessibility/AccessibilityScrollbar.h:
1196         (WebCore::AccessibilityScrollbar::scrollbar):
1197
1198 2010-11-05  Chang Shu  <chang.shu@nokia.com>
1199
1200         Reviewed by Antonio Gomes.
1201
1202         Add support for <select> element in single selection mode. We use space to
1203         trigger arrow key handling for selection change or spatial navigation.
1204         https://bugs.webkit.org/show_bug.cgi?id=48937
1205
1206         * dom/SelectElement.cpp:
1207         (WebCore::isSpatialNavigationEnabled):
1208         (WebCore::SelectElement::menuListDefaultEventHandler):
1209         (WebCore::SelectElement::listBoxDefaultEventHandler):
1210
1211 2010-11-05  Charlie Reis  <creis@chromium.org>
1212
1213         Reviewed by Darin Fisher.
1214
1215         Need to expose HistoryController::previousItem() for Chromium WebKit API.
1216         https://bugs.webkit.org/show_bug.cgi?id=48809
1217
1218         * loader/HistoryController.h:
1219
1220 2010-11-05  Ryosuke Niwa  <rniwa@webkit.org>
1221
1222         Reviewed by Darin Adler.
1223
1224         Crash in ApplyStyleCommand::surroundNodeRangeWithElement
1225         https://bugs.webkit.org/show_bug.cgi?id=48581
1226
1227         The crash was caused by a false assertion that we can always recover selection in
1228         ApplyStyleCommand::removeInlineStyle.  Fixed the crash by removing the assertion
1229         and adding an early exit to the call site.  Also converted raw pointers to RefPtr
1230         in surroundNodeRangeWithElement and addInlineStyleIfNeeded.
1231
1232         Test (non-Mac platforms): editing/style/iframe-onload-crash.html
1233
1234         * editing/ApplyStyleCommand.cpp:
1235         (WebCore::ApplyStyleCommand::applyInlineStyle):
1236         (WebCore::ApplyStyleCommand::removeInlineStyle):
1237         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
1238         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
1239         * editing/ApplyStyleCommand.h:
1240
1241 2010-11-04  Alexey Proskuryakov  <ap@apple.com>
1242
1243         Reviewed by Darin Adler.
1244
1245         https://bugs.webkit.org/show_bug.cgi?id=49008
1246         <rdar://problem/7906226> Frequent crashes on mail.yahoo.co.jp
1247
1248         Instance::m_runtimeObject used to be zeroed out by RuntimeObject destructor. But the
1249         destructor may not be called immediately - GC first marks an object as dead, and only 
1250         destroys it when its cell is overwritten. So, m_runtimeObject would keep pointing to a dead
1251         object.
1252
1253         Functions in JSPluginElementFunctions.cpp put the RuntimeObject on stack for later use,
1254         but if it's already dead, it can be overwritten before use.
1255
1256         The solution is of course to use WeakGCPtr, which returns 0 for dead objects.
1257
1258         * bridge/jsc/BridgeJSC.cpp:
1259         (JSC::Bindings::Instance::Instance):
1260         (JSC::Bindings::Instance::~Instance):
1261         (JSC::Bindings::Instance::createRuntimeObject):
1262         (JSC::Bindings::Instance::willDestroyRuntimeObject):
1263         (JSC::Bindings::Instance::willInvalidateRuntimeObject):
1264         * bridge/jsc/BridgeJSC.h:
1265         * bridge/runtime_object.cpp:
1266         (JSC::Bindings::RuntimeObject::~RuntimeObject):
1267         (JSC::Bindings::RuntimeObject::invalidate):
1268
1269 2010-11-05  Chris Marrin  <cmarrin@apple.com>
1270
1271         Reviewed by Simon Fraser.
1272
1273         Make suspendAnimations/resumeAnimations and setCSSAnimations traverse through subframes and remember state
1274         https://bugs.webkit.org/show_bug.cgi?id=46945
1275
1276         Add new funtions to suspend and resume animations. The go through all subframes and suspend or resume them
1277         recursively.
1278
1279         Test: animations/stop-animation-on-suspend.html
1280
1281         * WebCore.exp.in:
1282         * page/Frame.cpp:
1283         (WebCore::Frame::suspendAnimations):
1284         (WebCore::Frame::resumeAnimations):
1285         * page/Frame.h:
1286
1287 2010-11-05  Pavel Feldman  <pfeldman@chromium.org>
1288
1289         Reviewed by Timothy Hatcher.
1290
1291         Web Inspector: Crash in InspectorDOMAgent::innerParentNode.
1292         https://bugs.webkit.org/show_bug.cgi?id=49054
1293
1294         * inspector/InspectorDOMAgent.cpp:
1295         (WebCore::InspectorDOMAgent::setOuterHTML):
1296
1297 2010-11-05  Pavel Feldman  <pfeldman@chromium.org>
1298
1299         Reviewed by Timothy Hatcher.
1300
1301         Web Inspector: XHR logging in console should give complete view of resource.
1302         https://bugs.webkit.org/show_bug.cgi?id=48998
1303
1304         Drive-by fixes: linkify line number to scripts panel, fall back to resources;
1305         enable multiline console entry on shift modifier as well.
1306         
1307         * inspector/front-end/NetworkPanel.js:
1308         (WebInspector.NetworkPanel):
1309         (WebInspector.NetworkPanel.prototype._reset):
1310         (WebInspector.NetworkPanel.prototype.refreshResource):
1311         (WebInspector.NetworkPanel.prototype.canShowSourceLine):
1312         (WebInspector.NetworkPanel.prototype.showSourceLine):
1313         * inspector/front-end/StoragePanel.js:
1314         (WebInspector.StoragePanel.prototype.show):
1315         (WebInspector.StoragePanel.prototype.showSourceLine):
1316         * inspector/front-end/inspector.js:
1317         (WebInspector.showPanel):
1318         (WebInspector.linkifyStringAsFragment):
1319
1320 2010-10-27  Jeremy Orlow  <jorlow@chromium.org>
1321
1322         Reviewed by Steve Block.
1323
1324         Clean up IDBTransactionBackend/Coordinator
1325         https://bugs.webkit.org/show_bug.cgi?id=48425
1326
1327         Get rid of obsolete id and thus we don't need the factory method
1328         on IDBTransactionCoordinator that creates IDBTransactionBackends.
1329
1330         Add an assert to IDBTransactionBackend to make sure we're not in
1331         the coordinator and then remove the coordinators ref counting link
1332         to the transaction.
1333
1334         Have the transaction backend zero out refs to the database when its
1335         done using it.
1336
1337         Existing tests provide coverage for this refactoring.
1338
1339         * storage/IDBDatabaseBackendImpl.cpp:
1340         (WebCore::IDBDatabaseBackendImpl::setVersion):
1341         (WebCore::IDBDatabaseBackendImpl::transaction):
1342         * storage/IDBTransactionBackendImpl.cpp:
1343         (WebCore::IDBTransactionBackendImpl::create):
1344         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
1345         (WebCore::IDBTransactionBackendImpl::~IDBTransactionBackendImpl):
1346         (WebCore::IDBTransactionBackendImpl::abort):
1347         (WebCore::IDBTransactionBackendImpl::commit):
1348         * storage/IDBTransactionBackendImpl.h:
1349         * storage/IDBTransactionBackendInterface.h:
1350         * storage/IDBTransactionCoordinator.cpp:
1351         (WebCore::IDBTransactionCoordinator::didStartTransaction):
1352         (WebCore::IDBTransactionCoordinator::didFinishTransaction):
1353         (WebCore::IDBTransactionCoordinator::isActive):
1354         (WebCore::IDBTransactionCoordinator::processStartedTransactions):
1355         * storage/IDBTransactionCoordinator.h:
1356
1357 2010-10-27  Jeremy Orlow  <jorlow@chromium.org>
1358
1359         Reviewed by Steve Block.
1360
1361         IDBFactoryBackend's reference to IDBDatabaseBackend should be weak
1362         https://bugs.webkit.org/show_bug.cgi?id=48416
1363
1364         The factory's lifetime is that of the application, so without making
1365         this weak, IDBDatabaseBackend's will never be closed until the app
1366         terminates.
1367
1368         * storage/IDBDatabaseBackendImpl.cpp:
1369         (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
1370         (WebCore::IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl):
1371         * storage/IDBDatabaseBackendImpl.h:
1372         (WebCore::IDBDatabaseBackendImpl::create):
1373         * storage/IDBFactoryBackendImpl.cpp:
1374         (WebCore::IDBFactoryBackendImpl::removeIDBDatabaseBackend):
1375         (WebCore::IDBFactoryBackendImpl::removeSQLiteDatabase):
1376         (WebCore::IDBFactoryBackendImpl::open):
1377         * storage/IDBFactoryBackendImpl.h:
1378
1379 2010-10-27  Jeremy Orlow  <jorlow@chromium.org>
1380
1381         Reviewed by Steve Block.
1382
1383         IDBObjectStoreBackend and IDBIndexBackend should not depend on IDBDatabaseBackend
1384         https://bugs.webkit.org/show_bug.cgi?id=48410
1385
1386         Break dependency cyles between IDBDatabaseBackend and the other classes listed.
1387         This was causing memory leaks.
1388
1389         * storage/IDBCursorBackendImpl.cpp:
1390         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
1391         (WebCore::IDBCursorBackendImpl::updateInternal):
1392         (WebCore::IDBCursorBackendImpl::removeInternal):
1393         (WebCore::IDBCursorBackendImpl::database):
1394         * storage/IDBCursorBackendImpl.h:
1395         (WebCore::IDBCursorBackendImpl::create):
1396         * storage/IDBDatabaseBackendImpl.cpp:
1397         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1398         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
1399         * storage/IDBIndexBackendImpl.cpp:
1400         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
1401         (WebCore::IDBIndexBackendImpl::openCursorInternal):
1402         (WebCore::IDBIndexBackendImpl::sqliteDatabase):
1403         * storage/IDBIndexBackendImpl.h:
1404         (WebCore::IDBIndexBackendImpl::create):
1405         (WebCore::IDBIndexBackendImpl::storeName):
1406         * storage/IDBObjectStoreBackendImpl.cpp:
1407         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
1408         (WebCore::IDBObjectStoreBackendImpl::createIndex):
1409         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
1410         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
1411         (WebCore::IDBObjectStoreBackendImpl::sqliteDatabase):
1412         * storage/IDBObjectStoreBackendImpl.h:
1413         (WebCore::IDBObjectStoreBackendImpl::create):
1414
1415 2010-11-05  Pavel Feldman  <pfeldman@chromium.org>
1416
1417         Reviewed by Timothy Hatcher.
1418
1419         Web Inspector: inspector lags on large resources with numerous <script> tags.
1420         https://bugs.webkit.org/show_bug.cgi?id=49060
1421
1422         * inspector/front-end/ScriptsPanel.js:
1423         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu):
1424
1425 2010-11-05  Patrick Gansterer  <paroga@webkit.org>
1426
1427         Reviewed by David Kilzer.
1428
1429         Replace ARRAYSIZE with WTF_ARRAY_LENGTH
1430         https://bugs.webkit.org/show_bug.cgi?id=48903
1431
1432         * platform/UUID.cpp:
1433         (WebCore::createCanonicalUUIDString):
1434         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
1435         (WebCore::FontCache::getFontDataForCharacters):
1436         * platform/graphics/win/FontCacheWin.cpp:
1437         (WebCore::FontCache::getLastResortFallbackFont):
1438         * platform/graphics/win/IconWin.cpp:
1439         (WebCore::Icon::createIconForFiles):
1440         * platform/win/ClipboardUtilitiesWin.cpp:
1441         (WebCore::getWebLocData):
1442         * platform/win/ClipboardWin.cpp:
1443         (WebCore::createGlobalHDropContent):
1444         (WebCore::createGlobalImageFileDescriptor):
1445         (WebCore::ClipboardWin::files):
1446         (WebCore::ClipboardWin::writeURL):
1447         * platform/win/DragDataWin.cpp:
1448         (WebCore::DragData::asFilenames):
1449         * platform/win/FileSystemWin.cpp:
1450         (WebCore::safeCreateFile):
1451
1452 2010-11-05  Roland Steiner  <rolandsteiner@chromium.org>
1453
1454         Reviewed by Dirk Schulze.
1455
1456         Bug 48979 - [Chromium] SVGListPropertyTearOff.h: function commitChange ASSERTs on Win & Mac
1457         https://bugs.webkit.org/show_bug.cgi?id=48979
1458
1459         Function removeItemValuesAndWrappers(): Move code out of 'if' statement so that
1460         'wrappers' and 'values' stay synced.
1461
1462         test: svg/dom/baseVal-animVal-crash.html doesn't ASSERT
1463
1464         * svg/properties/SVGListProperty.h:
1465         (WebCore::SVGListProperty::removeItemValuesAndWrappers):
1466
1467 2010-11-05  John Reck  <jreck@google.com>
1468
1469         Reviewed by Nikolas Zimmermann.
1470
1471         The change to SVGPropertyTearOff by CodeGeneratorV8.pm caused two build failures
1472         for Android. One was a missing SVGPropertyTearOff.h include, the other was a 
1473         missing forward declaration of FloatRect. Seems to be the result of:
1474         https://bugs.webkit.org/show_bug.cgi?id=48204
1475
1476         Bug: https://bugs.webkit.org/show_bug.cgi?id=49025
1477
1478         No tests needed, fixes build issue.
1479
1480         * bindings/scripts/CodeGeneratorV8.pm:
1481
1482 2010-11-05  Rob Buis  <rwlbuis@gmail.com>
1483
1484         Reviewed by David Hyatt.
1485
1486         CSSRule#parentRule always null
1487         https://bugs.webkit.org/show_bug.cgi?id=46228
1488
1489         Ensure MediaList child rules have the MediaList set as parent
1490         in order to correct their parentRule correctness.
1491
1492         Test: fast/dom/css-mediarule-parentRule.html
1493
1494         * css/CSSMediaRule.cpp:
1495         (WebCore::CSSMediaRule::CSSMediaRule):
1496
1497 2010-11-04  Xan Lopez  <xlopez@igalia.com>
1498
1499         Fix the GTK+ build.
1500
1501         * GNUmakefile.am:
1502
1503 2010-10-20  Chang Shu  <chang.shu@nokia.com>, Antonio Gomes <tonikitoo@webkit.org>
1504
1505         Reviewed by Simon Fraser.
1506
1507         [Qt] Makes <input type=text> and <textarea> functional with
1508         Spatial Navigation enabled. Before this patch, the focus cannot
1509         move away from input box once it is in. This patch allows focus
1510         move to neighbor nodes when the caret reaches the edge of the texts.
1511         This patch does not support yet cases where the focused <input>
1512         has a JS handler for the arrow keys.
1513         https://bugs.webkit.org/show_bug.cgi?id=37153
1514
1515         Tests: fast/events/spatial-navigation/snav-input.html
1516                fast/events/spatial-navigation/snav-textarea.html
1517
1518         * editing/EditorCommand.cpp:
1519         (WebCore::executeMoveDown):
1520         (WebCore::executeMoveLeft):
1521         (WebCore::executeMoveRight):
1522         (WebCore::executeMoveUp):
1523         * editing/SelectionController.cpp:
1524         (WebCore::SelectionController::modify):
1525
1526 2010-11-04  Dan Bernstein  <mitz@apple.com>
1527
1528         Build fix.
1529
1530         * editing/Editor.cpp:
1531         (WebCore::Editor::dismissCorrectionPanel):
1532
1533 2010-11-04  Jia Pu  <jpu@apple.com>
1534
1535         Reviewed by Dan Bernstein.
1536
1537         reversion bubble in WebViews
1538         https://bugs.webkit.org/show_bug.cgi?id=47630
1539         <rdar://problem/8530960>
1540
1541         Added manual test:
1542         manual-tests/autocorrection/continue-typing-to-dismiss-reversion.html
1543         manual-tests/autocorrection/delete-to-dismiss-reversion.html
1544         manual-tests/autocorrection/delete-to-end-of-word-to-show-reversion.html
1545         manual-tests/autocorrection/move-to-end-of-word-to-show-reversion.html
1546         manual-tests/autocorrection/type-whitespace-to-dismiss-reversion.html
1547
1548         We can only manully test this feature for two reasons:
1549         1. On Mac OS X, the result of spell checking is partly determined by past user usage. We can't
1550            realiably generating test cases until we can disable user custom data during spell checking.
1551         2. To exerciese this feature, we need a minimum of 0.3 second delay using WebCore timer.
1552
1553         This patch is to add reversion to correction panel. It consists of following major code changes:
1554         1. Collected all autocorrection related member variables in Editor into a CorrectionPanelInfo
1555            class to improve readability.
1556         2. Changed signature of Editor::startCorrectionPanelTimer() to allow caller to specify the
1557            type of correction panel--regular correction or reversion.
1558         3. Made necessary changes to adopt reversion API in AppKit.
1559         4. Use SUPPORT_CORRECTION_PANEL macro to improve readability.
1560
1561         * GNUmakefile.am: Added CorrectionPanelInfo.h.
1562         * WebCore.gypi: Ditto.
1563         * WebCore.pro: Ditto.
1564         * WebCore.vcproj/WebCore.vcproj: Ditto.
1565         * WebCore.xcodeproj/project.pbxproj:
1566         * editing/CorrectionPanelInfo.h: Added.
1567         * editing/Editor.cpp:
1568         (WebCore::Editor::respondToChangedSelection): Start correction panel timer for reversion when
1569           the new selection is a caret selection at end of a previously corrected word.
1570         (WebCore::Editor::appliedEditing): Stop timer at the beginning of the method instead of at the end.
1571         (WebCore::Editor::~Editor): Adopted new method dismissCorrectionPanel().
1572         (WebCore::Editor::markMisspellingsAfterTypingToPosition): Adopted new method applyCorrectionPanelInfo().
1573         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Code change for new m_correctionPanelInfo
1574           member variable.
1575         (WebCore::Editor::correctionPanelTimerFired): Change to handle reversion panel type.
1576         (WebCore::Editor::handleRejectedCorrection): Ditto.
1577         (WebCore::Editor::startCorrectionPanelTimer): Changed signature to allow passing in panel type.
1578         (WebCore::Editor::stopCorrectionPanelTimer): Adopted macro SUPPORT_CORRECTION_PANEL.
1579         (WebCore::Editor::handleCancelOperation): Ditto.
1580         (WebCore::Editor::isShowingCorrectionPanel): Ditto.
1581         (WebCore::Editor::dismissCorrectionPanel): Update m_correctionPanelInfo when correction panel
1582           is dismissed.
1583         (WebCore::Editor::applyCorrectionPanelInfo): Factored out code that applies autocorrection.
1584         (WebCore::Editor::changeSelectionAfterCommand): Adopt macro SUPPORT_CORRECTION_PANEL.
1585         * editing/Editor.h: Adopted CorrectionPanelInfo and add new member methods.
1586         * editing/EditorCommand.cpp: Adopted macro SUPPORT_CORRECTION_PANEL
1587         (WebCore::createCommandMap):
1588         * editing/TypingCommand.cpp: Adopted macro SUPPORT_CORRECTION_PANEL and new signature of
1589           startCorrectionPanelTimer().
1590         (WebCore::TypingCommand::markMisspellingsAfterTyping):
1591         * loader/EmptyClients.h:
1592         (WebCore::EmptyEditorClient::showCorrectionPanel): Adopted new signature of base class method.
1593         (WebCore::EmptyEditorClient::dismissCorrectionPanel):  Ditto.
1594         * manual-tests/autocorrection/continue-typing-to-dismiss-reversion.html: Added.
1595         * manual-tests/autocorrection/delete-to-dismiss-reversion.html: Added.
1596         * manual-tests/autocorrection/delete-to-end-of-word-to-show-reversion.html: Added.
1597         * manual-tests/autocorrection/move-to-end-of-word-to-show-reversion.html: Added.
1598         * manual-tests/autocorrection/type-whitespace-to-dismiss-reversion.html: Added.
1599         * page/EditorClient.h: Changed signature of showCorrectionPanel() and dismissCorrectionPanel().
1600         * platform/graphics/mac/GraphicsContextMac.mm: Added comment to improve readability.
1601         (WebCore::GraphicsContext::drawLineForTextChecking):
1602
1603 2010-11-04  Dan Bernstein  <mitz@apple.com>
1604
1605         Reviewed by Dave Hyatt.
1606
1607         Made table layout and painting work with all writing modes. Hit-testing, repainting, tables
1608         where some elements have their own layers, and cells whose writing mode differs from the
1609         table’s are not supported yet.
1610
1611         Make tables work with vertical text
1612         https://bugs.webkit.org/show_bug.cgi?id=46417
1613
1614         Tests: fast/table/027-vertical.html
1615                fast/table/028-vertical.html
1616                fast/table/035-vertical.html
1617                fast/table/038-vertical.html
1618                fast/table/040-vertical.html
1619                fast/table/auto-with-percent-height-vertical.html
1620                fast/table/border-collapsing/001-vertical.html
1621                fast/table/border-collapsing/002-vertical.html
1622                fast/table/border-collapsing/003-vertical.html
1623                fast/table/border-collapsing/004-vertical.html
1624                fast/table/border-collapsing/border-collapsing-head-foot-vertical.html
1625                fast/table/border-collapsing/equal-precedence-resolution-vertical.html
1626                fast/table/border-collapsing/rtl-border-collapsing-vertical.html
1627                fast/table/colspanMinWidth-vertical.html
1628                fast/table/fixed-with-auto-with-colspan-vertical.html
1629                fast/table/growCellForImageQuirk-vertical.html
1630                fast/table/height-percent-test-vertical.html
1631                fast/table/percent-widths-stretch-vertical.html
1632                fast/table/rowspan-paint-order-vertical.html
1633                fast/table/table-display-types-vertical.html
1634
1635         * css/CSSStyleSelector.cpp:
1636         (WebCore::CSSStyleSelector::adjustRenderStyle): Changed to allow all writing modes for tables,
1637         make row groups, rows, column groups and columns inherit the table’s writing mode. For now,
1638         make cells do this too.
1639         * html/HTMLTableElement.cpp:
1640         (WebCore::HTMLTableElement::parseMappedAttribute): Map align=center using logical properties.
1641         * rendering/RenderTable.cpp:
1642         (WebCore::RenderTable::RenderTable): Initialize m_borderStart and m_borderEnd.
1643         (WebCore::RenderTable::styleDidChange): Changed the rule for when to use auto layout to look
1644         at the logical width instead of the width.
1645         (WebCore::RenderTable::computeLogicalWidth): Uses logical widths and works with perpendicular
1646         containing blocks.
1647         (WebCore::RenderTable::layout): Use logical lengths.
1648         (WebCore::RenderTable::setCellLogicalWidths): Renamed setCellWidths() to this and updated for
1649         the renaming of RenderTableSection::setCellWidths().
1650         (WebCore::RenderTable::paintObject): Account for flipped modes.
1651         (WebCore::RenderTable::subtractCaptionRect): Added this helper method the considers writing modes.
1652         (WebCore::RenderTable::paintBoxDecorations): Adopted subtractCaptionRect().
1653         (WebCore::RenderTable::paintMask): Ditto.
1654         (WebCore::RenderTable::computePreferredLogicalWidths): Updated for the renaming of
1655         recalcHorizontalBorders().
1656         (WebCore::RenderTable::calcBorderStart): Renamed calcBorderLeft() to this and changed it to use
1657         borderStart(). Splits odd number of pixels based on the physical side.
1658         (WebCore::RenderTable::calcBorderEnd): Similar.
1659         (WebCore::RenderTable::recalcBordersInRowDirection): Renamed recalcHorizontalBorders() to this
1660         and updated for other renames.
1661         (WebCore::RenderTable::borderBefore): Replaced borderTop() with this.
1662         (WebCore::RenderTable::borderAfter): Similar.
1663         (WebCore::RenderTable::outerBorderBefore): Similar.
1664         (WebCore::RenderTable::outerBorderAfter): Similar.
1665         (WebCore::RenderTable::outerBorderStart): Similar.
1666         (WebCore::RenderTable::outerBorderEnd): Similar.
1667         (WebCore::RenderTable::firstLineBoxBaseline): Changed to use logical heights.
1668         (WebCore::RenderTable::overflowClipRect): Account for writing modes.
1669         * rendering/RenderTable.h:
1670         (WebCore::RenderTable::borderStart):
1671         (WebCore::RenderTable::borderEnd):
1672         (WebCore::RenderTable::borderLeft):
1673         (WebCore::RenderTable::borderRight):
1674         (WebCore::RenderTable::borderTop):
1675         (WebCore::RenderTable::borderBottom):
1676         (WebCore::RenderTable::outerBorderLeft):
1677         (WebCore::RenderTable::outerBorderRight):
1678         (WebCore::RenderTable::outerBorderTop):
1679         (WebCore::RenderTable::outerBorderBottom):
1680         (WebCore::RenderTable::bordersPaddingAndSpacingInRowDirection): Changed to match its name.
1681         * rendering/RenderTableRow.cpp:
1682         (WebCore::RenderTableRow::styleWillChange): Changed to detect changes to logical height.
1683         * rendering/RenderTableSection.cpp:
1684         (WebCore::setRowLogicalHeightToRowStyleLogicalHeightIfNotRelative): Renamed and changed to use
1685         logical heights.
1686         (WebCore::RenderTableSection::RenderTableSection): Updated initializers for new member variables.
1687         (WebCore::RenderTableSection::addChild): Updated for rename.
1688         (WebCore::RenderTableSection::ensureRows): Ditto.
1689         (WebCore::RenderTableSection::addCell): Ditto. Also use logical heights.
1690         (WebCore::RenderTableSection::setCellLogicalWidths): Renamed setCellWidths() to this, changed
1691         to use logical widths.
1692         (WebCore::RenderTableSection::calcRowLogicalHeight): Added “logical” to the name. Updated with
1693         logical heights.
1694         (WebCore::RenderTableSection::layoutRows):
1695         (WebCore::RenderTableSection::calcOuterBorderBefore):
1696         (WebCore::RenderTableSection::calcOuterBorderAfter):
1697         (WebCore::RenderTableSection::calcOuterBorderStart):
1698         (WebCore::RenderTableSection::calcOuterBorderEnd):
1699         (WebCore::RenderTableSection::recalcOuterBorder):
1700         (WebCore::RenderTableSection::firstLineBoxBaseline):
1701         (WebCore::RenderTableSection::paintCell):
1702         (WebCore::RenderTableSection::recalcCells):
1703         * rendering/RenderTableSection.h:
1704         (WebCore::RenderTableSection::outerBorderBefore):
1705         (WebCore::RenderTableSection::outerBorderAfter):
1706         (WebCore::RenderTableSection::outerBorderStart):
1707         (WebCore::RenderTableSection::outerBorderEnd):
1708
1709 2010-11-04  Kent Tamura  <tkent@chromium.org>
1710
1711         Unreviewed, trivial test fix.
1712
1713         Fix GTK build for http://trac.webkit.org/changeset/71373 .
1714
1715         * GNUmakefile.am: Add HTMLOutputElement.{cpp,h}
1716
1717 2010-11-04  MORITA Hajime  <morrita@google.com>
1718
1719         Reviewed by Kent Tamura.
1720
1721         Stale reference to RenderObject held as FrameView layoutRoot
1722         https://bugs.webkit.org/show_bug.cgi?id=48019
1723         
1724         <progress> and <meter> shouldn't have children of its RenderObject,
1725         which caused unexpected result.
1726         This change suppresses child creation to prevent it.
1727
1728         Tests: fast/dom/HTMLMeterElement/meter-element-with-child-crash.html
1729                fast/dom/HTMLProgressElement/progress-element-with-child-crash.html
1730
1731         * rendering/RenderIndicator.h:
1732         (WebCore::RenderIndicator::canHaveChildren):
1733
1734 2010-11-04  Kenichi Ishibashi  <bashi@google.com>
1735
1736         Reviewed by Kent Tamura.
1737
1738         [HTML5][Forms] Support for <output> element
1739         https://bugs.webkit.org/show_bug.cgi?id=29363
1740
1741         Support for <output> element.
1742
1743         Tests: fast/dom/HTMLOutputElement/dom-settable-token-list.html
1744                fast/dom/HTMLOutputElement/htmloutputelement-reset-event.html
1745                fast/dom/HTMLOutputElement/htmloutputelement-validity.html
1746                fast/dom/HTMLOutputElement/htmloutputelement-value.html
1747                fast/dom/HTMLOutputElement/htmloutputelement.html
1748
1749         * Android.derived.jscbindings.mk: Added JSHTMLOutputElement.h.
1750         * Android.derived.v8bindings.mk: Added V8HTMLOutputElement.h.
1751         * Android.jscbindings.mk: Added JSHTMLOutputElementCustom.cpp.
1752         * Android.mk: Added HTMLOutputElement.cpp.
1753         * Android.v8bindings.mk: Added V8HTMLOutputElementCustom.cpp.
1754         * CMakeLists.txt: Added HTMLOutputElement.{idl,cpp} and JSHTMLOutputElementCustom.cpp.
1755         * DerivedSources.cpp: Added JSHTMLOutputElement.cpp.
1756         * DerivedSources.make: Added HTMLOutputElement entry.
1757         * GNUmakefile.am: Added JSHTMLOutputElement.{cpp,h}
1758         * WebCore.gypi: Added HTMLOutputElement.{idl,cpp,h}, JSHTMLOutputElementCustom.cpp and V8HTMLOutputElementCustom.cpp
1759         * WebCore.pri: Added HTMLOutputElement.idl.
1760         * WebCore.pro: Added V8HTMLOutputElementCustom.cpp, JSHTMLOutputElementCustom.cpp and HTMLOutputElement.cpp.
1761         * WebCore.vcproj/WebCore.vcproj: Added entries for JSHTMLOutputElement.{cpp,h} and JSHTMLOutputElementCustom.cpp.
1762         * WebCore.xcodeproj/project.pbxproj: Added entries for JSHTMLOutputElementCustom.cpp, HTMLOutputElement.{cpp,h,idl}, JSHTMLOutputElement.{cpp,h}
1763         * bindings/js/JSBindingsAllInOne.cpp: Added JSHTMLOutputElementCustom.cpp.
1764         * bindings/js/JSHTMLOutputElementCustom.cpp: Added.
1765         (WebCore::JSHTMLOutputElement::htmlFor):
1766         (WebCore::JSHTMLOutputElement::setHtmlFor):
1767         * bindings/v8/custom/V8DOMSettableTokenListCustom.cpp: Modified.
1768         (WebCore::V8DOMSettableTokenList::indexedPropertyGetter): Returns null if the index is out of range.
1769         * bindings/v8/custom/V8HTMLOutputElementCustom.cpp: Added.
1770         (WebCore::V8HTMLOutputElement::htmlForAccessorGetter):
1771         (WebCore::V8HTMLOutputElement::htmlForAccessorSetter):
1772         * css/html.css: Added a default style of output element.
1773         (output):
1774         * html/DOMSettableTokenList.cpp: Fix bugs.
1775         (WebCore::DOMSettableTokenList::item): Returns null string if the index is out of range.
1776         (WebCore::DOMSettableTokenList::addInternal): Added check m_tokens.isNull().
1777         (WebCore::DOMSettableTokenList::setValue): Set the value case sensitive.
1778         * html/HTMLOutputElement.cpp: Added.
1779         (WebCore::HTMLOutputElement::HTMLOutputElement):
1780         (WebCore::HTMLOutputElement::create):
1781         (WebCore::HTMLOutputElement::formControlType):
1782         (WebCore::HTMLOutputElement::parseMappedAttribute):
1783         (WebCore::HTMLOutputElement::htmlFor):
1784         (WebCore::HTMLOutputElement::setFor):
1785         (WebCore::HTMLOutputElement::setForm):
1786         (WebCore::HTMLOutputElement::childrenChanged):
1787         (WebCore::HTMLOutputElement::reset):
1788         (WebCore::HTMLOutputElement::value):
1789         (WebCore::HTMLOutputElement::setValue):
1790         (WebCore::HTMLOutputElement::defaultValue):
1791         (WebCore::HTMLOutputElement::setDefaultValue):
1792         (WebCore::HTMLOutputElement::setTextContentInternal):
1793         * html/HTMLOutputElement.h: Added.
1794         (WebCore::HTMLOutputElement::isEnumeratable):
1795         (WebCore::HTMLOutputElement::willValidate):
1796         * html/HTMLOutputElement.idl: Added.
1797         * html/HTMLTagNames.in: Added "output".
1798         * page/DOMWindow.idl: Added an attribute for HTMLOutputElement.
1799
1800 2010-11-04  Zhenyao Mo  <zmo@google.com>
1801
1802         Reviewed by Kenneth Russell.
1803
1804         Remove IMPLEMENTATION_COLOR_READ_FORMAT and TYPE
1805         https://bugs.webkit.org/show_bug.cgi?id=48938
1806
1807         * html/canvas/WebGLRenderingContext.cpp:
1808         (WebCore::WebGLRenderingContext::initializeNewContext):
1809         (WebCore::WebGLRenderingContext::getParameter):
1810         (WebCore::WebGLRenderingContext::readPixels):
1811         * html/canvas/WebGLRenderingContext.h:
1812         * html/canvas/WebGLRenderingContext.idl:
1813         * platform/graphics/GraphicsContext3D.h:
1814         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1815         (WebCore::GraphicsContext3D::getIntegerv):
1816
1817 2010-11-04  Zhenyao Mo  <zmo@google.com>
1818
1819         Reviewed by Kenneth Russell.
1820
1821         TypedArray should throw exception if length not a multiple of element size
1822         https://bugs.webkit.org/show_bug.cgi?id=45487
1823
1824         * bindings/js/JSArrayBufferViewHelper.h:
1825         (WebCore::constructArrayBufferView):
1826         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
1827         (WebCore::constructWebGLArray):
1828
1829 2010-11-04  Kenneth Russell  <kbr@google.com>
1830
1831         Reviewed by Adam Barth.
1832
1833         [chromium] Mac: WebGL: all textured content is blue
1834         https://bugs.webkit.org/show_bug.cgi?id=49021
1835
1836         Added support for 8-bit, little-endian CGImages. The previous
1837         image decode path used the default byte order, which is apparently
1838         big-endian.
1839
1840         Tested with various WebGL content and layout tests in Chromium.
1841         Ran layout tests in WebKit and tested various WebGL content in
1842         Safari. Was not able to run layout tests with Chromium port of
1843         DumpRenderTree due to build failures currently in the tree.
1844
1845         * platform/graphics/GraphicsContext3D.cpp:
1846         (WebCore::doPacking):
1847         * platform/graphics/GraphicsContext3D.h:
1848         * platform/graphics/cg/GraphicsContext3DCG.cpp:
1849         (WebCore::getSourceDataFormat):
1850         (WebCore::GraphicsContext3D::getImageData):
1851
1852 2010-11-03  Zhenyao Mo  <zmo@google.com>
1853
1854         Reviewed by Kenneth Russell.
1855
1856         renderbufferStorage(DEPTH_STENCIL) shouldn't generate an error
1857         https://bugs.webkit.org/show_bug.cgi?id=48891
1858
1859         * html/canvas/WebGLFramebuffer.cpp:
1860         (WebCore::WebGLFramebuffer::isIncomplete): Considering the case where DEPTH_STENCIL is not supported.
1861         * html/canvas/WebGLRenderbuffer.cpp:
1862         (WebCore::WebGLRenderbuffer::WebGLRenderbuffer): Init added members.
1863         * html/canvas/WebGLRenderbuffer.h: Add members and accessor functions.
1864         (WebCore::WebGLRenderbuffer::setInternalFormat): 
1865         (WebCore::WebGLRenderbuffer::setSize):
1866         (WebCore::WebGLRenderbuffer::getWidth):
1867         (WebCore::WebGLRenderbuffer::getHeight):
1868         (WebCore::WebGLRenderbuffer::setIsValid):
1869         (WebCore::WebGLRenderbuffer::isValid):
1870         * html/canvas/WebGLRenderingContext.cpp:
1871         (WebCore::WebGLRenderingContext::initializeNewContext): Check if packed_depth_stencil extension exists.
1872         (WebCore::WebGLRenderingContext::getRenderbufferParameter): Simulate the case for DEPTH_STENCIL where packed_depth_stencil is not supported.
1873         (WebCore::WebGLRenderingContext::renderbufferStorage): Bypass the call if packed_depth_stencil is not supported.
1874         * html/canvas/WebGLRenderingContext.h:
1875
1876 2010-11-04  Kavita Kanetkar  <kkanetkar@chromium.org>
1877
1878         Reviewed by Adam Barth.
1879
1880         Web Inspector: Enable files ystem UI for chromium
1881         https://bugs.webkit.org/show_bug.cgi?id=48963
1882
1883         * inspector/Inspector.idl:
1884         * inspector/InspectorFileSystemAgent.cpp:
1885         (WebCore::InspectorFileSystemAgent::getFileSystemPathAsync):
1886         * inspector/InspectorFileSystemAgent.h:
1887         * inspector/front-end/FileSystemView.js:
1888         (WebInspector.FileSystemView):
1889         (WebInspector.FileSystemView.prototype.setFileSystemDisabled):
1890         (WebInspector.FileSystemView.prototype._createTextAndButton):
1891         (WebInspector.FileSystemView.prototype.refreshFileSystem):
1892         * inspector/front-end/StoragePanel.js:
1893         (WebInspector.StoragePanel.prototype.setFileSystemDisabled):
1894         * inspector/front-end/inspector.js:
1895         (WebInspector.didGetFileSystemDisabled):
1896         (WebInspector.reset):
1897
1898 2010-11-04  Robert Hogan  <robert@webkit.org>
1899
1900         Reviewed by Darin Adler.
1901
1902         Stale reference to JSDOMWindow in ScriptController::m_cacheableBindingObject
1903
1904         After bug 37725 we need to update the globalObject() (i.e. JSDOMWindow)
1905         associated with the m_cacheablebindingRootObject every time we clear the
1906         frame and load a new page. This allows the runtime objects
1907         (e.g. LayoutTestController etc.) to persist between navigations as
1908         before but also ensures that when qt_runtime, or any other bridge,
1909         looks at the root->globalObject() of a cacheable binding object
1910         it gets the DOMWindow of the current page rather than the DOMWindow
1911         that was in place when m_cacheableBindingRootObject was created.
1912
1913         Fixes fast/dom/nodesFromRect-basic.html on Qt.
1914
1915         https://bugs.webkit.org/show_bug.cgi?id=48758
1916
1917         * bindings/js/ScriptController.cpp:
1918         (WebCore::ScriptController::clearWindowShell):
1919         * bridge/runtime_root.cpp:
1920         (JSC::Bindings::RootObject::updateGlobalObject):
1921         * bridge/runtime_root.h:
1922
1923 2010-11-04  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1924
1925         Reviewed by David Hyatt.
1926
1927         Delegate scrolling via a separate method
1928         https://bugs.webkit.org/show_bug.cgi?id=48988
1929
1930         Add a delegatedScrollRequested method to HostWindow for delegating
1931         scrolling to the view. This is only used in conjunction with tiling,
1932         and is ifdef'ed.
1933
1934         * page/Chrome.cpp:
1935         (WebCore::Chrome::delegatedScrollRequested):
1936         * page/Chrome.h:
1937         * page/ChromeClient.h:
1938         * platform/HostWindow.h:
1939         * platform/ScrollView.cpp:
1940         (WebCore::ScrollView::setScrollPosition):
1941
1942 2010-11-04  Pavel Feldman  <pfeldman@chromium.org>
1943
1944         Reviewed by Timothy Hatcher.
1945
1946         Web Inspector: Need better way of switching back to the Timeline view of the Network tab.
1947         https://bugs.webkit.org/show_bug.cgi?id=48995
1948
1949         - Moved close button to the left, preceding tab headers;
1950         - Auto-adjusting summary bar width when switching to the preview mode
1951         - Auto-scrolling network log if it was scrolled to bottom.
1952
1953         * inspector/front-end/DataGrid.js:
1954         (WebInspector.DataGrid):
1955         (WebInspector.DataGrid.prototype.isScrolledToLastRow):
1956         (WebInspector.DataGrid.prototype.scrollToLastRow):
1957         * inspector/front-end/NetworkPanel.js:
1958         (WebInspector.NetworkPanel):
1959         (WebInspector.NetworkPanel.prototype.updateSidebarWidth):
1960         (WebInspector.NetworkPanel.prototype._positionSummaryBar):
1961         (WebInspector.NetworkPanel.prototype.refresh):
1962         (WebInspector.NetworkPanel.prototype._reset):
1963         (WebInspector.NetworkPanel.prototype._toggleGridMode):
1964         * inspector/front-end/inspector.css:
1965         (.tabbed-pane-header li):
1966         * inspector/front-end/networkPanel.css:
1967         (.network-summary-bar):
1968         (#network-close-button):
1969         (#network-views.small #network-close-button):
1970         (#network-views .resource-view .tabbed-pane-header):
1971         (#network-views.small .resource-view .tabbed-pane-header):
1972
1973 2010-11-04  Erik Arvidsson  <arv@chromium.org>
1974
1975         Reviewed by Dimitri Glazkov.
1976
1977         Support box-sizing without the vendor prefix
1978         https://bugs.webkit.org/show_bug.cgi?id=36713
1979
1980         Based on patch by Peter Beverloo <peter@lvp-media.com>
1981
1982         Test: fast/css/box-sizing-backwards-compat-prefix.html
1983
1984         * css/CSSComputedStyleDeclaration.cpp:
1985         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1986         * css/CSSParser.cpp:
1987         (WebCore::CSSParser::parseValue):
1988         (WebCore::cssPropertyID): This handles -webkit-box-sizing and maps it to box-sizing.
1989         * css/CSSPropertyNames.in:
1990         * css/CSSStyleSelector.cpp:
1991         (WebCore::CSSStyleSelector::applyProperty):
1992         * css/quirks.css: Change -webkit-box-sizing to box-sizing.
1993         (input:not([type=image]), textarea):
1994         * css/view-source.css: Ditto.
1995         (.webkit-line-gutter-backdrop, .webkit-line-number):
1996         * css/wml.css: Ditto.
1997         (do):
1998         (select):
1999
2000 2010-11-04  John Reck  <jreck@google.com>
2001
2002         Reviewed by Steve Block.
2003
2004         Fix a linker failure when building for Android
2005         https://bugs.webkit.org/show_bug.cgi?id=48964
2006         
2007         The Android stub for setCookieStoragePrivateBrowsingEnabled(bool) wasn't in the WebCore namespace, which caused
2008         a linker failure when building for Android. Moved the stub to the WebCore namespace. This was caused by 
2009         http://trac.webkit.org/changeset/70400
2010         
2011         No new tests, build fix only
2012
2013         * platform/android/TemporaryLinkStubs.cpp:
2014
2015 2010-11-04  Joseph Pecoraro  <joepeck@webkit.org>
2016
2017         Reviewed by Andreas Kling.
2018
2019         Request.h getters can be made const
2020         https://bugs.webkit.org/show_bug.cgi?id=49003
2021
2022         Added the const qualifier to some getters that don't mutate the object.
2023
2024         * loader/Request.h:
2025         (WebCore::Request::cachedResource):
2026         (WebCore::Request::cachedResourceLoader):
2027         (WebCore::Request::isIncremental):
2028         (WebCore::Request::isMultipart):
2029
2030 2010-11-03  Brian Weinstein  <bweinstein@apple.com>
2031
2032         Reviewed by Brady Eidson.
2033
2034         User scripts shouldn't be injected in a frame's empty initial document.
2035         https://bugs.webkit.org/show_bug.cgi?id=48970
2036         <rdar://problem/8618164>
2037         <rdar://problem/8082122>
2038         
2039         When a frame loads, it first creates an empty initial document, then navigates to the correct URL. Our
2040         current policy with user scripts is to inject them into both the initial empty document, and then inject
2041         them again.
2042         
2043         This causes developers to think their scripts have been injected twice into all iframes, and there is a timing
2044         issue between WebKit1 and WebKit2 that causes start scripts to be injected into the initial empty document
2045         of the main frame when a new tab or window is created.
2046         
2047         The fix for this is to not inject user scripts when the frame is creating its initial empty document before loading
2048         the correct source.
2049
2050         * page/Frame.cpp:
2051         (WebCore::Frame::injectUserScripts):
2052
2053 2010-11-04  Andreas Kling  <kling@webkit.org>
2054
2055         Reviewed by Nikolas Zimmermann.
2056
2057         GraphicsContext: Don't do full save/restore when painting with low quality scaling
2058         https://bugs.webkit.org/show_bug.cgi?id=48738
2059
2060         Stash the imageInterpolationQuality() in a local and reset it after painting.
2061
2062         * platform/graphics/GraphicsContext.cpp:
2063         (WebCore::GraphicsContext::drawImage):
2064         (WebCore::GraphicsContext::drawTiledImage):
2065         (WebCore::GraphicsContext::drawImageBuffer):
2066         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
2067         (WebCore::GraphicsContext::imageInterpolationQuality):
2068         * platform/graphics/skia/GraphicsContextSkia.cpp:
2069         (WebCore::GraphicsContext::imageInterpolationQuality):
2070         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2071         (WebCore::GraphicsContext::imageInterpolationQuality):
2072
2073 2010-11-04  Nikolas Zimmermann  <nzimmermann@rim.com>
2074
2075         Reviewed by Andreas Kling.
2076
2077         Refactor SVGStringListPropertyTearOff/SVGListPropertyTearOff to use a common base class
2078         https://bugs.webkit.org/show_bug.cgi?id=48990
2079
2080         Introduce SVGListProperty as common base class between static lists (SVGStringListPropertyTearOff) and dynamic lists (SVGListPropertyTearOff).
2081         This is a preparation for the addition of the next static list type: SVGPointList.
2082
2083         * GNUmakefile.am: Add new files to build.
2084         * WebCore.gypi: Ditto.
2085         * WebCore.pro: Ditto.
2086         * WebCore.vcproj/WebCore.vcproj: Ditto.
2087         * WebCore.xcodeproj/project.pbxproj: Ditto.
2088         * bindings/scripts/CodeGenerator.pm: s/SVGStringListPropertyTearOff/SVGStaticListPropertyTearOff/.
2089         * bindings/scripts/CodeGeneratorJS.pm: Ditto.
2090         * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
2091         * bindings/scripts/CodeGeneratorV8.pm: Ditto.
2092         * svg/properties/SVGAnimatedListPropertyTearOff.h: Include SVGStaticListPropertyTearOff.h here, to avoid special dependencies in CodeGenerator*.pm
2093         * svg/properties/SVGListProperty.h: Added.
2094         * svg/properties/SVGListPropertyTearOff.h: Use SVGList API implementation from SVGListProperty base class.
2095         * svg/properties/SVGStaticListPropertyTearOff.h: Added. Use SVGList API implementation from SVGListProperty base class.
2096         * svg/properties/SVGStringListPropertyTearOff.h: Removed.
2097
2098 2010-11-04  Ryosuke Niwa  <rniwa@webkit.org>
2099
2100         Unreviewed. Fixed WebCore.xcodeproject
2101
2102         * WebCore.xcodeproj/project.pbxproj:
2103
2104 2010-11-04  Pratik Solanki  <psolanki@apple.com>
2105
2106         Reviewed by Darin Adler.
2107
2108         Should make use of purge priorities for different resource types
2109         https://bugs.webkit.org/show_bug.cgi?id=48684
2110
2111         Assign purge priorities to CachedResource objects. JavaScript and CSS stylesheets are more
2112         important than images so hint to the kernel to purge them last. We do this by repurposing
2113         the previously unused function, PurgeableBuffer::setPurgePriority(). It now just sets the
2114         priority field and does not have side-effects like calling makePurgeable(true).
2115
2116         Also, remove unusued PurgeableBuffer::create(const Vector<char>&) function and move the
2117         purgeable memory size threshold from CachedResource to PurgeableBuffer.
2118
2119         * WebCore.xcodeproj/project.pbxproj: Add new PurgePriority.h header and mark it as private
2120         header.
2121         * loader/CachedCSSStyleSheet.h:
2122         (WebCore::CachedCSSStyleSheet::purgePriority):
2123         * loader/CachedImage.h:
2124         (WebCore::CachedImage::purgePriority):
2125         * loader/CachedResource.cpp:
2126         (WebCore::CachedResource::makePurgeable): Set the purge priority on the PurgeableBffer.
2127         Also, move the check for purgeable size threshold to PurgeableBuffer.
2128         * loader/CachedResource.h:
2129         (WebCore::CachedResource::purgePriority): Added. New virtual method that lets the class
2130         specify its purge priority.
2131         * loader/CachedScript.h:
2132         (WebCore::CachedScript::purgePriority):
2133         * platform/PurgePriority.h: Added. Move the PurgePriority enum from PurgeableBuffer class to
2134         its own header file.
2135         (WebCore::):
2136         * platform/PurgeableBuffer.h:
2137         (WebCore::PurgeableBuffer::setPurgePriority): Update this previously unused function to just
2138         set the priority and not call makePurgeable(true).
2139         * platform/mac/PurgeableBufferMac.cpp: Update size threshold to 16KB which is what
2140         CachedResource was using.
2141
2142 2010-11-04  Chris Guillory  <chris.guillory@google.com>
2143
2144         Reviewed by Chris Fleizach.
2145
2146         Ignore static text children of text field controls in the accessibility tree.
2147         https://bugs.webkit.org/show_bug.cgi?id=48944
2148
2149         * accessibility/AccessibilityRenderObject.cpp:
2150         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
2151
2152 2010-11-04  Erik Arvidsson  <arv@chromium.org>
2153
2154         Reviewed by Tony Chang.
2155
2156         Computed style is not correct for negative values in the presence of zooming
2157         https://bugs.webkit.org/show_bug.cgi?id=48855
2158
2159         * rendering/style/RenderStyle.h:
2160         (WebCore::adjustForAbsoluteZoom): When the value is less than zero we need to decrement instead of increment.
2161
2162 2010-11-04  Shane Stephens  <shanestephens@google.com>
2163
2164         Reviewed by Tony Chang.
2165
2166         SVGStyledTransformableElement supplemental transforms pre-multiplied
2167         but should be post-multiplied.
2168         https://bugs.webkit.org/show_bug.cgi?id=48026
2169
2170         Test: svg/animations/animate-path-nested-transforms.svg
2171
2172         * svg/SVGStyledTransformableElement.cpp:
2173         (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
2174         
2175         Switched order of multiplication.  Note that due to a bug in
2176         AffineTransform's operator* implementation the order of arguments is
2177         reversed (see http://bugs.webkit.org/show_bug.cgi?id=48031).
2178
2179 2010-11-04  James Simonsen  <simonjam@chromium.org>
2180
2181         Reviewed by Darin Fisher.
2182
2183         [Web Timing] Implement dom* timing marks
2184         https://bugs.webkit.org/show_bug.cgi?id=46301
2185
2186         Test: fast/dom/webtiming-document-open.html
2187
2188         * GNUmakefile.am: Added DocumentTiming.h
2189         * WebCore.gypi: Ditto.
2190         * WebCore.vcproj/WebCore.vcproj: Ditto.
2191         * WebCore.xcodeproj/project.pbxproj: Ditto.
2192         * dom/Document.cpp:
2193         (WebCore::Document::setReadyState): Set DOM WebTiming marks.
2194         (WebCore::Document::finishedParsing): Set DOM WebTiming marks.
2195         * dom/Document.h:
2196         (WebCore::Document::timing): Added.
2197         * dom/DocumentTiming.h: Added.
2198         (WebCore::DocumentTiming::DocumentTiming):
2199         * page/Timing.cpp: Added DOM timing.
2200         (WebCore::Timing::domLoading): Ditto.
2201         (WebCore::Timing::domInteractive): Ditto.
2202         (WebCore::Timing::domContentLoaded): Ditto.
2203         (WebCore::Timing::domComplete): Ditto.
2204         (WebCore::Timing::documentTiming): Ditto.
2205         * page/Timing.h: Ditto.
2206         * page/Timing.idl: Ditto.
2207
2208 2010-11-04  Carlos Garcia Campos  <cgarcia@igalia.com>
2209
2210         Reviewed by Martin Robinson.
2211
2212         [GTK] Implement unencodable characters handling in TextCodecGtk::encode()
2213         https://bugs.webkit.org/show_bug.cgi?id=48902
2214
2215         Fixes a crash in test fast/encoding/char-encoding.html.
2216
2217         * platform/text/gtk/TextCodecGtk.cpp:
2218         (WebCore::TextCodecGtk::encode):
2219
2220 2010-11-04  Adam Barth  <abarth@webkit.org>
2221
2222         Enabled ICCJPEG on Chromium Mac
2223         https://bugs.webkit.org/show_bug.cgi?id=48977
2224
2225         Add iccjpeg as a dependency.
2226
2227         * WebCore.gyp/WebCore.gyp:
2228
2229 2010-11-03  Kent Tamura  <tkent@chromium.org>
2230
2231         Reviewed by Dimitri Glazkov.
2232
2233         Framework to show form validation message for invalid controls
2234         https://bugs.webkit.org/show_bug.cgi?id=31718
2235
2236         HTMLFormElement::validateInteractively() shows a validation message for
2237         an invalid control by HTMLFormControlElement::updateVisibleValidationMessage(),
2238         and the message is hidden when the invalid control looses focus, becomes
2239         valid, detached, or the form is submitted again.
2240
2241         Introduce ValidationMessage class to manage visible form validation
2242         message. It has no implementation to show/hide a message yet.
2243
2244         No new tests. New behavior is disabled by default, and is timing-dependent.
2245
2246         * Android.mk: Add ValidationMessage.
2247         * CMakeLists.txt: ditto.
2248         * GNUmakefile.am: ditto.
2249         * WebCore.gypi: ditto.
2250         * WebCore.pro: ditto.
2251         * WebCore.vcproj/WebCore.vcproj: ditto.
2252         * WebCore.xcodeproj/project.pbxproj: ditto.
2253         * html/HTMLFormControlElement.cpp:
2254         (WebCore::HTMLFormControlElement::detach): Hides a validation message.
2255         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
2256            Hides a validation message if validation is not needed.
2257         (WebCore::HTMLFormControlElement::updateVisibleValidationMessage):
2258         (WebCore::HTMLFormControlElement::hideVisibleValidationMessage):
2259         (WebCore::HTMLFormControlElement::setNeedsValidityCheck):
2260           Hides a validation message or updates the validation message.
2261         (WebCore::HTMLFormControlElement::dispatchBlurEvent):
2262           Hides a validation message.
2263         (WebCore::HTMLFormControlElement::visibleValidationMessage):
2264         * html/HTMLFormControlElement.h:
2265         * html/HTMLFormElement.cpp:
2266         (WebCore::HTMLFormElement::validateInteractively):
2267          - Hide existing validation messages before showing new message.
2268          - Show new validation message.
2269         * html/ValidationMessage.cpp: Added.
2270         (WebCore::ValidationMessage::ValidationMessage):
2271         (WebCore::ValidationMessage::~ValidationMessage):
2272         (WebCore::ValidationMessage::create):
2273         (WebCore::ValidationMessage::setMessage):
2274         (WebCore::ValidationMessage::hideMessage):
2275         * html/ValidationMessage.h: Added.
2276         (WebCore::ValidationMessage::message):
2277
2278 2010-11-03  Patrick Gansterer  <paroga@webkit.org>
2279
2280         Reviewed by Adam Roben.
2281
2282         Port WCDataObject.cpp to WinCE
2283         https://bugs.webkit.org/show_bug.cgi?id=48921
2284
2285         OleDuplicateData is not supported on WinCE.
2286
2287         * platform/win/WCDataObject.cpp:
2288         (WebCore::WCDataObject::CopyMedium):
2289
2290 2010-11-03  Patrick Gansterer  <paroga@webkit.org>
2291
2292         Reviewed by Adam Roben.
2293
2294         Port ClipboardWin.cpp to WinCE
2295         https://bugs.webkit.org/show_bug.cgi?id=48412
2296
2297         * platform/win/ClipboardWin.cpp:
2298         (WebCore::writeFileToDataObject):
2299
2300 2010-11-03  Patrick Gansterer  <paroga@webkit.org>
2301
2302         Reviewed by Adam Roben.
2303
2304         Port ClipboardWin.cpp to WinCE
2305         https://bugs.webkit.org/show_bug.cgi?id=48412
2306
2307         * platform/win/ClipboardWin.cpp:
2308         (WebCore::filesystemPathFromUrlOrTitle):
2309         (WebCore::createGlobalHDropContent):
2310         (WebCore::ClipboardWin::files):
2311
2312 2010-11-03  Vincent Scheib  <scheib@chromium.org>
2313
2314         Reviewed by James Robinson.
2315
2316         [chromium] GraphicsContext3D creation attributes include canRecoverFromContextLoss option
2317         https://bugs.webkit.org/show_bug.cgi?id=48850
2318
2319         Implementations of GraphicsContext3D may respect the creation attribute
2320         canRecoverFromContextLoss being false, and then only succeeding initialization if
2321         the context can satisfy that request of never being lost. DX9 on XP can not satisfy
2322         such a request.
2323
2324         Test by use of accelerated canvas 2d in Chromium with ANGLE on XP machines.
2325
2326         * platform/graphics/GraphicsContext3D.h:
2327         (WebCore::GraphicsContext3D::Attributes::Attributes):
2328         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
2329         (WebCore::SharedGraphicsContext3D::create):
2330
2331 2010-11-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2332
2333         Reviewed by Martin Robinson.
2334
2335         [GTK] Use sentence boundaries instead of start/end sentence
2336         https://bugs.webkit.org/show_bug.cgi?id=48422
2337
2338         Using sentence boundaries all intersentence
2339         whitespace/control/format characters are assigned to a
2340         sentence. This is what ICU does, so we have to do the same in
2341         order to get the same results with glib unicode backend. It fixes
2342         the sentence tests cases in test fast/dom/Range/range-expand.html.
2343
2344         * platform/text/gtk/TextBreakIteratorGtk.cpp:
2345         (WebCore::textBreakNext):
2346         (WebCore::textBreakPrevious):
2347
2348 2010-11-03  Zhenyao Mo  <zmo@google.com>
2349
2350         Reviewed by Kenneth Russell.
2351
2352         depthRange should generate INVALID_OPERATION if zNear is greater than zFar
2353         https://bugs.webkit.org/show_bug.cgi?id=48676
2354
2355         * html/canvas/WebGLRenderingContext.cpp:
2356         (WebCore::WebGLRenderingContext::depthRange):
2357
2358 2010-11-03  Adrienne Walker  <enne@google.com>
2359
2360         Reviewed by Kenneth Russell.
2361
2362         Properly return empty strings instead of null when using invalid
2363         objects for some WebGL calls.  This fixes issues caused by r71274.
2364         https://bugs.webkit.org/show_bug.cgi?id=48962
2365
2366         * html/canvas/WebGLRenderingContext.cpp:
2367         (WebCore::WebGLRenderingContext::getProgramInfoLog):
2368         (WebCore::WebGLRenderingContext::getShaderInfoLog):
2369         (WebCore::WebGLRenderingContext::getShaderSource):
2370
2371 2010-11-01  Ryosuke Niwa  <rniwa@webkit.org>
2372
2373         Reviewed by Darin Adler.
2374
2375         Crash in ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle
2376         https://bugs.webkit.org/show_bug.cgi?id=48581
2377
2378         The crash was caused by RemoveNodePreservingChildrenCommand's calling removeNode
2379         on m_node without checking that m_node has a parent and it's still in the document.
2380         Fixed the crash by adding an early exit in CompositeEditCommand::removeNode and
2381         deploying RefPtr in several places of ApplyStyleCommand.cpp.
2382
2383         Test: editing/style/iframe-onload-crash.html
2384
2385         * editing/ApplyStyleCommand.cpp:
2386         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
2387         (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle):
2388         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
2389         * editing/ApplyStyleCommand.h:
2390         * editing/CompositeEditCommand.cpp:
2391         (WebCore::CompositeEditCommand::removeNode):
2392
2393 2010-11-03  Jia Pu  <jpu@apple.com>
2394
2395         Reviewed by Darin Adler.
2396
2397         Crashes in WebCore::DocumentMarkerController::removeMarkersFromMarkerMapVectorPair() when deleting multiple lines of text.
2398         https://bugs.webkit.org/show_bug.cgi?id=48918
2399         <rdar://problem/8620602>
2400
2401         I haven't been able to found a reliable way to reproduce the bug. However, whenever it happens,
2402         the crash is caused by a null node pointer returned by TextIterator. So it seems to be a 
2403         safe fix to guard against that. 
2404
2405         * editing/Editor.cpp: (WebCore::Editor::removeSpellAndCorrectionMarkersFromWordsToBeEdited):
2406
2407 2010-11-02  Zhenyao Mo  <zmo@google.com>
2408
2409         Reviewed by Kenneth Russell.
2410
2411         A different mask or reference value in stencil operations should generate INVALID_OPERATION
2412         https://bugs.webkit.org/show_bug.cgi?id=48669
2413
2414         * html/canvas/WebGLRenderingContext.cpp:
2415         (WebCore::WebGLRenderingContext::WebGLRenderingContext): Init stencil func ref/mask and stencil mask to default.
2416         (WebCore::WebGLRenderingContext::stencilFunc): Cache ref/mask value.
2417         (WebCore::WebGLRenderingContext::stencilFuncSeparate): Generate error if front/back values differ.
2418         (WebCore::WebGLRenderingContext::stencilMask): Cache mask value.
2419         (WebCore::WebGLRenderingContext::stencilMaskSeparate): Generate error if front/back values differ.
2420         (WebCore::WebGLRenderingContext::validateFace): Validate face parameter.
2421         (WebCore::WebGLRenderingContext::validateStencilFunc): Validate stencil func parameter.
2422         * html/canvas/WebGLRenderingContext.h: Add members to track stencil func ref/mask and stencil mask.
2423
2424 2010-11-03  Dimitri Glazkov  <dglazkov@chromium.org>
2425
2426         Reverting r71244, r71248 and r71250. Broke default event handling inside text fields.
2427         https://bugs.webkit.org/show_bug.cgi?id=46015
2428
2429         * Android.mk:
2430         * CMakeLists.txt:
2431         * GNUmakefile.am:
2432         * WebCore.gypi:
2433         * WebCore.pro:
2434         * WebCore.vcproj/WebCore.vcproj:
2435         * WebCore.xcodeproj/project.pbxproj:
2436         * dom/ContainerNode.cpp:
2437         (WebCore::notifyChildInserted):
2438         * dom/DOMAllInOne.cpp:
2439         * dom/EventContext.cpp: Removed.
2440         * dom/EventContext.h: Removed.
2441         * dom/Node.cpp:
2442         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
2443         (WebCore::Node::createRendererIfNeeded):
2444         (WebCore::Node::eventParentNode):
2445         (WebCore::Node::enclosingLinkEventParentOrSelf):
2446         (WebCore::eventTargetAsSVGElementInstance):
2447         (WebCore::eventTargetRespectingSVGTargetRules):
2448         (WebCore::Node::eventAncestors):
2449         (WebCore::Node::dispatchGenericEvent):
2450         * dom/Node.h:
2451         * dom/Text.cpp:
2452         (WebCore::Text::createRenderer):
2453         * dom/WindowEventContext.cpp: Removed.
2454         * dom/WindowEventContext.h: Removed.
2455         * inspector/InspectorDOMAgent.cpp:
2456         (WebCore::InspectorDOMAgent::getEventListenersForNode):
2457         * inspector/InspectorInstrumentation.cpp:
2458         (WebCore::eventHasListeners):
2459         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
2460         * inspector/InspectorInstrumentation.h:
2461         (WebCore::InspectorInstrumentation::willDispatchEvent):
2462         * page/EventHandler.cpp:
2463         (WebCore::EventHandler::updateMouseEventTargetNode):
2464         * rendering/ShadowElement.h:
2465         (WebCore::ShadowElement::shadowParent):
2466         (WebCore::ShadowElement::shadowParentNode):
2467         * svg/SVGElement.cpp:
2468         (WebCore::SVGElement::eventParentNode):
2469         * svg/SVGElement.h:
2470
2471 2010-11-03  Adam Barth  <abarth@webkit.org>
2472
2473         Reviewed by Eric Seidel.
2474
2475         CG use of WebKit image decoders crashes on some animated GIFs
2476         https://bugs.webkit.org/show_bug.cgi?id=48955
2477
2478         It turns out CFDataGetMutableBytePtr isn't safe call on a null pointer.
2479
2480         Test: fast/images/dont-crash-with-null-gif-frames.html
2481
2482         * platform/image-decoders/cg/ImageDecoderCG.cpp:
2483         (WebCore::RGBA32Buffer::copyReferenceToBitmapData):
2484         (WebCore::RGBA32Buffer::copyBitmapData):
2485
2486 2010-11-03  Adrienne Walker  <enne@google.com>
2487
2488         Reviewed by Kenneth Russell.
2489
2490         Implement lost, restored, and creation failure context events for
2491         WebGLRenderingContext.  The lost and restored functions are not hooked
2492         up yet, but the context now acts according to the spec as it should
2493         during a lost context.  Tested manually, as there's no programmatic
2494         way to lose a context yet.
2495         https://bugs.webkit.org/show_bug.cgi?id=35626
2496
2497         * WebCore.gypi:
2498         * WebCore.xcodeproj/project.pbxproj:
2499         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2500         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
2501         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2502         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
2503         * dom/EventNames.h:
2504         * html/canvas/WebGLContextEvent.cpp: Added.
2505         (WebCore::WebGLContextEvent::WebGLContextEvent):
2506         (WebCore::WebGLContextEvent::~WebGLContextEvent):
2507         (WebCore::WebGLContextEvent::initEvent):
2508         * html/canvas/WebGLContextEvent.h: Added.
2509         (WebCore::WebGLContextEvent::create):
2510         (WebCore::WebGLContextEvent::statusMessage):
2511         * html/canvas/WebGLContextEvent.idl: Added.
2512         * html/canvas/WebGLRenderingContext.cpp:
2513         (WebCore::WebGLRenderingContext::create):
2514         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
2515         (WebCore::WebGLRenderingContext::initializeNewContext):
2516         (WebCore::WebGLRenderingContext::activeTexture):
2517         (WebCore::WebGLRenderingContext::attachShader):
2518         (WebCore::WebGLRenderingContext::bindAttribLocation):
2519         (WebCore::WebGLRenderingContext::bindBuffer):
2520         (WebCore::WebGLRenderingContext::bindFramebuffer):
2521         (WebCore::WebGLRenderingContext::bindRenderbuffer):
2522         (WebCore::WebGLRenderingContext::bindTexture):
2523         (WebCore::WebGLRenderingContext::blendColor):
2524         (WebCore::WebGLRenderingContext::blendEquation):
2525         (WebCore::WebGLRenderingContext::blendEquationSeparate):
2526         (WebCore::WebGLRenderingContext::blendFunc):
2527         (WebCore::WebGLRenderingContext::blendFuncSeparate):
2528         (WebCore::WebGLRenderingContext::bufferData):
2529         (WebCore::WebGLRenderingContext::bufferSubData):
2530         (WebCore::WebGLRenderingContext::checkFramebufferStatus):
2531         (WebCore::WebGLRenderingContext::clear):
2532         (WebCore::WebGLRenderingContext::clearColor):
2533         (WebCore::WebGLRenderingContext::clearDepth):
2534         (WebCore::WebGLRenderingContext::clearStencil):
2535         (WebCore::WebGLRenderingContext::colorMask):
2536         (WebCore::WebGLRenderingContext::compileShader):
2537         (WebCore::WebGLRenderingContext::copyTexImage2D):
2538         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
2539         (WebCore::WebGLRenderingContext::createBuffer):
2540         (WebCore::WebGLRenderingContext::createFramebuffer):
2541         (WebCore::WebGLRenderingContext::createTexture):
2542         (WebCore::WebGLRenderingContext::createProgram):
2543         (WebCore::WebGLRenderingContext::createRenderbuffer):
2544         (WebCore::WebGLRenderingContext::createShader):
2545         (WebCore::WebGLRenderingContext::cullFace):
2546         (WebCore::WebGLRenderingContext::deleteBuffer):
2547         (WebCore::WebGLRenderingContext::deleteFramebuffer):
2548         (WebCore::WebGLRenderingContext::deleteProgram):
2549         (WebCore::WebGLRenderingContext::deleteRenderbuffer):
2550         (WebCore::WebGLRenderingContext::deleteShader):
2551         (WebCore::WebGLRenderingContext::deleteTexture):
2552         (WebCore::WebGLRenderingContext::depthFunc):
2553         (WebCore::WebGLRenderingContext::depthMask):
2554         (WebCore::WebGLRenderingContext::depthRange):
2555         (WebCore::WebGLRenderingContext::detachShader):
2556         (WebCore::WebGLRenderingContext::disable):
2557         (WebCore::WebGLRenderingContext::disableVertexAttribArray):
2558         (WebCore::WebGLRenderingContext::drawArrays):
2559         (WebCore::WebGLRenderingContext::drawElements):
2560         (WebCore::WebGLRenderingContext::enable):
2561         (WebCore::WebGLRenderingContext::enableVertexAttribArray):
2562         (WebCore::WebGLRenderingContext::finish):
2563         (WebCore::WebGLRenderingContext::flush):
2564         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
2565         (WebCore::WebGLRenderingContext::framebufferTexture2D):
2566         (WebCore::WebGLRenderingContext::frontFace):
2567         (WebCore::WebGLRenderingContext::generateMipmap):
2568         (WebCore::WebGLRenderingContext::getActiveAttrib):
2569         (WebCore::WebGLRenderingContext::getActiveUniform):
2570         (WebCore::WebGLRenderingContext::getAttachedShaders):
2571         (WebCore::WebGLRenderingContext::getAttribLocation):
2572         (WebCore::WebGLRenderingContext::getBufferParameter):
2573         (WebCore::WebGLRenderingContext::getContextAttributes):
2574         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
2575         (WebCore::WebGLRenderingContext::getParameter):
2576         (WebCore::WebGLRenderingContext::getProgramParameter):
2577         (WebCore::WebGLRenderingContext::getProgramInfoLog):
2578         (WebCore::WebGLRenderingContext::getRenderbufferParameter):
2579         (WebCore::WebGLRenderingContext::getShaderParameter):
2580         (WebCore::WebGLRenderingContext::getShaderInfoLog):
2581         (WebCore::WebGLRenderingContext::getShaderSource):
2582         (WebCore::WebGLRenderingContext::getTexParameter):
2583         (WebCore::WebGLRenderingContext::getUniform):
2584         (WebCore::WebGLRenderingContext::getUniformLocation):
2585         (WebCore::WebGLRenderingContext::getVertexAttrib):
2586         (WebCore::WebGLRenderingContext::getVertexAttribOffset):
2587         (WebCore::WebGLRenderingContext::hint):
2588         (WebCore::WebGLRenderingContext::isBuffer):
2589         (WebCore::WebGLRenderingContext::isContextLost):
2590         (WebCore::WebGLRenderingContext::isEnabled):
2591         (WebCore::WebGLRenderingContext::isFramebuffer):
2592         (WebCore::WebGLRenderingContext::isProgram):
2593         (WebCore::WebGLRenderingContext::isRenderbuffer):
2594         (WebCore::WebGLRenderingContext::isShader):
2595         (WebCore::WebGLRenderingContext::isTexture):
2596         (WebCore::WebGLRenderingContext::lineWidth):
2597         (WebCore::WebGLRenderingContext::linkProgram):
2598         (WebCore::WebGLRenderingContext::pixelStorei):
2599         (WebCore::WebGLRenderingContext::polygonOffset):
2600         (WebCore::WebGLRenderingContext::readPixels):
2601         (WebCore::WebGLRenderingContext::releaseShaderCompiler):
2602         (WebCore::WebGLRenderingContext::renderbufferStorage):
2603         (WebCore::WebGLRenderingContext::sampleCoverage):
2604         (WebCore::WebGLRenderingContext::scissor):
2605         (WebCore::WebGLRenderingContext::shaderSource):
2606         (WebCore::WebGLRenderingContext::stencilFunc):
2607         (WebCore::WebGLRenderingContext::stencilFuncSeparate):
2608         (WebCore::WebGLRenderingContext::stencilMask):
2609         (WebCore::WebGLRenderingContext::stencilMaskSeparate):
2610         (WebCore::WebGLRenderingContext::stencilOp):
2611         (WebCore::WebGLRenderingContext::stencilOpSeparate):
2612         (WebCore::WebGLRenderingContext::texImage2D):
2613         (WebCore::WebGLRenderingContext::texParameter):
2614         (WebCore::WebGLRenderingContext::texSubImage2DBase):
2615         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
2616         (WebCore::WebGLRenderingContext::texSubImage2D):
2617         (WebCore::WebGLRenderingContext::uniform1f):
2618         (WebCore::WebGLRenderingContext::uniform1fv):
2619         (WebCore::WebGLRenderingContext::uniform1i):
2620         (WebCore::WebGLRenderingContext::uniform1iv):
2621         (WebCore::WebGLRenderingContext::uniform2f):
2622         (WebCore::WebGLRenderingContext::uniform2fv):
2623         (WebCore::WebGLRenderingContext::uniform2i):
2624         (WebCore::WebGLRenderingContext::uniform2iv):
2625         (WebCore::WebGLRenderingContext::uniform3f):
2626         (WebCore::WebGLRenderingContext::uniform3fv):
2627         (WebCore::WebGLRenderingContext::uniform3i):
2628         (WebCore::WebGLRenderingContext::uniform3iv):
2629         (WebCore::WebGLRenderingContext::uniform4f):
2630         (WebCore::WebGLRenderingContext::uniform4fv):
2631         (WebCore::WebGLRenderingContext::uniform4i):
2632         (WebCore::WebGLRenderingContext::uniform4iv):
2633         (WebCore::WebGLRenderingContext::uniformMatrix2fv):
2634         (WebCore::WebGLRenderingContext::uniformMatrix3fv):
2635         (WebCore::WebGLRenderingContext::uniformMatrix4fv):
2636         (WebCore::WebGLRenderingContext::useProgram):
2637         (WebCore::WebGLRenderingContext::validateProgram):
2638         (WebCore::WebGLRenderingContext::vertexAttribPointer):
2639         (WebCore::WebGLRenderingContext::viewport):
2640         (WebCore::WebGLRenderingContext::loseContext):
2641         (WebCore::WebGLRenderingContext::restoreContext):
2642         (WebCore::WebGLRenderingContext::addObject):
2643         (WebCore::WebGLRenderingContext::vertexAttribfImpl):
2644         (WebCore::WebGLRenderingContext::vertexAttribfvImpl):
2645         * html/canvas/WebGLRenderingContext.h:
2646         * html/canvas/WebGLRenderingContext.idl:
2647         * platform/graphics/GraphicsContext3D.h:
2648
2649 2010-11-03  Kenneth Russell  <kbr@google.com>
2650
2651         Reviewed by Chris Marrin.
2652
2653         Redesign extension mechanism in GraphicsContext3D
2654         https://bugs.webkit.org/show_bug.cgi?id=46894
2655
2656         Upon request, factored out extension support from GraphicsContext3D
2657         into a new Extensions3D class. (The plural was chosen because the
2658         class and subclasses hold multiple extensions.)
2659
2660         Unlike GraphicsContext3D, Extensions3D contains only pure virtual
2661         methods. This was done because Extensions3D's inheritance diagram
2662         and usage pattern is very different from that of GraphicsContext3D,
2663         and the concrete subclasses need to decide how to implement the
2664         various entry points. Requiring them to be placed at the
2665         Extensions3D level will cause implementation details to leak into
2666         the base class, which is highly undesirable. Any virtual call
2667         overhead to these entry points will be negligible.
2668
2669         Changed call sites utilizing these extensions to call through the
2670         Extensions3D object or its subclasses.
2671
2672         Tested:
2673          - Chromium on Linux with accelerated 2D canvas and HTML5 video
2674          - Chromium on Mac OS X with WebGL and CSS 3D content
2675          - Safari on Mac OS X with WebGL and CSS 3D content
2676
2677         No new tests. Covered by existing tests.
2678
2679         * WebCore.gypi:
2680         * WebCore.pro:
2681         * WebCore.xcodeproj/project.pbxproj:
2682         * platform/graphics/Extensions3D.h: Added.
2683         (WebCore::Extensions3D::~Extensions3D):
2684         * platform/graphics/GraphicsContext3D.cpp:
2685         * platform/graphics/GraphicsContext3D.h:
2686         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2687         (WebCore::DrawingBuffer::DrawingBuffer):
2688         (WebCore::DrawingBuffer::publishToPlatformLayer):
2689         * platform/graphics/chromium/Extensions3DChromium.h: Added.
2690         * platform/graphics/chromium/VideoLayerChromium.cpp:
2691         (WebCore::VideoLayerChromium::updateTexture):
2692         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
2693         (WebCore::SharedGraphicsContext3D::supportsBGRA):
2694         * platform/graphics/gpu/SharedGraphicsContext3D.h:
2695         * platform/graphics/gpu/Texture.cpp:
2696         (WebCore::convertFormat):
2697         * platform/graphics/mac/GraphicsContext3DMac.mm:
2698         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Added.
2699         (WebCore::Extensions3DOpenGL::Extensions3DOpenGL):
2700         (WebCore::Extensions3DOpenGL::~Extensions3DOpenGL):
2701         (WebCore::Extensions3DOpenGL::supports):
2702         (WebCore::Extensions3DOpenGL::getGraphicsResetStatusARB):
2703         * platform/graphics/opengl/Extensions3DOpenGL.h: Added.
2704         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2705         (WebCore::GraphicsContext3D::getExtensions):
2706         * platform/graphics/qt/Extensions3DQt.cpp: Added.
2707         (WebCore::Extensions3DQt::Extensions3DQt):
2708         (WebCore::Extensions3DQt::~Extensions3DQt):
2709         (WebCore::Extensions3DQt::supports):
2710         (WebCore::Extensions3DQt::getGraphicsResetStatusARB):
2711         * platform/graphics/qt/Extensions3DQt.h: Added.
2712         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2713         (WebCore::GraphicsContext3D::getExtensions):
2714         * platform/graphics/skia/PlatformContextSkia.cpp:
2715         (WebCore::PlatformContextSkia::readbackHardwareToSoftware):
2716
2717 2010-11-03  Mike Thole  <mthole@apple.com>
2718
2719         Reviewed by Darin Adler.
2720         
2721         Tweak coding style (follow-up to r71264).
2722         
2723         * platform/mac/Language.mm:
2724         (WebCore::createHTTPStyleLanguageCode): Style tweaks.
2725
2726 2010-11-03  Darin Adler  <darin@apple.com>
2727
2728         Updated Xcode projects by opening them with Xcode 3.2.4.
2729         Updated svn:ignore for Xcode projects.
2730
2731         * manual-tests/NPN_Invoke/NPN_Invoke.xcodeproj: Added property svn:ignore.
2732         * manual-tests/NPN_Invoke/NPN_Invoke.xcodeproj/project.pbxproj: Updated with Xcode 3.2.4.
2733
2734 2010-11-03  Matthew Delaney  <mdelaney@apple.com>
2735
2736         Reviewed by Darin Adler.
2737
2738         Fix canvas/philip/tests/2d.pattern.image.undefined.html
2739         https://bugs.webkit.org/show_bug.cgi?id=48894
2740
2741         * bindings/js/JSCanvasRenderingContext2DCustom.cpp: Changed error thrown to match the spec.
2742
2743 2010-11-03  Simon Fraser  <simon.fraser@apple.com>
2744
2745         Reviewed by John Sullivan.
2746
2747         Crash when setting context font to bad value
2748         https://bugs.webkit.org/show_bug.cgi?id=48948
2749         
2750         Null-check the CSSValue passed to CSSStyleSelector::applyPropertyToStyle(),
2751         since it may be null if the style declaration does not contain a value
2752         for the 'font' property.
2753
2754         Test: fast/canvas/invalid-set-font-crash.html
2755
2756         * css/CSSStyleSelector.cpp:
2757         (WebCore::CSSStyleSelector::applyPropertyToStyle):
2758
2759 2010-11-03  Mike Thole  <mthole@apple.com>
2760
2761         Reviewed by Alexey Proskuryakov.
2762
2763         Crash under WebCore::platformDefaultLanguage() when using Arabic language
2764         https://bugs.webkit.org/show_bug.cgi?id=48946
2765
2766         * platform/mac/Language.mm:
2767         (WebCore::createHTTPStyleLanguageCode):
2768         Retain the lowercaseLanguageCode string before returning it.  This was the code path that
2769         would lead to a crash.  Also removed early return to prevent a leak of preferredLanguageCode.
2770
2771 2010-11-03  Dan Bernstein  <mitz@apple.com>
2772
2773         Reviewed by Dave Hyatt.
2774
2775         Made table column width allocation algorithms use logical widths.
2776
2777         Part of: Make tables work with vertical text
2778         https://bugs.webkit.org/show_bug.cgi?id=46417
2779
2780         No new tests since tables don’t support different block flows yet.
2781
2782         * rendering/AutoTableLayout.cpp:
2783         (WebCore::AutoTableLayout::AutoTableLayout):
2784         (WebCore::AutoTableLayout::recalcColumn):
2785         (WebCore::AutoTableLayout::fullRecalc):
2786         (WebCore::AutoTableLayout::computePreferredLogicalWidths):
2787         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
2788         (WebCore::AutoTableLayout::insertSpanCell):
2789         (WebCore::AutoTableLayout::layout):
2790         * rendering/AutoTableLayout.h:
2791         (WebCore::AutoTableLayout::Layout::Layout):
2792         * rendering/FixedTableLayout.cpp:
2793         (WebCore::FixedTableLayout::calcWidthArray):
2794         (WebCore::FixedTableLayout::computePreferredLogicalWidths):
2795         (WebCore::FixedTableLayout::layout):
2796         * rendering/FixedTableLayout.h:
2797         * rendering/RenderTable.h:
2798         (WebCore::RenderTable::bordersPaddingAndSpacingInRowDirection): Renamed, but not changed yet.
2799
2800 2010-11-03  No'am Rosenthal  <noam.rosenthal@nokia.com>
2801
2802         Unreviewed build fix for r71253
2803
2804         #endif for TILED_BACKING_STORE was at the wrong place.
2805
2806         * platform/graphics/qt/GraphicsLayerQt.cpp:
2807         (WebCore::GraphicsLayerQtImpl::tiledBackingStoreBackgroundColor):
2808
2809 2010-11-03  David Hyatt  <hyatt@apple.com>
2810
2811         Reviewed by Dan Bernstein.
2812
2813         https://bugs.webkit.org/show_bug.cgi?id=48945
2814         
2815         Patch logicalLeftSelectionOffset and logicalRightSelectionOffset to be directionally abstract.
2816         
2817         Also make sure writing mode roots are also selection painting roots.
2818
2819         * rendering/RenderBlock.cpp:
2820         (WebCore::RenderBlock::isSelectionRoot):
2821         (WebCore::RenderBlock::logicalLeftSelectionOffset):
2822         (WebCore::RenderBlock::logicalRightSelectionOffset):
2823         * rendering/RenderBlock.h:
2824
2825 2010-11-03  Pavel Feldman  <pfeldman@chromium.org>
2826
2827         Reviewed by Timothy Hatcher.
2828
2829         Web Inspector: main resource is being re-assigned upon iframe's commit load.
2830         https://bugs.webkit.org/show_bug.cgi?id=48940
2831
2832         * inspector/front-end/ResourceManager.js:
2833         (WebInspector.ResourceManager.prototype.identifierForInitialRequest):
2834         (WebInspector.ResourceManager.prototype.didCommitLoadForFrame):
2835
2836 2010-11-03  Nate Chapin  <japhet@chromium.org>
2837
2838         Reviewed by Alexey Proskuryakov.
2839
2840         Wait to stop all loads for a frame being detached until after its
2841         chidlren have been detached. This ensures that any loads started
2842         by a child's unload event handler will be properly cancelled.
2843         https://bugs.webkit.org/show_bug.cgi?id=46579
2844
2845         Tests: fast/loader/ping-error.html
2846                http/tests/navigation/image-load-in-subframe-unload-handler.html
2847
2848         * loader/FrameLoader.cpp:
2849         (WebCore::FrameLoader::detachFromParent):
2850
2851 2010-11-03  Pavel Feldman  <pfeldman@chromium.org>
2852
2853         Reviewed by Simon Fraser.
2854
2855         Web Inspector: show proper image size for cached resources.
2856         https://bugs.webkit.org/show_bug.cgi?id=48915
2857
2858         * inspector/front-end/ExtensionServer.js:
2859         (WebInspector.ExtensionServer.prototype._onGetResourceContent):
2860         * inspector/front-end/ImageView.js:
2861         (WebInspector.ImageView.prototype.contentTabSelected.onImageLoad):
2862         (WebInspector.ImageView.prototype.contentTabSelected):
2863         (WebInspector.ImageView.prototype._base64ToSize):
2864         * inspector/front-end/NetworkPanel.js:
2865         (WebInspector.NetworkDataGridNode.prototype._refreshNameCell):
2866         * inspector/front-end/Resource.js:
2867         (WebInspector.Resource.prototype.set finished):
2868         (WebInspector.Resource.prototype.get content):
2869         (WebInspector.Resource.prototype.requestContent):
2870         (WebInspector.Resource.prototype._innerRequestContent):
2871         * inspector/front-end/ResourceManager.js:
2872         (WebInspector.ResourceManager.requestContent):
2873         * inspector/front-end/SourceView.js:
2874         (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded):
2875
2876 2010-11-03  Noam Rosenthal  <noam.rosenthal@nokia.com>
2877
2878         Reviewed by Kenneth Rohde Christiansen.
2879
2880         [Qt] GraphicsLayer: support tiling
2881         https://bugs.webkit.org/show_bug.cgi?id=39691
2882
2883         Add support for TiledBackingStore in GraphicsLayerQt, when a layer is too large.
2884
2885         No new tests. Tests in LayoutTests/compositing/tiling now work with OpenGL enabled.
2886
2887         * platform/graphics/qt/GraphicsLayerQt.cpp:
2888         (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl):
2889         (WebCore::GraphicsLayerQtImpl::~GraphicsLayerQtImpl):
2890         (WebCore::GraphicsLayerQtImpl::recache):
2891         (WebCore::GraphicsLayerQtImpl::paint):
2892         (WebCore::GraphicsLayerQtImpl::tiledBackingStorePaintBegin):
2893         (WebCore::GraphicsLayerQtImpl::tiledBackingStorePaint):
2894         (WebCore::GraphicsLayerQtImpl::tiledBackingStorePaintEnd):
2895         (WebCore::GraphicsLayerQtImpl::tiledBackingStoreContentsRect):
2896         (WebCore::GraphicsLayerQtImpl::tiledBackingStoreBackgroundColor):
2897         (WebCore::GraphicsLayerQtImpl::tiledBackingStoreVisibleRect):
2898
2899 2010-11-03  Tony Chang  <tony@chromium.org>
2900
2901         Reviewed by Ojan Vafai.
2902
2903         Undo r54932 which inappropriately adjusts font sizes on zoomed pages
2904         https://bugs.webkit.org/show_bug.cgi?id=48890
2905
2906         Test: editing/inserting/page-zoom-font-size.html
2907
2908         * editing/ReplaceSelectionCommand.cpp:
2909         (WebCore::ReplaceSelectionCommand::negateStyleRulesThatAffectAppearance):
2910
2911 2010-11-03  Dan Bernstein  <mitz@apple.com>
2912
2913         Reviewed by Dave Hyatt.
2914
2915         Make collapsed borders in tables work with different block flows
2916         https://bugs.webkit.org/show_bug.cgi?id=46191
2917
2918         No new tests since tables don’t support different block flows yet.
2919
2920         This change still doesn’t support cells whose block flow differs from the table’s.
2921
2922         * rendering/AutoTableLayout.cpp:
2923         (WebCore::AutoTableLayout::recalcColumn): Updated for the renaming of styleOrColWidth().
2924         (WebCore::AutoTableLayout::calcEffectiveWidth): Ditto.
2925         * rendering/FixedTableLayout.cpp:
2926         (WebCore::FixedTableLayout::calcWidthArray): Ditto.
2927         * rendering/RenderBlock.cpp:
2928         (WebCore::RenderBlock::computePreferredLogicalWidths): Ditto.
2929         * rendering/RenderTableCell.cpp:
2930         (WebCore::RenderTableCell::styleOrColLogicalWidth): Renamed styleOrColWidth() to this and
2931         changed to use logical widths.
2932         (WebCore::RenderTableCell::computePreferredLogicalWidths): Updated for the above rename.
2933         (WebCore::RenderTableCell::updateLogicalWidth): Renamed updateWidth() to this and changed
2934         to set the logical width.
2935         (WebCore::RenderTableCell::collapsedStartBorder): Changed collapsedLeftBorder() into this.
2936         Note that “start” here will refer to the table’s block flow, not the cell’s, once we allow
2937         the two to differ.
2938         (WebCore::RenderTableCell::collapsedEndBorder): Similar.
2939         (WebCore::RenderTableCell::collapsedBeforeBorder): Similar.
2940         (WebCore::RenderTableCell::collapsedAfterBorder): Similar.
2941         (WebCore::RenderTableCell::collapsedLeftBorder): Resolves “left” to a logical side using
2942         the table’s block flow.
2943         (WebCore::RenderTableCell::collapsedRightBorder): Similar.
2944         (WebCore::RenderTableCell::collapsedTopBorder): Similar.
2945         (WebCore::RenderTableCell::collapsedBottomBorder): Similar.
2946         (WebCore::RenderTableCell::borderStart): Use borderHalfStart().
2947         (WebCore::RenderTableCell::borderEnd): Similar.
2948         (WebCore::RenderTableCell::borderBefore): Similar.
2949         (WebCore::RenderTableCell::borderAfter): Similar.
2950         (WebCore::RenderTableCell::borderHalfLeft): Resolves “left” to a logical side using the
2951         table’s block flow.
2952         (WebCore::RenderTableCell::borderHalfRight): Similar.
2953         (WebCore::RenderTableCell::borderHalfTop): Similar.
2954         (WebCore::RenderTableCell::borderHalfBottom): Similar.
2955         (WebCore::RenderTableCell::borderHalfStart): Added. Uses collapsedStartBorder(). Splits odd
2956         widths based on physical side.
2957         (WebCore::RenderTableCell::borderHalfEnd): Similar.
2958         (WebCore::RenderTableCell::borderHalfBefore): Similar.
2959         (WebCore::RenderTableCell::borderHalfAfter): Similar.
2960         (WebCore::RenderTableCell::collectBorderStyles): Use logical methods.
2961         (WebCore::RenderTableCell::paintCollapsedBorder): Updated.
2962         * rendering/RenderTableCell.h:
2963         * rendering/RenderTableSection.cpp:
2964         (WebCore::RenderTableSection::setCellWidths): Updated for the renaming of updateWidth().
2965         * rendering/style/RenderStyle.cpp:
2966         (WebCore::RenderStyle::borderBefore): Added.
2967         (WebCore::RenderStyle::borderAfter): Added.
2968         (WebCore::RenderStyle::borderStart): Added.
2969         (WebCore::RenderStyle::borderEnd): Adeed.
2970         * rendering/style/RenderStyle.h:
2971
2972 2010-11-03  Dimitri Glazkov  <dglazkov@chromium.org>
2973
2974         Fix Win build correctly after r71244 and r71248
2975
2976         * WebCore.vcproj/WebCore.vcproj: Added XML gobbledygook back.
2977         * dom/DOMAllInOne.cpp: Added files to build into a combined file.
2978
2979 2010-11-03  Dimitri Glazkov  <dglazkov@chromium.org>
2980
2981         Fix Qt, Win builds after r71244.
2982
2983         * WebCore.vcproj/WebCore.vcproj: Removed XML gobbledygook that prevents files from building.
2984         * dom/Text.cpp:
2985         (WebCore::Text::createRenderer): Moved parentOrHost inside ENABLE(SVG) guard.
2986
2987 2010-11-03  David Hyatt  <hyatt@apple.com>
2988
2989         Reviewed by Dan Bernstein.
2990
2991         https://bugs.webkit.org/show_bug.cgi?id=48928
2992         
2993         Rename all the selection gap functions to not be directionally specific.  Left and Right turn into LogicalLeft and
2994         LogicalRight.  Horizontal becomes Line.  Vertical becomes Block.
2995
2996         * rendering/RenderBlock.cpp:
2997         (WebCore::RenderBlock::selectionGapRectsForRepaint):
2998         (WebCore::RenderBlock::paintSelection):
2999         (WebCore::RenderBlock::fillSelectionGaps):
3000         (WebCore::RenderBlock::fillInlineSelectionGaps):
3001         (WebCore::RenderBlock::fillBlockSelectionGaps):
3002         (WebCore::RenderBlock::fillLineSelectionGap):
3003         (WebCore::RenderBlock::fillBlockSelectionGap):
3004         (WebCore::RenderBlock::fillLogicalLeftSelectionGap):
3005         (WebCore::RenderBlock::fillLogicalRightSelectionGap):
3006         (WebCore::RenderBlock::getSelectionGapInfo):
3007         (WebCore::RenderBlock::logicalLeftSelectionOffset):
3008         (WebCore::RenderBlock::logicalRightSelectionOffset):
3009         * rendering/RenderBlock.h:
3010         * rendering/RootInlineBox.cpp:
3011         (WebCore::RootInlineBox::fillLineSelectionGap):
3012
3013 2010-11-03  Dimitri Glazkov  <dglazkov@chromium.org>
3014
3015         Reviewed by Darin Adler.
3016
3017         Implement shadow DOM-aware event targeting and introduce EventContext to track the context of each event dispatch.
3018         https://bugs.webkit.org/show_bug.cgi?id=46015
3019
3020         This patch adds the notion of EventContext (and a very similar-acting WindowEventContext, specifically
3021         for DOMWindow), an abstraction that carries information around dispatching an event for any given Node.
3022
3023         This abstraction is necessary to ensure that events, fired from shadow DOM nodes are properly retargeted to
3024         appear as if they are coming from their host, thus never exposing the shadow DOM nodes to the world outside.
3025
3026         * Android.mk: Added EventContext, WindowEventContext files.
3027         * CMakeLists.txt: Ditto.
3028         * GNUmakefile.am: Ditto.
3029         * WebCore.gypi: Ditto.
3030         * WebCore.pro: Ditto.
3031         * WebCore.xcodeproj/project.pbxproj: Ditto.
3032         * WebCore.vcproj/WebCore.vcproj: Ditto.
3033         * dom/ContainerNode.cpp:
3034         (WebCore::notifyChildInserted): Changed to be shadow DOM-aware.
3035         * dom/EventContext.cpp: Added.
3036         * dom/EventContext.h: Added.
3037         * dom/Node.cpp:
3038         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc): Changed to be shadow DOM-aware.
3039         (WebCore::Node::createRendererIfNeeded): Ditto.
3040         (WebCore::Node::parentOrHostNode): Added new helper method.
3041         (WebCore::Node::enclosingLinkEventParentOrSelf): Changed to be shadow DOM-aware.
3042         (WebCore::eventTargetRespectingSVGTargetRules): Collapsed two helper methods into one.
3043         (WebCore::Node::eventAncestors): Refactored to collect a vector of EventContexts.
3044         (WebCore::Node::topEventContext): Added.
3045         (WebCore::eventHasListeners): Changed to use EventContexts.
3046         (WebCore::Node::dispatchGenericEvent): Ditto.
3047         * dom/Node.h: Removed eventParentNode that's no longer needed, added parentOrHostNode decl,
3048             and changed signature of eventAncestors to use EventContexts.
3049         * dom/Text.cpp:
3050         (WebCore::Text::createRenderer): Changed to be shadow DOM-aware.
3051         * inspector/InspectorDOMAgent.cpp:
3052         (WebCore::InspectorDOMAgent::getEventListenersForNode): Changed to use EventContexts.
3053         * page/EventHandler.cpp:
3054         (WebCore::EventHandler::updateMouseEventTargetNode): Removed code that's no longer necessary.
3055         * rendering/ShadowElement.h: Made m_shadowParent a RefPtr to avoid stale references when parent
3056         is deleted.
3057         * svg/SVGElement.cpp: Removed eventParentNode that's no longer needed.
3058         * svg/SVGElement.h: Ditto.
3059         * dom/WindowEventContext.cpp: Added.
3060         * dom/WindowEventContext.h: Added.
3061
3062 2010-11-02  Mikhail Naganov  <mnaganov@chromium.org>
3063
3064         Reviewed by Pavel Feldman.
3065
3066         Web Inspector: Fix console messages about starting and finishing profiling.
3067
3068         https://bugs.webkit.org/show_bug.cgi?id=48825
3069
3070         * inspector/InspectorProfilerAgent.cpp:
3071         (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
3072         * inspector/front-end/ProfilesPanel.js:
3073         (WebInspector.ProfilesPanel.prototype.displayTitleForProfileLink):
3074
3075 2010-11-03  Nikolas Zimmermann  <nzimmermann@rim.com>
3076
3077         Reviewed by Andreas Kling.
3078
3079         chrome.dll!WebCore::SVGLength::SVGLength ...
3080         https://bugs.webkit.org/show_bug.cgi?id=48831
3081
3082         Test: svg/dom/baseVal-animVal-crash.html
3083
3084         * svg/properties/SVGListPropertyTearOff.h:
3085         (WebCore::SVGListPropertyTearOff::initialize): Renamed removeItemFromListIfNeeded to processIncomingListItem, to reflect its new job.
3086         (WebCore::SVGListPropertyTearOff::insertItemBefore): Ditto.
3087         (WebCore::SVGListPropertyTearOff::replaceItem): Ditto.
3088         (WebCore::SVGListPropertyTearOff::appendItem): Ditto.
3089         (WebCore::SVGListPropertyTearOff::processIncomingListItem): Copy incoming item, if necessary, see inline comments.
3090         * svg/properties/SVGPropertyTearOff.h:
3091         (WebCore::SVGPropertyTearOff::detachWrapper): Remove association with SVGAnimatedProperty, when wrapper is detached.
3092
3093 2010-11-03  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3094
3095         Reviewed by Andreas Kling.
3096
3097         Make it possible to delegate scrolling to the UI
3098         https://bugs.webkit.org/show_bug.cgi?id=48907
3099
3100         Add a WebCore setting for delegating scrolling to the actual
3101         WebKit view, which means that setScrollPosition will call
3102         scrollContents directly without going though the scrollbar
3103         code.
3104
3105         * page/FrameView.cpp:
3106         (WebCore::FrameView::delegatesScrolling):
3107         * page/FrameView.h:
3108         * page/Settings.cpp:
3109         (WebCore::Settings::Settings):
3110         (WebCore::Settings::setShouldDelegateScrolling):
3111         * page/Settings.h:
3112         (WebCore::Settings::shouldDelegateScrolling):
3113         * platform/ScrollView.cpp:
3114         (WebCore::ScrollView::setScrollPosition):
3115         * platform/ScrollView.h:
3116         (WebCore::ScrollView::delegatesScrolling):
3117
3118 2010-11-03  Patrick Gansterer  <paroga@webkit.org>
3119
3120         Reviewed by Adam Roben.
3121
3122         [WINCE] Add SharedBitmap
3123         https://bugs.webkit.org/show_bug.cgi?id=28272
3124
3125         SharedBitmap is a helper class used as NativeImagePtr for WinCE.
3126         It's wide used by WinCE graphics files as a replacement of HBITMAP.
3127
3128         Originally written by Yong Li <yong.li@torchmobile.com>.
3129
3130         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3131         (WebCore::TransparentLayerDC::TransparentLayerDC):
3132         (WebCore::TransparentLayerDC::~TransparentLayerDC):
3133         (WebCore::ScopeDCProvider::ScopeDCProvider):
3134         (WebCore::ScopeDCProvider::~ScopeDCProvider):
3135         (WebCore::GraphicsContext::drawText):
3136         * platform/graphics/wince/SharedBitmap.cpp: Added.
3137         (WebCore::SharedBitmap::create):
3138         (WebCore::SharedBitmap::SharedBitmap):
3139         (WebCore::SharedBitmap::~SharedBitmap):
3140         (WebCore::SharedBitmap::resetPixels):
3141         (WebCore::convert32To16):
3142         (WebCore::SharedBitmap::to16bit):
3143         (WebCore::SharedBitmap::freeMemory):
3144         (WebCore::SharedBitmap::createHandle):
3145         (WebCore::SharedBitmap::ensureHandle):
3146         (WebCore::SharedBitmap::draw):
3147         (WebCore::SharedBitmap::clipBitmap):
3148         (WebCore::drawPatternSimple):
3149         (WebCore::normalizePhase):
3150         (WebCore::SharedBitmap::drawPattern):
3151         (WebCore::SharedBitmap::DCProvider::getDC):
3152         (WebCore::SharedBitmap::DCProvider::releaseDC):
3153         (WebCore::SharedBitmap::clearPixels):
3154         * platform/graphics/wince/SharedBitmap.h: Added.
3155         (WebCore::DCProvider::getDC):
3156         (WebCore::DCProvider::releaseDC):
3157         (WebCore::DCProvider::DCHolder::DCHolder):
3158         (WebCore::DCProvider::DCHolder::~DCHolder):
3159         (WebCore::DCProvider::DCHolder::set):
3160         (WebCore::DCProvider::DCHolder::get):
3161         (WebCore::DCProvider::DCHolder::clearInternal):
3162         (WebCore::DCProvider::DCHolder::setInternal):
3163
3164 2010-11-03  Nikolas Zimmermann  <nzimmermann@rim.com>
3165
3166         Reviewed by Dirk Schulze.
3167
3168         chrome.dll!WebCore::SVGListPropertyTearOff<...>::getItem ReadAV@NULL (578c0f7f21ca517ba29a4eafb7099c1b)
3169         https://bugs.webkit.org/show_bug.cgi?id=48829
3170
3171         Share SVGPropertyTearOff wrapper cache between SVGAnimatedListPropertyTearOff::baseVal/animVal.
3172         When modifying the list through baseVal, and then grabbing the animVal list an assertion was fired,
3173         as the wrapper cache was out of sync with the underlying SVG*List vector.
3174
3175         Test: svg/dom/baseVal-animVal-list-crash.html
3176
3177         * svg/properties/SVGAnimatedListPropertyTearOff.h:
3178         (WebCore::SVGAnimatedListPropertyTearOff::baseVal):
3179         (WebCore::SVGAnimatedListPropertyTearOff::animVal):
3180         (WebCore::SVGAnimatedListPropertyTearOff::removeItemFromList):
3181         (WebCore::SVGAnimatedListPropertyTearOff::detachListWrappers):
3182         (WebCore::SVGAnimatedListPropertyTearOff::values):
3183         (WebCore::SVGAnimatedListPropertyTearOff::wrappers):
3184         (WebCore::SVGAnimatedListPropertyTearOff::create):
3185         (WebCore::SVGAnimatedListPropertyTearOff::SVGAnimatedListPropertyTearOff):
3186         * svg/properties/SVGListPropertyTearOff.h:
3187         (WebCore::SVGListPropertyTearOff::create):
3188         (WebCore::SVGListPropertyTearOff::removeItemFromList):
3189         (WebCore::SVGListPropertyTearOff::clear):
3190         (WebCore::SVGListPropertyTearOff::numberOfItems):
3191         (WebCore::SVGListPropertyTearOff::initialize):
3192         (WebCore::SVGListPropertyTearOff::getItem):
3193         (WebCore::SVGListPropertyTearOff::insertItemBefore):
3194         (WebCore::SVGListPropertyTearOff::replaceItem):
3195         (WebCore::SVGListPropertyTearOff::removeItem):
3196         (WebCore::SVGListPropertyTearOff::appendItem):
3197         (WebCore::SVGListPropertyTearOff::SVGListPropertyTearOff):
3198         (WebCore::SVGListPropertyTearOff::commitChange):
3199
3200 2010-11-02  Ilya Tikhonovsky  <loislo@chromium.org>
3201
3202         Reviewed by Pavel Feldman.
3203
3204         Web Inspector: Remove obsolete code.
3205         It is not required to push onload and DOMContentLoaded events times to the fresh instance of Inspector.
3206         Network Panel is showing the markers only after reloading the inspected page.
3207         https://bugs.webkit.org/show_bug.cgi?id=48854
3208
3209         * inspector/InspectorController.cpp:
3210         (WebCore::InspectorController::InspectorController):
3211         (WebCore::InspectorController::populateScriptObjects):
3212         (WebCore::InspectorController::mainResourceFiredDOMContentEvent):
3213         (WebCore::InspectorController::mainResourceFiredLoadEvent):
3214         * inspector/InspectorController.h:
3215
3216 2010-11-03  Pavel Feldman  <pfeldman@chromium.org>
3217
3218         Reviewed by Jeremy Orlow.
3219
3220         Web Inspector: brush up breakpoints UI and UX.
3221         https://bugs.webkit.org/show_bug.cgi?id=48901
3222
3223         * inspector/front-end/BreakpointManager.js:
3224         (WebInspector.DOMBreakpoint.prototype.populateLabelElement):
3225         (WebInspector.XHRBreakpoint.prototype.populateLabelElement):
3226         * inspector/front-end/BreakpointsSidebarPane.js:
3227         (WebInspector.BreakpointsSidebarPane.prototype.addBreakpointItem):
3228         (WebInspector.XHRBreakpointsSidebarPane.prototype.addBreakpointItem):
3229         (WebInspector.XHRBreakpointsSidebarPane.prototype._hideEditBreakpointDialog):
3230         (WebInspector.BreakpointItem):
3231         * inspector/front-end/ElementsTreeOutline.js:
3232         (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu.handlerFunction):
3233         (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
3234         * inspector/front-end/PropertiesSection.js:
3235         (WebInspector.PropertiesSection):
3236         * inspector/front-end/inspector.css:
3237         (.monospace):
3238         (body.platform-mac.platform-mac-snowleopard .source-code):
3239         (body.platform-windows .monospace, body.platform-windows .source-code):
3240         (body.platform-linux .monospace, body.platform-linux .source-code):
3241         (.source-code):
3242         (.section .header):
3243         (.section .header::before):
3244         (.section .header .title, .event-bar .header .title):
3245         (.section .header .subtitle, .event-bar .header .subtitle):
3246         (.section.expanded .properties, .event-bar.expanded .event-properties):
3247         (.event-listener-breakpoints .event-category):
3248         (.event-listener-breakpoints.properties-tree .children li):
3249         (.event-listener-breakpoints .checkbox-elem):
3250         (.event-bar):
3251         (.event-bars .event-bar .header .title):
3252         (.event-bars .event-bar .header::before):
3253         (.pane > .body .info):
3254         (.pane > .body .placard + .info):
3255         (ol.breakpoint-list):
3256         (.breakpoint-list li):
3257         (.pane .breakpoint-hit):
3258         (.cursor-pointer):
3259         (.cursor-auto):
3260
3261 2010-11-03  Nikolas Zimmermann  <nzimmermann@rim.com>
3262
3263         Not reviewed.
3264
3265         Convert SVGAnimatedString/SVGStringList to the new SVG*PropertyTearOff concept
3266         https://bugs.webkit.org/show_bug.cgi?id=48898
3267
3268         Fix Chromium/V8 build for real, verified using a local ToT Chromium build.
3269
3270         * bindings/scripts/CodeGeneratorV8.pm:
3271
3272 2010-11-03  Nikolas Zimmermann  <nzimmermann@rim.com>
3273
3274         Not reviewed.
3275
3276         Convert SVGAnimatedString/SVGStringList to the new SVG*PropertyTearOff concept
3277         https://bugs.webkit.org/show_bug.cgi?id=48898
3278
3279         Next attempt to fix the Chromium/V8 builds - a class forward in the headers was still missing.
3280
3281         * bindings/scripts/CodeGeneratorV8.pm: Add SVGStringListPropertyTearOff in the V8SVGStringList header.
3282
3283 2010-11-03  Nikolas Zimmermann  <nzimmermann@rim.com>
3284
3285         Not reviewed.
3286
3287         Convert SVGAnimatedString/SVGStringList to the new SVG*PropertyTearOff concept
3288         https://bugs.webkit.org/show_bug.cgi?id=48898
3289
3290         Attempt to fix the Chromium/V8 builds.
3291
3292         * bindings/scripts/CodeGeneratorV8.pm: Add missing "SVGStringListPropertyTearOff.h" include, also replaces some commas by semicolons (no idea why it worked before, Perl is not strict...)
3293
3294 2010-11-03  Nikolas Zimmermann  <nzimmermann@rim.com>
3295
3296         Reviewed by Dirk Schulze.
3297
3298         Convert SVGAnimatedString/SVGStringList to the new SVG*PropertyTearOff concept
3299         https://bugs.webkit.org/show_bug.cgi?id=48898
3300
3301         Convert SVGAnimatedString/SVGStringList to the new svg animated type concept.
3302         SVGStringList is special compared to all other SVG*Lists, as it returns non-live elements.
3303         That means myStringList.getItem(0) = 'foobar' doesn't take effect.
3304
3305         When appending an item to a SVGStringList, that has been taken from another list, it's not removed from the list origin.
3306         That demanded a new SVGStringListPropertyTearOff which does just that.
3307
3308         Tests: svg/W3C-SVG-1.1-SE/types-dom-06-f.svg
3309                svg/dom/SVGStringList.html
3310
3311         * GNUmakefile.am: Add SVGAnimatedString.h / SVGStringListPropertyTearOff.h to build.
3312         * WebCore.gypi: Ditto.
3313         * WebCore.pro: Ditto.
3314         * WebCore.vcproj/WebCore.vcproj: Ditto.
3315         * WebCore.xcodeproj/project.pbxproj: Ditto.
3316         * bindings/scripts/CodeGenerator.pm: Recognize SVGAnimatedString as new style svg animated type. Map SVGStringList to SVGStringListPropertyTearOff.
3317         * bindings/scripts/CodeGeneratorJS.pm: Handle SVGStringListPropertyTearOff in GetSVGPropertyTypes.
3318         * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
3319         * bindings/scripts/CodeGeneratorV8.pm: Ditto.
3320         * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGAnimatedString handling.
3321         * svg/DeprecatedSVGAnimatedTemplate.h: Ditto.
3322         * svg/SVGAElement.cpp: Renamed target to svgTarget() to avoid clashes with Element::target(), adjust the bindings to call svgTarget() instead of target(), when processing SVGAElement.
3323         (WebCore::SVGAElement::parseMappedAttribute):
3324         (WebCore::SVGAElement::synchronizeProperty):
3325         * svg/SVGAElement.h:
3326         * svg/SVGAltGlyphElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
3327         * svg/SVGAnimatedString.h: Added.
3328         * svg/SVGCursorElement.h: Ditto.
3329         * svg/SVGFEBlendElement.h: Ditto.
3330         * svg/SVGFEColorMatrixElement.h: Ditto.
3331         * svg/SVGFEComponentTransferElement.h: Ditto.
3332         * svg/SVGFECompositeElement.h: Ditto.
3333         * svg/SVGFEConvolveMatrixElement.h: Ditto.
3334         * svg/SVGFEDiffuseLightingElement.h: Ditto.
3335         * svg/SVGFEDisplacementMapElement.h: Ditto.
3336         * svg/SVGFEGaussianBlurElement.h: Ditto.
3337         * svg/SVGFEImageElement.h: Ditto.
3338         * svg/SVGFEMergeNodeElement.h: Ditto.
3339         * svg/SVGFEMorphologyElement.h: Ditto.
3340         * svg/SVGFEOffsetElement.h: Ditto.
3341         * svg/SVGFESpecularLightingElement.h: Ditto.
3342         * svg/SVGFETileElement.h: Ditto.
3343         * svg/SVGFilterElement.h: Ditto.
3344         * svg/SVGFilterPrimitiveStandardAttributes.h: Ditto.
3345         * svg/SVGForeignObjectElement.h: Ditto.
3346         * svg/SVGGradientElement.h: Ditto.
3347         * svg/SVGImageElement.h: Ditto. 
3348         * svg/SVGLengthList.idl: Remove leftover SVGListProperty marker.
3349         * svg/SVGMPathElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
3350         * svg/SVGPatternElement.h: Ditto.
3351         * svg/SVGScriptElement.h: Ditto.
3352         * svg/SVGStringList.cpp: Make SVGStringList a plain Vector<String>.
3353         (WebCore::SVGStringList::commitChange): React to SVGStringList changes.
3354         (WebCore::SVGStringList::reset):
3355         (WebCore::SVGStringList::parse):
3356         * svg/SVGStringList.h:
3357         (WebCore::SVGStringList::SVGStringList):
3358         * svg/SVGStyledElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
3359         * svg/SVGTRefElement.h: Ditto.
3360         * svg/SVGTests.cpp: Adapt to SVGStringList API changes.
3361         (WebCore::SVGTests::SVGTests):
3362         (WebCore::SVGTests::hasExtension):
3363         (WebCore::SVGTests::isValid):
3364         (WebCore::SVGTests::parseMappedAttribute):
3365         (WebCore::SVGTests::isKnownAttribute):
3366         * svg/SVGTests.h: Ditto.
3367         (WebCore::SVGTests::requiredFeatures):
3368         (WebCore::SVGTests::requiredExtensions):
3369         (WebCore::SVGTests::systemLanguage):
3370         * svg/SVGTextPathElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
3371         * svg/SVGURIReference.h: Adapt to SVGStringList API changes.
3372         (WebCore::SVGURIReference::~SVGURIReference):
3373         * svg/SVGUseElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
3374         * svg/SVGViewElement.cpp: Adapt to SVGStringList API changes.
3375         (WebCore::SVGViewElement::SVGViewElement):
3376         (WebCore::SVGViewElement::parseMappedAttribute):
3377         * svg/SVGViewElement.h: Ditto.
3378         (WebCore::SVGViewElement::viewTarget):
3379         * svg/properties/SVGAnimatedPropertyMacros.h: Moved GetOwnerElementForType heleprs from SVGAnimatedPropertySynchronizer into this file.
3380         * svg/properties/SVGAnimatedPropertySynchronizer.h: 
3381         * svg/properties/SVGPropertyTraits.h: Handle SVGStringList.
3382         * svg/properties/SVGStringListPropertyTearOff.h: Added. This is a simplified version of SVGListPropertyTearOff, tied to SVGStringList and its special demands.
3383         (WebCore::SVGStringListPropertyTearOff::create):
3384         (WebCore::SVGStringListPropertyTearOff::clear):
3385         (WebCore::SVGStringListPropertyTearOff::numberOfItems):
3386         (WebCore::SVGStringListPropertyTearOff::initialize):
3387         (WebCore::SVGStringListPropertyTearOff::getItem):
3388         (WebCore::SVGStringListPropertyTearOff::insertItemBefore):
3389         (WebCore::SVGStringListPropertyTearOff::replaceItem):
3390         (WebCore::SVGStringListPropertyTearOff::removeItem):
3391         (WebCore::SVGStringListPropertyTearOff::appendItem):
3392         (WebCore::SVGStringListPropertyTearOff::SVGStringListPropertyTearOff):
3393
3394 2010-11-03  Zoltan Herczeg  <zherczeg@webkit.org>
3395
3396         Reviewed by Dirk Schulze.
3397
3398         SVG FELighting performance issues
3399         https://bugs.webkit.org/show_bug.cgi?id=48212
3400
3401         This patch speeds-up FELighting filter painting by 40%
3402         It reduces the number of floating point operations and
3403         empolys faster pixel manipulation (both for read and
3404         write). Furthermore the length() member of FloatPoint3D
3405         is made inline to speed up vector length calculations.
3406
3407         The lighting filter pixels tests are cover this patch.
3408
3409         * platform/graphics/FloatPoint3D.cpp:
3410         * platform/graphics/FloatPoint3D.h:
3411         (WebCore::FloatPoint3D::length):
3412         * platform/graphics/filters/FELighting.cpp:
3413         (WebCore::FELighting::LightingData::topLeft):
3414         (WebCore::FELighting::LightingData::topRow):
3415         (WebCore::FELighting::LightingData::topRight):
3416         (WebCore::FELighting::LightingData::leftColumn):
3417         (WebCore::FELighting::LightingData::interior):
3418         (WebCore::FELighting::LightingData::rightColumn):
3419         (WebCore::FELighting::LightingData::bottomLeft):
3420         (WebCore::FELighting::LightingData::bottomRow):
3421         (WebCore::FELighting::LightingData::bottomRight):
3422         (WebCore::FELighting::inlineSetPixel):
3423         (WebCore::FELighting::setPixel):
3424         (WebCore::FELighting::drawLighting):
3425         (WebCore::FELighting::apply):
3426         * platform/graphics/filters/FELighting.h:
3427         * platform/graphics/filters/LightSource.cpp:
3428         (WebCore::PointLightSource::updatePaintingData):
3429         (WebCore::SpotLightSource::updatePaintingData):
3430         (WebCore::DistantLightSource::initPaintingData):
3431         * platform/graphics/filters/LightSource.h:
3432
3433 2010-11-03  Daniel Bates  <dbates@rim.com>
3434
3435         Reviewed by Adam Barth.
3436
3437         For unnamed frames, window.name returns a generated name
3438         https://bugs.webkit.org/show_bug.cgi?id=6751
3439
3440         Part 2 of 2.
3441
3442         Fixes an issue where the window.name of an unnamed frame returns
3443         a unique generated name that is used internally to identify the
3444         frame. Instead, we should return an empty string as implied by
3445         section 5.1.6 of the HTML5 spec. (http://www.w3.org/TR/html5/browsers.html#browsing-context-names).
3446         This section describes that a browsing context can have no name or be
3447         the empty string.
3448
3449         * html/HTMLFrameElementBase.cpp:
3450         (WebCore::HTMLFrameElementBase::openURL): Removed ASSERT for empty
3451         frame name since this is valid as per the HTML5 spec.
3452         (WebCore::HTMLFrameElementBase::setName): Removed the call to FrameTree::uniqueChildName()
3453         since the loader code no longer depends on the frame name being unique.
3454         * page/DOMWindow.cpp:
3455         (WebCore::DOMWindow::name): Modified to call FrameTree::name().
3456         * page/FrameTree.cpp:
3457         (WebCore::FrameTree::setName):
3458         (WebCore::FrameTree::clearName):
3459         * page/FrameTree.h:
3460         (WebCore::FrameTree::name): Re-added; returns the DOM-specified name of the
3461         frame. Previously, this method returned the internal frame name.
3462
3463 2010-11-03  takano takumi  <takano1@asia.apple.com>
3464
3465         Reviewed by Dan Bernstein.
3466
3467         Add text-combine property to our property list. Reflect the setting to a RenderStyle object.
3468         https://bugs.webkit.org/show_bug.cgi?id=48608
3469
3470         Test: fast/text/international/text-combine-parser-test.html
3471
3472         * css/CSSComputedStyleDeclaration.cpp: Added text-combine property support.
3473         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3474         * css/CSSParser.cpp: Added text-combine property support.
3475         (WebCore::CSSParser::parseValue):
3476         * css/CSSPrimitiveValueMappings.h: Added a primitive value mapper for text-combine
3477         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3478         (WebCore::CSSPrimitiveValue::operator TextCombine):
3479         * css/CSSPropertyNames.in: Added "text-combine".
3480         * css/CSSStyleSelector.cpp: Added text-combine property support.
3481         (WebCore::CSSStyleSelector::applyProperty):
3482         * css/CSSValueKeywords.in: Added values for text-combine.
3483         * rendering/style/RenderStyle.cpp:
3484         (WebCore::RenderStyle::diff): Added check of text-combine value.
3485         * rendering/style/RenderStyle.h: Added accessors for text-combine.
3486         (WebCore::InheritedFlags::textCombine):
3487         (WebCore::InheritedFlags::setTextCombine):
3488         (WebCore::InheritedFlags::initialTextCombine):
3489         * rendering/style/RenderStyleConstants.h:
3490         * rendering/style/StyleRareNonInheritedData.cpp: Added text-combine property support.
3491         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3492         (WebCore::StyleRareNonInheritedData::operator==):
3493         * rendering/style/StyleRareNonInheritedData.h: Added text-combine entry for RenderStyle object here.
3494
3495 2010-11-02  Daniel Bates  <dbates@rim.com>
3496
3497         Reviewed by Adam Barth.
3498
3499         For unnamed frames, window.name returns a generated name
3500         https://bugs.webkit.org/show_bug.cgi?id=6751
3501
3502         Part 1 of 2.
3503
3504         Towards fixing bug #6751, rename FrameTree::name() to FrameTree::uniqueName(),
3505         which is more descriptive of its purpose. A follow up patch will re-add
3506         FrameTree::name() which will return the DOM-specified name of the frame.
3507
3508         We will also take this opportunity to verify that we have found all the
3509         call sites of FrameTree::name().
3510
3511         * loader/DocumentLoader.cpp:
3512         (WebCore::DocumentLoader::mainResource): Use FrameTree::uniqueName().
3513         * loader/FrameLoader.cpp:
3514         (WebCore::FrameLoader::loadURLIntoChildFrame): Ditto.
3515         (WebCore::FrameLoader::commitProvisionalLoad): Ditto.
3516         * loader/HistoryController.cpp:
3517         (WebCore::HistoryController::saveDocumentState): Ditto.
3518         (WebCore::HistoryController::restoreDocumentState): Ditto.
3519         (WebCore::HistoryController::createItem): Ditto.
3520         (WebCore::HistoryController::currentFramesMatchItem): Ditto.
3521         * loader/ProgressTracker.cpp:
3522         (WebCore::ProgressTracker::progressStarted): Ditto.
3523         (WebCore::ProgressTracker::progressCompleted): Ditto.
3524         * loader/archive/cf/LegacyWebArchive.cpp:
3525         (WebCore::LegacyWebArchive::create): Ditto.
3526         * page/DOMWindow.cpp:
3527         (WebCore::DOMWindow::name): Ditto.
3528         * page/FrameTree.cpp:
3529         (WebCore::FrameTree::setName): Ditto.
3530         (WebCore::FrameTree::clearName): Ditto.
3531         (WebCore::FrameTree::uniqueChildName): Ditto.
3532         (WebCore::FrameTree::child): Ditto.
3533         (WebCore::FrameTree::find): Ditto.
3534         * page/FrameTree.h:
3535         (WebCore::FrameTree::uniqueName): Renamed (formerly FrameTree::name()).
3536
3537 2010-11-02  Chris Rogers  <crogers@google.com>
3538
3539         Reviewed by James Robinson.
3540
3541         Add AudioProcessingEvent files
3542         https://bugs.webkit.org/show_bug.cgi?id=48884
3543
3544         No new tests since audio API is not yet implemented.
3545
3546         * webaudio/AudioProcessingEvent.cpp: Added.
3547         (WebCore::AudioProcessingEvent::create):
3548         (WebCore::AudioProcessingEvent::AudioProcessingEvent):
3549         (WebCore::AudioProcessingEvent::~AudioProcessingEvent):
3550         (WebCore::AudioProcessingEvent::isAudioProcessingEvent):
3551         * webaudio/AudioProcessingEvent.h: Added.
3552         (WebCore::AudioProcessingEvent::inputBuffer):
3553         (WebCore::AudioProcessingEvent::outputBuffer):
3554         * webaudio/AudioProcessingEvent.idl: Added.
3555
3556 2010-11-02  Al Patrick  <apatrick@chromium.org>
3557
3558         Reviewed by Kenneth Russell.
3559
3560         Added PluginLayerChromium, which composites plugin instances that have an associated OpenGL backing texture.
3561
3562         https://bugs.webkit.org/show_bug.cgi?id=48032
3563
3564         * WebCore.gypi:
3565         * loader/SubframeLoader.cpp
3566         (WebCore::SubframeLoader::loadPlugin):
3567         * platform/graphics/chromium/LayerChromium.cpp:
3568         (WebCore::LayerChromium::setNeedsDisplay):
3569         * platform/graphics/chromium/LayerRendererChromium.cpp:
3570         (WebCore::LayerRendererChromium::initializeSharedObjects):
3571         (WebCore::LayerRendererChromium::cleanupSharedObjects):
3572         * platform/graphics/chromium/LayerRendererChromium.h:
3573         (WebCore::LayerRendererChromium::pluginLayerSharedValues):
3574         * platform/graphics/chromium/PluginLayerChromium.cpp: Added.
3575         (WebCore::PluginLayerChromium::SharedValues::SharedValues):
3576         (WebCore::PluginLayerChromium::SharedValues::~SharedValues):
3577         (WebCore::PluginLayerChromium::create):
3578         (WebCore::PluginLayerChromium::PluginLayerChromium):
3579         (WebCore::PluginLayerChromium::updateContents):
3580         (WebCore::PluginLayerChromium::draw):
3581         * platform/graphics/chromium/PluginLayerChromium.h: Added.
3582         (WebCore::PluginLayerChromium::drawsContent):
3583         (WebCore::PluginLayerChromium::setTextureId):
3584         (WebCore::PluginLayerChromium::SharedValues::shaderProgram):
3585         (WebCore::PluginLayerChromium::SharedValues::shaderSamplerLocation):
3586         (WebCore::PluginLayerChromium::SharedValues::shaderMatrixLocation):
3587         (WebCore::PluginLayerChromium::SharedValues::shaderAlphaLocation):
3588         (WebCore::PluginLayerChromium::SharedValues::initialized):
3589
3590 2010-11-02  James Simonsen  <simonjam@chromium.org>
3591
3592         Reviewed by Adam Barth.
3593
3594         mathml in html sometimes incorrectly parsed
3595         https://bugs.webkit.org/show_bug.cgi?id=48105
3596
3597         * html/parser/HTMLTreeBuilder.cpp:
3598         (WebCore::HTMLTreeBuilder::processEndTag): Fixed to match HTML5 spec.
3599
3600 2010-11-02  Chris Guillory  <chris.guillory@google.com>
3601
3602         Reviewed by Dmitry Titov.
3603
3604         Null check obj in AXObjectCache::postPlatformNotification.
3605         https://bugs.webkit.org/show_bug.cgi?id=48896
3606
3607         * accessibility/chromium/AXObjectCacheChromium.cpp:
3608         (WebCore::AXObjectCache::postPlatformNotification):
3609
3610 2010-11-02  Kavita Kanetkar  <kkanetkar@chromium.org>
3611
3612         Reviewed by Dumitru Daniliuc.
3613
3614         [FileSystem] Support not creating directories when queried by inspector.
3615         https://bugs.webkit.org/show_bug.cgi?id=48169
3616
3617         * fileapi/LocalFileSystem.cpp:
3618         (WebCore::openFileSystem):
3619         (WebCore::LocalFileSystem::readFileSystem):
3620         (WebCore::LocalFileSystem::requestFileSystem):
3621         * fileapi/LocalFileSystem.h:
3622         * platform/AsyncFileSystem.cpp:
3623         (WebCore::AsyncFileSystem::openFileSystem):
3624         * platform/AsyncFileSystem.h:
3625
3626 2010-11-02  Chris Rogers  <crogers@google.com>
3627
3628         Reviewed by Kenneth Russell.
3629
3630         Add AudioBufferSourceNode files
3631         https://bugs.webkit.org/show_bug.cgi?id=48012
3632
3633         No new tests since audio API is not yet implemented.
3634
3635         * webaudio/AudioBufferSourceNode.cpp: Added.
3636         (WebCore::AudioBufferSourceNode::create):
3637         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
3638         (WebCore::AudioBufferSourceNode::~AudioBufferSourceNode):
3639         (WebCore::AudioBufferSourceNode::process):
3640         (WebCore::AudioBufferSourceNode::provideInput):
3641         (WebCore::AudioBufferSourceNode::readFromBuffer):
3642         (WebCore::AudioBufferSourceNode::readFromBufferWithGrainEnvelope):
3643         (WebCore::AudioBufferSourceNode::reset):
3644         (WebCore::AudioBufferSourceNode::setBuffer):
3645         (WebCore::AudioBufferSourceNode::numberOfChannels):
3646         (WebCore::AudioBufferSourceNode::noteOn):
3647         (WebCore::AudioBufferSourceNode::noteGrainOn):
3648         (WebCore::AudioBufferSourceNode::noteOff):
3649         (WebCore::AudioBufferSourceNode::totalPitchRate):
3650         * webaudio/AudioBufferSourceNode.h: Added.
3651         (WebCore::AudioBufferSourceNode::buffer):
3652         (WebCore::AudioBufferSourceNode::looping):
3653         (WebCore::AudioBufferSourceNode::setLooping):
3654         (WebCore::AudioBufferSourceNode::gain):
3655         (WebCore::AudioBufferSourceNode::playbackRate):
3656         (WebCore::AudioBufferSourceNode::setPannerNode):
3657         * webaudio/AudioBufferSourceNode.idl: Added.
3658
3659 2010-11-02  Martin Robinson  <mrobinson@igalia.com>
3660
3661         Reviewed by Adam Barth.
3662
3663         [Cairo] Remove PlatformRefPtrCairo
3664         https://bugs.webkit.org/show_bug.cgi?id=48192
3665
3666         Replace PlatformRefPtrCairo with a RefPtr specialization for Cairo and
3667         Fontconfig types. This is the first step toward removing PlatformRefPtr,
3668         whose job is better handled by RefPtr.
3669
3670         * CMakeListsEfl.txt: Update the sources list to include RefPtrCairo
3671         instead of PlatformRefPtrCairo.
3672         * GNUmakefile.am: Ditto.
3673         * WebCore.vcproj/WebCore.vcproj: Ditto.
3674         * platform/graphics/GraphicsContext.h: Replace PlatformRefPtrCairo with
3675         RefPtrCairo.
3676         * platform/graphics/cairo/CairoUtilities.cpp: Ditto.
3677         (WebCore::drawPatternToCairoContext): Ditto.
3678         * platform/graphics/cairo/FontCacheFreeType.cpp: Ditto.
3679         (WebCore::FontCache::getFontDataForCharacters): Ditto.
3680         (WebCore::FontCache::createFontPlatformData): Ditto.
3681         * platform/graphics/cairo/FontPlatformDataFreeType.cpp: Ditto.
3682         (WebCore::FontPlatformData::FontPlatformData): Ditto.
3683         (WebCore::FontPlatformData::initializeWithFontFace): Ditto.
3684         * platform/graphics/cairo/FontPlatformDataFreeType.h: Ditto.
3685         * platform/graphics/cairo/GraphicsContextCairo.cpp: Ditto.
3686         * platform/graphics/cairo/ImageCairo.cpp: Ditto.
3687         * platform/graphics/cairo/RefPtrCairo.cpp: Renamed from WebCore/platform/graphics/cairo/PlatformRefPtrCairo.cpp.
3688         (WTF::refIfNotNull): Added.
3689         (WTF::derefIfNotNull): Added.
3690         * platform/graphics/cairo/RefPtrCairo.h: Renamed from WebCore/platform/graphics/cairo/PlatformRefPtrCairo.h.
3691         * platform/gtk/CursorGtk.cpp: Replace PlatformRefPtrCairo with
3692         RefPtrCairo.
3693         (WebCore::createNamedCursor): Ditto.
3694         * platform/gtk/DragImageGtk.cpp: Ditto.
3695         (WebCore::scaleDragImage): Ditto.
3696         (WebCore::dissolveDragImageToFraction): Ditto.
3697         * plugins/gtk/PluginViewGtk.cpp: Ditto.
3698         (WebCore::PluginView::paint): Ditto.
3699
3700 2010-11-02  Chris Rogers  <crogers@google.com>
3701
3702         Reviewed by Kenneth Russell.
3703
3704         Simple followup changes to files affected by AudioNodeInput thread safety
3705         https://bugs.webkit.org/show_bug.cgi?id=48661
3706
3707         No new tests since audio API is not yet implemented.
3708
3709         * webaudio/AudioBasicProcessorNode.cpp:
3710         (WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput):
3711         * webaudio/AudioChannelSplitter.cpp:
3712         (WebCore::AudioChannelSplitter::process):
3713         * webaudio/AudioDestinationNode.cpp:
3714         (WebCore::AudioDestinationNode::initialize):
3715         (WebCore::AudioDestinationNode::uninitialize):
3716         (WebCore::AudioDestinationNode::provideInput):
3717         * webaudio/AudioGainNode.cpp:
3718         (WebCore::AudioGainNode::checkNumberOfChannelsForInput):
3719         * webaudio/AudioPannerNode.cpp:
3720         (WebCore::AudioPannerNode::notifyAudioSourcesConnectedToNode):
3721
3722 2010-11-02  Chris Guillory  <chris.guillory@google.com>
3723
3724         Reviewed by Chris Fleizach.
3725
3726         Chromium: Propagate a document value changed notification on scroll.
3727         https://bugs.webkit.org/show_bug.cgi?id=48817
3728
3729         * accessibility/AccessibilityObject.h:
3730         (WebCore::AccessibilityObject::isAccessibilityScrollbar):
3731         * accessibility/AccessibilityScrollbar.h:
3732         (WebCore::AccessibilityScrollbar::scrollbar):
3733         (WebCore::AccessibilityScrollbar::isAccessibilityScrollbar):
3734         * accessibility/chromium/AXObjectCacheChromium.cpp:
3735         (WebCore::AXObjectCache::postPlatformNotification):
3736
3737 2010-11-02  Chris Rogers  <crogers@google.com>
3738
3739         Reviewed by Kenneth Russell.
3740
3741         Add ConvolverNode files
3742         https://bugs.webkit.org/show_bug.cgi?id=47941
3743
3744         No new tests since audio API is not yet implemented.
3745
3746         * webaudio/ConvolverNode.cpp: Added.
3747         (WebCore::ConvolverNode::ConvolverNode):
3748         (WebCore::ConvolverNode::~ConvolverNode):
3749         (WebCore::ConvolverNode::process):
3750         (WebCore::ConvolverNode::reset):
3751         (WebCore::ConvolverNode::initialize):
3752         (WebCore::ConvolverNode::uninitialize):
3753         (WebCore::ConvolverNode::setBuffer):
3754         (WebCore::ConvolverNode::buffer):
3755         * webaudio/ConvolverNode.h: Added.
3756         (WebCore::ConvolverNode::create):
3757         * webaudio/ConvolverNode.idl: Added.
3758
3759 2010-11-02  Chris Rogers  <crogers@google.com>
3760
3761         Reviewed by Kenneth Russell.
3762
3763         Add RealtimeAnalyser files
3764         https://bugs.webkit.org/show_bug.cgi?id=48810
3765
3766         No new tests since audio API is not yet implemented.
3767
3768         * webaudio/RealtimeAnalyser.cpp: Added.
3769         (WebCore::RealtimeAnalyser::RealtimeAnalyser):
3770         (WebCore::RealtimeAnalyser::~RealtimeAnalyser):
3771         (WebCore::RealtimeAnalyser::reset):
3772         (WebCore::RealtimeAnalyser::setFftSize):
3773         (WebCore::RealtimeAnalyser::writeInput):
3774         (WebCore::RealtimeAnalyser::doFFTAnalysis):
3775         (WebCore::RealtimeAnalyser::getFloatFrequencyData):
3776         (WebCore::RealtimeAnalyser::getByteFrequencyData):
3777         (WebCore::RealtimeAnalyser::getByteTimeDomainData):
3778         * webaudio/RealtimeAnalyser.h: Added.
3779         (WebCore::RealtimeAnalyser::fftSize):
3780         (WebCore::RealtimeAnalyser::frequencyBinCount):
3781         (WebCore::RealtimeAnalyser::setMinDecibels):
3782         (WebCore::RealtimeAnalyser::minDecibels):
3783         (WebCore::RealtimeAnalyser::setMaxDecibels):
3784         (WebCore::RealtimeAnalyser::maxDecibels):
3785         (WebCore::RealtimeAnalyser::setSmoothingTimeConstant):
3786         (WebCore::RealtimeAnalyser::smoothingTimeConstant):
3787         (WebCore::RealtimeAnalyser::magnitudeBuffer):
3788
3789 2010-11-02  Ilya Sherman  <isherman@chromium.org>
3790
3791         Reviewed by Kent Tamura.
3792
3793         Avoid overlapping label text in autofill popup with icon.
3794         Updates the menu width computation to take the icon width into account.
3795         https://bugs.webkit.org/show_bug.cgi?id=48497
3796
3797         * platform/chromium/PopupMenuChromium.cpp:
3798         (WebCore::PopupListBox::paintRow):
3799         (WebCore::PopupListBox::layout):
3800
3801 2010-10-28  Zhenyao Mo  <zmo@google.com>
3802
3803         Reviewed by Kenneth Russell.
3804
3805         Perform framebuffer attachment checking upon draw call rather than attachment
3806         https://bugs.webkit.org/show_bug.cgi?id=46318
3807
3808         * html/canvas/WebGLFramebuffer.cpp:
3809         (WebCore::getInternalFormat): Helper function to get an attachment's internal format.
3810         (WebCore::isUninitialized): Helper function to decide if an attachment is initialized or not.
3811         (WebCore::setInitialized): Helper funtion to set an attachment as being initialized.
3812         (WebCore::WebGLFramebuffer::setAttachment): No longer perform buffer initialization at this point.
3813         (WebCore::WebGLFramebuffer::removeAttachment): Ditto.
3814         (WebCore::WebGLFramebuffer::getColorBufferFormat): Make it const.
3815         (WebCore::WebGLFramebuffer::isIncomplete): Attachments conflict check.
3816         (WebCore::WebGLFramebuffer::onAccess): Check atatchment conflicts and buffer initialization if necessary.
3817         (WebCore::WebGLFramebuffer::initializeRenderbuffers): Return a boolean whether the framebuffer is complete or not.
3818         * html/canvas/WebGLFramebuffer.h: Add new function declaration and remove some outdated functions.
3819         (WebCore::WebGLFramebuffer::isColorAttached):
3820         (WebCore::WebGLFramebuffer::isDepthAttached): Make this private.
3821         (WebCore::WebGLFramebuffer::isStencilAttached): Ditto.
3822         (WebCore::WebGLFramebuffer::isDepthStencilAttached): Ditto.
3823         * html/canvas/WebGLRenderbuffer.h:
3824         (WebCore::WebGLRenderbuffer::setInternalFormat): Also set the renderbuffer as uninitialized.
3825         * html/canvas/WebGLRenderingContext.cpp:
3826         (WebCore::WebGLRenderingContext::bindFramebuffer): No longer perform framebuffer initialization at this point.
3827         (WebCore::WebGLRenderingContext::checkFramebufferStatus): Check WebGL specific attachment conflicts.
3828         (WebCore::WebGLRenderingContext::clear): Call WebGLFramebuffer::onAccess.
3829         (WebCore::WebGLRenderingContext::copyTexImage2D): Ditto.
3830         (WebCore::WebGLRenderingContext::copyTexSubImage2D): Ditto.
3831         (WebCore::WebGLRenderingContext::drawArrays): Ditto.
3832         (WebCore::WebGLRenderingContext::drawElements): Ditto.
3833         (WebCore::WebGLRenderingContext::framebufferRenderbuffer): No longer perform framebuffer initialization at this point.
3834         (WebCore::WebGLRenderingContext::readPixels): Call WebGLFramebuffer::onAccess.
3835         (WebCore::WebGLRenderingContext::renderbufferStorage): No longer perform framebuffer initialization at this point.
3836         (WebCore::WebGLRenderingContext::texImage2DBase): Ditto.
3837
3838 2010-11-01  Zhenyao Mo  <zmo@google.com>
3839
3840         Reviewed by Kenneth Russell.
3841
3842         blendFunc should generate INVALID_OPERATION if constant color and constant alpha are together as source and destination factors
3843         https://bugs.webkit.org/show_bug.cgi?id=48674
3844
3845         Test: fast/canvas/webgl/webgl-specific.html
3846
3847         * html/canvas/WebGLRenderingContext.cpp:
3848         (WebCore::WebGLRenderingContext::blendFunc):
3849         (WebCore::WebGLRenderingContext::blendFuncSeparate):
3850         * html/canvas/WebGLRenderingContext.h:
3851         (WebCore::WebGLRenderingContext::validateBlendFuncFactors): Helper function to do the checking.
3852
3853 2010-11-02  Simon Fraser  <simon.fraser@apple.com>
3854
3855         Reviewed by Dan Bernstein.
3856
3857         Overlapped nested iframes show smearing when scrolled
3858         https://bugs.webkit.org/show_bug.cgi?id=48873
3859
3860         A FrameView goes into slow scrolling mode (not blitting) when told that it is
3861         overlapped. However, a nested iframe could still try to use fast scrolling
3862         when its parent is overlapped, which could result in bad rendering.
3863         
3864         Fixed by making useSlowRepaints() and useSlowRepaintsIfNotOverlapped()
3865         walk up their parent chain, asking if their parents also use slow
3866         repaints.
3867         
3868         All the places that call setCanBlitOnScroll() now call
3869         updateCanBlitOnScrollRecursively() to ensure that the canBlitOnScroll
3870         flag is updated correctly on subframes.
3871         
3872         Repaint tests do not work on nested iframes, so added manual test.
3873
3874         * manual-tests/frames/nested-iframe-blit-on-scroll.html: Added.
3875         * manual-tests/frames/resources/blit-on-scroll-subframe.html: Added.
3876         * manual-tests/frames/resources/blit-on-scroll-subsubframe.html: Added.
3877         * page/FrameView.cpp:
3878         (WebCore::FrameView::layout):
3879         (WebCore::FrameView::useSlowRepaints):
3880         (WebCore::FrameView::useSlowRepaintsIfNotOverlapped):
3881         (WebCore::FrameView::updateCanBlitOnScrollRecursively):
3882         (WebCore::FrameView::setUseSlowRepaints):
3883         (WebCore::FrameView::addSlowRepaintObject):
3884         (WebCore::FrameView::removeSlowRepaintObject):
3885         (WebCore::FrameView::addFixedObject):
3886         (WebCore::FrameView::removeFixedObject):
3887         (WebCore::FrameView::setIsOverlapped):
3888         (WebCore::FrameView::setContentIsOpaque):
3889         * page/FrameView.h:
3890
3891 2010-11-02  Simon Fraser  <simon.fraser@apple.com>
3892
3893         Reviewed by Dan Bernstein.
3894
3895         Iframes nested inside a compositing layer don't repaint correctly
3896         https://bugs.webkit.org/show_bug.cgi?id=48880
3897         <rdar://problem/8194698>
3898         
3899         The isEnclosedInCompositingLayer() is used to modify the behavior of
3900         -[WebClipView visibleRect:] in WebKit, so that scrolling-related repaints
3901         are correct in composited iframes. Previously it only asked whether the
3902         frame's renderer was in a compositing layer, but we actually need to
3903         consult all ancestors.
3904         
3905         Test: compositing/iframes/nested-iframe-scrolling.html
3906
3907         * page/FrameView.cpp:
3908         (WebCore::FrameView::isEnclosedInCompositingLayer):
3909
3910 2010-11-02  David Hyatt  <hyatt@apple.com>
3911
3912         Reviewed by Dan Bernstein.
3913
3914         https://bugs.webkit.org/show_bug.cgi?id=48672
3915         
3916         Make vertical glyph offset hit testing work with inline boxes.  This allows selection to paint
3917         properly for vertical text (although gap-filling is still broken).
3918         
3919         Refactored and cleaned up the writing mode flipping functions, and also did some cleanup to
3920         better share code between hit testing and painting.
3921
3922         * rendering/InlineBox.cpp:
3923         (WebCore::InlineBox::locationIncludingFlipping):
3924         (WebCore::InlineBox::flipForWritingMode):
3925         * rendering/InlineBox.h:
3926         * rendering/InlineFlowBox.cpp:
3927         (WebCore::InlineFlowBox::nodeAtPoint):
3928         (WebCore::InlineFlowBox::paint):
3929         (WebCore::InlineFlowBox::paintBoxDecorations):
3930         (WebCore::InlineFlowBox::paintMask):
3931         * rendering/InlineTextBox.cpp:
3932         (WebCore::InlineTextBox::selectionRect):
3933         (WebCore::InlineTextBox::nodeAtPoint):
3934         (WebCore::InlineTextBox::paint):
3935         (WebCore::InlineTextBox::textPos):
3936         (WebCore::InlineTextBox::offsetForPosition):
3937         (WebCore::InlineTextBox::positionForOffset):
3938         * rendering/RenderBlock.cpp:
3939         (WebCore::RenderBlock::paintChildren):
3940         (WebCore::RenderBlock::paintFloats):
3941         (WebCore::RenderBlock::hitTestFloats):
3942         (WebCore::RenderBlock::hitTestContents):
3943         * rendering/RenderBox.cpp:
3944         (WebCore::RenderBox::computeRectForRepaint):
3945         (WebCore::RenderBox::flipForWritingMode):
3946         (WebCore::RenderBox::locationOffsetIncludingFlipping):
3947         * rendering/RenderBox.h:
3948         * rendering/RenderInline.cpp:
3949         (WebCore::RenderInline::clippedOverflowRectForRepaint):
3950         * rendering/RenderLineBoxList.cpp:
3951         (WebCore::RenderLineBoxList::rangeIntersectsRect):
3952         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
3953         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
3954         (WebCore::RenderLineBoxList::paint):
3955         (WebCore::RenderLineBoxList::hitTest):
3956         * rendering/RenderLineBoxList.h:
3957         * rendering/RenderText.cpp:
3958         (WebCore::RenderText::positionForPoint):
3959
3960 2010-11-02  Adam Barth  <abarth@webkit.org>
3961
3962         Reviewed by Eric Seidel.
3963
3964         JPEG decoders should understand color profiles
3965         https://bugs.webkit.org/show_bug.cgi?id=48819
3966
3967         This patch is currently a no-op because no one defines USE(ICCJPEG).
3968         We'll enable this for Chromium Mac once we have ICCJPEG landed in
3969         Chromium's third_party directory.
3970
3971         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3972         (WebCore::readColorProfile):
3973         (WebCore::JPEGImageReader::JPEGImageReader):
3974         (WebCore::JPEGImageReader::decode):
3975         (WebCore::JPEGImageDecoder::outputScanlines):
3976         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
3977         (WebCore::JPEGImageDecoder::setColorProfile):
3978
3979 2010-11-02  Mihai Parparita  <mihaip@chromium.org>
3980
3981         Reviewed by Adam Barth.
3982
3983         [Chromium] Crash when encountering history.back() call during Page::goToItem execution
3984         https://bugs.webkit.org/show_bug.cgi?id=48477
3985         
3986         For the Chromium port, BackForwardList::itemAtIndex synthesizes a 
3987         HistoryItem and saves a pointer to it in m_pendingItem. During 
3988         Page::goToItem we call FrameLoader::stopAllLoaders, which can trigger
3989         onload handlers (if a subframe was not considered committed by the frame
3990         loader). If one of those handlers calls calls history.back() or another
3991         operation that ends up in NavigationScheduler::scheduleHistoryNavigation,
3992         we would call BackForwardList::itemAtIndex, which means that we would 
3993         lose the m_pendingItem RefPtr that pointed to the item being navigated 
3994         to, causing its ref count to go to 0*, and thus for the HistoryItem to
3995         be deleted before we were done navigating to it.
3996         
3997         This is fixed in two ways:
3998         - Add a protector RefPtr in Page::goToItem to make sure that the item is
3999           still around for when we pass it to HistoryController:goToItem.
4000         - Change NavigationScheduler::scheduleHistoryNavigation to not use
4001           BackForwardList::itemAtIndex and instead look at the
4002           forward/backListCount() (since it doesn't actually care about the
4003           returned HistoryItem).
4004         
4005         * Full annotated stack trace of this is at http://crbug.com/59554#c9.        
4006
4007         Test: http/tests/history/back-during-onload-triggered-by-back.html
4008
4009         * loader/NavigationScheduler.cpp:
4010         (WebCore::NavigationScheduler::scheduleHistoryNavigation):
4011         * page/Page.cpp:
4012         (WebCore::Page::goToItem):
4013
4014 2010-10-28  Zhenyao Mo  <zmo@google.com>
4015
4016         Reviewed by Kenneth Russell.
4017
4018         Update getUniform for bvec[234] to return boolean[] rather than Uint8Array
4019         https://bugs.webkit.org/show_bug.cgi?id=47568
4020
4021         * html/canvas/WebGLRenderingContext.cpp:
4022         (WebCore::WebGLRenderingContext::getUniform):
4023
4024 2010-11-02  Chris Rogers  <crogers@google.com>
4025
4026         Reviewed by Kenneth Russell.
4027
4028         Add RealtimeAnalyserNode files
4029         https://bugs.webkit.org/show_bug.cgi?id=48798
4030
4031         No new tests since audio API is not yet implemented.
4032
4033         * webaudio/RealtimeAnalyserNode.cpp: Added.
4034         (WebCore::RealtimeAnalyserNode::RealtimeAnalyserNode):
4035         (WebCore::RealtimeAnalyserNode::~RealtimeAnalyserNode):
4036         (WebCore::RealtimeAnalyserNode::process):
4037         (WebCore::RealtimeAnalyserNode::pullInputs):
4038         (WebCore::RealtimeAnalyserNode::reset):
4039         * webaudio/RealtimeAnalyserNode.h: Added.
4040         (WebCore::RealtimeAnalyserNode::create):
4041         (WebCore::RealtimeAnalyserNode::fftSize):
4042         (WebCore::RealtimeAnalyserNode::setFftSize):
4043         (WebCore::RealtimeAnalyserNode::frequencyBinCount):
4044         (WebCore::RealtimeAnalyserNode::setMinDecibels):
4045         (WebCore::RealtimeAnalyserNode::minDecibels):
4046         (WebCore::RealtimeAnalyserNode::setMaxDecibels):
4047         (WebCore::RealtimeAnalyserNode::maxDecibels):
4048         (WebCore::RealtimeAnalyserNode::setSmoothingTimeConstant):
4049         (WebCore::RealtimeAnalyserNode::smoothingTimeConstant):
4050         (WebCore::RealtimeAnalyserNode::getFloatFrequencyData):
4051         (WebCore::RealtimeAnalyserNode::getByteFrequencyData):
4052         (WebCore::RealtimeAnalyserNode::getByteTimeDomainData):
4053         * webaudio/RealtimeAnalyserNode.idl: Added.
4054
4055 2010-11-02  Sheriff Bot  <webkit.review.bot@gmail.com>
4056
4057         Unreviewed, rolling out r71152.
4058         http://trac.webkit.org/changeset/71152
4059         https://bugs.webkit.org/show_bug.cgi?id=48866
4060
4061         Causes lots and lots of crashes (Requested by jamesr_ on
4062         #webkit).
4063
4064         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
4065         (WebCore::JPEGImageReader::JPEGImageReader):
4066         (WebCore::JPEGImageReader::decode):
4067         (WebCore::JPEGImageDecoder::outputScanlines):
4068         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
4069
4070 2010-11-02  Alexey Proskuryakov  <ap@apple.com>
4071
4072         Reviewed by Timothy Hatcher.
4073
4074         https://bugs.webkit.org/show_bug.cgi?id=48813
4075         <rdar://problem/8602552> REGRESSION (r63622): DNS prefetching for <link> tags doesn't work
4076         in non-HTTP documents
4077
4078         Cannot test DNS prefetching.
4079
4080         * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process): We should be looking at
4081         preferences, not at whether this document has prefetching enabled.
4082
4083 2010-11-02  Pavel Feldman  <pfeldman@chromium.org>
4084
4085         Not reviewed: Web Inspector: follow up to r71139. Fixed Mac monospace
4086         height style.
4087
4088         * inspector/front-end/PropertiesSection.js:
4089         (WebInspector.PropertiesSection):
4090         * inspector/front-end/inspector.css:
4091
4092 2010-11-02  Adam Barth  <abarth@webkit.org>
4093
4094         Reviewed by Eric Seidel.
4095
4096         JPEG decoders should understand color profiles
4097         https://bugs.webkit.org/show_bug.cgi?id=48819
4098
4099         This patch is currently a no-op because no one defines USE(ICCJPEG).
4100         We'll enable this for Chromium Mac once we have ICCJPEG landed in
4101         Chromium's third_party directory.
4102
4103         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
4104         (WebCore::readColorProfile):
4105         (WebCore::JPEGImageReader::JPEGImageReader):
4106         (WebCore::JPEGImageReader::decode):
4107         (WebCore::JPEGImageDecoder::outputScanlines):
4108         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
4109         (WebCore::JPEGImageDecoder::setColorProfile):
4110
4111 2010-11-02  Ilya Sherman  <isherman@chromium.org>
4112
4113         Reviewed by Simon Fraser.
4114
4115         Marks selectionStart() and selectionEnd() as const.
4116         https://bugs.webkit.org/show_bug.cgi?id=48786
4117
4118         * html/HTMLFormControlElement.cpp:
4119         (WebCore::HTMLTextFormControlElement::selectionStart):
4120         (WebCore::HTMLTextFormControlElement::selectionEnd):
4121         * html/HTMLFormControlElement.h:
4122
4123 2010-11-02  Chris Rogers  <crogers@google.com>
4124
4125         Reviewed by Kenneth Russell.
4126
4127         Fix license for audio files