Unreviewed build fix.
[WebKit-https.git] / WebCore / ChangeLog
1 2010-12-12  Jon Honeycutt  <jhoneycutt@apple.com>
2
3         Unreviewed build fix.
4
5         * WebCore.vcproj/WebCore.vcproj:
6         Remove accidentally-committed conflict marker.
7
8 2010-10-28  MORITA Hajime  <morrita@google.com>
9
10         Reviewed by Ojan Vafai.
11
12         spellcheck does not check pasted text
13         https://bugs.webkit.org/show_bug.cgi?id=40092
14
15         - Introduced SpellChecker class to encapsulate asynchronous spell
16           checker state: sequence id, requesting text and target node.
17           This is also the first step to decompose spell-check related
18           code to a separate class.
19         - Added EditorClient::isAsynchronousSpellCheckingEnabled() 
20           to use async spellcheck API on the platform.
21           These APIs are touched by SpellChecker.
22         - Used SpellChecker to check a pasted test. Text to check is
23           collected from the subtree under the editingRoot.
24         - Added Setting::m_asynchronousSpellCheckingEnabled to control
25           async spell checking.
26
27         Test: editing/spelling/spellcheck-paste.html
28
29         * CMakeLists.txt:
30         * GNUmakefile.am:
31         * WebCore.exp.in:
32         * WebCore.gypi:
33         * WebCore.pro:
34         * WebCore.vcproj/WebCore.vcproj:
35         * WebCore.xcodeproj/project.pbxproj:
36         * dom/DocumentMarkerController.cpp:
37         (WebCore::DocumentMarkerController::showMarkers):
38         (showDocumentMarkers):
39         * dom/DocumentMarkerController.h:
40         * dom/PositionIterator.cpp:
41         (WebCore::PositionIterator::setOffsetInLeafNode):
42         * dom/PositionIterator.h:
43         * editing/Editor.cpp:
44         (WebCore::Editor::replaceSelectionWithFragment):
45         (WebCore::Editor::Editor):
46         (WebCore::findFirstMarkable):
47         (WebCore::Editor::selectionStartHasSpellingMarkerFor):
48         * editing/Editor.h:
49         (WebCore::Editor::spellChecker):
50         * editing/SpellChecker.cpp: Added.
51         (WebCore::SpellChecker::SpellChecker):
52         (WebCore::SpellChecker::~SpellChecker):
53         (WebCore::SpellChecker::initRequest):
54         (WebCore::SpellChecker::clearRequest):
55         (WebCore::SpellChecker::isAsynchronousEnabled):
56         (WebCore::SpellChecker::canCheckAsynchronously):
57         (WebCore::SpellChecker::isBusy):
58         (WebCore::SpellChecker::isValid):
59         (WebCore::SpellChecker::isCheckable):
60         (WebCore::SpellChecker::requestCheckingFor):
61         (WebCore::forwardIterator):
62         (WebCore::SpellChecker::didCheck):
63         * editing/SpellChecker.h: Added.
64         (WebCore::SpellCheckingResult::SpellCheckingResult):
65         (WebCore::SpellCheckingResult::type):
66         (WebCore::SpellCheckingResult::location):
67         (WebCore::SpellCheckingResult::length):
68         * loader/EmptyClients.h:
69         (WebCore::EmptyEditorClient::requestCheckingOfString):
70         * page/EditorClient.h:
71         * page/Settings.cpp:
72         (WebCore::Settings::Settings):
73         * page/Settings.h:
74         (WebCore::Settings::setAsynchronousSpellCheckingEnabled):
75         (WebCore::Settings::asynchronousSpellCheckingEnabled):
76
77 2010-12-09  Antonio Gomes  <agomes@rim.com>
78
79         Reviewed by Daniel Bates.
80
81         Spatial Navigation: code clean up (part II)
82         https://bugs.webkit.org/show_bug.cgi?id=50666
83
84         No new tests needed.
85
86         * page/FocusController.cpp: Removed static declaration of updateFocusCandidateIfNeeded() from
87         the top of FocusController.cpp, and added the 'static' keyword where the function is implemented;
88         * page/SpatialNavigation.cpp: In FocusCandidate constructor, renamed 'n' to 'node', and added an assert to it;
89         (WebCore::FocusCandidate::FocusCandidate):
90         (WebCore::virtualRectForAreaElementAndDirection): Added an assert to 'node';
91         * page/SpatialNavigation.h:I reordered the declaration of some methods in order to group related ones;
92         Removed isScrollableContainerNode() function declaration since it is not used outside SpatialNavigation.cpp;
93         And removed the declaration of isNodeDeepDescendantOfDocument() since it does not exist anymore.
94
95 2010-12-12  Philippe Normand  <pnormand@igalia.com>
96
97         Reviewed by Xan Lopez.
98
99         build-webkit --gtk --minimal fails
100         https://bugs.webkit.org/show_bug.cgi?id=46267
101
102         No new tests, build fix only.
103
104         * GNUmakefile.am: Include some JS bindings generated headers in
105         the build even if their corresponding feature is disabled. They
106         are needed to make the DOM bindings build.
107
108 2010-12-12  Sam Magnuson  <smagnuso@gmail.com>
109
110         Reviewed by Eric Seidel.
111
112         [Qt] Compile with QT_NO_QUUID_STRING.
113         https://bugs.webkit.org/show_bug.cgi?id=49745
114
115         * platform/UUID.cpp:
116         (WebCore::createCanonicalUUIDString):
117
118 2010-12-12  Ragner Magalhaes  <ragner.magalhaes@openbossa.org>
119
120         Reviewed by Eric Seidel.
121
122         [Qt] Missing style for date pickers on Qt Mobile theme
123         https://bugs.webkit.org/show_bug.cgi?id=50628
124
125         * css/themeQtMobile.css:
126
127 2010-12-11  Alice Liu  <alice.liu@apple.com>
128
129         Mac build fix.
130
131         * platform/network/mac/ResourceResponseMac.mm:
132         (WebCore::ResourceResponse::platformLazyInit):
133         Resolve string[0] ambiguity by passing 0U.
134
135 2010-12-11  Adam Barth  <abarth@webkit.org>
136
137         Reviewed by Sam Weinig.
138
139         [V8] Move to DOMWindow::setLocation
140         https://bugs.webkit.org/show_bug.cgi?id=50876
141
142         Recently, JavaScriptCore moved to implementing setLocation in WebCore.
143         This patch change V8 to use that common code path.  I haven't removed
144         the old code path because it's still used for other things (like
145         assigning window.location.href), but I'll move the rest over in a
146         future patch.
147
148         * bindings/v8/custom/V8DOMWindowCustom.cpp:
149         (WebCore::V8DOMWindow::locationAccessorSetter):
150         * bindings/v8/specialization/V8BindingState.cpp:
151         (WebCore::::getFirstWindow):
152         * bindings/v8/specialization/V8BindingState.h:
153
154 2010-10-11  Diego Gonzalez  <diegohcg@webkit.org>
155
156         Reviewed by Kenneth Rohde Christiansen.
157
158         [Qt] Mock DeviceOrientation client for DRT
159         https://bugs.webkit.org/show_bug.cgi?id=47490
160
161         * WebCore.pro:
162
163 2010-12-11  Joone Hur  <joone@kldp.org>
164
165         Reviewed by Alexey Proskuryakov.
166
167         enumeration value ‘ResponseTypeArrayBuffer’ not handled in switch
168         https://bugs.webkit.org/show_bug.cgi?id=50871
169
170         Fix the warning which occurs when enumeration value is not handled in switch.
171
172         No new tests, no change in behavior.
173
174         * bindings/js/JSXMLHttpRequestCustom.cpp:
175         (WebCore::JSXMLHttpRequest::response):
176
177 2010-12-11  Patrick Gansterer  <paroga@webkit.org>
178
179         Reviewed by Darin Adler.
180
181         Add an overload to makeString for Vector<char>
182         https://bugs.webkit.org/show_bug.cgi?id=50123
183
184         This also contains a segfault fix for ImageBuffer::toDataURL of the Haiku port.
185
186         * platform/graphics/cg/ImageBufferCG.cpp:
187         (WebCore::ImageBuffer::toDataURL):
188         * platform/graphics/gtk/ImageBufferGtk.cpp:
189         (WebCore::ImageBuffer::toDataURL):
190         * platform/graphics/haiku/ImageBufferHaiku.cpp:
191         (WebCore::ImageBuffer::toDataURL):
192         * platform/graphics/skia/ImageBufferSkia.cpp:
193         (WebCore::ImageBuffer::toDataURL):
194
195 2010-12-10  Alexey Proskuryakov  <ap@apple.com>
196
197         Mac build fix.
198
199         * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit):
200         Resolve string[0] ambiguity by passing 0U.
201
202 2010-12-10  Steve Falkenburg  <sfalken@apple.com>
203
204         Windows production build fix.
205         
206         Only the vsprops are indirected through WebKitVSPropsRedirectionDir, not the scripts in WebKitLibraries/win/tools/scripts.
207
208         * WebCore.vcproj/WebCoreGeneratedCommon.vsprops:
209         * WebCore.vcproj/build-generated-files.sh:
210
211 2010-12-10  John Knottenbelt  <jknotten@chromium.org>
212
213         Reviewed by Eric Seidel.
214
215         Remove WebCore/platform/mac/GeolocationService.{h,mm}
216         https://bugs.webkit.org/show_bug.cgi?id=50074
217
218         Remove unused non-client-based geolocation code.
219
220         * platform/mac/GeolocationServiceMac.h: Removed.
221         * platform/mac/GeolocationServiceMac.mm: Removed.
222
223 2010-12-10  Alexey Proskuryakov  <ap@apple.com>
224
225         Reviewed by Darin Adler.
226
227         https://bugs.webkit.org/show_bug.cgi?id=46573
228         <rdar://problem/8479389> REGRESSION: charset="utf-8" (with quotes) doesn't work
229
230         Test: http/tests/mime/quoted-charset.php
231
232         * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit):
233         * platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::platformLazyInit):
234         Work around a CFNetwork issue, strip quotes if they are present.
235
236 2010-12-10  Vincent Scheib  <scheib@chromium.org>
237
238         Reviewed by James Robinson.
239
240         Shader::loadShader() must initialize variable passed to getShaderiv
241         https://bugs.webkit.org/show_bug.cgi?id=50842
242
243         Test: fast/canvas/canvas-largedraws.html
244
245         * platform/graphics/gpu/Shader.cpp:
246         (WebCore::Shader::loadShader):
247
248 2010-12-10  Vincent Scheib  <scheib@chromium.org>
249
250         Reviewed by James Robinson.
251
252         Texture::updateSubRect should pass IntRect by reference
253         https://bugs.webkit.org/show_bug.cgi?id=50845
254
255         No test, changing to pass by ref.
256
257         * platform/graphics/gpu/Texture.cpp:
258         (WebCore::Texture::updateSubRect):
259         * platform/graphics/gpu/Texture.h:
260
261 2010-12-10  Darin Adler  <darin@apple.com>
262
263         Reviewed by Sam Weinig.
264
265         Move open and showModalDialog implementations from bindings into DOM class DOMWindow
266         https://bugs.webkit.org/show_bug.cgi?id=50836
267
268         * bindings/js/JSDOMWindowCustom.cpp:
269         (WebCore::JSDOMWindow::open): Removed most of the code and changed to call
270         DOMWindow::open.
271         (WebCore::DialogHandler::DialogHandler): Added. Object is used to handle the
272         arguments and return value in showModalDialog.
273         (WebCore::DialogHandler::dialogCreated): Ditto.
274         (WebCore::DialogHandler::returnValue): Ditto.
275         (WebCore::setUpDialog): Added. Function passed to showModalDialog that just
276         casts pointer to DialogHandler can calls dialogCreated.
277         (WebCore::JSDOMWindow::showModalDialog): Removed most of the code and changed
278         to call DOMWindow::showModalDialog.
279         (WebCore::JSDOMWindow::postMessage): Made style match the rest of the file by
280         renaming local variables and getting rid of a needless ones.
281
282         * page/DOMWindow.cpp:
283         (WebCore::DOMWindow::parseModalDialogFeatures): Moved body of this function
284         to the WindowFeatures class.
285         (WebCore::DOMWindow::allowPopUp): Renamed argument from activeFrame to firstFrame,
286         because that's the frame we pass in here. Also added an overload so this can be
287         called on a window rather than a frame.
288         (WebCore::DOMWindow::setLocation): Renamed a couple variables so the names are
289         the same as in open and showModalDialog. Factored the JavaScript security check
290         into a new function named isInsecureScriptAccess.
291         (WebCore::DOMWindow::isInsecureScriptAccess): Here is the new function.
292         (WebCore::DOMWindow::createWindow): Added. Contains logic shared by open and
293         showModalDialog just as the function named createWindow in JSDOMWindowCustom.cpp
294         used to.
295         (WebCore::DOMWindow::open): Added. Code from JSDOMWindowCustom without the
296         JavaScript language binding part, and with a bit of refactoring to share code
297         with the rest of the DOMWindow class.
298         (WebCore::DOMWindow::showModalDialog): Ditto.
299
300         * page/DOMWindow.h: Moved conditional parts of the file into separate paragraphs
301         in alphabetical order so they are not scattered thorugh the file. Removed redundant
302         includes. Added some blank lines for clarity. Added an open function and a
303         showModalDialog function. Added private createWindow and isInsecureScriptAccess
304         functions.
305
306         * page/WindowFeatures.cpp:
307         (WebCore::isWindowFeaturesSeparator): Renamed from isSeparator for clarity.
308         (WebCore::WindowFeatures::WindowFeatures): Updated for name change. Used isEmpty
309         instead of checking length. Added a new constructor for use when making dialogs,
310         with code from the showModalDialog function.
311         (WebCore::WindowFeatures::boolFeature): Use DialogFeaturesMap typedef.
312         (WebCore::WindowFeatures::floatFeature): Use DialogFeaturesMap typedef.
313         Renamed a local variable and tweaked the comments a bit.
314         (WebCore::WindowFeatures::parseDialogFeatures): Added. Code moved here from
315         DOMWindow::parseDialogFeatures and refactored a bit.
316
317         * page/WindowFeatures.h: Added new constructor, new parseDialogFeatures
318         function, DialogFeaturesMap typedef, and made setWindowFeature function private.
319
320 2010-12-10  Chris Fleizach  <cfleizach@apple.com>
321
322         Reviewed by Darin Adler.
323
324         AX: refactor AccessibilityRenderObject::doAccessibilityHitTest
325         https://bugs.webkit.org/show_bug.cgi?id=50574
326
327         Refactors accessibility hit testing to allow for a more flexible model when handling elements
328         with fake sub-elements (like sliders or list boxes).
329
330         Renamed doAccessibilityHitTest -> accessibilityHitTest, which is called on the root
331         accessibility render object. Then subclassers are able to override 
332         elementAccessibilityHitTest to return their own specific elements.
333
334         * accessibility/AccessibilityListBox.cpp:
335         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
336         * accessibility/AccessibilityListBox.h:
337         * accessibility/AccessibilityObject.h:
338         (WebCore::AccessibilityObject::accessibilityHitTest):
339         (WebCore::AccessibilityObject::elementAccessibilityHitTest):
340         * accessibility/AccessibilityRenderObject.cpp:
341         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
342         * accessibility/AccessibilityRenderObject.h:
343         * accessibility/AccessibilitySlider.cpp:
344         (WebCore::AccessibilitySlider::elementAccessibilityHitTest):
345         * accessibility/AccessibilitySlider.h:
346         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
347         (webkit_accessible_component_ref_accessible_at_point):
348         * accessibility/mac/AccessibilityObjectWrapper.mm:
349         (-[AccessibilityObjectWrapper accessibilityHitTest:]):
350
351 2010-12-10  Kenneth Russell  <kbr@google.com>
352
353         Reviewed by Darin Adler.
354
355         Clean up assertion in Extensions3DOpenGL.cpp
356         https://bugs.webkit.org/show_bug.cgi?id=50852
357
358         Built Release mode to test. No functionality change.
359
360         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
361         (WebCore::Extensions3DOpenGL::ensureEnabled):
362
363 2010-12-10  Cosmin Truta  <ctruta@chromium.org>
364
365         Reviewed by Eric Seidel.
366
367         Crash while processing ill-formed <textPath> ouside of <text>
368         https://bugs.webkit.org/show_bug.cgi?id=47759
369
370         Renderers within a <text> subtree are created only when their corresponding elements
371         satisfy the content model.
372
373         Test: svg/custom/invalid-text-content.svg
374
375         * svg/SVGTRefElement.cpp:
376         (WebCore::SVGTRefElement::childShouldCreateRenderer): Fixed to comply with the content model.
377         (WebCore::SVGTRefElement::rendererIsNeeded): Added.
378         * svg/SVGTRefElement.h:
379         * svg/SVGTSpanElement.cpp:
380         (WebCore::SVGTSpanElement::childShouldCreateRenderer): Fixed to comply with the content model.
381         (WebCore::SVGTSpanElement::rendererIsNeeded): Added.
382         * svg/SVGTSpanElement.h: Changed indentation.
383         * svg/SVGTextElement.cpp:
384         (WebCore::SVGTextElement::childShouldCreateRenderer): Reformatted.
385         * svg/SVGTextPathElement.cpp:
386         (WebCore::SVGTextPathElement::childShouldCreateRenderer): Fixed to comply with the content model.
387         (WebCore::SVGTextPathElement::rendererIsNeeded): Added.
388         * svg/SVGTextPathElement.h:
389
390 2010-12-10  Zhenyao Mo  <zmo@google.com>
391
392         Reviewed by Adam Barth.
393
394         Use enums instead of booleans in ImageSource/ImageDecoder constructors
395         https://bugs.webkit.org/show_bug.cgi?id=50818
396
397         This patch basically defines two enum type in ImageSource: AlphaOption
398         and GammaAndColorProfileOption and use them as ImageSource and ImageDecoder
399         constructor parameters instead of boolean typs.
400
401         * platform/graphics/ImageSource.cpp:
402         (WebCore::ImageSource::ImageSource):
403         (WebCore::ImageSource::setData):
404         * platform/graphics/ImageSource.h: Define the two enum types.
405         * platform/graphics/cg/GraphicsContext3DCG.cpp:
406         (WebCore::GraphicsContext3D::getImageData):
407         * platform/graphics/cg/ImageSourceCG.cpp:
408         (WebCore::ImageSource::ImageSource):
409         * platform/graphics/qt/ImageDecoderQt.cpp:
410         (WebCore::ImageDecoder::create):
411         (WebCore::ImageDecoderQt::ImageDecoderQt):
412         * platform/graphics/qt/ImageDecoderQt.h:
413         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
414         (WebCore::GraphicsContext3D::getImageData):
415         * platform/image-decoders/ImageDecoder.cpp:
416         (WebCore::ImageDecoder::create):
417         * platform/image-decoders/ImageDecoder.h:
418         (WebCore::ImageDecoder::ImageDecoder):
419         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
420         (WebCore::BMPImageDecoder::BMPImageDecoder):
421         * platform/image-decoders/bmp/BMPImageDecoder.h:
422         * platform/image-decoders/gif/GIFImageDecoder.cpp:
423         (WebCore::GIFImageDecoder::GIFImageDecoder):
424         * platform/image-decoders/gif/GIFImageDecoder.h:
425         * platform/image-decoders/ico/ICOImageDecoder.cpp:
426         (WebCore::ICOImageDecoder::ICOImageDecoder):
427         (WebCore::ICOImageDecoder::decodeAtIndex):
428         * platform/image-decoders/ico/ICOImageDecoder.h:
429         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
430         (WebCore::JPEGImageDecoder::JPEGImageDecoder):
431         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
432         * platform/image-decoders/png/PNGImageDecoder.cpp:
433         (WebCore::PNGImageDecoder::PNGImageDecoder):
434         * platform/image-decoders/png/PNGImageDecoder.h:
435         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
436         (WebCore::WEBPImageDecoder::WEBPImageDecoder):
437         * platform/image-decoders/webp/WEBPImageDecoder.h:
438
439 2010-12-10  Ryosuke Niwa  <rniwa@webkit.org>
440
441         Reviewed by Darin Adler.
442
443         REGRESSION(r73799): editing/execCommand/4920488.html fails
444         https://bugs.webkit.org/show_bug.cgi?id=50854
445
446         The regression was caused by Range::processContents's not extracting
447         m_end.container()->firstChild(). Fixed the bug by always adding the first child.
448
449         * dom/Range.cpp:
450         (WebCore::Range::processContents):
451
452 2010-12-10  Adam Barth  <abarth@webkit.org>
453
454         Reviewed by Eric Seidel.
455
456         REGRESSION: Infinite redirect on developer.apple.com
457         https://bugs.webkit.org/show_bug.cgi?id=45627
458
459         Tests: fast/loader/form-submit-aborts-parsing.html
460                fast/loader/location-change-aborts-parsing.html
461
462         This patch is not pretty, but it fixes the bug.  I stole this approach
463         from the old HTML parser (as suggested by Eric Seidel).  The other
464         approaches that folks tried for this bug are better, but it's inclear
465         how to get them to work correctly.  I've added a large FIXME comment.
466
467         * html/parser/HTMLDocumentParser.cpp:
468         (WebCore::HTMLDocumentParser::pumpTokenizer):
469         * html/parser/HTMLTreeBuilder.h:
470         (WebCore::HTMLTreeBuilder::isParsingFragment):
471
472 2010-12-10  Brian Weinstein  <bweinstein@apple.com>
473
474         Reviewed by Ada Chan.
475
476         When we are creating a ContextMenuItem, only call setSubMenu if we have
477         a subMenu to set.
478
479         * platform/ContextMenuItem.cpp:
480         (WebCore::ContextMenuItem::ContextMenuItem):
481
482 2010-12-10  Kenneth Russell  <kbr@google.com>
483
484         Unreviewed, another build fix. #include <wtf/UnusedParam.h> needed
485         for Release builds.
486
487         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
488
489 2010-12-10  Kenneth Russell  <kbr@google.com>
490
491         Unreviewed, build fix. Change #ifndef NDEBUG to #ifdef NDEBUG.
492
493         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
494         (WebCore::Extensions3DOpenGL::ensureEnabled):
495
496 2010-12-10  Kenneth Russell  <kbr@google.com>
497
498         Reviewed by James Robinson.
499
500         Implement extension entry points and remove EXTENSIONS enum
501         https://bugs.webkit.org/show_bug.cgi?id=40316
502
503         Implemented WebGLRenderingContext's getSupportedExtensions and
504         getExtensions entry points, and, to verify them, added support for
505         the first specified WebGL extension, OES_texture_float. This
506         extension is now advertised in the Chromium and WebKit ports when
507         the underlying hardware supports it.
508
509         The new OES_texture_float test in the WebGL conformance suite
510         verifies the allocation and population of floating point textures,
511         and their use as render targets. However, because this extension
512         is optional, it is not easily testable with a layout test; there
513         is only one set of expectations for a given test, and two would be
514         needed, one when the extension is available and one when it is not.
515
516         Tested with the oes-texture-float.html WebGL conformance test in
517         Chromium and WebKit on Mac OS X on hardware that supports the
518         extension. Also verified with a configuration that does not
519         advertise the extension that this same test passes.
520
521         * CMakeLists.txt:
522         * DerivedSources.make:
523         * GNUmakefile.am:
524         * WebCore.gypi:
525         * WebCore.pri:
526         * WebCore.pro:
527         * WebCore.xcodeproj/project.pbxproj:
528         * bindings/js/JSWebGLRenderingContextCustom.cpp:
529         (WebCore::toJS):
530         (WebCore::JSWebGLRenderingContext::markChildren):
531         (WebCore::JSWebGLRenderingContext::getExtension):
532         (WebCore::JSWebGLRenderingContext::getSupportedExtensions):
533         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
534         (WebCore::toV8Object):
535         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
536         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
537         * html/canvas/OESTextureFloat.cpp: Added.
538         (WebCore::OESTextureFloat::OESTextureFloat):
539         (WebCore::OESTextureFloat::~OESTextureFloat):
540         (WebCore::OESTextureFloat::getName):
541         (WebCore::OESTextureFloat::create):
542         * html/canvas/OESTextureFloat.h: Added.
543         * html/canvas/OESTextureFloat.idl: Added.
544         * html/canvas/WebGLExtension.cpp: Added.
545         (WebCore::WebGLExtension::WebGLExtension):
546         (WebCore::WebGLExtension::~WebGLExtension):
547         * html/canvas/WebGLExtension.h: Added.
548         * html/canvas/WebGLRenderingContext.cpp:
549         (WebCore::WebGLRenderingContext::getExtension):
550         (WebCore::WebGLRenderingContext::getSupportedExtensions):
551         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
552         (WebCore::WebGLRenderingContext::validateTexFuncData):
553         (WebCore::WebGLRenderingContext::getNumberOfExtensions):
554         (WebCore::WebGLRenderingContext::getExtensionNumber):
555         * html/canvas/WebGLRenderingContext.h:
556         * html/canvas/WebGLRenderingContext.idl:
557         * platform/graphics/Extensions3D.h:
558         * platform/graphics/GraphicsContext3D.cpp:
559         (WebCore::GraphicsContext3D::computeFormatAndTypeParameters):
560         (WebCore::GraphicsContext3D::extractTextureData):
561         (WebCore::doUnpackingAndPacking):
562         (WebCore::doPacking):
563         (WebCore::doFloatingPointPacking):
564         (WebCore::GraphicsContext3D::packPixels):
565         * platform/graphics/GraphicsContext3D.h:
566         * platform/graphics/chromium/Extensions3DChromium.h:
567         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
568         (WebCore::Extensions3DOpenGL::supports):
569         (WebCore::Extensions3DOpenGL::ensureEnabled):
570         * platform/graphics/opengl/Extensions3DOpenGL.h:
571         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
572         (WebCore::GraphicsContext3D::texImage2D):
573         * platform/graphics/qt/Extensions3DQt.cpp:
574         (WebCore::Extensions3DQt::ensureEnabled):
575         * platform/graphics/qt/Extensions3DQt.h:
576
577 2010-12-10  Darin Adler  <darin@apple.com>
578
579         Try to fix Windows build.
580
581         * dom/Range.cpp:
582         (WebCore::Range::processContents): Put typedef of NodeVector inside the function
583         instead of at the top of the file, since the use is restricted to this function.
584         There's another NodeVector in ContainerNode.cpp.
585
586 2010-12-09  Brian Weinstein  <bweinstein@apple.com>
587
588         Reviewed by Adam Roben.
589
590         Prep for WebKit2: Context menu support on Windows
591         https://bugs.webkit.org/show_bug.cgi?id=50514
592         
593         Before this patch ContextMenu on Windows were backed by HMENUs, and ContextMenuItems
594         were backed by MENUITEMINFOs. This meant they couldn't be copied, and they needed to
595         be to work in WebKit2.
596         
597         This patch adds a new USE flag - CROSS_PLATFORM_CONTEXT_MENUS that are for a cross-platform
598         representation of context menus. This patch also has Windows adopt them.
599         
600         Cross-platform context menus change the API of context menus and the ContextMenuClient. There
601         is no more idea of a PlatformMenuDescription or a PlatformMenuItemDescription. Menus are backed
602         by a Vector of ContextMenuItems, and menu items are backed by the variables they need (enabled, checked
603         title, action, type, and submenu).
604         
605         This patch also refactors the ContextMenuClient interface to use a variation on the getCustomMenuFromDefaultItems
606         function to allow for customization of the context menu.
607         
608         For other ports to use CROSS_PLATFORM_CONTEXT_MENUS, all they need to do is write conversion functions from
609         a ContextMenu <-> native menu type, and ContextMenuItem <-> native menu item type. For Windows, this is done
610         in ContextMenuWin.cpp and ContextMenuItemWin.cpp.
611
612         No new tests, no change in behavior.
613
614         * WebCore.vcproj/WebCore.vcproj: Add new files (only needed on Windows for now).
615         * loader/EmptyClients.h:
616         (WebCore::EmptyContextMenuClient::customizeMenu): Define this function if CROSS_PLATFORM_CONTEXT_MENUS
617             is on.
618         * page/ContextMenuClient.h: Ditto. 
619         * page/ContextMenuController.cpp:
620         (WebCore::ContextMenuController::showContextMenu): Call customizeMenu instead of 
621             getCustomMenuFromDefaultItems if CROSS_PLATFORM_CONTEXT_MENUS is on.
622         * platform/ContextMenu.cpp: Added.
623         (WebCore::ContextMenu::ContextMenu): Empty constructor.
624         (WebCore::ContextMenu::setItems): Sets the items in the menu.
625         (WebCore::ContextMenu::items): Returns the items in the menu.
626         (WebCore::ContextMenu::itemAtIndex):
627         (WebCore::itemWithActionInMenu): Returns the item with the correct action, recursively descending
628             into submenus.
629         (WebCore::ContextMenu::itemWithAction): Calls through to itemWithActionInMenu.
630         * platform/ContextMenu.h: Added a new set of functions and member variables that are defined for
631             CROSS_PLATFORM_CONTEXT_MENUS.
632         (WebCore::ContextMenu::appendItem): Appends an item to the menu.
633         * platform/ContextMenuItem.cpp: Added.
634         (WebCore::ContextMenuItem::ContextMenuItem):
635         (WebCore::ContextMenuItem::~ContextMenuItem):
636         (WebCore::ContextMenuItem::setSubMenu):
637         * platform/ContextMenuItem.h:
638         (WebCore::ContextMenuItem::type): Returns the type.
639         (WebCore::ContextMenuItem::setType): Sets the type.
640         (WebCore::ContextMenuItem::action): Returns the action.
641         (WebCore::ContextMenuItem::setAction): Sets the action.
642         (WebCore::ContextMenuItem::title): Returns the title.
643         (WebCore::ContextMenuItem::setTitle): Sets the title.
644         (WebCore::ContextMenuItem::checked): Returns whether or not the menu item is checked.
645         (WebCore::ContextMenuItem::setChecked): Sets whether ot not the menu item is checked.
646         (WebCore::ContextMenuItem::enabled): Returns whether or not the menu item is enabled.
647         (WebCore::ContextMenuItem::setEnabled): Sets whether or not the menu item is enabled.
648         (WebCore::ContextMenuItem::submenu): Returns the submenu.
649         * platform/PlatformMenuDescription.h: Remove the idea if a PlatformMenuDescription if 
650             CROSS_PLATFORM_CONTEXT_MENUS is on.
651         * platform/win/ContextMenuItemWin.cpp:
652         (WebCore::ContextMenuItem::ContextMenuItem): Creates a ContextMenuItem from a MENUITEMINFO.
653         (WebCore::ContextMenuItem::nativeMenuItem): Creates and returns a MENUITEMINFO.
654         * platform/win/ContextMenuWin.cpp:
655         (WebCore::ContextMenu::ContextMenu): Creates a ContextMenu from an HMENU.
656         (WebCore::ContextMenu::nativeMenu): Creates and returns an HMENU.
657
658 2010-12-10  Emil Eklund  <eae@chromium.org>
659
660         Reviewed by Adam Barth.
661
662         Fix crash in ReplaceSelectionCommand::doApply when selection is modified
663         during execution.
664         https://bugs.webkit.org/show_bug.cgi?id=50840
665
666         Test: editing/execCommand/insertHTML-mutation-crash.html
667
668         * editing/ReplaceSelectionCommand.cpp:
669         (WebCore::ReplaceSelectionCommand::copyStyleToChildren):
670         Replaced raw node pointer with RefPtr.
671         
672         (WebCore::ReplaceSelectionCommand::doApply):
673         Replaced raw node pointer with RefPtr and added null check.
674
675 2010-12-10  Emil Eklund  <eae@chromium.org>
676
677         Reviewed by Adam Barth.
678
679         Fix crash in Range::processContents when modified during mutation event.
680         https://bugs.webkit.org/show_bug.cgi?id=50710
681
682         Test: fast/dom/Range/range-extractContents.html
683
684         * dom/Range.cpp:
685         (WebCore::Range::processContents):
686         Replace raw pointers with RefPtrs and add checks.
687
688 2010-12-09  Enrica Casucci  <enrica@apple.com>
689
690         Reviewed by Alexey Proskuryakov.
691
692         Implement IME support for Mac.
693         <rdar://problem/7660589> WebKit2: Implement IME support for Mac.
694         https://bugs.webkit.org/show_bug.cgi?id=50788
695
696         * dom/KeyboardEvent.h:
697         (WebCore::KeypressCommand::KeypressCommand): Removed ASSERT in constructor,
698         since it is now used for more than one command.
699
700 2010-12-10  Jessie Berlin  <jberlin@apple.com>
701
702         Windows build fix. Unreviewed.
703
704         * WebCore.vcproj/WebCore.vcproj:
705         Remove duplicate </File> tag.
706
707 2010-12-09  Jenn Braithwaite  <jennb@chromium.org>
708
709         Reviewed by Adam Barth.
710
711         TextResourceDecoder::checkForHeadCharset can look way past the limit.
712         https://bugs.webkit.org/show_bug.cgi?id=47397
713
714         Replaced charset detection algorithm with real parser.
715         Added tests for parser bugs mentioned in the thread for this bug report.
716         Converted hixie's encoding parsing tests to a layout test.
717
718         Tests: fast/encoding/bracket-in-script.html
719                fast/encoding/bracket-in-tag.html
720                fast/encoding/escaped-bracket.html
721                fast/encoding/meta-in-body.html
722                fast/encoding/meta-in-script.html
723                fast/encoding/meta-in-title.html
724                fast/encoding/mismatched-end-tag.html
725                fast/encoding/namespace-meta.html
726                fast/encoding/not-http-equiv-content.html
727                fast/encoding/parser-tests.html
728                fast/encoding/quotes-in-title.html
729                fast/encoding/tag-name-digit.html
730                http/tests/misc/charset-sniffer-end-sniffing.html
731
732         * Android.mk:
733         * CMakeLists.txt:
734         * GNUmakefile.am:
735         * WebCore.gypi:
736         * WebCore.pro:
737         * WebCore.vcproj/WebCore.vcproj:
738         * WebCore.xcodeproj/project.pbxproj:
739         * html/parser/HTMLMetaCharsetParser.cpp: Added.
740         (WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser):
741         (WebCore::HTMLMetaCharsetParser::~HTMLMetaCharsetParser):
742         (WebCore::HTMLMetaCharsetParser::extractCharset):
743         (WebCore::HTMLMetaCharsetParser::processMeta):
744         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
745         * html/parser/HTMLMetaCharsetParser.h: Added.
746         (WebCore::HTMLMetaCharsetParser::create):
747         (WebCore::HTMLMetaCharsetParser::encoding):
748         * loader/TextResourceDecoder.cpp:
749         (WebCore::TextResourceDecoder::checkForHeadCharset):
750         (WebCore::TextResourceDecoder::checkForMetaCharset):
751         * loader/TextResourceDecoder.h:
752
753 2010-12-10 Nate Chapin  <japhet@chromium.org>
754
755         Reviewed by Antti Koivisto.
756
757         Merge Loader and Request. Currently, Loader is a singleton attached
758         to MemoryCache. Our goal is to remove knowledge of the loading process
759         from MemoryCache, so we should attach Loader to CachedResourceLoader instead.
760         Once Loader is moved off of MemoryCache, there's no reason it needs to be a singleton,
761         which removes the main reason for Request existing as a separate class (to store per-request
762         state that Loader couldn't).
763
764         Loader will be given a more descriptive name in a later patch.
765
766         https://bugs.webkit.org/show_bug.cgi?id=49837
767
768         Refactor only, no new tests.
769
770         * Android.mk:
771         * CMakeLists.txt:
772         * GNUmakefile.am:
773         * WebCore.gypi:
774         * WebCore.pro:
775         * loader/FrameLoader.cpp:
776         * loader/Request.cpp:
777         * loader/Request.h:
778         * loader/cache/CachedFont.cpp:
779         * loader/cache/CachedImage.cpp:
780         * loader/cache/CachedResource.cpp:
781         * loader/cache/CachedResource.h:
782         * loader/cache/CachedResourceLoader.cpp:
783         (WebCore::CachedResourceLoader::CachedResourceLoader):
784         (WebCore::CachedResourceLoader::~CachedResourceLoader):
785         (WebCore::CachedResourceLoader::requestImage):
786         (WebCore::CachedResourceLoader::setAutoLoadImages):
787         (WebCore::CachedResourceLoader::load):
788         (WebCore::CachedResourceLoader::loadDone): Was setLoadInProgress(false),
789             plus other CachedResourceLoader cleanup that had been handled in Loader.
790         (WebCore::CachedResourceLoader::cancelRequests): Moved from Loader.
791         (WebCore::CachedResourceLoader::requestCount):
792         * loader/cache/CachedResourceLoader.h:
793         (WebCore::CachedResourceLoader::loadFinishing): Was setLoadInProgress(true)
794         * loader/cache/MemoryCache.h:
795         * loader/loader.cpp:
796         (WebCore::Loader::Loader):
797         (WebCore::Loader::~Loader):
798         (WebCore::Loader::load):
799         (WebCore::Loader::willSendRequest):
800         (WebCore::Loader::didFinishLoading):
801         (WebCore::Loader::didFail):
802         (WebCore::Loader::didReceiveResponse):
803         (WebCore::Loader::didReceiveData):
804         (WebCore::Loader::didReceiveCachedMetadata):
805         * loader/loader.h:
806         (WebCore::Loader::cachedResourceLoader):
807
808 2010-12-10  Martin Robinson  <mrobinson@igalia.com>
809
810         Unreviewed, rolling out r73703.
811         http://trac.webkit.org/changeset/73703
812         https://bugs.webkit.org/show_bug.cgi?id=49658
813
814         This patch is causing crashes on the GTK+ bots.
815
816         * platform/ContextMenuItem.h:
817         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
818         * platform/gtk/ContextMenuGtk.cpp:
819         (WebCore::ContextMenu::appendItem):
820         * platform/gtk/ContextMenuItemGtk.cpp:
821         (WebCore::ContextMenuItem::ContextMenuItem):
822         (WebCore::ContextMenuItem::~ContextMenuItem):
823         (WebCore::ContextMenuItem::createNativeMenuItem):
824         (WebCore::ContextMenuItem::releasePlatformDescription):
825         (WebCore::ContextMenuItem::type):
826         (WebCore::ContextMenuItem::setType):
827         (WebCore::ContextMenuItem::action):
828         (WebCore::ContextMenuItem::setAction):
829         (WebCore::ContextMenuItem::title):
830         (WebCore::ContextMenuItem::setTitle):
831         (WebCore::ContextMenuItem::platformSubMenu):
832         (WebCore::ContextMenuItem::setSubMenu):
833         (WebCore::ContextMenuItem::setChecked):
834         (WebCore::ContextMenuItem::setEnabled):
835
836 2010-12-08  Mihai Parparita  <mihaip@chromium.org>
837
838         Reviewed by Darin Adler.
839
840         fast/canvas/canvas-getImageData-negative-source.html fails on Mac
841         https://bugs.webkit.org/show_bug.cgi?id=47901
842
843         Test: fast/canvas/canvas-getImageData-rounding.html
844         
845         static_cast<unsigned> is generally not what we want in
846         convertLogicalToDevice. It produces inconsistent results when compiling
847         for 32-bit vs. 64-bit, and in any case we weren't getting correct
848         rounding behavior for source rectangles (e.g. we should get a source rect
849         of width 2 if the source X is 0.9 and the source width is 0.2, but we
850         were getting only one of width 1).
851
852         * html/HTMLCanvasElement.cpp:
853         (WebCore::HTMLCanvasElement::convertLogicalToDevice):
854         (WebCore::HTMLCanvasElement::convertToValidDeviceSize):
855         * html/HTMLCanvasElement.h:
856
857 2010-12-10  Hironori Bono  <hbono@chromium.org>
858
859         Reviewed by Ojan Vafai.
860
861         [Chromium] Use libjpeg-turbo instead of libjpeg
862         https://bugs.webkit.org/show_bug.cgi?id=50054
863
864         This change replaces the hard-coded path to the GYP files of the JPEG
865         library with a 'libjpeg_gyp_path' variable, which is added by Chromium
866         r68453. (When building WebKit Chromium, this change sets its value to
867         '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp' to avoid changing
868         the current behavior.)
869
870         No new tests since this does not change the code at all.
871
872         * WebCore.gyp/WebCore.gyp:
873
874 2010-12-10  Chris Marrin  <cmarrin@apple.com>
875
876         Reviewed by Simon Fraser.
877
878         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
879         https://bugs.webkit.org/show_bug.cgi?id=49388
880
881         Got rid of the NonZeroBeginTimeFlag. Functionality is now hidden inside
882         the implementation.
883
884         * platform/graphics/ca/GraphicsLayerCA.cpp:
885         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
886         * platform/graphics/ca/PlatformCAAnimation.h:
887         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
888         (hasNonZeroBeginTimeFlag):
889         (setNonZeroBeginTimeFlag):
890         (PlatformCAAnimation::PlatformCAAnimation):
891         (PlatformCAAnimation::setBeginTime):
892
893 2010-12-10  Pavel Podivilov  <podivilov@chromium.org>
894
895         Reviewed by Pavel Feldman.
896
897         Web Inspector: eliminate SourceFrameDelegate by passing scripts to SourceFrame constructor.
898         https://bugs.webkit.org/show_bug.cgi?id=50679
899
900         * inspector/front-end/Script.js:
901         * inspector/front-end/ScriptView.js:
902         (WebInspector.ScriptView):
903         * inspector/front-end/ScriptsPanel.js:
904         (WebInspector.ScriptsPanel.prototype.reset):
905         * inspector/front-end/SourceFrame.js:
906         (WebInspector.SourceFrame):
907         (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
908         (WebInspector.SourceFrame.prototype._breakpointAdded):
909         (WebInspector.SourceFrame.prototype._doEditLine):
910         (WebInspector.SourceFrame.prototype._commitEditLine):
911         (WebInspector.SourceFrame.prototype._breakpoints):
912         (WebInspector.SourceFrame.prototype._sourceIDForLine):
913         * inspector/front-end/SourceView.js:
914         (WebInspector.SourceView):
915
916 2010-12-10  Andreas Kling  <kling@webkit.org>
917
918         Reviewed by Eric Seidel.
919
920         Don't do GraphicsContext save/restore just to preserve the CompositeOperator
921         https://bugs.webkit.org/show_bug.cgi?id=50070
922
923         Add GraphicsContext::compositeOperation() so we don't have to do a full
924         save/restore if the only context-tainting call is setCompositeOperation().
925
926         GraphicsContext::setCompositeOperation() now stores the op in its state
927         and calls a port-specific setPlatformCompositeOperation().
928
929         No new tests, this is an optimization.
930
931         * platform/graphics/GraphicsContext.cpp:
932         (WebCore::GraphicsContext::setCompositeOperation):
933         (WebCore::GraphicsContext::compositeOperation):
934         * platform/graphics/GraphicsContext.h:
935         * platform/graphics/GraphicsContextPrivate.h:
936         (WebCore::GraphicsContextState::GraphicsContextState):
937         * platform/graphics/Image.cpp:
938         (WebCore::Image::fillWithSolidColor):
939         * platform/graphics/cairo/GraphicsContextCairo.cpp:
940         (WebCore::GraphicsContext::setPlatformCompositeOperation):
941         * platform/graphics/cg/GraphicsContextCG.cpp:
942         (WebCore::GraphicsContext::setPlatformCompositeOperation):
943         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
944         (WebCore::GraphicsContext::setPlatformCompositeOperation):
945         * platform/graphics/mac/GraphicsContextMac.mm:
946         (WebCore::GraphicsContext::setPlatformCompositeOperation):
947         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
948         (WebCore::GraphicsContext::setPlatformCompositeOperation):
949         * platform/graphics/qt/GraphicsContextQt.cpp:
950         (WebCore::GraphicsContext::setPlatformCompositeOperation):
951         * platform/graphics/skia/GraphicsContextSkia.cpp:
952         (WebCore::GraphicsContext::setPlatformCompositeOperation):
953         * platform/graphics/skia/SkiaUtils.cpp:
954         (WebCore::WebCoreCompositeToSkiaComposite):
955         * platform/graphics/wince/GraphicsContextWinCE.cpp:
956         (WebCore::GraphicsContext::setPlatformCompositeOperation):
957         * platform/graphics/wx/GraphicsContextWx.cpp:
958         (WebCore::GraphicsContext::setPlatformCompositeOperation):
959         * rendering/RenderBoxModelObject.cpp:
960         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
961         * rendering/RenderView.cpp:
962         (WebCore::RenderView::paintBoxDecorations):
963
964 2010-12-10  Renata Hodovan  <reni@webkit.org>
965
966         Reviewed by Andreas Kling.
967
968         GraphicsContext: Merge m_common and m_data
969         https://bugs.webkit.org/show_bug.cgi?id=49914
970
971         Move data members from GraphicsContextPrivate into GraphicsContext. So GraphicsContextPlatform.h
972         and m_common became unnecessary. They are removed.
973         Add two methods to GraphicsContext: platformInit() and platformDestroy(), which
974         make the constructor of GraphicsContext clearer.
975         Besides add a getter to the private GraphicsContext::m_state member, because some inline
976         functions in cairo need it.
977
978         No new test is needed, because this is a refactoring.
979
980         * WebCore.xcodeproj/project.pbxproj:
981         * platform/graphics/GraphicsContext.cpp:
982         (WebCore::GraphicsContext::GraphicsContext):
983         (WebCore::GraphicsContext::~GraphicsContext):
984         (WebCore::GraphicsContext::save):
985         (WebCore::GraphicsContext::restore):
986         (WebCore::GraphicsContext::setStrokeThickness):
987         (WebCore::GraphicsContext::setStrokeStyle):
988         (WebCore::GraphicsContext::setStrokeColor):
989         (WebCore::GraphicsContext::setShadow):
990         (WebCore::GraphicsContext::clearShadow):
991         (WebCore::GraphicsContext::getShadow):
992         (WebCore::GraphicsContext::strokeThickness):
993         (WebCore::GraphicsContext::strokeStyle):
994         (WebCore::GraphicsContext::strokeColor):
995         (WebCore::GraphicsContext::strokeColorSpace):
996         (WebCore::GraphicsContext::fillRule):
997         (WebCore::GraphicsContext::setFillRule):
998         (WebCore::GraphicsContext::setFillColor):
999         (WebCore::GraphicsContext::fillColor):
1000         (WebCore::GraphicsContext::fillColorSpace):
1001         (WebCore::GraphicsContext::setShouldAntialias):
1002         (WebCore::GraphicsContext::shouldAntialias):
1003         (WebCore::GraphicsContext::state):
1004         (WebCore::GraphicsContext::setStrokePattern):
1005         (WebCore::GraphicsContext::setFillPattern):
1006         (WebCore::GraphicsContext::setStrokeGradient):
1007         (WebCore::GraphicsContext::setFillGradient):
1008         (WebCore::GraphicsContext::fillGradient):
1009         (WebCore::GraphicsContext::strokeGradient):
1010         (WebCore::GraphicsContext::fillPattern):
1011         (WebCore::GraphicsContext::strokePattern):
1012         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
1013         (WebCore::GraphicsContext::updatingControlTints):
1014         (WebCore::GraphicsContext::setUpdatingControlTints):
1015         (WebCore::GraphicsContext::setPaintingDisabled):
1016         (WebCore::GraphicsContext::paintingDisabled):
1017         (WebCore::GraphicsContext::textDrawingMode):
1018         (WebCore::GraphicsContext::setTextDrawingMode):
1019         * platform/graphics/GraphicsContext.h:
1020         (WebCore::GraphicsContextState::GraphicsContextState):
1021         * platform/graphics/GraphicsContextPrivate.h: Removed.
1022         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1023         (WebCore::setPlatformFill):
1024         (WebCore::setPlatformStroke):
1025         (WebCore::drawPathShadow):
1026         (WebCore::fillCurrentCairoPath):
1027         (WebCore::strokeCurrentCairoPath):
1028         (WebCore::GraphicsContext::platformInit):
1029         (WebCore::GraphicsContext::platformDestroy):
1030         (WebCore::GraphicsContext::fillPath):
1031         (WebCore::GraphicsContext::strokePath):
1032         (WebCore::GraphicsContext::fillRect):
1033         (WebCore::GraphicsContext::setPlatformShadow):
1034         (WebCore::GraphicsContext::strokeRect):
1035         (WebCore::GraphicsContext::setAlpha):
1036         (WebCore::GraphicsContext::getAlpha):
1037         * platform/graphics/cg/GraphicsContextCG.cpp:
1038         (WebCore::GraphicsContext::platformInit):
1039         (WebCore::GraphicsContext::platformDestroy):
1040         (WebCore::GraphicsContext::applyStrokePattern):
1041         (WebCore::GraphicsContext::applyFillPattern):
1042         (WebCore::GraphicsContext::drawPath):
1043         (WebCore::GraphicsContext::fillPath):
1044         (WebCore::GraphicsContext::strokePath):
1045         (WebCore::GraphicsContext::fillRect):
1046         (WebCore::GraphicsContext::setPlatformShadow):
1047         (WebCore::GraphicsContext::strokeRect):
1048         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
1049         (WebCore::GraphicsContext::platformInit):
1050         (WebCore::GraphicsContext::platformDestroy):
1051         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
1052         (WebCore::GraphicsContext::platformInit):
1053         (WebCore::GraphicsContext::platformDestroy):
1054         (WebCore::GraphicsContext::fillPath):
1055         (WebCore::GraphicsContext::strokePath):
1056         (WebCore::GraphicsContext::clip):
1057         (WebCore::GraphicsContext::clipOut):
1058         (WebCore::GraphicsContext::addInnerRoundedRectClip):
1059         * platform/graphics/qt/GraphicsContextQt.cpp:
1060         (WebCore::GraphicsContext::platformInit):
1061         (WebCore::GraphicsContext::platformDestroy):
1062         (WebCore::GraphicsContext::fillPath):
1063         (WebCore::GraphicsContext::strokePath):
1064         (WebCore::GraphicsContext::fillRect):
1065         (WebCore::GraphicsContext::setPlatformShadow):
1066         * platform/graphics/skia/GraphicsContextSkia.cpp:
1067         (WebCore::GraphicsContext::platformInit):
1068         (WebCore::GraphicsContext::platformDestroy):
1069         (WebCore::GraphicsContext::fillPath):
1070         (WebCore::GraphicsContext::setPlatformShadow):
1071         * platform/graphics/win/GraphicsContextCGWin.cpp:
1072         (WebCore::GraphicsContext::GraphicsContext):
1073         (WebCore::GraphicsContext::platformInit):
1074         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1075         (WebCore::GraphicsContext::GraphicsContext):
1076         (WebCore::GraphicsContext::platformInit):
1077         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1078         (WebCore::GraphicsContext::platformInit):
1079         (WebCore::GraphicsContext::platformDestroy):
1080         (WebCore::GraphicsContext::fillPath):
1081         (WebCore::GraphicsContext::fillRect):
1082         * platform/graphics/wx/GraphicsContextWx.cpp:
1083         (WebCore::GraphicsContext::platformInit):
1084         (WebCore::GraphicsContext::platformDestroy):
1085
1086 2010-12-10  Pavel Podivilov  <podivilov@chromium.org>
1087
1088         Reviewed by Yury Semikhatsky.
1089
1090         Web Inspector: introduce a pair of set/remove methods for each breakpoint type.
1091         https://bugs.webkit.org/show_bug.cgi?id=50809
1092
1093         * inspector/Inspector.idl:
1094         * inspector/InspectorController.cpp:
1095         (WebCore::InspectorController::InspectorController):
1096         (WebCore::InspectorController::setEventListenerBreakpoint):
1097         (WebCore::InspectorController::removeEventListenerBreakpoint):
1098         (WebCore::InspectorController::hasEventListenerBreakpoint):
1099         (WebCore::InspectorController::setXHRBreakpoint):
1100         (WebCore::InspectorController::removeXHRBreakpoint):
1101         (WebCore::InspectorController::hasXHRBreakpoint):
1102         (WebCore::InspectorController::clearNativeBreakpoints):
1103         * inspector/InspectorController.h:
1104         * inspector/InspectorDOMAgent.cpp:
1105         (WebCore::InspectorDOMAgent::setDOMBreakpoint):
1106         (WebCore::InspectorDOMAgent::removeDOMBreakpoint):
1107         (WebCore::InspectorDOMAgent::shouldBreakOnNodeInsertion):
1108         (WebCore::InspectorDOMAgent::shouldBreakOnNodeRemoval):
1109         (WebCore::InspectorDOMAgent::shouldBreakOnAttributeModification):
1110         (WebCore::InspectorDOMAgent::descriptionForDOMEvent):
1111         (WebCore::InspectorDOMAgent::didRemoveDOMNode):
1112         * inspector/InspectorDOMAgent.h:
1113         * inspector/InspectorInstrumentation.cpp:
1114         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
1115         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
1116         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
1117         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
1118         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
1119         * inspector/front-end/BreakpointManager.js:
1120         (WebInspector.BreakpointManager):
1121         (WebInspector.NativeBreakpoint):
1122         (WebInspector.DOMBreakpoint):
1123         (WebInspector.EventListenerBreakpoint):
1124         (WebInspector.XHRBreakpoint):
1125         * inspector/front-end/CallStackSidebarPane.js:
1126         (WebInspector.CallStackSidebarPane):
1127         (WebInspector.CallStackSidebarPane.prototype._nativeBreakpointHit):
1128         * inspector/front-end/DebuggerModel.js:
1129         (WebInspector.DebuggerModel.prototype.debuggerPaused):
1130
1131 2010-12-10  Adam Roben  <aroben@apple.com>
1132
1133         Windows production build fix after r72555
1134
1135         * WebCore.vcproj/WebCoreGeneratedCommon.vsprops: Use
1136         "$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win" to find the
1137         .vsprops files, rather than $(WebKitLibrariesDir).
1138
1139 2010-12-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1140
1141         Reviewed by nobody, build fix.
1142
1143         [Qt] Second attempt to fix the build with Qt 4.6 broken in 73710.
1144
1145         * platform/network/qt/QtNAMThreadSafeProxy.cpp:
1146         (WebCore::QtNetworkReplyThreadSafeProxy::QtNetworkReplyThreadSafeProxy):
1147         (WebCore::QtNetworkReplyThreadSafeProxy::localCustomRequest):
1148         * platform/network/qt/QtNAMThreadSafeProxy.h:
1149
1150 2010-12-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1151
1152         Reviewed by nobody, build fix.
1153
1154         [Qt] Fix the build with Qt 4.6 broken in 73710.
1155
1156         * platform/network/qt/QtNAMThreadSafeProxy.cpp:
1157         (WebCore::QtNetworkReplyThreadSafeProxy::QtNetworkReplyThreadSafeProxy):
1158         * platform/network/qt/QtNAMThreadSafeProxy.h:
1159
1160 2010-12-10  Emil Eklund  <eae@chromium.org>
1161
1162         Reviewed by Eric Seidel.
1163
1164         Change EventHandler::dispatchMouseEvent code to use DOM traversal instead of render tree traversal
1165         https://bugs.webkit.org/show_bug.cgi?id=49982
1166
1167         * page/EventHandler.cpp:
1168         (WebCore::EventHandler::dispatchMouseEvent):
1169         Walk up DOM/hosted tree rather than render tree.
1170
1171 2010-12-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1172
1173         Reviewed by Kenneth Rohde Christiansen.
1174
1175         [Qt] Support a QNetworkAccessManager affined to a different thread.
1176         https://bugs.webkit.org/show_bug.cgi?id=50080
1177
1178         This patch introduce thread safe proxy classes for QNetworkAccessManager
1179         and QNetworkReply.
1180         If run in the same thread, these objects will forward the calls with
1181         Qt::DirectConnection bindings, while in the other case they will use
1182         Qt::QueuedConnection to carry requests accross threads.
1183
1184         This patch basically:
1185         - Makes sure that all access goes through these objects
1186         - Reorders signal connections to make sure we are connected when the
1187           signal comes
1188         - Makes sure that no QObject in the WebCore thread is a child of the
1189           reply which might be in a different thread.
1190         - Forward the data directly in QByteArrays in signals instead of collecting
1191           the data when the signal is handled.
1192
1193         New test: tst_QWebPage::networkAccessManagerOnDifferentThread
1194
1195         * WebCore.pro:
1196         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
1197         (WebCore::MediaPlayerPrivateQt::commitLoad):
1198         * platform/network/qt/QNetworkReplyHandler.cpp:
1199         (WebCore::FormDataIODevice::FormDataIODevice):
1200         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1201         (WebCore::QNetworkReplyHandler::~QNetworkReplyHandler):
1202         (WebCore::QNetworkReplyHandler::setLoadMode):
1203         (WebCore::QNetworkReplyHandler::abort):
1204         (WebCore::QNetworkReplyHandler::release):
1205         (WebCore::ignoreHttpError):
1206         (WebCore::QNetworkReplyHandler::finish):
1207         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1208         (WebCore::QNetworkReplyHandler::forwardData):
1209         (WebCore::QNetworkReplyHandler::start):
1210         (WebCore::QNetworkReplyHandler::sendQueuedItems):
1211         * platform/network/qt/QNetworkReplyHandler.h:
1212         * platform/network/qt/QtNAMThreadSafeProxy.cpp: Added.
1213         * platform/network/qt/QtNAMThreadSafeProxy.h: Added.
1214         * platform/network/qt/ResourceHandleQt.cpp:
1215         (WebCore::ResourceHandle::willLoadFromCache):
1216         * platform/qt/CookieJarQt.cpp:
1217         (WebCore::networkAccessManager):
1218         (WebCore::setCookies):
1219         (WebCore::cookies):
1220         (WebCore::cookieRequestHeaderFieldValue):
1221         (WebCore::cookiesEnabled):
1222
1223 2010-12-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1224
1225         Reviewed by Kenneth Rohde Christiansen.
1226
1227         [Qt] Refactor QNetworkReplyHandler::finish() to prevent crashes.
1228         https://bugs.webkit.org/show_bug.cgi?id=50761
1229
1230         This patch change the order to check if m_reply is null instead,
1231         explicitly deleting the reply before calling start() for a redirect,
1232         or after calling didFinishLoading()/didFail() in other cases.
1233
1234         * platform/network/qt/QNetworkReplyHandler.cpp:
1235         (WebCore::QNetworkReplyHandler::finish):
1236
1237 2010-12-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1238
1239         Reviewed by Kenneth Rohde Christiansen.
1240
1241         [Qt] Make sure we send the response before any data.
1242         https://bugs.webkit.org/show_bug.cgi?id=50760
1243
1244         This patch make sure the data available flag is set before
1245         we call sendResponseIfNeeded.
1246
1247         * platform/network/qt/QNetworkReplyHandler.cpp:
1248         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1249         (WebCore::QNetworkReplyHandler::finish):
1250         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1251         (WebCore::QNetworkReplyHandler::forwardData):
1252         (WebCore::QNetworkReplyHandler::resetState):
1253         * platform/network/qt/QNetworkReplyHandler.h:
1254
1255 2010-12-10  Koan-Sin Tan  <koansin.tan@gmail.com>
1256
1257         Reviewed by Dan Bernstein.
1258
1259         Bopomofo should be part of CJK Ideographs in WebCore/platform/graphics/Font.cpp
1260         https://bugs.webkit.org/show_bug.cgi?id=50668
1261
1262         No new tests. Note that, as said in the bug report discussion,
1263         I did have a test case for the bug. However, to show the test 
1264         case you need some "broken" Microsoft copyrighted fonts, such
1265         as DFKai-SB.
1266
1267         * platform/graphics/Font.cpp:
1268         (WebCore::Font::isCJKIdeograph):
1269
1270 2010-12-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1271
1272         Reviewed by Martin Robinson.
1273
1274         [GTK] Simplify context-menu handling code
1275         https://bugs.webkit.org/show_bug.cgi?id=49658
1276
1277         * platform/ContextMenuItem.h:
1278         * platform/gtk/ContextMenuGtk.cpp:
1279         (WebCore::ContextMenu::appendItem):
1280         * platform/gtk/ContextMenuItemGtk.cpp:
1281         (WebCore::ContextMenuItem::ContextMenuItem):
1282         (WebCore::ContextMenuItem::~ContextMenuItem):
1283         (WebCore::ContextMenuItem::releasePlatformDescription):
1284         (WebCore::ContextMenuItem::type):
1285         (WebCore::ContextMenuItem::setType):
1286         (WebCore::ContextMenuItem::action):
1287         (WebCore::ContextMenuItem::setAction):
1288         (WebCore::ContextMenuItem::title):
1289         (WebCore::ContextMenuItem::setTitle):
1290         (WebCore::ContextMenuItem::platformSubMenu):
1291         (WebCore::ContextMenuItem::setSubMenu):
1292         (WebCore::ContextMenuItem::setChecked):
1293         (WebCore::ContextMenuItem::setEnabled):
1294
1295 2010-12-10  Philippe Normand  <pnormand@igalia.com>
1296
1297         Reviewed by Gustavo Noronha Silva.
1298
1299         [GStreamer] un-needed methods
1300         https://bugs.webkit.org/show_bug.cgi?id=50805
1301
1302         No new tests, code cleanup only.
1303
1304         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1305         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1306
1307 2010-12-10  Philippe Normand  <pnormand@igalia.com>
1308
1309         Reviewed by Gustavo Noronha Silva.
1310
1311         [GStreamer] data: source could also support non-base64 encoded URIs
1312         https://bugs.webkit.org/show_bug.cgi?id=30007
1313
1314         Removed our ancient implementation of dataurisrc. We should now
1315         use the one in gst-plugins-bad which is more mature.
1316
1317         * GNUmakefile.am:
1318         * platform/graphics/gstreamer/DataSourceGStreamer.cpp: Removed.
1319         * platform/graphics/gstreamer/DataSourceGStreamer.h: Removed.
1320         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1321         (WebCore::doGstInit):
1322
1323 2010-12-10  Zoltan Herczeg  <zherczeg@webkit.org>
1324
1325         Reviewed by Eric Seidel.
1326
1327         [Qt] Fix crashes in debug mode
1328         https://bugs.webkit.org/show_bug.cgi?id=49976
1329
1330         The m_methods hashmap of QtInstance contains InternalFunctions
1331         whose depend on the current RuntimeObject. When we recreate the
1332         RuntimeObject, we should also reset this hashmap.
1333
1334         * bridge/qt/qt_instance.cpp:
1335         (JSC::Bindings::QtInstance::newRuntimeObject):
1336
1337 2010-12-10  François Sausset  <sausset@gmail.com>
1338
1339         Reviewed by Eric Seidel.
1340
1341         MathML: update baselinePosition() call in RenderMathMLBlock.cpp 
1342         https://bugs.webkit.org/show_bug.cgi?id=50540
1343
1344         The call of baselinePosition() is outdated: new arguments added.
1345
1346         * mathml/RenderMathMLBlock.cpp:
1347         (WebCore::RenderMathMLBlock::paint):
1348
1349 2010-12-10  Hans Wennborg  <hans@chromium.org>
1350
1351         Reviewed by Jeremy Orlow.
1352
1353         IndexedDB: Numeric keys are floats.
1354         https://bugs.webkit.org/show_bug.cgi?id=50674
1355
1356         Use floating point to represent numeric keys,
1357         add version meta data to the SQLite db,
1358         and migrate object stores that use integers.
1359
1360         * bindings/v8/IDBBindingUtilities.cpp:
1361         (WebCore::createIDBKeyFromValue):
1362         * bindings/v8/custom/V8IDBKeyCustom.cpp:
1363         (WebCore::toV8):
1364         * storage/IDBFactoryBackendImpl.cpp:
1365         (WebCore::createTables):
1366         (WebCore::migrateDatabase):
1367         (WebCore::IDBFactoryBackendImpl::open):
1368         * storage/IDBKey.cpp:
1369         (WebCore::IDBKey::IDBKey):
1370         (WebCore::IDBKey::fromQuery):
1371         (WebCore::IDBKey::bind):
1372         (WebCore::IDBKey::bindWithNulls):
1373         * storage/IDBKey.h:
1374         (WebCore::IDBKey::create):
1375         (WebCore::IDBKey::number):
1376
1377 2010-12-10  Martin Robinson  <mrobinson@igalia.com>
1378
1379         Reviewed by Xan Lopez.
1380
1381         [Gtk] style="font-family: courier" makes text disappear
1382         https://bugs.webkit.org/show_bug.cgi?id=47452
1383
1384         Don't ever use fonts that do not have any of the three charmaps that
1385         Fontconfig supports (Unicode, Apple Roman and Symbol). If we select
1386         a font that doesn't have one of these charmaps, use the next font in
1387         the list.
1388
1389         Test: platform/gtk/fonts/font-with-no-valid-encoding.html
1390
1391         * platform/graphics/freetype/FontCacheFreeType.cpp:
1392         (WebCore::FontCache::createFontPlatformData): Check whether the
1393         font we selected has a valid Fontconfig charmap.
1394         * platform/graphics/freetype/FontPlatformData.h: Added new method definition.
1395         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1396         (WebCore::FontPlatformData::hasCompatibleCharmap): Added this method which
1397         verifies that a font has a valid Fontconfig charmap.
1398
1399 2010-12-09  Ryosuke Niwa  <rniwa@webkit.org>
1400
1401         Reviewed by Ojan Vafai.
1402
1403         Make DOM Mutation Events Asynchronous
1404         https://bugs.webkit.org/show_bug.cgi?id=46936
1405
1406         Implemented DOM mutations events as scoped events. A scoped event is an event whose
1407         dispatch is done via ScopedEventQueue. The behavior of the queue is controlled by
1408         EventQueueScope objects (RAII idiom), which increments and decrements the scoping level
1409         on its constructor and destructor respectively.
1410
1411         When the scoping level is 0 (initial level), scoped events are dispatched as soon as
1412         they are enqueued and act like synchronous events. When the scoping level is greater than 0,
1413         however, events are queued in ScopedEventQueue and their dispatches are delayed until
1414         the scoping level goes back to 0 (by the destruction of EventQueueScope).
1415
1416         DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMNodeRemovedFromDocument,
1417         DOMNodeInsertedIntoDocument, DOMFocusIn, DOMFocusOut, focusin, and focusout are treated as
1418         scoped events, and a scope object is instantiated in EditCommand::apply to delay dispatches
1419         of the events until the completion of each call of EditCommand::doApply.
1420
1421         Test: fast/events/mutation/execCommands.html
1422
1423         * Android.mk: Added ScopedEventQueue.cpp.
1424         * CMakeLists.txt: Ditto.
1425         * WebCore.pro: Ditto.
1426         * GNUmakefile.am: Added ScopedEventQueue.cpp and ScopedEventQueue.h.
1427         * WebCore.gypi:  Ditto.
1428         * WebCore.vcproj/project.vcproj: Ditto.
1429         * WebCore.xcodeproj/project.pbxproj: Ditto.
1430         * dom/ContainerNode.cpp:
1431         (WebCore::dispatchChildInsertionEvents): Calls dispatchScopedEvent.
1432         (WebCore::dispatchChildRemovalEvents): Ditto.
1433         * dom/DOMAllInOne.cpp: Added ScopedEventQueue.cpp.
1434         * dom/Element.cpp:
1435         (WebCore::Element::dispatchAttrRemovalEvent): Ditto. 
1436         (WebCore::Element::dispatchAttrAdditionEvent): Ditto.
1437         * dom/Node.cpp:
1438         (WebCore::Node::dispatchScopedEvent): Added.
1439         (WebCore::Node::dispatchSubtreeModifiedEvent): Calls dispatchScopedEvent.
1440         * dom/Node.h:
1441         * dom/ScopedEventQueue.cpp: Added.
1442         (WebCore::ScopedEventQueue::initialize): Added.
1443         (WebCore::ScopedEventQueue::enqueueEvent): Added.
1444         (WebCore::ScopedEventQueue::dispatchAllEvents): Added.
1445         (WebCore::ScopedEventQueue::dispatchEvent): Added.
1446         (WebCore::ScopedEventQueue::instance): Added.
1447         (WebCore::ScopedEventQueue::incrementScopingLevel): Added.
1448         (WebCore::ScopedEventQueue::decrementScopingLevel): Added.
1449         * dom/ScopedEventQueue.h: Added.
1450         (WebCore::ScopedEventQueue::~ScopedEventQueue): Added.
1451         (WebCore::ScopedEventQueue::ScopedEventQueue): Added.
1452         (WebCore::EventQueueScope::EventQueueScope): Added.
1453         (WebCore::EventQueueScope::~EventQueueScope): Added.
1454         * editing/EditCommand.cpp:
1455         (WebCore::EditCommand::apply): Instantiates EventQueueScope.
1456
1457 2010-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
1458
1459         Unreviewed, rolling out r73684.
1460         http://trac.webkit.org/changeset/73684
1461         https://bugs.webkit.org/show_bug.cgi?id=50801
1462
1463         "missing bug number" (Requested by rniwa on #webkit).
1464
1465         * Android.mk:
1466         * CMakeLists.txt:
1467         * GNUmakefile.am:
1468         * WebCore.gypi:
1469         * WebCore.pro:
1470         * WebCore.vcproj/WebCore.vcproj:
1471         * WebCore.xcodeproj/project.pbxproj:
1472         * dom/ContainerNode.cpp:
1473         (WebCore::dispatchChildInsertionEvents):
1474         (WebCore::dispatchChildRemovalEvents):
1475         * dom/DOMAllInOne.cpp:
1476         * dom/Element.cpp:
1477         (WebCore::Element::dispatchAttrRemovalEvent):
1478         (WebCore::Element::dispatchAttrAdditionEvent):
1479         * dom/Node.cpp:
1480         (WebCore::Node::dispatchSubtreeModifiedEvent):
1481         (WebCore::Node::dispatchUIEvent):
1482         * dom/Node.h:
1483         * dom/ScopedEventQueue.cpp: Removed.
1484         * dom/ScopedEventQueue.h: Removed.
1485         * editing/EditCommand.cpp:
1486         (WebCore::EditCommand::apply):
1487
1488 2010-12-09  Qi Zhang  <qi.2.zhang@nokia.com>
1489
1490         Reviewed by Kenneth Rohde Christiansen.
1491
1492         [Qt] enable orientation flag when QtMobility available
1493         https://bugs.webkit.org/show_bug.cgi?id=50781
1494
1495         When QtMobility available, enable orientation flag by default.
1496
1497         * features.pri:
1498
1499 2010-12-09  Kenichi Ishibashi  <bashi@google.com>
1500
1501         Reviewed by Kent Tamura.
1502
1503         Improve validation API support of <object> and <keygen>
1504         https://bugs.webkit.org/show_bug.cgi?id=50663
1505
1506         Adds validation API to HTMLObjectElement class.
1507         Makes HTMLKeygenElement::willValidate() return false.
1508
1509         Test: fast/forms/setCustomValidity-existence.html
1510
1511         * html/HTMLKeygenElement.h:
1512         (WebCore::HTMLKeygenElement::willValidate): Added.
1513         * html/HTMLObjectElement.h:
1514         (WebCore::HTMLObjectElement::validationMessage): Added.
1515         (WebCore::HTMLObjectElement::checkValidity): Added.
1516         (WebCore::HTMLObjectElement::setCustomValidity): Added.
1517         * html/HTMLObjectElement.idl: Added validation API properties.
1518
1519 2010-12-09  Sadrul Habib Chowdhury  <sadrul@chromium.org>
1520
1521         Reviewed by Kent Tamura.
1522
1523         Make sure a non-zero value is used for tile-width to avoid a crash
1524         https://bugs.webkit.org/show_bug.cgi?id=50341
1525
1526         The scaled tile width can be very small at times (e.g. with 'style: font 1
1527         required'). So use a minimum width of 1 instead of using 0 (which leads to a
1528         crash).
1529
1530         Tests: fast/dom/HTMLProgressElement/progress-element-with-style-crash.html
1531
1532         * rendering/RenderThemeChromiumSkia.cpp:
1533         (WebCore::RenderThemeChromiumSkia::paintProgressBar):
1534
1535 2010-12-09  Ryosuke Niwa  <rniwa@webkit.org>
1536
1537         Reviewed by Ojan Vafai.
1538
1539         Implemented DOM mutations events as scoped events. A scoped event is an event whose
1540         dispatch is done via ScopedEventQueue. The behavior of the queue is controlled by
1541         EventQueueScope objects (RAII idiom), which increments and decrements the scoping level
1542         on its constructor and destructor respectively.
1543
1544         When the scoping level is 0 (initial level), scoped events are dispatched as soon as
1545         they are enqueued and act like synchronous events. When the scoping level is greater than 0,
1546         however, events are queued in ScopedEventQueue and their dispatches are delayed until
1547         the scoping level goes back to 0 (by the destruction of EventQueueScope).
1548
1549         DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMNodeRemovedFromDocument,
1550         DOMNodeInsertedIntoDocument, DOMFocusIn, DOMFocusOut, focusin, and focusout are treated as
1551         scoped events, and a scope object is instantiated in EditCommand::apply to delay dispatches
1552         of the events until the completion of each call of EditCommand::doApply.
1553
1554         Test: fast/events/mutation/execCommands.html
1555
1556         * Android.mk: Added ScopedEventQueue.cpp.
1557         * CMakeLists.txt: Ditto.
1558         * WebCore.pro: Ditto.
1559         * GNUmakefile.am: Added ScopedEventQueue.cpp and ScopedEventQueue.h.
1560         * WebCore.gypi:  Ditto.
1561         * WebCore.vcproj/project.vcproj: Ditto.
1562         * WebCore.xcodeproj/project.pbxproj: Ditto.
1563         * dom/ContainerNode.cpp:
1564         (WebCore::dispatchChildInsertionEvents): Calls dispatchScopedEvent.
1565         (WebCore::dispatchChildRemovalEvents): Ditto.
1566         * dom/DOMAllInOne.cpp: Added ScopedEventQueue.cpp.
1567         * dom/Element.cpp:
1568         (WebCore::Element::dispatchAttrRemovalEvent): Ditto. 
1569         (WebCore::Element::dispatchAttrAdditionEvent): Ditto.
1570         * dom/Node.cpp:
1571         (WebCore::Node::dispatchScopedEvent): Added.
1572         (WebCore::Node::dispatchSubtreeModifiedEvent): Calls dispatchScopedEvent.
1573         * dom/Node.h:
1574         * dom/ScopedEventQueue.cpp: Added.
1575         (WebCore::ScopedEventQueue::initialize): Added.
1576         (WebCore::ScopedEventQueue::enqueueEvent): Added.
1577         (WebCore::ScopedEventQueue::dispatchAllEvents): Added.
1578         (WebCore::ScopedEventQueue::dispatchEvent): Added.
1579         (WebCore::ScopedEventQueue::instance): Added.
1580         (WebCore::ScopedEventQueue::incrementScopingLevel): Added.
1581         (WebCore::ScopedEventQueue::decrementScopingLevel): Added.
1582         * dom/ScopedEventQueue.h: Added.
1583         (WebCore::ScopedEventQueue::~ScopedEventQueue): Added.
1584         (WebCore::ScopedEventQueue::ScopedEventQueue): Added.
1585         (WebCore::EventQueueScope::EventQueueScope): Added.
1586         (WebCore::EventQueueScope::~EventQueueScope): Added.
1587         * editing/EditCommand.cpp:
1588         (WebCore::EditCommand::apply): Instantiates EventQueueScope.
1589
1590 2010-12-09  Sam Weinig  <sam@webkit.org>
1591
1592         Reviewed by Gavin Barraclough.
1593
1594         Fix scrolling with mouse wheel in WebKit2 views.  Once
1595         we coalesce wheel events, we can re-enable this.
1596
1597         * platform/mac/ScrollAnimatorMac.mm:
1598         (WebCore::ScrollAnimatorMac::scroll):
1599
1600 2010-12-09  Abhishek Arya  <inferno@chromium.org>
1601
1602         Reviewed by James Robinson.
1603
1604         For details element, ensure that if we ended up being inline that we set out replaced
1605         flag so that we are treated like an inline block.
1606         https://bugs.webkit.org/show_bug.cgi?id=50671
1607
1608         Test: fast/html/details-element-render-inline-crash.html
1609
1610         * rendering/RenderDetails.cpp:
1611         (WebCore::RenderDetails::styleDidChange): setReplaced to true if we are set as inline.
1612         * rendering/RenderDetails.h: function definition.
1613
1614 2010-12-09  Jasmin Lapalme  <jlapalme@druide.com>
1615
1616         Reviewed by Alexey Proskuryakov.
1617
1618         Fix a faulty conversion from UTF-8 to UTF-16 in WebCore during an XSLT transformation.
1619         https://bugs.webkit.org/show_bug.cgi?id=50708
1620
1621         Test: fast/xsl/utf8-chunks.xml
1622
1623         * xml/XSLTProcessorLibxslt.cpp:
1624         (WebCore::writeToVector): now converts and returns the correct byte count when the end of the chunk is in the middle of a multibyte UTF-8 character.
1625
1626 2010-12-09  Vincent Scheib  <scheib@chromium.org>
1627
1628         Reviewed by James Robinson.
1629
1630         Clip update rectangle for Texture::updateSubRect to texture size
1631         https://bugs.webkit.org/show_bug.cgi?id=49929
1632
1633         Test: fast/canvas/canvas-largedraws.html
1634
1635         * platform/graphics/gpu/Texture.cpp:
1636         (WebCore::Texture::updateSubRect):
1637
1638 2010-12-09  Kenneth Russell  <kbr@google.com>
1639
1640         Unreviewed. Another speculative Gtk build fix after r73669. Add
1641         needed derived sources to GNUmakefile.am.
1642
1643         * GNUmakefile.am:
1644
1645 2010-12-09  Kenneth Russell  <kbr@google.com>
1646
1647         Unreviewed. Speculative Gtk build fix after
1648         https://bugs.webkit.org/show_bug.cgi?id=36512 / r73669. Process
1649         all of the WebGL classes' IDL files.
1650
1651         * CMakeLists.txt:
1652
1653 2010-12-09  Zhenyao Mo  <zmo@google.com>
1654
1655         Reviewed by Kenneth Russell.
1656
1657         Expose constructor functions for instanceof checks of WebGL objects
1658         https://bugs.webkit.org/show_bug.cgi?id=36512
1659
1660         Test: fast/canvas/webgl/instanceof-test.html
1661
1662         * bindings/generic/RuntimeEnabledFeatures.h:
1663         (WebCore::RuntimeEnabledFeatures::webGLActiveInfoEnabled):
1664         (WebCore::RuntimeEnabledFeatures::webGLBufferEnabled):
1665         (WebCore::RuntimeEnabledFeatures::webGLFramebufferEnabled):
1666         (WebCore::RuntimeEnabledFeatures::webGLProgramEnabled):
1667         (WebCore::RuntimeEnabledFeatures::webGLRenderbufferEnabled):
1668         (WebCore::RuntimeEnabledFeatures::webGLShaderEnabled):
1669         (WebCore::RuntimeEnabledFeatures::webGLTextureEnabled):
1670         (WebCore::RuntimeEnabledFeatures::webGLUniformLocationEnabled):
1671         * html/canvas/WebGLActiveInfo.idl: Remove OmitConstructor.
1672         * html/canvas/WebGLBuffer.idl: Ditto.
1673         * html/canvas/WebGLFramebuffer.idl: Ditto.
1674         * html/canvas/WebGLProgram.idl: Ditto.
1675         * html/canvas/WebGLRenderbuffer.idl: Ditto.
1676         * html/canvas/WebGLShader.idl: Ditto.
1677         * html/canvas/WebGLTexture.idl: Ditto.
1678         * html/canvas/WebGLUniformLocation.idl: Ditto.
1679         * page/DOMWindow.idl: Expose constructors for WebGL objects in DOMWindow.
1680
1681 2010-12-09  Timothy Hatcher  <timothy@apple.com>
1682
1683         Export Color::white and Color::transparent.
1684
1685         Reviewed by Anders Carlsson.
1686
1687         * WebCore.exp.in:
1688
1689 2010-12-09  Sam Weinig  <sam@webkit.org>
1690
1691         Fix failing Mac tests.
1692
1693         * platform/mac/ScrollAnimatorMac.mm:
1694         (WebCore::ScrollAnimatorMac::scroll): Don't smooth scroll if the default
1695         AppleScrollAnimationEnabled is false.
1696
1697 2010-12-09  James Robinson  <jamesr@chromium.org>
1698
1699         Reviewed by Kenneth Russell.
1700
1701         [chromium] Compositor needs to manage its VRAM use
1702         https://bugs.webkit.org/show_bug.cgi?id=49629
1703
1704         This adds a basic texture manager to the Chromium compositor to limit the amount of VRAM
1705         used by compositor textures and switches ContentLayerChromium, ImageLayerChromium, and
1706         RenderSurfaceChromium to use managed LayerTexture.  The other *LayerChromium classes (Canvas,
1707         Video, and WebGL) and the root layer are still unmanaged.
1708
1709         The TextureManager works by providing tokens to callers that want to use a managed texture.
1710         The token can be used to request a texture, see if the previously requested texture is still
1711         available, and to protect/unprotect textures when they cannot be collected.  Whenever a
1712         texture is created the manager attempts to free up the least recently used textures until the
1713         total memory use is below the provided threshhold.  If the manager cannot satisfy the memory
1714         limit it will not return any new textures until some old textures are released.
1715
1716         A LayerTexture wraps a TextureManager token, size, and format.  A LayerChromium can check if a
1717         previously requested texture is still available for use and reserve the LayerTexture's underlying
1718         storage between the updateContentsIfDirty() and the draw() call.
1719
1720         Also changes LayerChromium from having separate contentsDirty()/updateContents() calls to a single
1721         updateContentsIfDirty().
1722
1723         Tests: platform/chromium/compositing/lots-of-img-layers-with-opacity.html
1724                platform/chromium/compositing/lots-of-img-layers.html
1725
1726         * WebCore.gypi:
1727         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1728         (WebCore::Canvas2DLayerChromium::updateContentsIfDirty):
1729         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1730         * platform/graphics/chromium/ContentLayerChromium.cpp:
1731         (WebCore::ContentLayerChromium::cleanupResources):
1732         (WebCore::ContentLayerChromium::updateContentsIfDirty):
1733         (WebCore::ContentLayerChromium::updateTextureRect):
1734         (WebCore::ContentLayerChromium::draw):
1735         * platform/graphics/chromium/ContentLayerChromium.h:
1736         * platform/graphics/chromium/ImageLayerChromium.cpp:
1737         (WebCore::ImageLayerChromium::updateContentsIfDirty):
1738         * platform/graphics/chromium/ImageLayerChromium.h:
1739         * platform/graphics/chromium/LayerChromium.h:
1740         (WebCore::LayerChromium::updateContentsIfDirty):
1741         (WebCore::LayerChromium::draw):
1742         * platform/graphics/chromium/LayerRendererChromium.cpp:
1743         (WebCore::LayerRendererChromium::LayerRendererChromium):
1744         (WebCore::LayerRendererChromium::useShader):
1745         (WebCore::LayerRendererChromium::prepareToDrawLayers):
1746         (WebCore::LayerRendererChromium::updateRootLayerTextureRect):
1747         (WebCore::LayerRendererChromium::drawLayers):
1748         (WebCore::LayerRendererChromium::getFramebufferPixels):
1749         (WebCore::LayerRendererChromium::createLayerTexture):
1750         (WebCore::LayerRendererChromium::deleteLayerTexture):
1751         (WebCore::LayerRendererChromium::updateLayersRecursive):
1752         (WebCore::LayerRendererChromium::useRenderSurface):
1753         (WebCore::LayerRendererChromium::drawLayer):
1754         (WebCore::LayerRendererChromium::setScissorToRect):
1755         (WebCore::LayerRendererChromium::setDrawViewportRect):
1756         (WebCore::LayerRendererChromium::initializeSharedObjects):
1757         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1758         * platform/graphics/chromium/LayerRendererChromium.h:
1759         (WebCore::LayerRendererChromium::renderSurfaceSharedValues):
1760         (WebCore::LayerRendererChromium::textureManager):
1761         * platform/graphics/chromium/LayerTexture.cpp: Added.
1762         (WebCore::LayerTexture::LayerTexture):
1763         (WebCore::LayerTexture::~LayerTexture):
1764         (WebCore::LayerTexture::isValid):
1765         (WebCore::LayerTexture::reserve):
1766         (WebCore::LayerTexture::unreserve):
1767         (WebCore::LayerTexture::bindTexture):
1768         (WebCore::LayerTexture::framebufferTexture2D):
1769         * platform/graphics/chromium/LayerTexture.h: Added.
1770         (WebCore::LayerTexture::create):
1771         * platform/graphics/chromium/PluginLayerChromium.cpp:
1772         (WebCore::PluginLayerChromium::updateContentsIfDirty):
1773         * platform/graphics/chromium/PluginLayerChromium.h:
1774         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
1775         (WebCore::RenderSurfaceChromium::SharedValues::SharedValues):
1776         (WebCore::RenderSurfaceChromium::SharedValues::~SharedValues):
1777         (WebCore::RenderSurfaceChromium::RenderSurfaceChromium):
1778         (WebCore::RenderSurfaceChromium::cleanupResources):
1779         (WebCore::RenderSurfaceChromium::prepareContentsTexture):
1780         (WebCore::RenderSurfaceChromium::draw):
1781         * platform/graphics/chromium/RenderSurfaceChromium.h:
1782         (WebCore::RenderSurfaceChromium::SharedValues::shaderProgram):
1783         (WebCore::RenderSurfaceChromium::SharedValues::shaderSamplerLocation):
1784         (WebCore::RenderSurfaceChromium::SharedValues::shaderMatrixLocation):
1785         (WebCore::RenderSurfaceChromium::SharedValues::shaderAlphaLocation):
1786         (WebCore::RenderSurfaceChromium::SharedValues::initialized):
1787         * platform/graphics/chromium/TextureManager.cpp: Added.
1788         (WebCore::memoryUseBytes):
1789         (WebCore::TextureManager::TextureManager):
1790         (WebCore::TextureManager::getToken):
1791         (WebCore::TextureManager::releaseToken):
1792         (WebCore::TextureManager::hasTexture):
1793         (WebCore::TextureManager::protectTexture):
1794         (WebCore::TextureManager::unprotectTexture):
1795         (WebCore::TextureManager::reduceMemoryToLimit):
1796         (WebCore::TextureManager::addTexture):
1797         (WebCore::TextureManager::removeTexture):
1798         (WebCore::TextureManager::requestTexture):
1799         * platform/graphics/chromium/TextureManager.h: Added.
1800         (WebCore::TextureManager::create):
1801         * platform/graphics/chromium/VideoLayerChromium.cpp:
1802         (WebCore::VideoLayerChromium::updateContentsIfDirty):
1803         * platform/graphics/chromium/VideoLayerChromium.h:
1804         * platform/graphics/chromium/WebGLLayerChromium.cpp:
1805         (WebCore::WebGLLayerChromium::updateContentsIfDirty):
1806         * platform/graphics/chromium/WebGLLayerChromium.h:
1807
1808 2010-12-09  Darin Adler  <darin@apple.com>
1809
1810         Reviewed by Sam Weinig.
1811
1812         Rework my recent setLocation refactoring to use DOMWindow instead of Frame.
1813         It's difficult to make correct security decisions based on Frame since a
1814         Frame can navigate to a new document.
1815
1816         Fixes some test failures that I somehow missed before the last check-in.
1817
1818         * bindings/js/JSDOMWindowBase.cpp:
1819         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): Call to the
1820         shell DOMWindow; not sure this one matters, but it's closer to the old
1821         code before my last patch. Also pass the DOMWindow rather than the
1822         frame to crossDomainAccessErrorMessage.
1823
1824         * bindings/js/JSDOMWindowCustom.cpp:
1825         (WebCore::JSDOMWindow::setLocation): Pass DOMWindow rather than Frame
1826         to the DOMWindow::setLocation function.
1827
1828         * page/DOMWindow.cpp:
1829         (WebCore::DOMWindow::setLocation): Take DOMWindow rather than Frame.
1830         (WebCore::DOMWindow::crossDomainAccessErrorMessage): Ditto.
1831
1832         * page/DOMWindow.h: Update new functions to take DOMWindow rather
1833         than Frame.
1834
1835 2010-12-09  Sam Weinig  <sam@webkit.org>
1836
1837         Try and fix the mac build.
1838
1839         * WebCore.exp.in:
1840
1841 2010-12-09  Dan Bernstein  <mitz@apple.com>
1842
1843         Reviewed by Dave Hyatt.
1844
1845         Removed an unused variable.
1846
1847         * rendering/InlineFlowBox.cpp:
1848         (WebCore::InlineFlowBox::computeLogicalBoxHeights): Removed parentLineHeight.
1849
1850 2010-12-09  Darin Adler  <darin@apple.com>
1851
1852         Reviewed by Geoffrey Garen.
1853
1854         Move DOMWindow::setLocation logic into DOMWindow class and out of JavaScript binding
1855         https://bugs.webkit.org/show_bug.cgi?id=50640
1856
1857         * bindings/js/JSDOMBinding.cpp:
1858         (WebCore::printErrorMessageForFrame): Removed body; just call through to
1859         DOMWindow::printErrorMessage.
1860
1861         * bindings/js/JSDOMWindowBase.cpp:
1862         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): Removed body;
1863         just call through to DOMWindow::crossDomainAccessErrorMessage.
1864
1865         * bindings/js/JSDOMWindowCustom.cpp:
1866         (WebCore::JSDOMWindow::setLocation): Changed terminology to use activeFrame and
1867         firstFrame, rather than the older lexicalFrame and dynamicFrame. Removed most
1868         of the body and moved it into DOMWindow::setLocation.
1869
1870         * page/DOMWindow.cpp:
1871         (WebCore::DOMWindow::setLocation): Added. Does all the same work that
1872         JSDOMWindow::setLocation used to do, but in a way that's not specific
1873         to JavaScript.
1874         (WebCore::DOMWindow::printErrorMessage): Added.
1875         (WebCore::DOMWindow::crossDomainAccessErrorMessage): Added.
1876
1877         * page/DOMWindow.h: Added setLocation, printErrorMessage, and
1878         crossDomainAccessErrorMessage.
1879
1880 2010-12-09  Sam Weinig  <sam@webkit.org>
1881
1882         Reviewed by Dan Bernstein.
1883
1884         WebKit2 needs smooth scrolling support on the mac
1885         <rdar://problem/8219402>
1886
1887         * WebCore.xcodeproj/project.pbxproj: Change ScrollAnimatorMac.cpp to ScrollAnimatorMac.mm.
1888         * platform/mac/ScrollAnimatorMac.cpp: Removed.
1889         * platform/mac/ScrollAnimatorMac.h:
1890         * platform/mac/ScrollAnimatorMac.mm: Copied from platform/mac/ScrollAnimatorMac.cpp.
1891         (-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]):
1892         (-[ScrollAnimationHelperDelegate bounds]):
1893         (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]):
1894         (-[ScrollAnimationHelperDelegate convertSizeToBase:]):
1895         (-[ScrollAnimationHelperDelegate convertSizeFromBase:]):
1896         (-[ScrollAnimationHelperDelegate superview]):
1897         (-[ScrollAnimationHelperDelegate documentView]):
1898         (-[ScrollAnimationHelperDelegate window]):
1899         (-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]):
1900         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1901         (WebCore::ScrollAnimatorMac::scroll):
1902         (WebCore::ScrollAnimatorMac::setScrollPositionAndStopAnimation):
1903         (WebCore::ScrollAnimatorMac::currentPosition):
1904         (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
1905         Add implementation of ScrollAnimator for the Mac.
1906
1907 2010-12-09  Brady Eidson  <beidson@apple.com>
1908
1909         Reviewed by Anders Carlsson.
1910
1911         <rdar://problem/8613779> and https://bugs.webkit.org/show_bug.cgi?id=50777
1912         WebKit2 ContextMenuClient support
1913
1914         Export some symbols and headers needed by WebKit2 Mac:
1915         * WebCore.exp.in:
1916         * WebCore.xcodeproj/project.pbxproj:
1917
1918 2010-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
1919
1920         Unreviewed, rolling out r73635.
1921         http://trac.webkit.org/changeset/73635
1922         https://bugs.webkit.org/show_bug.cgi?id=50778
1923
1924         'Side-effects on 3 css tests needs closer review' (Requested
1925         by mwenge on #webkit).
1926
1927         * platform/graphics/qt/ImageQt.cpp:
1928         (loadResourcePixmap):
1929         * platform/qt/RenderThemeQt.cpp:
1930         (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
1931         (WebCore::RenderThemeQt::paintSearchField):
1932         (WebCore::RenderThemeQt::adjustSearchFieldStyle):
1933         (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
1934         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
1935         * platform/qt/RenderThemeQt.h:
1936
1937 2010-12-09  Robert Hogan  <robert@webkit.org>
1938
1939         Reviewed by Andreas Kling.
1940
1941         [Qt] Search input field doesn't have cancel button
1942
1943         Add a cancel button to the search field and make it customizable
1944         by the client. For now, use the close dialog button associated
1945         with the application's style as the default.
1946
1947         https://bugs.webkit.org/show_bug.cgi?id=42887
1948
1949         * platform/graphics/qt/ImageQt.cpp:
1950         (loadResourcePixmap):
1951         * platform/qt/RenderThemeQt.cpp:
1952         (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
1953         (WebCore::RenderThemeQt::paintSearchField):
1954         (WebCore::RenderThemeQt::adjustSearchFieldStyle):
1955         (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
1956         (WebCore::RenderThemeQt::convertToPaintingRect):
1957         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
1958         * platform/qt/RenderThemeQt.h:
1959
1960 2010-12-09  Yael Aharon  <yael.aharon@nokia.com>
1961
1962         Reviewed by Antonio Gomes.
1963
1964         Spatial Navigation: Crash when handling iframe of size 0.
1965         https://bugs.webkit.org/show_bug.cgi?id=50730
1966
1967         if we have a frame of size 0, we would get into infinite loop and eventually crash. The reason is
1968         that when the algorithm sees a starting rect of size 0, it assumes that there is no focused node,
1969         thus restarts itself. The solution is to avoid considering iframes with size 0 for the spatial
1970         navigation algorithm.
1971
1972         Test: fast/spatial-navigation/snav-hidden-iframe-zero-size.html
1973
1974         * page/FocusController.cpp:
1975         (WebCore::updateFocusCandidateIfNeeded):
1976
1977 2010-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
1978
1979         Unreviewed, rolling out r73616.
1980         http://trac.webkit.org/changeset/73616
1981         https://bugs.webkit.org/show_bug.cgi?id=50772
1982
1983         Breaks chromium win build (Requested by hwennborg on #webkit).
1984
1985         * bindings/v8/IDBBindingUtilities.cpp:
1986         (WebCore::createIDBKeyFromValue):
1987         * bindings/v8/custom/V8IDBKeyCustom.cpp:
1988         (WebCore::toV8):
1989         * storage/IDBFactoryBackendImpl.cpp:
1990         (WebCore::createTables):
1991         (WebCore::IDBFactoryBackendImpl::open):
1992         * storage/IDBKey.cpp:
1993         (WebCore::IDBKey::IDBKey):
1994         (WebCore::IDBKey::fromQuery):
1995         (WebCore::IDBKey::bind):
1996         (WebCore::IDBKey::bindWithNulls):
1997         * storage/IDBKey.h:
1998         (WebCore::IDBKey::create):
1999         (WebCore::IDBKey::number):
2000
2001 2010-12-09  Antonio Gomes  <agomes@rim.com>
2002
2003         Rubber stamped by by Gustavo Noronha Silva.
2004
2005         Buildfix for GTK+ with building with -no-video.
2006
2007         paintStockIcon static function was implemented under the ENABLE(VIDEO) guard
2008         but used from outside the guard. See RenderThemeGtk::paintSearchFieldResultsDecoration()
2009         and RenderThemeGtk::paintSearchFieldCancelButton() methods.
2010
2011         * platform/gtk/RenderThemeGtk.cpp:
2012         (WebCore::getMediaElementFromRenderObject):
2013
2014 2010-12-07  Antonio Gomes  <agomes@rim.com>
2015
2016         Reviewed by Daniel Bates.
2017
2018         Spatial Navigation: code clean up
2019         https://bugs.webkit.org/show_bug.cgi?id=50666
2020
2021         Patch unifies two FocusCandidate constructors, making caller sites
2022         simpler. Now the special handling HTMLAreaElement gets is done within
2023         the non default constructor (i.e. FocusCanditate(Node*, FocusDirection)).
2024
2025         No new tests needed.
2026
2027         * page/FocusController.cpp:
2028         (WebCore::FocusController::findFocusCandidateInContainer):
2029         * page/SpatialNavigation.cpp:
2030         (WebCore::FocusCandidate::FocusCandidate):
2031
2032 2010-12-09  Philippe Normand  <pnormand@igalia.com>
2033
2034         Reviewed by Eric Carlson.
2035
2036         [GStreamer] disable fullscreen on MacOS Tiger and Leopard
2037         https://bugs.webkit.org/show_bug.cgi?id=50748
2038
2039         Don't support fullscreen video on Tiger and Leopard, just like the
2040         QTKit player.
2041
2042         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2043         (WebCore::MediaPlayerPrivateGStreamer::supportsFullscreen):
2044
2045 2010-12-06  Philippe Normand  <pnormand@igalia.com>
2046
2047         Reviewed by Martin Robinson.
2048
2049         [GTK] Support the Mozilla-style Fullscreen Javascript API
2050         https://bugs.webkit.org/show_bug.cgi?id=50572
2051
2052         * GNUmakefile.am: enable the Javascript Fullscreen API feature if
2053         it's been requested at configure time.
2054
2055 2010-12-09  Yong Li  <yoli@rim.com>
2056
2057         Reviewed by Darin Adler.
2058
2059         Check the return value of ImageBuffer::create()
2060         to avoid crash when ImageBuffer::create() fails.
2061         https://bugs.webkit.org/show_bug.cgi?id=50631
2062
2063         No new test because it relies on the platform implementation
2064         of ImageBuffer. It is hard to make ImageBuffer::create() fail
2065         in most ports.
2066
2067         * platform/graphics/GeneratedImage.cpp:
2068         (WebCore::GeneratedImage::drawPattern):
2069
2070 2010-12-09  Maciej Stachowiak  <mjs@apple.com>
2071
2072         Reviewed by Dan Bernstein.
2073
2074         Implement "Use Selection for Find" in WebKit2
2075         https://bugs.webkit.org/show_bug.cgi?id=50737
2076         <rdar://problem/8564881>
2077
2078         Implement a TakeFindStringFromSelection editor command. This is
2079         used solely to implement the "Use Selection for Find" menu command
2080         on Mac, and is not made available to script. On WebKit2, it is
2081         very convenient to reuse the editing machinery since this command
2082         is very similar to Copy.
2083
2084         * editing/Editor.h:
2085         * editing/EditorCommand.cpp:
2086         (WebCore::executeTakeFindStringFromSelection): Call to a mac-only Editor function.
2087         (WebCore::enabledTakeFindStringFromSelection): Check using Editor::canCopyExcludingStandaloneImage
2088         (WebCore::createCommandMap): Add "TakeFindStringFromSelection" command.
2089         * editing/mac/EditorMac.mm:
2090         (WebCore::Editor::canCopyExcludingStandaloneImages): Helper function; we can't use Editor::canCopy
2091         since it would make no sense to enable "Use Selection for Find" when viewing a standalone image
2092         document.
2093         (WebCore::Editor::takeFindStringFromSelection): Implement by copying the selected text
2094         to the special Find pasteboard.
2095
2096 2010-12-09  Abhishek Arya  <inferno@chromium.org>
2097
2098         Reviewed by Dimitri Glazkov.
2099
2100         As part of r73559, I added the referenceNode check to validate whether the root
2101         node of the iterator matches the node which is getting moved to other document.
2102         referenceNode is initialized to root, however can get moved using previousNode
2103         and nextNode methods, so it is required to use root directly.
2104         https://bugs.webkit.org/show_bug.cgi?id=50764
2105
2106         Test: fast/dom/node-iterator-reference-node-moved-crash.html
2107
2108         * dom/Document.cpp:
2109         (WebCore::Document::moveNodeIteratorsToNewDocument): change referenceNode to root.
2110
2111 2010-12-08  Dimitri Glazkov  <dglazkov@chromium.org>
2112
2113         Reviewed by Darin Adler.
2114
2115         Provide a generic way to store shadowParent on a Node.
2116         https://bugs.webkit.org/show_bug.cgi?id=50184
2117
2118         This patch makes TreeShared::m_parent act as either parentNode() or
2119         shadowHost() for Node. The distinction is controlled by IsShadowRootFlag.
2120
2121         Refactoring, so no new tests. See performance result testing in bug.
2122
2123         * dom/Element.cpp:
2124         (WebCore::Element::recalcStyle): Changed to use parentOrHostNode().
2125         * dom/Node.cpp:
2126         (WebCore::Node::shadowHost): Added.
2127         (WebCore::Node::setShadowHost): Added.
2128         (WebCore::Node::isContentEditable): Changed to use parentOrHostNode().
2129         (WebCore::Node::isContentRichlyEditable): Ditto.
2130         (WebCore::Node::nextRenderer): Ditto.
2131         (WebCore::Node::virtualComputedStyle): Ditto.
2132         (WebCore::Node::canStartSelection): Ditto.
2133         (WebCore::Node::shadowTreeRootNode): Changed to use parentNodeGuaranteedHostFree().
2134         (WebCore::Node::getEventAncestors): Ditto.
2135         (WebCore::Node::defaultEventHandler): Changed to use parentOrHostNode(). 
2136         * dom/Node.h: Added an extra flag and adjusted bit counts.
2137         (WebCore::Node::isShadowNode): Made non-virtual, switched to use flag.
2138         (WebCore::Node::parentNode): Made to recognize flag.
2139         (WebCore::Node::parentOrHostNode): Changed to use straight parent() and made const.
2140         (WebCore::Node::parentNodeGuaranteedHostFree): Added.
2141         (WebCore::Node::shadowParentNode): Made non-virtual and const.
2142         * editing/TextIterator.cpp:
2143         (WebCore::depthCrossingShadowBoundaries): Changed to use parentOrHostNode();
2144         (WebCore::nextInPreOrderCrossingShadowBoundaries): Ditto.
2145         (WebCore::previousInPostOrderCrossingShadowBoundaries):  Ditto.
2146         (WebCore::setUpFullyClippedStack): Ditto.
2147         (WebCore::TextIterator::advance): Ditto.
2148         (WebCore::SimplifiedBackwardsTextIterator::advance): Ditto.
2149         * page/DOMSelection.cpp:
2150         (WebCore::DOMSelection::anchorNode): Changed to use parentNodeGuaranteedHostFree().
2151         (WebCore::DOMSelection::focusNode): Ditto.
2152         (WebCore::DOMSelection::baseNode): Ditto.
2153         (WebCore::DOMSelection::extentNode): Ditto.
2154         (WebCore::DOMSelection::getRangeAt): Ditto.
2155         * rendering/MediaControlElements.cpp:
2156         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
2157             Changed to setShadowHost().
2158         (WebCore::MediaControlShadowRootElement::updateStyle): Changed to use shadowHost().
2159         (WebCore::MediaControlShadowRootElement::detach): Added an override to
2160             explicitly set shadowHost to 0. Otherwise, the element will leak.
2161         * rendering/MediaControlElements.h: Added detach def, removed members that are
2162             no longer needed.
2163         * rendering/RenderSVGShadowTreeRootContainer.cpp:
2164         (WebCore::RenderSVGShadowTreeRootContainer::~RenderSVGShadowTreeRootContainer):
2165             Added explicit clearing of shadowHost to avoid leaking and crashes,
2166             because SVG shadow DOM can be dynamically attached/detached, producing
2167             stale nodes in over/out event handling.
2168         * rendering/RenderSlider.cpp:
2169         (WebCore::SliderThumbElement::defaultEventHandler): Changed to use shadowHost().
2170         * rendering/RenderTextControlSingleLine.cpp:
2171         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
2172             Added explicit clearing of shadowHost and explicit destruction to
2173             avoid out-of-order removal of children.
2174         * rendering/RenderTreeAsText.cpp:
2175         (WebCore::nodePosition): Simplified code.
2176         * rendering/SVGShadowTreeElements.cpp:
2177         (WebCore::SVGShadowTreeRootElement::SVGShadowTreeRootElement): Added
2178             setting of shadowHost.
2179         (WebCore::SVGShadowTreeRootElement::attachElement): Changed to use shadowHost().
2180         (WebCore::SVGShadowTreeRootElement::clearShadowHost): Added.
2181         * rendering/SVGShadowTreeElements.h: Added def, removed members that are
2182              no longer needed.
2183         * rendering/ShadowElement.cpp:
2184         (WebCore::ShadowBlockElement::initAsPart): Changed to use shadowHost().
2185         * rendering/ShadowElement.h: Removed members that are no longer needed.
2186         (WebCore::ShadowElement::ShadowElement): Added setting of shadowHost.
2187         (WebCore::ShadowElement::detach): Added.
2188         * rendering/TextControlInnerElements.cpp:
2189         (WebCore::TextControlInnerElement::TextControlInnerElement): Added setting
2190             of shadowHost.
2191         (WebCore::TextControlInnerElement::attachInnerElement): Changed to use
2192             isShadowNode().
2193         (WebCore::TextControlInnerElement::detach): Added.
2194         * rendering/TextControlInnerElements.h: Removed members that are no
2195             longer needed.
2196         * svg/SVGElement.cpp:
2197         (WebCore::SVGElement::ownerSVGElement): Simplified code.
2198         (WebCore::SVGElement::viewportElement): Ditto.
2199         * svg/SVGLocatable.cpp:
2200         (WebCore::SVGLocatable::computeCTM): Ditto.
2201         * svg/SVGStyledElement.cpp:
2202         (WebCore::SVGStyledElement::title): Ditto.
2203         * svg/SVGUseElement.cpp:
2204         (WebCore::ShadowTreeUpdateBlocker::while): Ditto.
2205
2206 2010-12-09  Brady Eidson  <beidson@apple.com>
2207
2208         Reviewed by Maciej Stachowiak.
2209
2210         <rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191
2211         WebKit2 Authentication Support
2212
2213         * WebCore.exp.in:
2214
2215 2010-12-09  Peter Beverloo  <peter@lvp-media.com>
2216
2217         Reviewed by Maciej Stachowiak.
2218
2219         Default CSS definitions for the figure and figcaption elements.
2220
2221         Tests: fast/html/figcaption-element.html
2222                fast/html/figure-element.html
2223
2224         * css/html.css:
2225         (figure): The default figure-style equals a blockquote
2226         (figcaption): A non-sectioning block-level element
2227
2228 2010-12-09  Yury Semikhatsky  <yurys@chromium.org>
2229
2230         Reviewed by Pavel Feldman.
2231
2232         Web Inspector: Console records for failed XHRs should contain call stack and request method
2233         https://bugs.webkit.org/show_bug.cgi?id=50390
2234
2235         When inspector front-end is open we capture call stack at the place where request is sent and
2236         pass the stack along with other request data. There is a new type of console messages which
2237         is NetworkErrorMessageType, all messages of that type will have requestId field initialized
2238         with the corresponding network request identifier so that later on when we need to display
2239         that message in the front-end we could pull request data from the Network panel using
2240         this identifier. If there are no data for given requestId message formatting falls back to
2241         the old implementation which lacks such things as call stack, request method and exact
2242         source location.
2243
2244         * inspector/ConsoleMessage.cpp:
2245         (WebCore::ConsoleMessage::ConsoleMessage):
2246         (WebCore::ConsoleMessage::addToFrontend):
2247         (WebCore::ConsoleMessage::isEqual):
2248         * inspector/ConsoleMessage.h:
2249         * inspector/Inspector.idl:
2250         * inspector/InspectorController.cpp:
2251         (WebCore::InspectorController::didReceiveResponse):
2252         (WebCore::InspectorController::didFailLoading):
2253         * inspector/InspectorResourceAgent.cpp:
2254         (WebCore::InspectorResourceAgent::identifierForInitialRequest):
2255         * inspector/front-end/ConsoleView.js:
2256         (WebInspector.ConsoleView.prototype.updateMessageRepeatCount):
2257         (WebInspector.ConsoleMessage):
2258         (WebInspector.ConsoleMessage.prototype._formatMessage):
2259         (WebInspector.ConsoleMessage.prototype.toMessageElement):
2260         (WebInspector.ConsoleMessage.prototype.toString):
2261         (WebInspector.ConsoleMessage.prototype.isEqual):
2262         * inspector/front-end/ResourceManager.js:
2263         (WebInspector.ResourceManager.prototype.identifierForInitialRequest):
2264         * inspector/front-end/inspector.js:
2265         (WebInspector.addConsoleMessage):
2266         * page/Console.h:
2267
2268 2010-12-09  Dai Mikurube  <dmikurube@google.com>
2269
2270         Reviewed by Kent Tamura.
2271
2272         Implement "required" attribute for select tags
2273         https://bugs.webkit.org/show_bug.cgi?id=50380
2274
2275         Test: fast/forms/select-live-pseudo-selectors.html
2276               platform/mac/fast/objc/dom-html-select-live-pseudo-selectors.html
2277
2278         * dom/SelectElement.cpp:
2279         (WebCore::SelectElement::updateValidity): Added. It's a pure virtual function which is prepared so that HTMLSelectElement::updateValidity() calls HTMLSelectElement::setNeedsValidityCheck().
2280         (WebCore::SelectElement::parseMultipleAttribute): Added calling updateValidity().
2281         * html/HTMLSelectElement.cpp:
2282         (WebCore::HTMLSelectElement::deselectItems): Added calling setNeedsValidityCheck() to enable validity check after changing. No tests for this change since this function is not exposed to JavaScript or any web interface.
2283         (WebCore::HTMLSelectElement::setSelectedIndex): Added calling setNeedsValidityCheck().
2284         (WebCore::HTMLSelectElement::setSelectedIndexByUser): Added calling setNeedsValidityCheck().
2285         (WebCore::HTMLSelectElement::valueMissing): Added valueMissing() to check if selecting an invalid or placeholder label option when a valid required attribute is specified.
2286         (WebCore::HTMLSelectElement::listBoxSelectItem): Added calling setNeedsValidityCheck(). No tests for this change since it is not called yet. Look at the bug 36177 and the changeset 56180.
2287         (WebCore::HTMLSelectElement::add): Added calling setNeedsValidityCheck().
2288         (WebCore::HTMLSelectElement::remove): Added calling setNeedsValidityCheck().
2289         (WebCore::HTMLSelectElement::restoreFormControlState): Added calling setNeedsValidityCheck().
2290         (WebCore::HTMLSelectElement::parseMappedAttribute): Added calling setNeedsValidityCheck().
2291         (WebCore::HTMLSelectElement::selectAll): Added calling setNeedsValidityCheck().
2292         (WebCore::HTMLSelectElement::reset): Added calling setNeedsValidityCheck().
2293         (WebCore::HTMLSelectElement::updateListBoxSelection): Added calling setNeedsValidityCheck(). Skipped adding tests for this change as too complicated..
2294         (WebCore::HTMLSelectElement::setLength): Added calling setNeedsValidityCheck().
2295         (WebCore::HTMLSelectElement::isRequiredFormControl): Check if required or not.
2296         (WebCore::HTMLSelectElement::hasPlaceholderLabelOption): Added.
2297         (WebCore::HTMLSelectElement::updateValidity): Added. It calls setNeedsValidityCheck().
2298         * html/HTMLSelectElement.h:
2299         (WebCore::HTMLSelectElement::isOptionalFormControl): Check if not required.
2300         * html/HTMLSelectElement.idl: Added a required attribute to select elements..
2301         * html/ValidityState.cpp:
2302         (WebCore::ValidityState::valueMissing): Added valueMissing check for select elements into the global checker, ValidityState::valueMissing().
2303         * wml/WMLSelectElement.h:
2304         (WebCore::WMLSelectElement::updateValidity): Added. It does nothing.
2305
2306 2010-12-07  Jeremy Orlow  <jorlow@chromium.org>
2307
2308         Reviewed by Steve Block.
2309
2310         IndexedDB returns the wrong exceptions
2311         https://bugs.webkit.org/show_bug.cgi?id=50632
2312
2313         IndexedDB exceptions need to have an offset so they can
2314         be distinguished from DOM exceptions.  We also need to
2315         add strings for the various exceptions.  Lastly, make
2316         IDBDatabaseException use the common exception base class.
2317
2318         * bindings/js/JSDOMBinding.cpp:
2319         (WebCore::setDOMException):
2320         * bindings/v8/V8Proxy.cpp:
2321         (WebCore::V8Proxy::setDOMException):
2322         * dom/ExceptionCode.cpp:
2323         (WebCore::getExceptionCodeDescription):
2324         * dom/ExceptionCode.h:
2325         * storage/IDBDatabaseError.h:
2326         (WebCore::IDBDatabaseError::code):
2327         * storage/IDBDatabaseException.h:
2328         (WebCore::IDBDatabaseException::create):
2329         (WebCore::IDBDatabaseException::ErrorCodeToExceptionCode):
2330         (WebCore::IDBDatabaseException::IDBDatabaseException):
2331         * storage/IDBDatabaseException.idl:
2332
2333 2010-12-09  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2334
2335         Build fix for GTK+3. Use functions added for GTK+ 2.24 to get the
2336         GDK window size.
2337
2338         * plugins/gtk/gtk2xtbin.c:
2339         (gtk_xtbin_realize):
2340
2341 2010-12-09  Siddharth Mathur  <siddharth.mathur@nokia.com>
2342
2343         Reviewed by Laszlo Gombos.
2344
2345         Use BUILDING_WEBKIT like other ports
2346         https://bugs.webkit.org/show_bug.cgi?id=50713
2347
2348         * WebCore.pro: Change BUILD_WEBKIT to BUILDING_WEBKIT
2349
2350 2010-12-08  Erik Arvidsson  <arv@chromium.org>
2351
2352         Reviewed by Darin Adler.
2353
2354         Replace getAttribute().isNull() with fastHasAttribute()
2355         https://bugs.webkit.org/show_bug.cgi?id=50719
2356
2357         Covered by existing tests.
2358
2359         * dom/SelectElement.cpp:
2360         (WebCore::SelectElement::reset):
2361         * html/HTMLAppletElement.cpp:
2362         (WebCore::HTMLAppletElement::rendererIsNeeded):
2363         * html/HTMLCollection.cpp:
2364         (WebCore::HTMLCollection::itemAfter):
2365         * html/HTMLFormControlElement.cpp:
2366         (WebCore::HTMLFormControlElement::formNoValidate):
2367         * html/HTMLFormElement.cpp:
2368         (WebCore::HTMLFormElement::noValidate):
2369         * html/HTMLInputElement.cpp:
2370         (WebCore::HTMLInputElement::defaultChecked):
2371         (WebCore::HTMLInputElement::multiple):
2372         (WebCore::HTMLInputElement::webkitdirectory):
2373         * html/HTMLOptionElement.cpp:
2374         (WebCore::HTMLOptionElement::defaultSelected):
2375         * html/HTMLScriptElement.cpp:
2376         (WebCore::HTMLScriptElement::asyncAttributeValue):
2377         (WebCore::HTMLScriptElement::deferAttributeValue):
2378         * rendering/RenderFileUploadControl.cpp:
2379         (WebCore::RenderFileUploadControl::allowsMultipleFiles):
2380         (WebCore::RenderFileUploadControl::allowsDirectoryUpload):
2381
2382 2010-12-08  Nicolas Dufresne  <nicolas.dufresne@collabora.co.uk>
2383
2384         Reviewed by Martin Robinson.
2385
2386         Full page size flash plugins do not show in all situations
2387         https://bugs.webkit.org/show_bug.cgi?id=47742
2388
2389         This patch moves the plugin widget size allocation after the
2390         NPP_SetWindow is called with the effect that the resize of Flash
2391         content no longer result in grey flash. This seems logical since the
2392         widget tree cannot be fully constructed before the plugin receives
2393         the new container window.
2394
2395         Test: manual-tests/plugins/gtk-windowed-grey-glitch.html
2396
2397         * plugins/gtk/PluginViewGtk.cpp:
2398         (WebCore::PluginView::setNPWindowIfNeeded):
2399
2400 2010-12-08  David Hyatt  <hyatt@apple.com>
2401
2402         Reviewed by Simon Fraser.
2403
2404         Fix regression from xji's wheel scroll patch.  The vertical case is looking at the horizontal
2405         maximum position and not the vertical position.
2406
2407         * platform/ScrollView.cpp:
2408         (WebCore::ScrollView::wheelEvent):
2409
2410 2010-12-08  Sam Weinig  <sam@webkit.org>
2411
2412         Reviewed by Darin Adler.
2413
2414         Need a way to get a WKBundleFrameRef from JS HTMLIFrameElement
2415         https://bugs.webkit.org/show_bug.cgi?id=50726
2416
2417         * WebCore.xcodeproj/project.pbxproj: Expose HTMLIFrameElement.h.
2418
2419 2010-12-08  Matthew Delaney  <mdelaney@apple.com>
2420
2421         Reviewed by Simon Fraser.
2422
2423         Add getter and setters for acceleratesRendering flag on layers
2424         https://bugs.webkit.org/show_bug.cgi?id=50717
2425
2426         * platform/graphics/GraphicsLayer.cpp:
2427         * platform/graphics/ca/GraphicsLayerCA.cpp:
2428         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2429         Plumbed through acceleratedRendering flag.
2430
2431 2010-12-07  Zhenyao Mo  <zmo@google.com>
2432
2433         Reviewed by Kenneth Russell.
2434
2435         WebGLUniformLocation objects must be invalidated during linkProgram
2436         https://bugs.webkit.org/show_bug.cgi?id=37118
2437
2438         * html/canvas/WebGLProgram.cpp:
2439         (WebCore::WebGLProgram::WebGLProgram): Initialize link count to 0.
2440         (WebCore::WebGLProgram::cacheActiveAttribLocations): Don't check link status through gl call; use the cached status instead.
2441         * html/canvas/WebGLProgram.h:
2442         (WebCore::WebGLProgram::getLinkCount): Get link count.
2443         (WebCore::WebGLProgram::increaseLinkCount): Increase link count by 1.
2444         * html/canvas/WebGLRenderingContext.cpp:
2445         (WebCore::WebGLRenderingContext::getUniform): Fix a bug where wrong error is generated.
2446         (WebCore::WebGLRenderingContext::linkProgram): call increaseLinkCount after linkProgram.
2447         * html/canvas/WebGLUniformLocation.cpp:
2448         (WebCore::WebGLUniformLocation::WebGLUniformLocation): Set program's link count upon creation.
2449         (WebCore::WebGLUniformLocation::program): Return null if count doesn't match the program's.
2450         (WebCore::WebGLUniformLocation::location): Return -1 if count doesn't match the program's.
2451         * html/canvas/WebGLUniformLocation.h:
2452
2453 2010-12-08  Adele Peterson  <adele@apple.com>
2454
2455         Reviewed by Darin Adler.
2456
2457         Fix for https://bugs.webkit.org/show_bug.cgi?id=50725
2458         <rdar://problem/8694972> REGRESSION (r72052): "Search" placeholder in MobileMe mail is positioned too high
2459
2460         Test: fast/forms/placeholder-position.html
2461
2462         Since we center the inner text element for single line text controls, 
2463         we should ask the subclass to give us the y offset instead of trying to calculate it in the RenderTextControl class.
2464
2465         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::paintPlaceholder):
2466         * rendering/RenderTextControl.h:
2467         * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::textBlockInsetTop):
2468         * rendering/RenderTextControlMultiLine.h:
2469         * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::textBlockInsetTop):
2470         * rendering/RenderTextControlSingleLine.h:
2471
2472 2010-12-08  Chris Rogers  <crogers@google.com>
2473
2474         Reviewed by Kenneth Russell.
2475
2476         Add web audio files to mac port Xcode projects
2477         https://bugs.webkit.org/show_bug.cgi?id=50721
2478
2479         No new tests since audio API is not yet implemented.
2480
2481         * WebCore.xcodeproj/project.pbxproj:
2482         * bindings/js/JSDOMWindowCustom.cpp:
2483         (WebCore::JSDOMWindow::webkitAudioContext):
2484
2485 2010-12-08  Kent Tamura  <tkent@chromium.org>
2486
2487         Reviewed by Alexey Proskuryakov.
2488
2489         Yensign hack should work with Shift_JIS and ISO-2022-JP encodings.
2490         https://bugs.webkit.org/show_bug.cgi?id=49714
2491
2492         IE chooses a font which shows a yensign for 0x5c code point for a page
2493         encoded in x-mac-japanese, ISO-2022-JP, EUC-JP, Shift_JIS, Shift_JIS_X0213-2000,
2494         x-sjis, and Windows-31J.
2495         We have emulated this behavior by replacing 0x5c with 0xa5 for EUC-JP and
2496         Shift_JIS_X0213-2000. This change adds other encodings above.
2497
2498         Also, we move the HashSet initialization for isJapanese() and
2499         backslashAsCurrencySymbol() to TextEncodingRegistry.cpp because of
2500         ease of making them multi-thread safe.
2501
2502         * platform/text/TextEncoding.cpp:
2503         (WebCore::TextEncoding::isJapanese): Just calls isJapaneseEncoding().
2504         (WebCore::TextEncoding::backslashAsCurrencySymbol): Uses shouldShowBackslashAsCurrencySymbolIn().
2505         * platform/text/TextEncodingRegistry.cpp:
2506         (WebCore::addEncodingName): Moved from TextEncoding.cpp, and stop using atomicCanonicalTextEncodingName().
2507         (WebCore::buildQuirksSets): Added. Initializes HashSets for isJapaneseEncoding() and shouldShowBackslashAsCurrencySymbolIn().
2508         (WebCore::isJapaneseEncoding):
2509         (WebCore::shouldShowBackslashAsCurrencySymbolIn):
2510         (WebCore::extendTextCodecMaps): Add a call to buildQuirksSets().
2511         * platform/text/TextEncodingRegistry.h:
2512
2513 2010-12-08  Andy Estes  <aestes@apple.com>
2514
2515         Reviewed by Darin Adler.
2516
2517         Reflected unsigned attributes should be in the range [0, 2^31).
2518         https://bugs.webkit.org/show_bug.cgi?id=50472
2519
2520         HTML5 says that unsigned reflected attributes should be in the range
2521         [0, 2^31). When a value isn't in this range, a default value (or 0)
2522         should be returned instead. Update the JS bindings code generator to
2523         ensure 0 is returned when a content attribute value falls outside of
2524         this range.
2525
2526         Tests: bindings/scripts/test/TestObj.idl
2527                fast/html/marquee-element.html
2528
2529         * bindings/scripts/CodeGeneratorJS.pm: Return the maximum of 0 and the
2530         content attribute as a 32-bit signed int when converting a native value
2531         to an unsigned JS value.
2532         * bindings/scripts/test/TestObj.idl: Add a reflected unsigned attribute
2533         to test code generation.
2534         * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Update test results.
2535         * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
2536         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
2537         * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
2538         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
2539         * bindings/scripts/test/JS/JSTestObj.h: Ditto.
2540         * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
2541         * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
2542         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
2543
2544 2010-12-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2545
2546         Reviewed by Martin Robinson.
2547
2548         [GTK] Use gtk_icon_set_render_icon() to render icons in RenderThemeGtk
2549         https://bugs.webkit.org/show_bug.cgi?id=50623
2550
2551         We don't need to cache the icons since the will be cached by GTK+,
2552         and they will be rendered using the state and text direction.
2553
2554         * platform/gtk/RenderThemeGtk.cpp:
2555         (WebCore::paintStockIcon):
2556         (WebCore::getMediaButtonIconSize):
2557         (WebCore::RenderThemeGtk::initMediaColors):
2558         (WebCore::RenderThemeGtk::initMediaButtons):
2559         (WebCore::RenderThemeGtk::RenderThemeGtk):
2560         (WebCore::RenderThemeGtk::~RenderThemeGtk):
2561         (WebCore::RenderThemeGtk::gtkIconState):
2562         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationStyle):
2563         (WebCore::centerRectVerticallyInParentInputElement):
2564         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
2565         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
2566         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
2567         (WebCore::RenderThemeGtk::platformColorsDidChange):
2568         (WebCore::RenderThemeGtk::paintMediaButton):
2569         (WebCore::RenderThemeGtk::paintMediaFullscreenButton):
2570         (WebCore::RenderThemeGtk::paintMediaMuteButton):
2571         (WebCore::RenderThemeGtk::paintMediaPlayButton):
2572         (WebCore::RenderThemeGtk::paintMediaSeekBackButton):
2573         (WebCore::RenderThemeGtk::paintMediaSeekForwardButton):
2574         * platform/gtk/RenderThemeGtk.h:
2575
2576 2010-12-08  Abhishek Arya  <inferno@chromium.org>
2577
2578         Reviewed by Dimitri Glazkov.
2579
2580         Detach node iterator and move to new document when node gets moved.
2581         https://bugs.webkit.org/show_bug.cgi?id=50697
2582
2583         Test: fast/dom/node-iterator-document-moved-crash.html
2584
2585         * dom/Document.cpp: Method that takes a node and new document as argument.
2586         It detaches the node iterators belonging to the current document and attaches
2587         them to the new document.
2588         (WebCore::Document::moveNodeIteratorsToNewDocument):
2589         * dom/Document.h: Function definition.
2590         * dom/Node.cpp: When node is moved to another document, call the function to move
2591         the iterators appropriately.
2592         (WebCore::Node::setDocument):
2593
2594 2010-12-08  James Robinson  <jamesr@chromium.org>
2595
2596         Reviewed by Kenneth Russell.
2597
2598         [chromium] Text is blurry on a large composited layer with an odd center x/y coordinate
2599         https://bugs.webkit.org/show_bug.cgi?id=50702
2600
2601         Compute the center of a large layer using floats instead of ints to avoid roundoff errors.
2602
2603         Test: compositing/text-on-large-layer.html
2604
2605         * platform/graphics/chromium/ContentLayerChromium.cpp:
2606         (WebCore::ContentLayerChromium::draw):
2607
2608 2010-12-08  Ryosuke Niwa  <rniwa@webkit.org>
2609
2610         Reviewed by Dan Bernstein.
2611
2612         REGRESSION: LayoutTests/editing/selection/caret-rtl-2.html fails
2613         https://bugs.webkit.org/show_bug.cgi?id=33503
2614
2615         The bug was caused by Font::offsetForPosition's not taking into account the containing block's text direction.
2616         When RTL text appears in a LTR block, the offset at the beginning of RTL text is on the left of RTL text,
2617         and the offset at the end of RTL text is on the right of RTL text. For example, if we had RTL text CBA,
2618         then the correspondance between letters and offsets in logical order are: A -> 0, B -> 1, and C -> 2.
2619
2620         Case 1. CBA appears in a RTL block:
2621           In this case, clicking on the visual left of CBA puts the caret naturally at Position("CBA", 2).
2622           Clicking on the visual right of CBA puts the caret at Position("CBA", 0) as expected.
2623         Case 2. CBA appears in a LTR block:
2624           Because the containing block flows from left to right, by convention, Position("CBA", 2") corresponds
2625           to the visual right of CBA, and Position("CBA", 0) corresponds to the visual left of CBA.
2626           Therefore, clicking on the visual left of CBA should put the caret at Position("CBA", 0),
2627           and clicking on the visual right should put it at Position("CBA", 2).
2628
2629         The bug was caused by WebKit's not considering case 2. The same bug also exist for LTR text in a RTL block.
2630         Fixed the bug by taking care of the case 2 in InlineTextBox::offsetForPosition.
2631
2632         Tests: editing/selection/caret-ltr-2-left.html
2633                editing/selection/caret-ltr-2.html
2634                editing/selection/caret-ltr-right.html
2635                editing/selection/caret-ltr.html
2636                editing/selection/caret-rtl-2-left.html
2637                editing/selection/caret-rtl-right.html
2638
2639         * rendering/InlineTextBox.cpp:
2640         (WebCore::InlineTextBox::offsetForPosition):
2641
2642 2010-12-08  Anders Carlsson  <andersca@apple.com>
2643
2644         Reviewed by Darin Adler.
2645
2646         Fix some clang++ warnings (one of which was an actual bug)
2647         https://bugs.webkit.org/show_bug.cgi?id=50700
2648
2649         * page/mac/DragControllerMac.mm:
2650         (WebCore::DragController::dragOperation):
2651         Add parentheses to silent a clang warning.
2652
2653         * page/mac/EventHandlerMac.mm:
2654         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
2655         Fix || vs && precedence bug uncovered by clang.
2656
2657         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2658         (WebCore::GraphicsContext3D::reshape):
2659         Use an early return to avoid a warning.
2660
2661 2010-12-08  Chris Marrin  <cmarrin@apple.com>
2662
2663         Reviewed by Simon Fraser.
2664
2665         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
2666         https://bugs.webkit.org/show_bug.cgi?id=49388
2667
2668         Added copy constructors and casting operators to go between 
2669         TransformationMatrix and CATransform3D. Also added a copy
2670         constructor to go from CGAffineTransform to TransformationMatrix.
2671         Used these new methods to clean up platform CA code. This will
2672         make it easier to port to Windows.
2673
2674         I also fixed a couple of build issues found when trying out a 
2675         Windows build.
2676
2677         This is a resubmission of changesets r73477 and r73483 with a 
2678         fix for the SL build. The failure was because TransformationMatrix
2679         included QuartzCore/CATransform3D.h which brought in some system
2680         libraries, including Quickdraw, which has a definition for
2681         'Cursor' which clashed with WebCore's 'Cursor' class. So I had
2682         to qualify its use in WebChromeClient.cpp in WebKit2.
2683
2684         * WebCore.xcodeproj/project.pbxproj:
2685         * platform/graphics/ca/GraphicsLayerCA.cpp:
2686         (WebCore::GraphicsLayerCA::updateContentsTransform):
2687         (WebCore::GraphicsLayerCA::ensureCloneLayers):
2688         (WebCore::GraphicsLayerCA::fetchCloneLayers):
2689         * platform/graphics/ca/TransformationMatrixCA.cpp: Copied from WebCore/platform/graphics/ca/TransformationMatrixCA.cpp.
2690         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2691         (PlatformCAAnimation::setFromValue):
2692         (PlatformCAAnimation::setToValue):
2693         (PlatformCAAnimation::setValues):
2694         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2695         (PlatformCALayer::transform):
2696         (PlatformCALayer::setTransform):
2697         (PlatformCALayer::sublayerTransform):
2698         (PlatformCALayer::setSublayerTransform):
2699         (PlatformCALayer::contentsTransform):
2700         (PlatformCALayer::setContentsTransform):
2701         * platform/graphics/cg/TransformationMatrixCG.cpp:
2702         (WebCore::TransformationMatrix::TransformationMatrix):
2703         * platform/graphics/transforms/TransformationMatrix.h:
2704
2705 2010-12-07  Brian Weinstein  <bweinstein@apple.com>
2706
2707         Reviewed by John Sullivan.
2708
2709         Layering Violation in ContextMenu - member variable of type HitTestResult
2710         https://bugs.webkit.org/show_bug.cgi?id=50586
2711         
2712         ContextMenu had a layering violation by having a member variable of type HitTestResult, because
2713         classes in WebCore/platform can't know about classes in WebCore.
2714         
2715         This patch moves the HitTestResult and all functions that use it out of ContextMenu into ContextMenuController.
2716         All of the functions that dealt with populating the ContextMenu are now in ContextMenuController, and this
2717         allowed us to delete the ContextMenu file, putting all of the cross-platform code that used to be it
2718         in ContextMenuController, and the rest of the code is in the platform-specific files.
2719
2720         No change in behavior, no new tests.
2721
2722         * Android.mk: Removed ContextMenu.cpp.
2723         * CMakeLists.txt: Ditto.
2724         * GNUmakefile.am: Ditto.
2725         * WebCore.gypi: Ditto.
2726         * WebCore.pro: Ditto.
2727         * WebCore.vcproj/WebCore.vcproj: Ditto.
2728         * WebCore.xcodeproj/project.pbxproj: Ditto.
2729
2730         * page/ContextMenuController.cpp:
2731         (WebCore::ContextMenuController::ContextMenuController): Initialized m_hitTestResult to an empty HitTestResult.
2732         (WebCore::ContextMenuController::handleContextMenuEvent): Call populate on the ContextMenuController instead
2733             of the ContextMenu.
2734         (WebCore::ContextMenuController::createContextMenu): Fix some indination, and store the HitTestResult in a member
2735             variable.
2736         (WebCore::ContextMenuController::showContextMenu): Call addInspectElementItem on the ContextMenuController.
2737         (WebCore::ContextMenuController::contextMenuItemSelected): Use m_hitTestResult whenever we need a HitTestResult.
2738         (WebCore::ContextMenuController::appendItem): Validates the item for its state, and then appends it to the parent menu.
2739             This allowed us to move checkOrEnableIfNeeded from ContextMenu.
2740
2741         These functions were all moved from ContextMenu, and changed slightly to fit in ContextMenuController.
2742         All calls to ContextMenu::appendItem were changed to ContextMenuController::appendItem, which takes care
2743         of validating the menu.
2744         (WebCore::separatorItem): Moved from ContextMenu.
2745         (WebCore::ContextMenuController::createAndAppendFontSubMenu): Ditto.
2746         (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu): Ditto.
2747         (WebCore::ContextMenuController::createAndAppendSpeechSubMenu): Ditto.
2748         (WebCore::ContextMenuController::createAndAppendWritingDirectionSubMenu): Ditto.
2749         (WebCore::ContextMenuController::createAndAppendTextDirectionSubMenu): Ditto.
2750         (WebCore::ContextMenuController::createAndAppendSubstitutionsSubMenu): Ditto.
2751         (WebCore::ContextMenuController::createAndAppendTransformationsSubMenu): Ditto.
2752         (WebCore::selectionContainsPossibleWord): Ditto.
2753         (WebCore::ContextMenuController::populate): Ditto.
2754         (WebCore::ContextMenuController::addInspectElementItem): Ditto.
2755         (WebCore::ContextMenuController::checkOrEnableIfNeeded): Ditto.
2756         
2757         * page/ContextMenuController.h:
2758         (WebCore::ContextMenuController::hitTestResult): Returns the HitTestResult of the current ContextMenu.
2759
2760         * platform/ContextMenu.cpp: Removed.
2761         * platform/ContextMenu.h:
2762         * platform/efl/ContextMenuEfl.cpp:
2763         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2764         (WebCore::ContextMenu::appendItem): Removed the call to checkOrEnableIfNeeded.
2765         * platform/gtk/ContextMenuGtk.cpp:
2766         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2767         (WebCore::ContextMenu::appendItem): Ditto.
2768         * platform/haiku/ContextMenuHaiku.cpp:
2769         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2770         (WebCore::ContextMenu::appendItem): Ditto.
2771         (WebCore::ContextMenu::insertItem): Ditto.
2772         * platform/mac/ContextMenuMac.mm:
2773         (-[WebCoreMenuTarget validateMenuItem:]): Calls checkOrEnableIfNeeded on the controller instead of
2774             the context menu.
2775         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2776         (WebCore::ContextMenu::appendItem): Removed the call to checkOrEnableIfNeeded.
2777         (WebCore::ContextMenu::insertItem): Ditto.
2778         * platform/win/ContextMenuWin.cpp:
2779         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2780         (WebCore::ContextMenu::insertItem): Removed the call to checkOrEnableIfNeeded.
2781         * platform/wx/ContextMenuWx.cpp:
2782         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2783         (ContextMenu::appendItem): Ditto.
2784
2785 2010-12-08  Martin Robinson  <mrobinson@igalia.com>
2786
2787         Reviewed by John Sullivan.
2788
2789         [GTK] Layering violation in ContextMenuGtk.cpp
2790         https://bugs.webkit.org/show_bug.cgi?id=50676
2791
2792         ContextMenuGtk accesses the page's ContextMenuController, which is a layering
2793         violation. This was fixed for Mac with change r73469. We make a similar fix here
2794         by moving the "activated" signal connection to the WebKit layer.
2795
2796         * platform/gtk/ContextMenuGtk.cpp:
2797         (WebCore::ContextMenu::appendItem): Remove access of ContextMenuController. This
2798         is a layering violation.
2799
2800 2010-12-08  Jessie Berlin  <jberlin@apple.com>
2801
2802         Reviewed by Adam Roben.
2803
2804         WebKit2: Implement WebChromeClient::exceededDatabaseQuota
2805         https://bugs.webkit.org/show_bug.cgi?id=50656
2806
2807         * WebCore.exp.in:
2808         Export the symbol for SecurityOrigin::databaseIdentifier.
2809
2810 2010-12-08  Csaba Osztrogonác  <ossy@webkit.org>
2811
2812         Unreviewed, rolling out r73521.
2813         http://trac.webkit.org/changeset/73521
2814         https://bugs.webkit.org/show_bug.cgi?id=50640
2815
2816         It broke 90 layout tests
2817
2818         * bindings/js/JSDOMBinding.cpp:
2819         (WebCore::printErrorMessageForFrame):
2820         * bindings/js/JSDOMWindowBase.cpp:
2821         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage):
2822         * bindings/js/JSDOMWindowCustom.cpp:
2823         (WebCore::JSDOMWindow::setLocation):
2824         * page/DOMWindow.cpp:
2825         * page/DOMWindow.h:
2826
2827 2010-12-08  David Hyatt  <hyatt@apple.com>
2828
2829         Reviewed by Anders Carlsson.
2830
2831         https://bugs.webkit.org/show_bug.cgi?id=50576
2832
2833         REGRESSION in position of autocomplete popup on RTL page.
2834
2835         RTL static position computation did not subtract out the width of the enclosing box if the
2836         immediate parent was a RenderInline.  This bug was exposed by properly changing the RenderView
2837         to be RTL when the document was RTL.
2838
2839         Added three new tests in fast/block/positioning.
2840
2841         * rendering/RenderBox.cpp:
2842         (WebCore::RenderBox::computePositionedLogicalWidth):
2843
2844 2010-12-08  Xiaomei Ji  <xji@chromium.org>
2845
2846         Reviewed by David Hyatt.
2847
2848         Fix backward mouse wheeling not working when scroll position is below 0.
2849         https://bugs.webkit.org/show_bug.cgi?id=50370
2850
2851         Tests: fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
2852                fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
2853
2854         * platform/ScrollView.cpp:
2855         (WebCore::ScrollView::wheelEvent):
2856
2857 2010-12-08  Simon Fraser  <simon.fraser@apple.com>
2858
2859         Reviewed by Dan Bernstein.
2860
2861         Fix pauseAnimation API to work with shorthand properties
2862         https://bugs.webkit.org/show_bug.cgi?id=50639
2863         
2864         The pause API is always called with a long-hand property, but that
2865         property may be animating via a shorthand. Detect this, and pause
2866         such shorthand animations.
2867
2868         * page/animation/AnimationBase.cpp:
2869         (WebCore::ShorthandPropertyWrapper::propertyWrappers): Expose the vector
2870         of wrappers used by a shorthand wrapper.
2871
2872         (WebCore::gatherEnclosingShorthandProperties): Utility function that walks
2873         through the shorthand wrappers, keeping track of which can affect the given
2874         property.
2875         (WebCore::AnimationBase::animatableShorthandsAffectingProperty): Return a set
2876         of shorthand properties that can affect the given property.
2877
2878         * page/animation/AnimationBase.h: New method.
2879         * page/animation/CompositeAnimation.cpp:
2880         (WebCore::CompositeAnimation::pauseTransitionAtTime): If we don't find the
2881         property itself, check whether it's being animated via shorthands.
2882
2883 2010-12-08  David Hyatt  <hyatt@apple.com>
2884
2885         Reviewed by Beth Dakin.
2886
2887         <rdar://problem/8740920> Gestures: Frame::scalePage() broken by r73885
2888
2889         Make sure the transform applied to the RenderView for page scaling is incorporated into the
2890         docTop/Bottom/Left/Right accessors.
2891
2892         * rendering/RenderView.cpp:
2893         (WebCore::RenderView::docTop):
2894         (WebCore::RenderView::docBottom):
2895         (WebCore::RenderView::docLeft):
2896         (WebCore::RenderView::docRight):
2897
2898 2010-12-08  Ilya Tikhonovsky  <loislo@chromium.org>
2899
2900         Reviewed by Yury Semikhatsky.
2901
2902         Web Inspector: Protocol cleanup task. Remove WebInspector wrappers
2903         for TimelineAgent functions.
2904
2905         https://bugs.webkit.org/show_bug.cgi?id=50690
2906
2907         * inspector/Inspector.idl:
2908         * inspector/front-end/TimelineAgent.js:
2909         * inspector/front-end/TimelinePanel.js:
2910         (WebInspector.TimelinePanel):
2911         (WebInspector.TimelinePanel.prototype.timelineProfilerWasStarted):
2912         (WebInspector.TimelinePanel.prototype.timelineProfilerWasStopped):
2913
2914 2010-12-08  Philippe Normand  <pnormand@igalia.com>
2915
2916         Reviewed by Gustavo Noronha Silva.
2917
2918         [GTK] media/fullscreen* failing on 64-bits Debug
2919         https://bugs.webkit.org/show_bug.cgi?id=50394
2920
2921         Avoid emiting durationchanged in the case where the previous
2922         duration was 0 because that case is already handled by the
2923         HTMLMediaElement.
2924
2925         Test: media/media-fullscreen*.html
2926
2927         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2928         (WebCore::MediaPlayerPrivateGStreamer::durationChanged):
2929
2930 2010-12-07  Darin Adler  <darin@apple.com>
2931
2932         Reviewed by Geoffrey Garen.
2933
2934         Move DOMWindow::setLocation logic into DOMWindow class and out of JavaScript binding
2935         https://bugs.webkit.org/show_bug.cgi?id=50640
2936
2937         * bindings/js/JSDOMBinding.cpp:
2938         (WebCore::printErrorMessageForFrame): Removed body; just call through to
2939         DOMWindow::printErrorMessage.
2940
2941         * bindings/js/JSDOMWindowBase.cpp:
2942         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): Removed body;
2943         just call through to DOMWindow::crossDomainAccessErrorMessage.
2944
2945         * bindings/js/JSDOMWindowCustom.cpp:
2946         (WebCore::JSDOMWindow::setLocation): Changed terminology to use activeFrame and
2947         firstFrame, rather than the older lexicalFrame and dynamicFrame. Removed most
2948         of the body and moved it into DOMWindow::setLocation.
2949
2950         * page/DOMWindow.cpp:
2951         (WebCore::DOMWindow::setLocation): Added. Does all the same work that
2952         JSDOMWindow::setLocation used to do, but in a way that's not specific
2953         to JavaScript.
2954         (WebCore::DOMWindow::printErrorMessage): Added.
2955         (WebCore::DOMWindow::crossDomainAccessErrorMessage): Added.
2956
2957         * page/DOMWindow.h: Added setLocation, printErrorMessage, and
2958         crossDomainAccessErrorMessage.
2959
2960 2010-12-08  Alejandro G. Castro  <alex@igalia.com>
2961
2962         Unreviewed, rolling out r73494.
2963         http://trac.webkit.org/changeset/73494
2964         https://bugs.webkit.org/show_bug.cgi?id=50380
2965
2966         The tests added are crashing in the debug bots (macn and gtk)
2967
2968         * html/HTMLSelectElement.cpp:
2969         (WebCore::HTMLSelectElement::deselectItems):
2970         (WebCore::HTMLSelectElement::setSelectedIndex):
2971         (WebCore::HTMLSelectElement::setSelectedIndexByUser):
2972         (WebCore::HTMLSelectElement::listBoxSelectItem):
2973         (WebCore::HTMLSelectElement::add):
2974         (WebCore::HTMLSelectElement::remove):
2975         (WebCore::HTMLSelectElement::restoreFormControlState):
2976         (WebCore::HTMLSelectElement::parseMappedAttribute):
2977         (WebCore::HTMLSelectElement::selectAll):
2978         (WebCore::HTMLSelectElement::reset):
2979         (WebCore::HTMLSelectElement::updateListBoxSelection):
2980         (WebCore::HTMLSelectElement::setLength):
2981         * html/HTMLSelectElement.h:
2982         (WebCore::HTMLSelectElement::isOptionalFormControl):
2983         * html/HTMLSelectElement.idl:
2984         * html/ValidityState.cpp:
2985         (WebCore::ValidityState::valueMissing):
2986
2987 2010-12-07  Ilya Tikhonovsky  <loislo@chromium.org>
2988
2989         Reviewed by Pavel Feldman.
2990
2991         Web Inspector: Inspector protocol cleanup task. Remove
2992         WebInspector wrappers for DOMAgent functions.
2993
2994         There were a lot of wrappers in WebInspector namespace
2995         for different WebInspector agents functions. As far as we have a
2996         generic mechanic for such functions we can remove these
2997         wrappers and register domAgent instance as a handler for
2998         DOM domain notifications.
2999
3000         https://bugs.webkit.org/show_bug.cgi?id=50626
3001
3002         * inspector/Inspector.idl:
3003         * inspector/front-end/DOMAgent.js:
3004         (WebInspector.DOMNode):
3005         (WebInspector.DOMAgent):
3006         (WebInspector.DOMAgent.prototype.attributesUpdated):
3007         (WebInspector.DOMAgent.prototype.characterDataModified):
3008         (WebInspector.DOMAgent.prototype.setDocument):
3009         (WebInspector.DOMAgent.prototype.setDetachedRoot):
3010         (WebInspector.DOMAgent.prototype.setChildNodes):
3011         (WebInspector.DOMAgent.prototype.childNodeCountUpdated):
3012         (WebInspector.DOMAgent.prototype.childNodeInserted):
3013         (WebInspector.DOMAgent.prototype.childNodeRemoved):
3014         (WebInspector.EventListeners.getEventListenersForNodeAsync):
3015         * inspector/front-end/inspector.js:
3016         (WebInspector.didCommitLoad):
3017
3018 2010-12-08  Yury Semikhatsky  <yurys@chromium.org>
3019
3020         Reviewed by Pavel Feldman.
3021
3022         Web Inspector: remove groupLevel counter from console messages
3023         https://bugs.webkit.org/show_bug.cgi?id=50672
3024
3025         * inspector/ConsoleMessage.cpp:
3026         (WebCore::ConsoleMessage::ConsoleMessage):
3027         (WebCore::ConsoleMessage::addToFrontend):
3028         (WebCore::ConsoleMessage::isEqual):
3029         * inspector/ConsoleMessage.h:
3030         * inspector/InspectorController.cpp:
3031         (WebCore::InspectorController::InspectorController):
3032         (WebCore::InspectorController::addMessageToConsole):
3033         (WebCore::InspectorController::clearConsoleMessages):
3034         (WebCore::InspectorController::startGroup):
3035         (WebCore::InspectorController::endGroup):
3036         * inspector/InspectorController.h:
3037         * inspector/front-end/ConsoleView.js:
3038         (WebInspector.ConsoleView.createFilterElement):
3039         (WebInspector.ConsoleView):
3040         (WebInspector.ConsoleView.prototype.filter):
3041         (WebInspector.ConsoleView.prototype.afterShow):
3042         (WebInspector.ConsoleView.prototype.addMessage):
3043         (WebInspector.ConsoleView.prototype.updateMessageRepeatCount):
3044         (WebInspector.ConsoleView.prototype.clearMessages):
3045         (WebInspector.ConsoleMessage):
3046         (WebInspector.ConsoleMessage.createTextMessage):
3047         (WebInspector.ConsoleMessage.prototype.toMessageElement):
3048         (WebInspector.ConsoleMessage.prototype._addMessageHeader):
3049         (WebInspector.ConsoleMessage.prototype._updateRepeatCount):
3050         (WebInspector.ConsoleMessage.prototype.toString):
3051         (WebInspector.ConsoleMessage.prototype.isEqual):
3052         (WebInspector.ConsoleGroup):
3053         * inspector/front-end/Resource.js:
3054         (WebInspector.Resource.prototype._checkWarning):
3055         * inspector/front-end/SourceFrame.js:
3056         (WebInspector.SourceFrame.prototype._addMessageToSource):
3057         * inspector/front-end/inspector.js:
3058         (WebInspector.addConsoleMessage):
3059         (WebInspector.log.logMessage):
3060         (WebInspector.log):
3061
3062 2010-12-07  Pavel Podivilov  <podivilov@chromium.org>
3063
3064         Reviewed by Pavel Feldman.
3065
3066         Web Inspector: introduce DebuggerModel class representing InspectorDebuggerAgent state.
3067         https://bugs.webkit.org/show_bug.cgi?id=50567
3068
3069         Moved debugging-related code from BreakpointManager to DebuggerModel. Moved Breakpoint class to a separate file.
3070
3071         * English.lproj/localizedStrings.js:
3072         * WebCore.gypi:
3073         * WebCore.vcproj/WebCore.vcproj:
3074         * inspector/front-end/Breakpoint.js: Added.
3075         (WebInspector.Breakpoint): Moved from BreakpointManager.js.
3076         * inspector/front-end/BreakpointManager.js:
3077         (WebInspector.BreakpointManager): Remove debugger-related methods.
3078         * inspector/front-end/CallStackSidebarPane.js:
3079         (WebInspector.CallStackSidebarPane):
3080         (WebInspector.CallStackSidebarPane.prototype._nativeBreakpointHit):
3081         (WebInspector.CallStackSidebarPane.prototype._scriptBreakpointHit):
3082         * inspector/front-end/DebuggerModel.js: Added.
3083         (WebInspector.DebuggerModel): Moved debugger-related methods from BreakpointManager.
3084         * inspector/front-end/ScriptsPanel.js:
3085         (WebInspector.ScriptsPanel):
3086         (WebInspector.ScriptsPanel.prototype.continueToLine):
3087         (WebInspector.ScriptsPanel.prototype.editScriptSource.mycallback):
3088         (WebInspector.ScriptsPanel.prototype.editScriptSource):
3089         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
3090         (WebInspector.ScriptsPanel.prototype._debuggerResumed):
3091         (WebInspector.ScriptsPanel.prototype.reset):
3092         * inspector/front-end/SourceFrame.js:
3093         (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
3094         (WebInspector.SourceFrameDelegate.prototype.addBreakpoint):
3095         (WebInspector.SourceFrameDelegate.prototype.breakpoints):
3096         (WebInspector.SourceFrameDelegate.prototype.findBreakpoint):
3097         * inspector/front-end/WebKit.qrc:
3098         * inspector/front-end/inspector.html:
3099         * inspector/front-end/inspector.js:
3100         (WebInspector.createJSBreakpointsSidebarPane):
3101         (WebInspector.restoredBreakpoint):
3102         (WebInspector.pausedScript):
3103         (WebInspector.resumedScript):
3104         (WebInspector.reset):
3105
3106 2010-12-08  Pavel Podivilov  <podivilov@chromium.org>
3107
3108         Reviewed by Pavel Feldman.
3109
3110         Web Inspector: SourceFrame refactoring.
3111         https://bugs.webkit.org/show_bug.cgi?id=50223
3112
3113         SourceFrame should ask BreakpointManager about existing breakpoints instead of maintaining
3114         it's own storages. Move common code from ScriptView and SourceView to SourceFrame.
3115
3116         * inspector/front-end/BreakpointManager.js:
3117         (WebInspector.BreakpointManager.prototype.findBreakpoints):
3118         (WebInspector.BreakpointManager.prototype.findBreakpoint):
3119         * inspector/front-end/Script.js:
3120         (WebInspector.Script):
3121         (WebInspector.Script.prototype.get linesCount):
3122         (WebInspector.Script.prototype.get source):
3123         (WebInspector.Script.prototype.set source):
3124         * inspector/front-end/ScriptView.js:
3125         (WebInspector.ScriptView):
3126         (WebInspector.ScriptView.prototype._scriptSourceChanged):
3127         (WebInspector.ScriptFrameDelegateImpl):
3128         (WebInspector.ScriptFrameDelegateImpl.prototype.canEditScripts):
3129         (WebInspector.ScriptFrameDelegateImpl.prototype.editLineComplete):
3130         (WebInspector.ScriptFrameDelegateImpl.prototype.scripts):
3131         * inspector/front-end/ScriptsPanel.js:
3132         (WebInspector.ScriptsPanel):
3133         * inspector/front-end/SourceFrame.js:
3134         (WebInspector.SourceFrame): Add common methods of ScriptView and SourceView.
3135         (WebInspector.SourceFrameDelegate):
3136         (WebInspector.SourceFrameDelegate.prototype.canEditScripts):
3137         (WebInspector.SourceFrameDelegate.prototype.editLineComplete):
3138         (WebInspector.SourceFrameDelegate.prototype.scripts):
3139         * inspector/front-end/SourceView.js:
3140         (WebInspector.SourceView):
3141         (WebInspector.SourceView.prototype._contentLoaded):
3142         (WebInspector.ResourceFrameDelegateImpl):
3143         (WebInspector.ResourceFrameDelegateImpl.prototype.canEditScripts):
3144         (WebInspector.ResourceFrameDelegateImpl.prototype.editLineComplete):
3145         (WebInspector.ResourceFrameDelegateImpl.prototype.scripts):
3146
3147 2010-12-08  Yuta Kitamura  <yutak@chromium.org>
3148
3149         Unreviewed, rolling out r73492.
3150         http://trac.webkit.org/changeset/73492
3151         https://bugs.webkit.org/show_bug.cgi?id=49914
3152
3153         Caused a lot of pixel test failures and broke Windows build.
3154
3155         * WebCore.xcodeproj/project.pbxproj:
3156         * platform/graphics/GraphicsContext.cpp:
3157         (WebCore::GraphicsContext::createGraphicsContextPrivate):
3158         (WebCore::GraphicsContext::destroyGraphicsContextPrivate):
3159         (WebCore::GraphicsContext::save):
3160         (WebCore::GraphicsContext::restore):
3161         (WebCore::GraphicsContext::setStrokeThickness):
3162         (WebCore::GraphicsContext::setStrokeStyle):
3163         (WebCore::GraphicsContext::setStrokeColor):
3164         (WebCore::GraphicsContext::setShadow):
3165         (WebCore::GraphicsContext::clearShadow):
3166         (WebCore::GraphicsContext::getShadow):
3167         (WebCore::GraphicsContext::strokeThickness):
3168         (WebCore::GraphicsContext::strokeStyle):
3169         (WebCore::GraphicsContext::strokeColor):
3170         (WebCore::GraphicsContext::strokeColorSpace):
3171         (WebCore::GraphicsContext::fillRule):
3172         (WebCore::GraphicsContext::setFillRule):
3173         (WebCore::GraphicsContext::setFillColor):
3174         (WebCore::GraphicsContext::fillColor):
3175         (WebCore::GraphicsContext::fillColorSpace):
3176         (WebCore::GraphicsContext::setShouldAntialias):
3177         (WebCore::GraphicsContext::shouldAntialias):
3178         (WebCore::GraphicsContext::setStrokePattern):
3179         (WebCore::GraphicsContext::setFillPattern):
3180         (WebCore::GraphicsContext::setStrokeGradient):
3181         (WebCore::GraphicsContext::setFillGradient):
3182         (WebCore::GraphicsContext::fillGradient):
3183         (WebCore::GraphicsContext::strokeGradient):
3184         (WebCore::GraphicsContext::fillPattern):
3185         (WebCore::GraphicsContext::strokePattern):
3186         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
3187         (WebCore::GraphicsContext::updatingControlTints):
3188         (WebCore::GraphicsContext::setUpdatingControlTints):
3189         (WebCore::GraphicsContext::setPaintingDisabled):
3190         (WebCore::GraphicsContext::paintingDisabled):
3191         (WebCore::GraphicsContext::textDrawingMode):
3192         (WebCore::GraphicsContext::setTextDrawingMode):
3193         * platform/graphics/GraphicsContext.h:
3194         * platform/graphics/GraphicsContextPrivate.h: Added.
3195         (WebCore::GraphicsContextState::GraphicsContextState):
3196         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
3197         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3198         (WebCore::setPlatformFill):
3199         (WebCore::setPlatformStroke):
3200         (WebCore::drawPathShadow):
3201         (WebCore::fillCurrentCairoPath):
3202         (WebCore::strokeCurrentCairoPath):
3203         (WebCore::GraphicsContext::GraphicsContext):
3204         (WebCore::GraphicsContext::~GraphicsContext):
3205         (WebCore::GraphicsContext::fillPath):
3206         (WebCore::GraphicsContext::strokePath):
3207         (WebCore::GraphicsContext::fillRect):
3208         (WebCore::GraphicsContext::setPlatformShadow):
3209         (WebCore::GraphicsContext::strokeRect):
3210         (WebCore::GraphicsContext::setAlpha):
3211         (WebCore::GraphicsContext::getAlpha):
3212         * platform/graphics/cg/GraphicsContextCG.cpp:
3213         (WebCore::GraphicsContext::GraphicsContext):
3214         (WebCore::GraphicsContext::~GraphicsContext):
3215         (WebCore::GraphicsContext::applyStrokePattern):
3216         (WebCore::GraphicsContext::applyFillPattern):
3217         (WebCore::GraphicsContext::drawPath):
3218         (WebCore::GraphicsContext::fillPath):
3219         (WebCore::GraphicsContext::strokePath):
3220         (WebCore::GraphicsContext::fillRect):
3221         (WebCore::GraphicsContext::setPlatformShadow):
3222         (WebCore::GraphicsContext::strokeRect):
3223         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
3224         (WebCore::GraphicsContext::GraphicsContext):
3225         (WebCore::GraphicsContext::~GraphicsContext):
3226         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
3227         (WebCore::GraphicsContext::GraphicsContext):
3228         (WebCore::GraphicsContext::~GraphicsContext):
3229         (WebCore::GraphicsContext::fillPath):
3230         (WebCore::GraphicsContext::strokePath):
3231         (WebCore::GraphicsContext::clip):
3232         (WebCore::GraphicsContext::clipOut):
3233         (WebCore::GraphicsContext::addInnerRoundedRectClip):
3234         * platform/graphics/qt/GraphicsContextQt.cpp:
3235         (WebCore::GraphicsContext::GraphicsContext):
3236         (WebCore::GraphicsContext::~GraphicsContext):
3237         (WebCore::GraphicsContext::fillPath):
3238         (WebCore::GraphicsContext::strokePath):
3239         (WebCore::GraphicsContext::fillRect):
3240         (WebCore::GraphicsContext::setPlatformShadow):
3241         * platform/graphics/skia/GraphicsContextSkia.cpp:
3242         (WebCore::GraphicsContext::GraphicsContext):
3243         (WebCore::GraphicsContext::~GraphicsContext):
3244         (WebCore::GraphicsContext::fillPath):
3245         (WebCore::GraphicsContext::setPlatformShadow):
3246         * platform/graphics/win/GraphicsContextCGWin.cpp:
3247         (WebCore::GraphicsContext::GraphicsContext):
3248         * platform/graphics/win/GraphicsContextCairoWin.cpp:
3249         (WebCore::GraphicsContext::GraphicsContext):
3250         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3251         (WebCore::GraphicsContext::GraphicsContext):
3252         (WebCore::GraphicsContext::~GraphicsContext):
3253         (WebCore::GraphicsContext::fillPath):
3254         (WebCore::GraphicsContext::fillRect):
3255         * platform/graphics/wx/GraphicsContextWx.cpp:
3256         (WebCore::GraphicsContext::GraphicsContext):
3257         (WebCore::GraphicsContext::~GraphicsContext):
3258
3259 2010-12-08  Dai Mikurube  <dmikurube@google.com>
3260
3261         Reviewed by Kent Tamura.
3262
3263         Implement "required" attribute for select tags
3264         https://bugs.webkit.org/show_bug.cgi?id=50380
3265
3266         Test: fast/forms/select-live-pseudo-selectors.html
3267               platform/mac/fast/objc/dom-html-select-live-pseudo-selectors.html
3268
3269         * html/HTMLSelectElement.cpp:
3270         (WebCore::HTMLSelectElement::deselectItems): Added calling setNeedsValidityCheck() to enable validity check after changing. No tests for this change since this function is not exposed to JavaScript or any web interface.
3271         (WebCore::HTMLSelectElement::setSelectedIndex): Added calling setNeedsValidityCheck().
3272         (WebCore::HTMLSelectElement::setSelectedIndexByUser): Added calling setNeedsValidityCheck().
3273         (WebCore::HTMLSelectElement::valueMissing): Added valueMissing() to check if selecting an invalid or placeholder label option when a valid required attribute is specified.
3274         (WebCore::HTMLSelectElement::listBoxSelectItem): Added calling setNeedsValidityCheck(). No tests for this change since it is not called yet. Look at the bug 36177 and the changeset 56180.
3275         (WebCore::HTMLSelectElement::add): Added calling setNeedsValidityCheck().
3276         (WebCore::HTMLSelectElement::remove): Added calling setNeedsValidityCheck().
3277         (WebCore::HTMLSelectElement::restoreFormControlState): Added calling setNeedsValidityCheck().
3278         (WebCore::HTMLSelectElement::parseMappedAttribute): Added calling setNeedsValidityCheck().
3279         (WebCore::HTMLSelectElement::selectAll): Added calling setNeedsValidityCheck().
3280         (WebCore::HTMLSelectElement::reset): Added calling setNeedsValidityCheck().
3281         (WebCore::HTMLSelectElement::updateListBoxSelection): Added calling setNeedsValidityCheck(). Skipped adding tests for this change as too complicated..
3282         (WebCore::HTMLSelectElement::setLength): Added calling setNeedsValidityCheck().
3283         (WebCore::HTMLSelectElement::isRequiredFormControl): Check if required or not.
3284         (WebCore::HTMLSelectElement::hasPlaceholderLabelOption): Added.
3285         * html/HTMLSelectElement.h:
3286         (WebCore::HTMLSelectElement::isOptionalFormControl): Check if not required.
3287         * html/HTMLSelectElement.idl: Added a required attribute to select elements..
3288         * html/ValidityState.cpp:
3289         (WebCore::ValidityState::valueMissing): Added valueMissing check for select elements into the global checker, ValidityState::valueMissing().
3290
3291 2010-12-08  Renata Hodovan  <reni@webkit.org>
3292
3293         Reviewed by Andreas Kling.
3294
3295         GraphicsContext: Merge m_common and m_data
3296         https://bugs.webkit.org/show_bug.cgi?id=49914
3297
3298         Move data members from GraphicsContextPrivate into GraphicsContext. So GraphicsContextPlatform.h
3299         and m_common became unnecessary. They are removed.
3300         Add two methods to GraphicsContext: platformInit() and platformDestroy(), which
3301         make the constructor of GraphicsContext clearer.
3302         Besides add a getter to the private GraphicsContext::m_state member, because some inline
3303         functions in cairo need it.
3304
3305         No new test is needed, because this is a refactoring.
3306
3307         * WebCore.xcodeproj/project.pbxproj:
3308         * platform/graphics/GraphicsContext.cpp:
3309         (WebCore::GraphicsContext::GraphicsContext):
3310         (WebCore::GraphicsContext::~GraphicsContext):
3311         (WebCore::GraphicsContext::save):
3312         (WebCore::GraphicsContext::restore):
3313         (WebCore::GraphicsContext::setStrokeThickness):
3314         (WebCore::GraphicsContext::setStrokeStyle):
3315         (WebCore::GraphicsContext::setStrokeColor):
3316         (WebCore::GraphicsContext::setShadow):
3317         (WebCore::GraphicsContext::clearShadow):
3318         (WebCore::GraphicsContext::getShadow):
3319         (WebCore::GraphicsContext::strokeThickness):
3320         (WebCore::GraphicsContext::strokeStyle):
3321         (WebCore::GraphicsContext::strokeColor):
3322         (WebCore::GraphicsContext::strokeColorSpace):
3323         (WebCore::GraphicsContext::fillRule):
3324         (WebCore::GraphicsContext::setFillRule):
3325         (WebCore::GraphicsContext::setFillColor):
3326         (WebCore::GraphicsContext::fillColor):
3327         (WebCore::GraphicsContext::fillColorSpace):
3328         (WebCore::GraphicsContext::setShouldAntialias):
3329         (WebCore::GraphicsContext::shouldAntialias):
3330         (WebCore::GraphicsContext::state):
3331         (WebCore::GraphicsContext::setStrokePattern):
3332         (WebCore::GraphicsContext::setFillPattern):
3333         (WebCore::GraphicsContext::setStrokeGradient):
3334         (WebCore::GraphicsContext::setFillGradient):
3335         (WebCore::GraphicsContext::fillGradient):
3336         (WebCore::GraphicsContext::strokeGradient):
3337         (WebCore::GraphicsContext::fillPattern):
3338         (WebCore::GraphicsContext::strokePattern):
3339         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
3340         (WebCore::GraphicsContext::updatingControlTints):
3341         (WebCore::GraphicsContext::setUpdatingControlTints):
3342         (WebCore::GraphicsContext::setPaintingDisabled):
3343         (WebCore::GraphicsContext::paintingDisabled):
3344         (WebCore::GraphicsContext::textDrawingMode):
3345         (WebCore::GraphicsContext::setTextDrawingMode):
3346         * platform/graphics/GraphicsContext.h:
3347         (WebCore::GraphicsContextState::GraphicsContextState):
3348         * platform/graphics/GraphicsContextPrivate.h: Removed.
3349         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3350         (WebCore::setPlatformFill):
3351         (WebCore::setPlatformStroke):
3352         (WebCore::drawPathShadow):
3353         (WebCore::fillCurrentCairoPath):
3354         (WebCore::strokeCurrentCairoPath):
3355         (WebCore::GraphicsContext::platformInit):
3356         (WebCore::GraphicsContext::platformDestroy):
3357         (WebCore::GraphicsContext::fillPath):
3358         (WebCore::GraphicsContext::strokePath):
3359         (WebCore::GraphicsContext::fillRect):
3360         (WebCore::GraphicsContext::setPlatformShadow):
3361         (WebCore::GraphicsContext::strokeRect):
3362         (WebCore::GraphicsContext::setAlpha):
3363         (WebCore::GraphicsContext::getAlpha):
3364         * platform/graphics/cg/GraphicsContextCG.cpp:
3365         (WebCore::GraphicsContext::platformInit):
3366         (WebCore::GraphicsContext::platformDestroy):
3367         (WebCore::GraphicsContext::applyStrokePattern):
3368         (WebCore::GraphicsContext::applyFillPattern):
3369         (WebCore::GraphicsContext::drawPath):
3370         (WebCore::GraphicsContext::fillPath):
3371         (WebCore::GraphicsContext::strokePath):
3372         (WebCore::GraphicsContext::fillRect):
3373         (WebCore::GraphicsContext::setPlatformShadow):
3374         (WebCore::GraphicsContext::strokeRect):
3375         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
3376         (WebCore::GraphicsContext::platformInit):
3377         (WebCore::GraphicsContext::platformDestroy):
3378         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
3379         (WebCore::GraphicsContext::platformInit):
3380         (WebCore::GraphicsContext::platformDestroy):
3381         (WebCore::GraphicsContext::fillPath):
3382         (WebCore::GraphicsContext::strokePath):
3383         (WebCore::GraphicsContext::clip):
3384         (WebCore::GraphicsContext::clipOut):
3385         (WebCore::GraphicsContext::addInnerRoundedRectClip):
3386         * platform/graphics/qt/GraphicsContextQt.cpp:
3387         (WebCore::GraphicsContext::platformInit):
3388         (WebCore::GraphicsContext::platformDestroy):
3389         (WebCore::GraphicsContext::fillPath):
3390         (WebCore::GraphicsContext::strokePath):
3391         (WebCore::GraphicsContext::fillRect):
3392         (WebCore::GraphicsContext::setPlatformShadow):
3393         * platform/graphics/skia/GraphicsContextSkia.cpp:
3394         (WebCore::GraphicsContext::platformInit):
3395         (WebCore::GraphicsContext::platformDestroy):
3396         (WebCore::GraphicsContext::fillPath):
3397         (WebCore::GraphicsContext::setPlatformShadow):
3398         * platform/graphics/win/GraphicsContextCGWin.cpp:
3399         (WebCore::GraphicsContext::platformInit):
3400         * platform/graphics/win/GraphicsContextCairoWin.cpp:
3401         (WebCore::GraphicsContext::platformInit):
3402         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3403         (WebCore::GraphicsContext::platformInit):
3404         (WebCore::GraphicsContext::platformDestroy):
3405         (WebCore::GraphicsContext::fillPath):
3406         (WebCore::GraphicsContext::fillRect):
3407         * platform/graphics/wx/GraphicsContextWx.cpp:
3408         (WebCore::GraphicsContext::platformInit):
3409         (WebCore::GraphicsContext::platformDestroy):
3410
3411 2010-12-07  Anton Muhin  <antonm@chromium.org>
3412
3413         Reviewed by Nate Chapin.
3414
3415         Port http://trac.webkit.org/changeset/72819/ to v8-backed ports.
3416         https://bugs.webkit.org/show_bug.cgi?id=50246
3417
3418         * bindings/v8/V8DOMMap.h:
3419         (WebCore::AbstractWeakReferenceMap::Visitor::startMap):
3420         (WebCore::AbstractWeakReferenceMap::Visitor::endMap):
3421         (WebCore::WeakReferenceMap::visit):
3422         * bindings/v8/V8GCController.cpp:
3423         (WebCore::GrouperItem::GrouperItem):
3424         (WebCore::GrouperItem::groupId):
3425         (WebCore::makeV8ObjectGroups):
3426         (WebCore::NodeGrouperVisitor::NodeGrouperVisitor):
3427         (WebCore::NodeGrouperVisitor::visitDOMWrapper):
3428         (WebCore::NodeGrouperVisitor::applyGrouping):
3429         (WebCore::DOMObjectGrouperVisitor::ObjectGrouperVisitor):
3430         (WebCore::DOMObjectGrouperVisitor::startMap):
3431         (WebCore::DOMObjectGrouperVisitor::endMap):
3432         (WebCore::DOMObjectGrouperVisitor::visitDOMWrapper):
3433         (WebCore::V8GCController::gcPrologue):
3434
3435 2010-12-07  Daniel Bates  <dbates@rim.com>
3436
3437         Reviewed by Martin Robinson.
3438
3439         Implement focus ring support for image maps
3440         https://bugs.webkit.org/show_bug.cgi?id=50371
3441
3442         Implement GraphicsContext::drawFocusRing(const Path&, ...) so as to support
3443         drawing a focus ring for image maps.
3444
3445         Tests: fast/images/imagemap-circle-focus-ring.html
3446                fast/images/imagemap-polygon-focus-ring.html
3447
3448         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3449         (WebCore::adjustFocusRingColor): Added.
3450         (WebCore::adjustFocusRingLineWidth): Added.
3451         (WebCore::focusRingStrokeStyle): Added.
3452         (WebCore::GraphicsContext::drawFocusRing): Moved code for determining focus ring- color,
3453         line width and stroke style into functions adjustFocusRingColor(), adjustFocusRingLineWidth(),
3454         and focusRingStrokeStyle(), respectively. Implemented GraphicsContext::drawFocusRing(const Path&, ...).
3455
3456 2010-12-07  Sergio Villar Senin  <svillar@igalia.com>
3457
3458         Reviewed by Xan Lopez.
3459
3460         [GTK] WebKitSoupCache fails to load resources when cache contents are externally removed
3461         https://bugs.webkit.org/show_bug.cgi?id=50577
3462
3463         Try to download cached resources again if they are no longer
3464         accesible by the cache.
3465
3466         * platform/network/soup/cache/soup-request-http.c:
3467         (send_async_cb):
3468         (webkit_soup_request_http_send_async):
3469
3470 2010-12-06  MORITA Hajime  <morrita@google.com>
3471
3472         Reviewed by Dimitri Glazkov.
3473
3474         RenderIndicator subclasses should not change the render tree during layout.
3475         https://bugs.webkit.org/show_bug.cgi?id=50026
3476
3477         The old code created shadow elements during a layout computation,
3478         that makes the layout state inconsisntent and cause an assertion failure. 
3479         This change created shadow elements before the layout to avoid  
3480         state inconsistencies.
3481         
3482         Instead of creating shadows on demand, RenderMeter and
3483         RenderProgress now create all necessary shadows before layouts,
3484         and change its visibilities during the layout: Changing
3485         visibilities doesn't trigger relayout and keep the state
3486         consistent.
3487         
3488         RenderMeter uses new HidablePartElement for shadow elements,
3489         which can toggle visibiliby between hidden and original value.
3490
3491         Test: fast/dom/HTMLMeterElement/meter-element-crash.html
3492
3493         * html/HTMLMeterElement.cpp:
3494         (WebCore::HTMLMeterElement::attach): Calling updateFromElement()
3495         * html/HTMLMeterElement.h:
3496         * html/HTMLProgressElement.cpp:
3497         (WebCore::HTMLProgressElement::attach): Calling updateFromElement()
3498         * html/HTMLProgressElement.h:
3499         * rendering/RenderIndicator.cpp:
3500         * rendering/RenderIndicator.h:
3501         * rendering/RenderMeter.cpp:
3502         (WebCore::MeterPartElement::MeterPartElement): Added to hold a restorable visibility.
3503         (WebCore::MeterPartElement::createForPart):
3504         (WebCore::MeterPartElement::hide):
3505         (WebCore::MeterPartElement::restoreVisibility):
3506         (WebCore::MeterPartElement::updateStyleForPart):
3507         (WebCore::MeterPartElement::saveVisibility):
3508         (WebCore::RenderMeter::~RenderMeter):
3509         (WebCore::RenderMeter::createPart): Extracted
3510         (WebCore::RenderMeter::updateFromElement): Had a shadow generation.
3511         (WebCore::RenderMeter::layoutParts): Removed shadow generation code.
3512         (WebCore::RenderMeter::shouldHaveParts):
3513         (WebCore::RenderMeter::valuePartRect): Adopted orientation.
3514         (WebCore::RenderMeter::orientation): Morphed from isHorizontal()
3515         (WebCore::RenderMeter::valuePseudoId): Adoptedn orientation
3516         (WebCore::RenderMeter::barPseudoId): Adopted orientation.
3517         * rendering/RenderMeter.h:
3518         (WebCore::RenderMeter::shadowAttached):
3519         * rendering/RenderProgress.cpp:
3520         (WebCore::RenderProgress::updateFromElement): Had a shadow generation.
3521         (WebCore::RenderProgress::layoutParts):
3522         * rendering/RenderProgress.h: