WebCore: HTML5 Conformance Test failure: approved/xhtml5/object_border_pixel.xhtml
[WebKit-https.git] / WebCore / ChangeLog
1 2011-01-03  Julie-Jeongeun-Kim  <Jeongeun.Kim@obigo.com>
2
3         Reviewed by Darin Adler.
4
5         HTML5 Conformance Test failure: approved/xhtml5/object_border_pixel.xhtml
6         https://bugs.webkit.org/show_bug.cgi?id=48596
7         
8         border attribute was not parsed in HTMLObjectElement.
9         I added code for it as HTMLImageElement handled.
10
11         new test:fast/html/object-border.html
12
13         * html/HTMLObjectElement.cpp:
14         (WebCore::HTMLObjectElement::parseMappedAttribute):
15
16 2011-01-03  Darin Adler  <darin@apple.com>
17
18         Try to fix Chromium build.
19
20         * history/HistoryItem.cpp:
21         (WebCore::HistoryItem::encodeBackForwardTreeNode): Added a V8 case here.
22         Not sure this ever will be used with V8.
23         (WebCore::HistoryItem::decodeBackForwardTree): Ditto.
24
25 2011-01-03  Darin Adler  <darin@apple.com>
26
27         Try to fix Leopard build.
28
29         * history/HistoryItem.cpp: Use a consistent type, uint64_t, for the
30         size variable.
31
32 2011-01-03  Abhishek Arya  <inferno@chromium.org>
33
34         Reviewed by Darin Adler.
35
36         Fixes before child calculation when adding anonymous childs to table parts.
37         https://bugs.webkit.org/show_bug.cgi?id=50932
38
39         Fix in r74364 was incomplete. When before child is equal to the table part(to
40         which the new child is getting added), it confuses the table part to add it
41         incorrectly as an after child. The patch fixes by passing the before child as
42         the table part's first child.
43
44         Tests: fast/css-generated-content/table-before-after-child-add.html
45                fast/css-generated-content/table-cell-before-after-child-add.html
46                fast/css-generated-content/table-row-before-after-child-add.html
47                fast/css-generated-content/table-row-before-after-child-add.html
48
49         * rendering/RenderTable.cpp:
50         (WebCore::RenderTable::addChild):
51         * rendering/RenderTableRow.cpp:
52         (WebCore::RenderTableRow::addChild):
53         * rendering/RenderTableSection.cpp:
54         (WebCore::RenderTableSection::addChild):
55
56 2011-01-03  Dan Bernstein  <mitz@apple.com>
57
58         Reviewed by Simon Fraser.
59
60         Shrink HTMLTableCellElement
61         https://bugs.webkit.org/show_bug.cgi?id=51858
62
63         * html/HTMLTableCellElement.cpp:
64         (WebCore::HTMLTableCellElement::HTMLTableCellElement): Removed intialization of m_row and
65         m_col.
66         * html/HTMLTableCellElement.h: Removed m_row and m_col and their accessors.
67
68 2011-01-03  Darin Adler  <darin@apple.com>
69
70         Fix build.
71
72         * platform/network/FormData.cpp:
73         (WebCore::FormData::create): Roll back uint8_t change.
74         (WebCore::FormData::flatten): Ditto.
75         (WebCore::FormData::flattenToString): Ditto.
76         (WebCore::encode): Ditto.
77         (WebCore::decode): Ditto.
78         (WebCore::FormData::encodeForBackForward):
79         * platform/network/FormData.h: Ditto.
80         * platform/network/mac/FormDataStreamMac.mm:
81         (WebCore::advanceCurrentStream): Ditto.
82
83 2011-01-03  Darin Adler  <darin@apple.com>
84
85         Reviewed by Brady Eidson.
86
87         Add code to encode/decode the back/forward tree
88         https://bugs.webkit.org/show_bug.cgi?id=51853
89
90         * history/HistoryItem.cpp:
91         (WebCore::HistoryItem::encodeBackForwardTree): Added.
92         (WebCore::HistoryItem::encodeBackForwardTreeNode): Added.
93         (WebCore::HistoryItem::decodeBackForwardTree): Added.
94         * history/HistoryItem.h: Added functions above.
95
96         * platform/network/FormData.cpp:
97         (WebCore::FormData::create): Changed type to Vector<uint8_t> instead of
98         Vector<char>. This type is used in our newer code for vectors of bytes.
99         (WebCore::FormData::flatten): Ditto.
100         (WebCore::FormData::flattenToString): Ditto. Had to add a cast here.
101         (WebCore::FormData::encodeForBackForward): Added.
102         (WebCore::FormData::decodeForBackForward): Added.
103         * platform/network/FormData.h: Changed type to Vector<uint8_t> instead of
104         Vector<char>. Also made some single-argument constructors explicit.
105         Also added the new functions.
106
107         * platform/network/mac/FormDataStreamMac.mm:
108         (WebCore::advanceCurrentStream): Changed to use uint8_t to match above.
109
110 2011-01-03  Simon Fraser  <simon.fraser@apple.com>
111
112         Attempt to fix GTK build.
113
114         * platform/graphics/gtk/FontGtk.cpp:
115         (WebCore::drawGlyphsShadow):
116
117 2011-01-03  Helder Correia  <helder@sencha.com>
118
119         Reviewed by Simon Fraser.
120
121         ContextShadow can avoid code duplication for getting the CTM
122         https://bugs.webkit.org/show_bug.cgi?id=51799
123
124         ContextShadow defines its own getTransformationMatrixFromContext()
125         which does exactly the same as GraphicsContext::getCTM().
126
127         Existing tests: fast/canvas/canvas*shadow*html
128
129         * platform/graphics/ContextShadow.cpp:
130         (WebCore::ContextShadow::mustUseContextShadow):
131         (WebCore::ContextShadow::adjustBlurDistance):
132         (WebCore::ContextShadow::calculateLayerBoundingRect):
133         * platform/graphics/ContextShadow.h:
134         * platform/graphics/cairo/ContextShadowCairo.cpp:
135         (WebCore::ContextShadow::beginShadowLayer):
136         (WebCore::ContextShadow::endShadowLayer):
137         (WebCore::ContextShadow::drawRectShadowWithoutTiling):
138         * platform/graphics/cairo/FontCairo.cpp:
139         (WebCore::drawGlyphsShadow):
140         * platform/graphics/cairo/GraphicsContextCairo.cpp:
141         (WebCore::drawPathShadow):
142         * platform/graphics/cairo/ImageCairo.cpp:
143         (WebCore::BitmapImage::draw):
144         * platform/graphics/gtk/FontGtk.cpp:
145         (WebCore::drawGlyphsShadow):
146         * platform/graphics/qt/ContextShadowQt.cpp:
147         (WebCore::ContextShadow::beginShadowLayer):
148         (WebCore::ContextShadow::endShadowLayer):
149         * platform/graphics/qt/FontQt.cpp:
150         (WebCore::drawTextCommon):
151         * platform/graphics/qt/GraphicsContextQt.cpp:
152         (WebCore::GraphicsContext::fillPath):
153         (WebCore::GraphicsContext::strokePath):
154         (WebCore::GraphicsContext::fillRect):
155         (WebCore::GraphicsContext::fillRoundedRect):
156         * platform/graphics/qt/ImageQt.cpp:
157         (WebCore::BitmapImage::draw):
158         * platform/graphics/qt/StillImageQt.cpp:
159         (WebCore::StillImage::draw):
160
161 2011-01-03  Darin Adler  <darin@apple.com>
162
163         Reviewed by Dan Bernstein.
164
165         InsertTextCommand::m_charactersAdded is unused
166         https://bugs.webkit.org/show_bug.cgi?id=51849
167
168         * editing/InsertTextCommand.cpp:
169         (WebCore::InsertTextCommand::InsertTextCommand): Don't initialize m_charactersAdded.
170         (WebCore::InsertTextCommand::input): Don't update m_charactersAdded.
171         * editing/InsertTextCommand.h: Removed charactersAdded function and
172         m_charactersAdded data member.
173
174 2011-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
175
176         Reviewed by Martin Robinson.
177
178         [GTK] Move paintMenuListButton() to RenderThemeGtk.cpp
179         https://bugs.webkit.org/show_bug.cgi?id=51832
180
181         Method paintMenuListButton() contains code common to both gtk 2
182         and 3, so it can be moved to RenderThemeGtk.cpp instead of
183         duplicating it.
184
185         * platform/gtk/RenderThemeGtk.cpp:
186         (WebCore::RenderThemeGtk::paintMenuListButton):
187         * platform/gtk/RenderThemeGtk2.cpp:
188         * platform/gtk/RenderThemeGtk3.cpp:
189
190 2011-01-03  Pratik Solanki  <psolanki@apple.com>
191
192         Reviewed by Darin Adler.
193
194         https://bugs.webkit.org/show_bug.cgi?id=51850
195         Put CFNetwork loader code inside USE(CFNETWORK)
196
197         Add USE(CFNETWORK) macros around all the cf/mac network files. Also added all CFNetwork
198         files to the WebCore Xcode project.
199
200         * WebCore.xcodeproj/project.pbxproj:
201         * loader/cf/ResourceLoaderCFNet.cpp:
202         * loader/mac/ResourceLoaderMac.mm:
203         * platform/network/cf/AuthenticationCF.cpp:
204         * platform/network/cf/AuthenticationCF.h:
205         * platform/network/cf/CookieJarCFNet.cpp:
206         * platform/network/cf/CookieStorageCFNet.cpp:
207         * platform/network/cf/CookieStorageCFNet.h:
208         * platform/network/cf/CredentialStorageCFNet.cpp:
209         * platform/network/cf/FormDataStreamCFNet.cpp:
210         * platform/network/cf/FormDataStreamCFNet.h:
211         * platform/network/cf/LoaderRunLoopCF.cpp:
212         * platform/network/cf/LoaderRunLoopCF.h:
213         * platform/network/cf/ResourceError.h:
214         * platform/network/cf/ResourceHandleCFNet.cpp:
215         * platform/network/cf/ResourceRequest.h:
216         * platform/network/cf/ResourceRequestCFNet.cpp:
217         * platform/network/cf/ResourceRequestCFNet.h:
218         * platform/network/cf/ResourceResponse.h:
219         * platform/network/cf/ResourceResponseCFNet.cpp:
220         * platform/network/mac/AuthenticationMac.h:
221         * platform/network/mac/AuthenticationMac.mm:
222         * platform/network/mac/FormDataStreamMac.h:
223         * platform/network/mac/FormDataStreamMac.mm:
224         * platform/network/mac/ResourceError.h:
225         * platform/network/mac/ResourceHandleMac.mm:
226         * platform/network/mac/ResourceRequest.h:
227         * platform/network/mac/ResourceRequestMac.mm:
228         * platform/network/mac/ResourceResponse.h:
229         * platform/network/mac/ResourceResponseMac.mm:
230
231 2011-01-03  Yi Shen  <yi.4.shen@nokia.com>
232
233         Reviewed by Adam Barth.
234
235         [Qt] Add SelectAll option to the context menu for the editor
236         https://bugs.webkit.org/show_bug.cgi?id=50049
237
238         Enable SelectAll for the Qt context menu.
239
240         * page/ContextMenuController.cpp:
241         (WebCore::ContextMenuController::populate):
242         * platform/ContextMenuItem.h:
243         * platform/LocalizationStrategy.h:
244         * platform/LocalizedStrings.cpp:
245         (WebCore::contextMenuItemTagSelectAll):
246         * platform/LocalizedStrings.h:
247
248 2011-01-03  Dan Bernstein  <mitz@apple.com>
249
250         Reviewed by Darin Adler.
251
252         Shrink RootInlineBox
253         https://bugs.webkit.org/show_bug.cgi?id=51847
254
255         * rendering/RootInlineBox.cpp:
256         (WebCore::RootInlineBox::alignBoxesInBlockDirection): Changed to use the baselineType()
257         accessor.
258         * rendering/RootInlineBox.h: Rolled m_baselineType into a bitfield. Changed its type to
259         unsigned because otherwise MSVC treats it as signed.
260         (WebCore::RootInlineBox::baselineType): Added a cast.
261
262 2011-01-03  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
263
264         Reviewed by Martin Robinson.
265
266         [GTK] Split webkitprivate.{cpp,h} in more manageable chunks
267         https://bugs.webkit.org/show_bug.cgi?id=50698
268
269         Fix DOM bindings generation to no longer include the now-gone
270         webkitprivate.h header, including the appropriate replacements
271         instead.
272
273         * bindings/scripts/CodeGeneratorGObject.pm:
274
275 2011-01-03  Brady Eidson  <beidson@apple.com>
276
277         Reviewed by Darin Adler.
278
279         Add Encode/Decode machinery Darin and I plan to work with for back/forward stuff in WebKit2.
280
281         * ForwardingHeaders/wtf/Decoder.h: Added.
282         * ForwardingHeaders/wtf/Encoder.h: Added.
283
284 2011-01-03  Chris Fleizach  <cfleizach@apple.com>
285
286         Reviewed by Darin Adler.
287
288         AX: Regression: WebKit no longer auto-scrolls with VoiceOver navigation
289         https://bugs.webkit.org/show_bug.cgi?id=51833
290
291         Make sure the web area returns the contentsSize, not the same size as what is displayed.
292
293         Test: platform/mac/accessibility/webarea-size-equals-content-size.html
294
295         * accessibility/AccessibilityRenderObject.cpp:
296         (WebCore::AccessibilityRenderObject::boundingBoxRect):
297
298 2011-01-03  Simon Fraser  <simon.fraser@apple.com>
299
300         Fix warning in 32-bit builds.
301
302         * css/CSSGradientValue.cpp:
303         (WebCore::CSSLinearGradientValue::createGradient):
304
305 2011-01-03  Benjamin C Meyer  <bmeyer@rim.com>
306
307         Reviewed by Daniel Bates.
308
309         In the cmake build system move logic related to ENABLE_NOTIFICATIONS into its own block.
310         https://bugs.webkit.org/show_bug.cgi?id=51827
311
312         * CMakeLists.txt:
313
314 2011-01-03  Dan Bernstein  <mitz@apple.com>
315
316         Reviewed by Simon Fraser.
317
318         Remove the unused RenderTableCell::m_percentageHeight
319         https://bugs.webkit.org/show_bug.cgi?id=51837
320
321         * rendering/RenderTableCell.cpp:
322         (WebCore::RenderTableCell::RenderTableCell): Removed initialization of m_percentageHeight.
323         * rendering/RenderTableCell.h: Removed m_percentageHeight.
324
325 2011-01-03  Simon Fraser  <simon.fraser@apple.com>
326
327         Reviewed by David Hyatt.
328
329         Implement -webkit-linear-gradient and -webkit-radial-gradient
330         https://bugs.webkit.org/show_bug.cgi?id=28152
331
332         Add support for -webkit-radial-gradients.
333
334         Tests: fast/gradients/css3-radial-gradients.html
335                fast/gradients/css3-radial-gradients2.html
336
337         * css/CSSGradientValue.cpp:
338         (WebCore::blend): Used to blend colors, which is necessary when truncating
339         the start of radial gradients.
340         (WebCore::GradientStop): Small struct to aid gradient stop processing.
341         (WebCore::CSSGradientValue::addStops): Rename 'positions' to 'stops', and store
342         the color so that we can blend it when truncating radial gradients. Changed
343         to handle both linear and radial gradients.
344         (WebCore::CSSRadialGradientValue::cssText): Update to follow the spec.
345         (WebCore::CSSRadialGradientValue::resolveRadius): Stylistic change.
346         (WebCore::distanceToClosestCorner): New utility method.
347         (WebCore::distanceToFarthestCorner): Ditto.
348         (WebCore::CSSRadialGradientValue::createGradient): New logic to deal with shape and
349         fill rules.
350
351         * css/CSSGradientValue.h:
352         (WebCore::CSSGradientValue::isLinearGradient): Color-stop processing needs to know what
353         kind of gradient it's dealing with, so add new isFooGradient methods.
354         (WebCore::CSSGradientValue::isRadialGradient): Ditto.
355         (WebCore::CSSLinearGradientValue::isLinearGradient):
356         (WebCore::CSSRadialGradientValue::setShape): New setters for shape, size etc.
357         (WebCore::CSSRadialGradientValue::setSizingBehavior):
358         (WebCore::CSSRadialGradientValue::setEndHorizontalSize):
359         (WebCore::CSSRadialGradientValue::setEndVerticalSize):
360         (WebCore::CSSRadialGradientValue::isRadialGradient):
361
362         * css/CSSParser.h:
363         * css/CSSParser.h: Pass a CSSParserValueList* into parseFillPositionXY() and parseFillPosition()
364         so we can use parseFillPosition() when parsing a gradient function.
365         * css/CSSParser.cpp:
366         (WebCore::CSSParser::parseFillPositionXY): Pass in a CSSParserValueList*
367         (WebCore::CSSParser::parseFillPosition): Ditto
368         (WebCore::CSSParser::parseFillProperty): Pass m_valueList to parseFillPosition.
369         (WebCore::CSSParser::parseTransformOriginShorthand): Ditto
370         (WebCore::CSSParser::parseRadialGradient): Flesh out radial gradient parsing.
371         (WebCore::CSSParser::parseTransformOrigin): Pass m_valueList to parseFillPosition.
372         (WebCore::CSSParser::parsePerspectiveOrigin): Ditto
373
374         * css/CSSValueKeywords.in: New keywords for radial gradient shape and fill behaviors.
375
376         * platform/graphics/Gradient.cpp:
377         (WebCore::Gradient::Gradient): Pass aspect ratio for elliptical gradients.
378         * platform/graphics/Gradient.h: Add aspect ratio for elliptical gradients.
379         (WebCore::Gradient::create):
380         (WebCore::Gradient::startRadius): Expose radii.
381         (WebCore::Gradient::endRadius):
382         (WebCore::Gradient::setStartRadius): Setters are required for when we need to scale color stops.
383         (WebCore::Gradient::setEndRadius):
384         (WebCore::Gradient::aspectRatio):
385         * platform/graphics/cg/GradientCG.cpp:
386         (WebCore::Gradient::paint): For elliptical gradients, scale the CTM.
387         * platform/graphics/wince/GraphicsContextWinCE.cpp:
388         (WebCore::GraphicsContext::fillRect): Use start/endRadius() rather than r0() and r1().
389
390 2011-01-03  Simon Fraser  <simon.fraser@apple.com>
391
392         Reviewed by David Hyatt.
393
394         Implement -webkit-linear-gradient and -webkit-radial-gradient
395         https://bugs.webkit.org/show_bug.cgi?id=28152
396         
397         Add support for the parsing and rendering of non-repeating CSS3 linear gradients,
398         according to <http://dev.w3.org/csswg/css3-images/#linear-gradients>.
399
400         Tests: fast/gradients/css3-color-stop-units.html
401                fast/gradients/css3-color-stops.html
402                fast/gradients/css3-gradient-parsing.html
403                fast/gradients/css3-linear-angle-gradients.html
404
405         * css/CSSGradientValue.h:
406         Add subclasses of CSSGradientValue for linear and radial gradients.
407         
408         * css/CSSGradientValue.cpp:
409         (WebCore::CSSGradientValue::image): Add FIXME comment about why we can't cache
410         the gradient sometimes.
411         (WebCore::compareStops): positions are CSSValues now.
412         (WebCore::CSSGradientValue::sortStopsIfNeeded): Add assertion that this is only called
413         for old-style gradients.
414         (WebCore::CSSGradientValue::addStops): New method that handles the spec rules about
415         missing positions, ensuring that stop position is ordered, and spacing out stops
416         without positions. Also normalize gradients which use stops outside the 0-1 range
417         so that platforms can render them correctly.
418         (WebCore::positionFromValue): Determin the position on the gradient line for percentage,
419         number and length values.
420         (WebCore::CSSGradientValue::computeEndPoint):
421         (WebCore::CSSLinearGradientValue::cssText):
422         (WebCore::endPointsFromAngle): Compute endpoints for a gradient which covers the rectangle
423         given an angle.
424         (WebCore::CSSLinearGradientValue::createGradient):
425         (WebCore::CSSRadialGradientValue::cssText):
426         (WebCore::CSSRadialGradientValue::resolveRadius):
427         (WebCore::CSSRadialGradientValue::createGradient):
428
429         * css/CSSParser.cpp:
430         (WebCore::CSSParser::parseValue): Style fix.
431         (WebCore::CSSParser::parseContent): Use isGeneratedImageValue() and parseGeneratedImage()
432         (WebCore::CSSParser::parseFillImage): Use isGeneratedImageValue() and parseGeneratedImage()
433         (WebCore::CSSParser::parseBorderImage): Use isGeneratedImageValue() and parseGeneratedImage()
434         (WebCore::parseDeprecatedGradientPoint): Renamed to indicate that it's only used for -webkit-gradient.
435         (WebCore::parseDeprecatedGradientColorStop): Renamed to indicate that it's only used for -webkit-gradient,
436         and fixed to store CSSValues for the stop position.
437         (WebCore::CSSParser::parseDeprecatedGradient): Renamed to indicate that it's only used for -webkit-gradient,
438         and create CSSLinearGradientValue and CSSRadialGradientValue as appropriate.
439         (WebCore::valueFromSideKeyword):
440         (WebCore::parseGradientColorOrKeyword): Color parsing utility.
441         (WebCore::CSSParser::parseLinearGradient): New method to parse linear gradients.
442         (WebCore::CSSParser::parseRadialGradient): Stub for new method to parse radial gradients.
443         (WebCore::CSSParser::isGeneratedImageValue): Detect gradients and CSS canvas.
444         (WebCore::CSSParser::parseGeneratedImage): Parser for generated images like gradients
445         and CSS canvas.
446         * css/CSSParser.h:
447         * platform/graphics/Gradient.h:
448         (WebCore::Gradient::setP0): We need to be able to change the points when normalizing gradients.
449         (WebCore::Gradient::setP1): Ditto.
450
451 2011-01-03  Noam Rosenthal  <noam.rosenthal@nokia.com>
452
453         Reviewed by Andreas Kling.
454
455         [Qt] document.getElementById(...) doesn't return the right object in combination with QGraphicsWidget
456         https://bugs.webkit.org/show_bug.cgi?id=51464
457
458         Added a way to bind any QObject created as a plugin to JavaScript, 
459         by adding a custom member (qtObject) to WebCore::Widget. 
460         Added a test to tst_qwebpage to make sure plugins created 
461         as QGraphicsWidget are accessible through JavaScript.
462
463         * bindings/js/ScriptControllerQt.cpp:
464         (WebCore::ScriptController::createScriptInstanceForWidget):
465         * platform/Widget.h:
466         * platform/qt/WidgetQt.cpp:
467         (WebCore::Widget::Widget):
468         (WebCore::Widget::setBindingObject):
469         (WebCore::Widget::bindingObject):
470
471 2011-01-03  David Hyatt  <hyatt@apple.com>
472
473         Reviewed by Simon Fraser.
474
475         https://bugs.webkit.org/show_bug.cgi?id=51328
476
477         Printing on a page with body { height: 100% } clips out the overflow contents.  This happened
478         because the computePageRects function was never correct.  It was using the layer's width and height
479         for the document's width and height, and the layer no longer includes overflow in its width and
480         height.  It was also incorrectly assuming the first page would begin at (0,0), and this is an invalid
481         assumption in RTL or vertical text environments.
482
483         Added printing/page-count-percentage-height.html
484
485         * page/PrintContext.cpp:
486         (WebCore::PrintContext::computePageRects):
487         (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
488
489 2011-01-03  Csaba Osztrogon√°c  <ossy@webkit.org>
490
491         [Qt] Unreviewed buildfix for --minimal build after r74895.
492
493         * html/InputType.cpp: Missing include added.
494         * html/NumberInputType.cpp: Missing include added.
495
496 2011-01-02  Darin Adler  <darin@apple.com>
497
498         Reviewed by Kent Tamura.
499
500         Eliminate HTMLInputElement::m_deprecatedTypeNumber, other input refactoring and renaming
501         https://bugs.webkit.org/show_bug.cgi?id=51791
502
503         * dom/InputElement.h: Make sanitizeValueForTextField public so it can
504         be called by InputType.
505
506         * html/BaseButtonInputType.cpp:
507         (WebCore::BaseButtonInputType::accessKeyAction): Added.
508         (WebCore::BaseButtonInputType::storesValueSeparateFromAttribute): Added.
509         * html/BaseButtonInputType.h: Ditto.
510
511         * html/BaseCheckableInputType.cpp:
512         (WebCore::BaseCheckableInputType::canSetStringValue): Added.
513         (WebCore::BaseCheckableInputType::accessKeyAction): Added.
514         (WebCore::BaseCheckableInputType::fallbackValue): Added.
515         (WebCore::BaseCheckableInputType::storesValueSeparateFromAttribute): Added.
516         (WebCore::BaseCheckableInputType::isCheckable): Added.
517         * html/BaseCheckableInputType.h: Ditto.
518
519         * html/BaseDateAndTimeInputType.cpp:
520         (WebCore::BaseDateAndTimeInputType::hasSpinButton): Added.
521         * html/BaseDateAndTimeInputType.h: Ditto.
522
523         * html/BaseTextInputType.h: Made more functions private.
524
525         * html/ButtonInputType.cpp:
526         (WebCore::ButtonInputType::isTextButton): Added.
527         * html/ButtonInputType.h: Ditto.
528
529         * html/CheckboxInputType.cpp:
530         (WebCore::CheckboxInputType::willDispatchClick): Added.
531         (WebCore::CheckboxInputType::didDispatchClick): Added.
532         (WebCore::CheckboxInputType::isCheckbox): Added.
533         * html/CheckboxInputType.h: Ditto.
534
535         * html/DateTimeInputType.cpp:
536         (WebCore::DateTimeInputType::scaledStepValueShouldBeInteger): Fixed
537         typo in name of this function.
538         * html/DateTimeInputType.h: Ditto.
539         * html/DateTimeLocalInputType.cpp:
540         (WebCore::DateTimeLocalInputType::scaledStepValueShouldBeInteger): Ditto.
541         * html/DateTimeLocalInputType.h: Ditto.
542
543         * html/EmailInputType.cpp:
544         (WebCore::EmailInputType::isEmailField): Added.
545         * html/EmailInputType.h: Ditto.
546
547         * html/FileInputType.cpp:
548         (WebCore::FileInputType::FileInputType): Added.
549         (WebCore::FileInputType::canSetStringValue): Added.
550         (WebCore::FileInputType::canChangeFromAnotherType): Added.
551         (WebCore::FileInputType::files): Added.
552         (WebCore::FileInputType::canSetValue): Added.
553         (WebCore::FileInputType::getTypeSpecificValue): Added.
554         (WebCore::FileInputType::storesValueSeparateFromAttribute): Added.
555         (WebCore::FileInputType::setFileList): Added.
556         (WebCore::FileInputType::isFileUpload): Added.
557         * html/FileInputType.h: Ditto.
558
559         * html/HTMLInputElement.cpp:
560         (WebCore::HTMLInputElement::HTMLInputElement): Updated for data member
561         renaming and removal.
562         (WebCore::HTMLInputElement::isValidValue): Call canSetStringValue
563         instead of checking specific type numbers.
564         (WebCore::HTMLInputElement::getAllowedValueStepWithDecimalPlaces):
565         Use fastGetAttribute and fixed typo in the name of the
566         scaledStepValueShouldBeInteger function.
567         (WebCore::HTMLInputElement::isKeyboardFocusable): Call
568         InputType::isKeyboardFocusable; moved most of the type-specific
569         logic there.
570         (WebCore::HTMLInputElement::shouldUseInputMethod): Call
571         InputType::shouldUseInputMethod; moved the type-specific logic there.
572         (WebCore::HTMLInputElement::handleBlurEvent): Call
573         InputType::handleBlurEvent; moved the type-specific logic there.
574         (WebCore::HTMLInputElement::setType): Tweak the names and types
575         in this function.
576         (WebCore::HTMLInputElement::updateType): Removed the code that
577         set m_deprecatedTypeNumber. Compare types by comparing the value
578         from formControlType. Removed file-specific logic and instead call
579         InputType::canChangeFromAnotherType. Streamlined the logic for
580         activation callbacks.
581         (WebCore::HTMLInputElement::accessKeyAction): Call
582         InputType::accessKeyAction; moved the type-specific logic there.
583         (WebCore::HTMLInputElement::mapToEntry): Call
584         InputType::shouldRespectHeightAndWidthAttributes and
585         InputType::shouldRespectAlignAttribute.
586         (WebCore::HTMLInputElement::parseMappedAttribute): Updated
587         for name changes and the removal of m_defaultChecked. Changed the
588         alt attribute logic to be based on the class of the renderer.
589         Call InputType::srcAttributeChanged and moved the type-specific
590         logic there. Call shouldRespectAlignAttribute and
591         shouldRespectHeightAndWidthAttributes rather than having
592         type-specific logic here. Call minOrMaxAttributeChanged.
593         (WebCore::HTMLInputElement::rendererIsNeeded): Call
594         InputType::rendererIsNeeded; moved the type-specific logic there.
595         (WebCore::HTMLInputElement::attach): Removed the unneeded m_inited
596         flag, which was redundant with the m_haveType flag. Call
597         InputType::attach; moved the type-specific logic there.
598         (WebCore::HTMLInputElement::altText): Use fastGetAttribute.
599         (WebCore::HTMLInputElement::isSuccessfulSubmitButton): Call
600         InputType::canBeSuccessfulSubmitButton; moved the type-specific
601         logic there.
602         (WebCore::HTMLInputElement::isActivatedSubmit): Updated for
603         name changes.
604         (WebCore::HTMLInputElement::setActivatedSubmit): Ditto.
605         (WebCore::HTMLInputElement::reset): Updated to use
606         InputType::storesValueSeparateFromAttribute. Also use
607         hasAttribute(checkedAttr) rather than m_defaultChecked,
608         since both are the same. Also updated for name change.
609         (WebCore::HTMLInputElement::setChecked): Updated for name
610         changes. Also added call to
611         InputType::shouldSendChangeEventAfterCheckedChanged and
612         moved the type-specific logic there.
613         (WebCore::HTMLInputElement::setIndeterminate): Call
614         isCheckable to see if indeterminate is allowed.
615         Also updated for name changes.
616         (WebCore::HTMLInputElement::copyNonAttributeProperties):
617         Updated for name changes and removed data members.
618         (WebCore::HTMLInputElement::value): Call
619         InputType::getTypeSpecificValue and InputType::fallbackValue.
620         Moved the type-specific logic there.
621         (WebCore::HTMLInputElement::valueWithDefault): Call
622         InputType::defaultValue. Moved the type-specific logic there.
623         (WebCore::HTMLInputElement::setSuggestedValue): Call
624         InputType::canSetSuggestedValue. Moved the type-specific logic
625         there.
626         (WebCore::HTMLInputElement::setValue): Call
627         InputType::canSetValue. Moved the type-specific logic there.
628         Clear the file list if it exists rather than checking the
629         type explicitly. We could probably do that a more elegant way.
630         (WebCore::HTMLInputElement::placeholder): Use fastGetAttribute.
631         (WebCore::HTMLInputElement::setValueFromRenderer): Use the
632         isFileUpload function in the assertion.
633         (WebCore::HTMLInputElement::setFileListFromRenderer): Put most
634         of the code from this function into FileInputType::setFileList.
635         (WebCore::HTMLInputElement::preDispatchEventHandler): Changed
636         to call InputType::willDispatchClick, which does the type-specific
637         work. Still need to use a single struct for all types, because
638         the type of the element could change during the event handling.
639         (WebCore::HTMLInputElement::postDispatchEventHandler): Changed
640         to call InputType::didDispatchClick.
641         (WebCore::HTMLInputElement::defaultValue): Use fastGetAttribute.
642         (WebCore::HTMLInputElement::accept): Use fastGetAttribute.
643         (WebCore::HTMLInputElement::alt): Use fastGetAttribute.
644         (WebCore::HTMLInputElement::src): Use fastGetAttribute.
645         (WebCore::HTMLInputElement::setAutofilled): Updated for name
646         changes.
647         (WebCore::HTMLInputElement::files): Use InputType::files.
648         (WebCore::HTMLInputElement::isAcceptableValue): Use
649         InputType::isAcceptableValue.
650         (WebCore::HTMLInputElement::sanitizeValue): Use
651         InputType::sanitizeValue.
652         (WebCore::HTMLInputElement::hasUnacceptableValue): Use
653         InputType::hasUnacceptableValue.
654         (WebCore::HTMLInputElement::needsActivationCallback): Use
655         InputType::shouldResetOnDocumentActivation.
656         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument): Use
657         InputType::willMoveToNewOwnerDocument.
658         (WebCore::HTMLInputElement::dataList): Use
659         InputType::shouldRespectListAttribute.
660         (WebCore::HTMLInputElement::selectedOption): Tweaked logic
661         and naming a bit.
662         (WebCore::HTMLInputElement::stepUpFromRenderer): Use
663         fastGetAttribute.
664         (WebCore::HTMLInputElement::isSpeechEnabled): Use
665         InputType::shouldRespectSpeechAttribute.
666         (WebCore::HTMLInputElement::isTextButton): No longer inline.
667         Calls through to InputType.
668         (WebCore::HTMLInputElement::isRadioButton): Ditto.
669         (WebCore::HTMLInputElement::isSearchField): Ditto.
670         (WebCore::HTMLInputElement::isInputTypeHidden): Ditto.
671         (WebCore::HTMLInputElement::isPasswordField): Ditto.
672         (WebCore::HTMLInputElement::isCheckbox): Ditto.
673         (WebCore::HTMLInputElement::isText): Ditto.
674         (WebCore::HTMLInputElement::isEmailField): Ditto.
675         (WebCore::HTMLInputElement::isFileUpload): Ditto.
676         (WebCore::HTMLInputElement::isImageButton): Ditto.
677         (WebCore::HTMLInputElement::isNumberField): Ditto.
678         (WebCore::HTMLInputElement::isSubmitButton): Ditto.
679         (WebCore::HTMLInputElement::isTelephoneField): Ditto.
680         (WebCore::HTMLInputElement::isURLField): Ditto.
681         (WebCore::HTMLInputElement::isEnumeratable): Ditto.
682         (WebCore::HTMLInputElement::isChecked): No longer inline.
683         Calls InputType::isCheckable.
684         (WebCore::HTMLInputElement::hasSpinButton): No longer inline.
685         Calls through to InputType.
686         (WebCore::HTMLInputElement::supportsPlaceholder): No longer
687         inline. Calls isTextType as before, but with no special case
688         for ISINDEX. That special case was unneeded since it returns
689         true from isTextType.
690         (WebCore::HTMLInputElement::checkedRadioButtons): No longer
691         inline.
692         (WebCore::HTMLInputElement::handleBeforeTextInsertedEvent):
693         No longer inline.
694
695         * html/HTMLInputElement.h: Removed multiple unneeded includes.
696         The big one is probably InputType.h, but also HTMLFormElement.h.
697         Removed unneeded forward declarations. Made many functions
698         no longer inline since they now need to make virtual function
699         dispatches. Removed the unneeded defaultChecked and
700         webkitdirectory functions. Both are handled by HTML attribute
701         reflection for DOM bindings, and the callers instead can get
702         at the attribute. Made updateCheckedRadioButtons public so it
703         can be called by an InputType class. Removed
704         DeprecatedInputType, InputTypeMap, createTypeMap,
705         deprecatedInputType, allowsIndeterminate,
706         respectHeightAndWidthAttrs, storesValueSeparateFromAttribute,
707         m_imageLoader, m_fileList, m_deprecatedTypeNumber,
708         m_defaultChecked, and m_inited. Renamed m_checked to
709         m_isChecked, m_useDefaultChecked to m_reflectsCheckedAttribute,
710         m_indeterminate tom_isIndeterminate, m_haveType to m_hasType,
711         m_activeSubmit to m_isActivatedSubmit, and m_autofilled to
712         m_isAutofilled.
713         
714         * html/HiddenInputType.cpp:
715         (WebCore::HiddenInputType::accessKeyAction): Added.
716         (WebCore::HiddenInputType::rendererIsNeeded) Added.:
717         (WebCore::HiddenInputType::storesValueSeparateFromAttribute): Added.
718         (WebCore::HiddenInputType::isHiddenType): Added.
719         (WebCore::HiddenInputType::shouldRespectHeightAndWidthAttributes): Added.
720         * html/HiddenInputType.h: Ditto.
721
722         * html/ImageInputType.cpp:
723         (WebCore::ImageInputType::ImageInputType): Moved out of the header file.
724         (WebCore::ImageInputType::srcAttributeChanged): Added.
725         (WebCore::ImageInputType::attach): Added.
726         (WebCore::ImageInputType::willMoveToNewOwnerDocument): Added.
727         (WebCore::ImageInputType::shouldRespectAlignAttribute): Added.
728         (WebCore::ImageInputType::canBeSuccessfulSubmitButton): Added.
729         (WebCore::ImageInputType::isImageButton): Added.
730         (WebCore::ImageInputType::isEnumeratable): Added.
731         (WebCore::ImageInputType::shouldRespectHeightAndWidthAttributes): Added.
732         * html/ImageInputType.h: Ditto.
733
734         * html/InputType.cpp:
735         (WebCore::InputType::create): Changed argument type to String. There
736         is no value in taking an AtomicString here.
737         (WebCore::InputType::scaledStepValueShouldBeInteger): Fixed typo in
738         this function name.
739         (WebCore::InputType::canSetStringValue): Added.
740         (WebCore::InputType::isKeyboardFocusable): Added.
741         (WebCore::InputType::shouldUseInputMethod): Added.
742         (WebCore::InputType::handleBlurEvent): Added.
743         (WebCore::InputType::accessKeyAction): Added.
744         (WebCore::InputType::attach): Added.
745         (WebCore::InputType::srcAttributeChanged): Added.
746         (WebCore::InputType::willMoveToNewOwnerDocument): Added.
747         (WebCore::InputType::shouldRespectAlignAttribute): Added.
748         (WebCore::InputType::canChangeFromAnotherType): Added.
749         (WebCore::InputType::minOrMaxAttributeChanged): Added.
750         (WebCore::InputType::canBeSuccessfulSubmitButton): Added.
751         (WebCore::InputType::rendererIsNeeded): Added.
752         (WebCore::InputType::files): Added.
753         (WebCore::InputType::getTypeSpecificValue): Added.
754         (WebCore::InputType::fallbackValue): Added.
755         (WebCore::InputType::defaultValue): Added.
756         (WebCore::InputType::canSetSuggestedValue): Added.
757         (WebCore::InputType::shouldSendChangeEventAfterCheckedChanged): Added.
758         (WebCore::InputType::storesValueSeparateFromAttribute): Added.
759         (WebCore::InputType::canSetValue): Added.
760         (WebCore::InputType::willDispatchClick): Added.
761         (WebCore::InputType::didDispatchClick): Added.
762         (WebCore::InputType::isAcceptableValue): Added.
763         (WebCore::InputType::sanitizeValue): Added.
764         (WebCore::InputType::hasUnacceptableValue): Added.
765         (WebCore::InputType::setFileList): Added.
766         (WebCore::InputType::shouldResetOnDocumentActivation): Added.
767         (WebCore::InputType::shouldRespectListAttribute): Added.
768         (WebCore::InputType::shouldRespectSpeechAttribute): Added.
769         (WebCore::InputType::isTextButton): Added.
770         (WebCore::InputType::isRadioButton): Added.
771         (WebCore::InputType::isSearchField): Added.
772         (WebCore::InputType::isHiddenType): Added.
773         (WebCore::InputType::isPasswordField): Added.
774         (WebCore::InputType::isCheckbox): Added.
775         (WebCore::InputType::isEmailField): Added.
776         (WebCore::InputType::isFileUpload): Added.
777         (WebCore::InputType::isImageButton): Added.
778         (WebCore::InputType::isNumberField): Added.
779         (WebCore::InputType::isSubmitButton): Added.
780         (WebCore::InputType::isTelephoneField): Added.
781         (WebCore::InputType::isURLField): Added.
782         (WebCore::InputType::isEnumeratable): Added.
783         (WebCore::InputType::isCheckable): Added.
784         (WebCore::InputType::hasSpinButton): Added.
785         (WebCore::InputType::shouldRespectHeightAndWidthAttributes): Added.
786
787         * html/InputType.h: Removed unneeded ExceptionCode.h include and
788         used a typedef instead as we do when we want for forward declare it.
789         Added includes and forward declarations needed for new functions.
790         Added ClickHandlingState structure. Changed the argument to create
791         to a String rather than AtomicString. Added many virtual functions.
792         
793         * html/IsIndexInputType.cpp:
794         (WebCore::IsIndexInputType::shouldRespectListAttribute): Added.
795         * html/IsIndexInputType.h: Ditto.
796
797         * html/NumberInputType.cpp:
798         (WebCore::NumberInputType::handleBlurEvent): Added.
799         (WebCore::NumberInputType::isAcceptableValue): Added.
800         (WebCore::NumberInputType::sanitizeValue): Added.
801         (WebCore::NumberInputType::hasUnacceptableValue): Added.
802         (WebCore::NumberInputType::shouldRespectSpeechAttribute): Added.
803         (WebCore::NumberInputType::isNumberField): Added.
804         (WebCore::NumberInputType::hasSpinButton): Added.
805         * html/NumberInputType.h: Ditto.
806
807         * html/PasswordInputType.cpp:
808         (WebCore::PasswordInputType::shouldUseInputMethod): Added.
809         (WebCore::PasswordInputType::shouldResetOnDocumentActivation): Added.
810         (WebCore::PasswordInputType::shouldRespectListAttribute): Added.
811         (WebCore::PasswordInputType::shouldRespectSpeechAttribute): Added.
812         (WebCore::PasswordInputType::isPasswordField): Added.
813         * html/PasswordInputType.h: Ditto.
814
815         * html/RadioInputType.cpp:
816         (WebCore::RadioInputType::isKeyboardFocusable): Added.
817         (WebCore::RadioInputType::attach): Added.
818         (WebCore::RadioInputType::shouldSendChangeEventAfterCheckedChanged): Added.
819         (WebCore::RadioInputType::willDispatchClick): Added.
820         (WebCore::RadioInputType::didDispatchClick): Added.
821         (WebCore::RadioInputType::isRadioButton): Added.
822         * html/RadioInputType.h: Ditto.
823
824         * html/RangeInputType.cpp:
825         (WebCore::RangeInputType::accessKeyAction): Added.
826         (WebCore::RangeInputType::minOrMaxAttributeChanged): Added.
827         (WebCore::RangeInputType::fallbackValue): Added.
828         (WebCore::RangeInputType::sanitizeValue): Added.
829         (WebCore::RangeInputType::shouldRespectListAttribute): Added.
830         * html/RangeInputType.h: Ditto.
831
832         * html/ResetInputType.cpp:
833         (WebCore::ResetInputType::defaultValue): Added.
834         (WebCore::ResetInputType::isTextButton): Added.
835         * html/ResetInputType.h: Ditto.
836
837         * html/SearchInputType.cpp:
838         (WebCore::SearchInputType::shouldRespectSpeechAttribute): Added.
839         (WebCore::SearchInputType::isSearchField): Added.
840         * html/SearchInputType.h: Ditto.
841
842         * html/SubmitInputType.cpp:
843         (WebCore::SubmitInputType::canBeSuccessfulSubmitButton): Added.
844         (WebCore::SubmitInputType::defaultValue): Added.
845         (WebCore::SubmitInputType::isSubmitButton): Added.
846         (WebCore::SubmitInputType::isTextButton): Added.
847         * html/SubmitInputType.h: Ditto.
848
849         * html/TelephoneInputType.cpp:
850         (WebCore::TelephoneInputType::shouldRespectSpeechAttribute): Added.
851         (WebCore::TelephoneInputType::isTelephoneField): Added.
852         * html/TelephoneInputType.h: Ditto.
853
854         * html/TextFieldInputType.cpp:
855         (WebCore::TextFieldInputType::shouldUseInputMethod): Added.
856         (WebCore::TextFieldInputType::sanitizeValue): Added.
857         (WebCore::TextFieldInputType::shouldRespectListAttribute): Added.
858         * html/TextFieldInputType.h: Ditto.
859
860         * html/TextInputType.cpp:
861         (WebCore::TextInputType::canSetSuggestedValue): Added.
862         (WebCore::TextInputType::shouldRespectSpeechAttribute): Added.
863         * html/TextInputType.h: Ditto.
864
865         * html/TimeInputType.cpp:
866         (WebCore::TimeInputType::scaledStepValueShouldBeInteger): Fixed
867         typo in the name of this function.
868         * html/TimeInputType.h: Ditto.
869
870         * html/URLInputType.cpp:
871         (WebCore::URLInputType::isURLField): Added.
872         * html/URLInputType.h: Ditto.
873
874 2011-01-03  Mihai Parparita  <mihaip@chromium.org>
875
876         Unreviewed.
877
878         NSScrollView-based scrollbars and ScrollBarTheme-based scrollbars don't look the same
879         https://bugs.webkit.org/show_bug.cgi?id=51151
880
881         Flip switch to use WebThemeEngine for Chromium/Mac scrollbar rendering,
882         so that it can match Safari's (and thus use the same baselines).
883
884         No new tests, should be covered by layout tests (which will need
885         expectation changes)
886
887         * platform/chromium/ScrollbarThemeChromiumMac.mm:
888
889 2011-01-03  Antonio Gomes  <agomes@rim.com>
890
891         Unreviewed build fix for WebKit/Gtk+.
892
893         RenderThemeGtk::initMediaColors() in RenderThemeGtk2.cpp needs to be
894         guarded by ENABLE(VIDEO), as it is in its header.
895
896         No new tests.
897
898         * platform/gtk/RenderThemeGtk2.cpp:
899
900 2011-01-02  Dan Bernstein  <mitz@apple.com>
901
902         Rubber-stamped by Simon Fraser.
903
904         <rdar://problem/8812159> Update copyright strings
905
906         * Info.plist:
907
908 2011-01-02  Dan Bernstein  <mitz@apple.com>
909
910         Reviewed by Sam Weinig.
911
912         <rdar://problem/8806570> REGRESSION (r73337): Incorrect text match count when a match occurs in a text field
913         https://bugs.webkit.org/show_bug.cgi?id=51623
914
915         * editing/Editor.cpp:
916         (WebCore::Editor::countMatchesForText): Actually remember the original search range end
917         container and offset and restore them when needed, instead of using two references to the
918         same Range.
919         * manual-tests/find-count-matches-after-text-control.html: Added.
920
921 2011-01-02  Benjamin Poulain  <benjamin.poulain@nokia.com>
922
923         Reviewed by Csaba Osztrogon√°c.
924
925         WebKit 2 does not build on 64bits with a recent GCC
926         https://bugs.webkit.org/show_bug.cgi?id=51754
927
928         Use explicitely 64 bits types for the attributes of DatabaseDetails.
929
930         * storage/DatabaseDetails.h:
931         (WebCore::DatabaseDetails::expectedUsage):
932         (WebCore::DatabaseDetails::currentUsage):
933
934 2011-01-02  Patrick Gansterer  <paroga@webkit.org>
935
936         Unreviewed WinCE build fix for r74868.
937
938         * platform/graphics/wince/ImageBufferWinCE.cpp:
939         (WebCore::getImageData):
940
941 2011-01-02  Sheriff Bot  <webkit.review.bot@gmail.com>
942
943         Unreviewed, rolling out r74847.
944         http://trac.webkit.org/changeset/74847
945         https://bugs.webkit.org/show_bug.cgi?id=51803
946
947         "Preprocessor guards should be in header files" (Requested by
948         ap on #webkit).
949
950         * bindings/js/JSDOMWindowBase.cpp:
951         * dom/Document.cpp:
952         (WebCore::Document::recalcStyle):
953         * html/HTMLDocument.cpp:
954         * loader/FrameLoader.cpp:
955         * loader/ResourceLoadNotifier.cpp:
956         * page/Chrome.cpp:
957         * page/Console.cpp:
958         * page/ContextMenuController.cpp:
959         * page/DOMWindow.cpp:
960         (WebCore::DOMWindow::dispatchEvent):
961         * page/EventHandler.cpp:
962         * page/Page.cpp:
963         * storage/Database.cpp:
964         * workers/AbstractWorker.cpp:
965         * workers/DefaultSharedWorkerRepository.cpp:
966         * workers/SharedWorker.cpp:
967         * workers/Worker.cpp:
968         * workers/WorkerContext.cpp:
969         * workers/WorkerMessagingProxy.cpp:
970         * xml/XMLHttpRequest.cpp:
971         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
972
973 2011-01-02  Patrick Gansterer  <paroga@webkit.org>
974
975         [CMake] Unreviewed build fix.
976
977         * CMakeLists.txt:
978
979 2011-01-02  Dirk Schulze  <krit@webkit.org>
980
981         Reviewed by Simon Fraser.
982
983         Clarify ImageBuffer and ImageData relationship
984         https://bugs.webkit.org/show_bug.cgi?id=51297
985
986         Remove references to ImageData and CanvasPixelArray from ImageBuffer and SVG filter/masker code,
987         since this was a layering violation, and replaced it by ByteArray.
988
989         No change of functionality, so no new test added.
990
991         * html/ImageData.cpp:
992         (WebCore::ImageData::create):
993         (WebCore::ImageData::ImageData):
994         * html/ImageData.h: Added new constructor with ByteArray input.
995         (WebCore::ImageData::width):
996         (WebCore::ImageData::height):
997         (WebCore::ImageData::data):
998         * html/canvas/CanvasPixelArray.cpp:
999         (WebCore::CanvasPixelArray::create):
1000         (WebCore::CanvasPixelArray::CanvasPixelArray):
1001         * html/canvas/CanvasPixelArray.h: New conctructor with ByteArray input, used by HTML Canvas.
1002         (WebCore::CanvasPixelArray::data):
1003         (WebCore::CanvasPixelArray::length):
1004         (WebCore::CanvasPixelArray::set):
1005         (WebCore::CanvasPixelArray::get):
1006         * html/canvas/CanvasRenderingContext2D.cpp:
1007         (WebCore::CanvasRenderingContext2D::getImageData):
1008         (WebCore::CanvasRenderingContext2D::putImageData):
1009         * platform/graphics/ImageBuffer.h:
1010         * platform/graphics/cairo/ImageBufferCairo.cpp:
1011         (WebCore::getImageData):
1012         (WebCore::ImageBuffer::getUnmultipliedImageData):
1013         (WebCore::ImageBuffer::getPremultipliedImageData):
1014         (WebCore::putImageData):
1015         (WebCore::ImageBuffer::putUnmultipliedImageData):
1016         (WebCore::ImageBuffer::putPremultipliedImageData):
1017         * platform/graphics/cg/ImageBufferCG.cpp:
1018         (WebCore::getImageData):
1019         (WebCore::ImageBuffer::getUnmultipliedImageData):
1020         (WebCore::ImageBuffer::getPremultipliedImageData):
1021         (WebCore::putImageData):
1022         (WebCore::ImageBuffer::putUnmultipliedImageData):
1023         (WebCore::ImageBuffer::putPremultipliedImageData):
1024         * platform/graphics/filters/FEBlend.cpp:
1025         (WebCore::FEBlend::apply):
1026         * platform/graphics/filters/FEColorMatrix.cpp:
1027         (WebCore::FEColorMatrix::apply):
1028         * platform/graphics/filters/FEComponentTransfer.cpp:
1029         (WebCore::FEComponentTransfer::apply):
1030         * platform/graphics/filters/FEComposite.cpp:
1031         (WebCore::FEComposite::apply):
1032         * platform/graphics/filters/FEConvolveMatrix.cpp:
1033         (WebCore::setDestinationPixels):
1034         (WebCore::FEConvolveMatrix::apply):
1035         * platform/graphics/filters/FEConvolveMatrix.h:
1036         * platform/graphics/filters/FEDisplacementMap.cpp:
1037         (WebCore::FEDisplacementMap::apply):
1038         * platform/graphics/filters/FEGaussianBlur.cpp:
1039         (WebCore::FEGaussianBlur::apply):
1040         * platform/graphics/filters/FELighting.cpp:
1041         (WebCore::FELighting::apply):
1042         * platform/graphics/filters/FEMorphology.cpp:
1043         (WebCore::FEMorphology::apply):
1044         * platform/graphics/filters/FETurbulence.cpp:
1045         (WebCore::FETurbulence::apply):
1046         * platform/graphics/filters/FilterEffect.cpp:
1047         (WebCore::FilterEffect::asImageBuffer):
1048         (WebCore::FilterEffect::asUnmultipliedImage):
1049         (WebCore::FilterEffect::asPremultipliedImage):
1050         (WebCore::FilterEffect::copyImageBytes):
1051         (WebCore::FilterEffect::copyUnmultipliedImage):
1052         (WebCore::FilterEffect::copyPremultipliedImage):
1053         (WebCore::FilterEffect::createUnmultipliedImageResult):
1054         (WebCore::FilterEffect::createPremultipliedImageResult):
1055         * platform/graphics/filters/FilterEffect.h:
1056         * platform/graphics/qt/ImageBufferQt.cpp:
1057         (WebCore::getImageData):
1058         (WebCore::ImageBuffer::getUnmultipliedImageData):
1059         (WebCore::ImageBuffer::getPremultipliedImageData):
1060         (WebCore::putImageData):
1061         (WebCore::ImageBuffer::putUnmultipliedImageData):
1062         (WebCore::ImageBuffer::putPremultipliedImageData):
1063         * platform/graphics/skia/ImageBufferSkia.cpp:
1064         (WebCore::getImageData):
1065         (WebCore::ImageBuffer::getUnmultipliedImageData):
1066         (WebCore::ImageBuffer::getPremultipliedImageData):
1067         (WebCore::putImageData):
1068         (WebCore::ImageBuffer::putUnmultipliedImageData):
1069         (WebCore::ImageBuffer::putPremultipliedImageData):
1070         * platform/graphics/wince/ImageBufferWinCE.cpp:
1071         (WebCore::getImageData):
1072         (WebCore::ImageBuffer::getUnmultipliedImageData):
1073         (WebCore::ImageBuffer::getPremultipliedImageData):
1074         (WebCore::putImageData):
1075         (WebCore::ImageBuffer::putUnmultipliedImageData):
1076         (WebCore::ImageBuffer::putPremultipliedImageData):
1077         * platform/graphics/wx/ImageBufferWx.cpp:
1078         (WebCore::ImageBuffer::getUnmultipliedImageData):
1079         (WebCore::ImageBuffer::getPremultipliedImageData):
1080         (WebCore::ImageBuffer::putUnmultipliedImageData):
1081         (WebCore::ImageBuffer::putPremultipliedImageData):
1082         * rendering/RenderSVGResourceMasker.cpp:
1083         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
1084
1085 2011-01-01  Adam Barth  <abarth@webkit.org>
1086
1087         Reviewed by Eric Seidel.
1088
1089         Move JavaScriptCore to Source
1090         https://bugs.webkit.org/show_bug.cgi?id=51604
1091
1092         Update references to JavaScriptCore.
1093
1094         * Android.derived.jscbindings.mk:
1095         * Android.v8bindings.mk:
1096         * CMakeLists.txt:
1097         * WebCore.gyp/WebCore.gyp:
1098         * WebCore.pro:
1099           - These changes are subtle and might not be 100% correct.
1100         * move-js-headers.sh:
1101
1102 2011-01-01  Adam Barth  <abarth@webkit.org>
1103
1104         Reviewed by Eric Seidel.
1105
1106         forbid sandboxed frames to call top.close() when allow-same-origin is not setted
1107         https://bugs.webkit.org/show_bug.cgi?id=38340
1108
1109         We now pass the ScriptExecutionContext to window.close so it can find
1110         the Frame and check whether navigation is allowed.  This check will
1111         almost always pass because you can only close top-level frames, but the
1112         check will fail when the calling script is sandboxed.
1113
1114         Tests: fast/frames/sandboxed-iframe-close-top-noclose.html
1115                fast/frames/sandboxed-iframe-close-top.html
1116
1117         * page/DOMWindow.cpp:
1118         (WebCore::DOMWindow::close):
1119         * page/DOMWindow.h:
1120         * page/DOMWindow.idl:
1121
1122 2011-01-01  Adam Barth  <abarth@webkit.org>
1123
1124         Reviewed by Eric Seidel.
1125
1126         sandbox iframes have access to top.history methods
1127         https://bugs.webkit.org/show_bug.cgi?id=38152
1128
1129         To enforce the sandbox restrictions on History, we need to pass the
1130         ScriptExecutionContext to WebCore.  This patch leaves the original
1131         History methods in place because they are used directly by folks who
1132         don't care about security checks.
1133
1134         Test: fast/frames/sandboxed-iframe-history-denied.html
1135
1136         * page/History.cpp:
1137         (WebCore::History::back):
1138         (WebCore::History::forward):
1139         (WebCore::History::go):
1140         * page/History.h:
1141         * page/History.idl:
1142
1143 2011-01-01  Adam Barth  <abarth@webkit.org>
1144
1145         Remove empty file.
1146
1147         * Android.mk:
1148         * CMakeLists.txt:
1149         * GNUmakefile.am:
1150         * WebCore.gypi:
1151         * WebCore.pro:
1152         * WebCore.vcproj/WebCore.vcproj:
1153         * WebCore.xcodeproj/project.pbxproj:
1154         * dom/DOMAllInOne.cpp:
1155         * dom/Entity.cpp: Removed.
1156
1157 2011-01-01  Adam Barth  <abarth@webkit.org>
1158
1159         Remove empty file.
1160
1161         * CMakeLists.txt:
1162         * GNUmakefile.am:
1163         * WebCore.pro:
1164         * WebCore.vcproj/WebCore.vcproj:
1165         * WebCore.xcodeproj/project.pbxproj:
1166         * bindings/js/JSBindingsAllInOne.cpp:
1167         * bindings/js/JSPopStateEventCustom.cpp: Removed.
1168
1169 2011-01-01  Adam Barth  <abarth@webkit.org>
1170
1171         Remove empty files.
1172
1173         * GNUmakefile.am:
1174         * WebCore.gypi:
1175         * WebCore.vcproj/WebCore.vcproj:
1176         * WebCore.xcodeproj/project.pbxproj:
1177         * bindings/generic/BindingFrame.h: Removed.
1178         * bindings/generic/BindingLocation.h: Removed.
1179
1180 2011-01-01  Konstantin Tokarev  <annulen@yandex.ru>
1181
1182         Reviewed by Darin Adler.
1183
1184         Don't include Inspector headers when Inspector is disabled
1185         https://bugs.webkit.org/show_bug.cgi?id=51789
1186
1187         * bindings/js/JSDOMWindowBase.cpp: Include Inspector headers when
1188         Inspector is enabled
1189         * dom/Document.cpp: Include Inspector headers when
1190         Inspector is enabled
1191         (WebCore::Document::recalcStyle): Disabled InspectorInstrumentationCookie
1192         handling
1193         * html/HTMLDocument.cpp: Include Inspector headers when
1194         Inspector is enabled
1195         * loader/FrameLoader.cpp: Include Inspector headers when
1196         Inspector is enabled
1197         * loader/ResourceLoadNotifier.cpp: Include Inspector headers when
1198         Inspector is enabled
1199         * page/Chrome.cpp: Include Inspector headers when
1200         Inspector is enabled
1201         * page/Console.cpp: Include Inspector headers when
1202         Inspector is enabled
1203         * page/ContextMenuController.cpp: Include Inspector headers when
1204         Inspector is enabled
1205         * page/DOMWindow.cpp: Include Inspector headers when
1206         Inspector is enabled
1207         (WebCore::DOMWindow::dispatchEvent): Disabled InspectorInstrumentationCookie
1208         handling
1209         * page/EventHandler.cpp: Include Inspector headers when
1210         Inspector is enabled
1211         * page/Page.cpp: Include Inspector headers when
1212         Inspector is enabled
1213         * storage/Database.cpp: Include Inspector headers when
1214         Inspector is enabled
1215         * workers/AbstractWorker.cpp: Include Inspector headers when
1216         Inspector is enabled
1217         * workers/DefaultSharedWorkerRepository.cpp: Include Inspector headers when
1218         Inspector is enabled
1219         * workers/SharedWorker.cpp: Include Inspector headers when
1220         Inspector is enabled
1221         * workers/Worker.cpp: Include Inspector headers when
1222         Inspector is enabled
1223         * workers/WorkerContext.cpp: Include Inspector headers when
1224         Inspector is enabled
1225         * workers/WorkerMessagingProxy.cpp: Include Inspector headers when
1226         Inspector is enabled
1227         * xml/XMLHttpRequest.cpp: Include Inspector headers when
1228         Inspector is enabled
1229         (WebCore::XMLHttpRequest::callReadyStateChangeListener): Disabled
1230         InspectorInstrumentationCookie handling
1231
1232 2010-12-31  Adam Barth  <abarth@webkit.org>
1233
1234         Reviewed by Darin Adler.
1235
1236         fast/loader/about-blank-hash-change.html fails on Chromium
1237         https://bugs.webkit.org/show_bug.cgi?id=51788
1238
1239         I'm unable to reproduce the failure locally, so this patch is slightly
1240         speculative.  We need to be slighly more careful how we compare the
1241         fragment identifiers for Chromium because Chromium uses a URL parser
1242         that is more agressive about canonicalization.
1243
1244         * page/Location.cpp:
1245         (WebCore::Location::setHash):
1246
1247 2010-12-31  Martin Robinson  <mrobinson@igalia.com>
1248
1249         Reviewed by Xan Lopez.
1250
1251         [GTK] Use GLib/GIO API for FileSystemGtk implementation
1252         https://bugs.webkit.org/show_bug.cgi?id=51617
1253
1254         Complete implementation of FileSystem platform code for GLib. This
1255         converts remaining API points using POSIX calls to platform-independent
1256         GLib calls and fixes other compilation errors.
1257
1258         No new tests. This code will be tested when an implementation
1259         of beginDragWithFiles is complete.
1260
1261         (WebCore::JSDirectoryEntry::getFile):
1262         (WebCore::JSDirectoryEntry::getDirectory):
1263         * platform/FileSystem.h: Added forward declarations for GLib types to
1264         avoid GLib includes and changed the PlatformFileHandle to be a GIOStream.
1265         * platform/gtk/FileSystemGtk.cpp:
1266         (WebCore::openTemporaryFile): Reimplement using only GLib calls.
1267         (WebCore::openFile): Ditto.
1268         (WebCore::closeFile): Ditto.
1269         (WebCore::seekFile): Added implementation.
1270         (WebCore::writeToFile): Reimplement using only GLib calls.
1271         (WebCore::readFromFile): Ditto.
1272
1273 2010-12-31  Darin Adler  <darin@apple.com>
1274
1275         Reviewed by Dan Bernstein.
1276
1277         Some renaming and refactoring of form element code
1278         https://bugs.webkit.org/show_bug.cgi?id=51784
1279
1280         * bindings/js/JSHTMLSelectElementCustom.cpp:
1281         (WebCore::JSHTMLSelectElement::remove): Call new overload of remove
1282         for option elements instead of putting the logic in the binding.
1283
1284         * html/HTMLButtonElement.cpp:
1285         (WebCore::HTMLButtonElement::HTMLButtonElement): Updated for name changes.
1286         (WebCore::HTMLButtonElement::defaultEventHandler): Renamed argument to
1287         "event" instead of "evt". Also updated for name changes.
1288         (WebCore::HTMLButtonElement::isActivatedSubmit): Ditto.
1289         (WebCore::HTMLButtonElement::setActivatedSubmit): Ditto.
1290         (WebCore::HTMLButtonElement::appendFormData): Ditto.
1291         * html/HTMLButtonElement.h: Renamed m_activeSubmit to m_isActivatedSubmit
1292         to match the getter function name. The name still doesn't seem great.
1293
1294         * html/HTMLFormElement.cpp:
1295         (WebCore::HTMLFormElement::HTMLFormElement): Updated for name changes.
1296         (WebCore::HTMLFormElement::~HTMLFormElement): Use autoComplete function
1297         instead of m_autocomplete data member.
1298         (WebCore::HTMLFormElement::rendererIsNeeded): Use m_wasDemoted data member
1299         instead of otherwise-unused isDemoted function.
1300         (WebCore::HTMLFormElement::submitImplicitly): Updated for name changes.
1301         (WebCore::HTMLFormElement::validateInteractively): Removed code to clear
1302         m_insubmit. This is now handled by the caller, prepareForSubmission.
1303         (WebCore::HTMLFormElement::prepareForSubmission): Renamed. Updated for
1304         name changes. Moved code to clear m_isSubmittingOrPreparingForSubmission
1305         here from validateInteractively. Removed unneeded check of m_doingsubmit
1306         boolean before setting it.
1307         (WebCore::HTMLFormElement::submit): Factored this function into two.
1308         One for JavaScript and one for non-JavaScript. Neither function needs a frame
1309         argument, because the question being asked, anyPageIsProcessingUserGesture,
1310         is a question asked of an entire page group, not a specific frame or page,
1311         so it's not important which is the active frame.
1312         (WebCore::HTMLFormElement::submitFromJavaScript): Ditto.
1313         (WebCore::HTMLFormElement::reset): Updated for name changes.
1314         (WebCore::HTMLFormElement::parseMappedAttribute): Removed code to parse
1315         acceptAttr and got rid of code to set m_autocomplete.
1316         (WebCore::HTMLFormElement::elementForAlias): Changed return type to a raw
1317         pointer.
1318         (WebCore::HTMLFormElement::getNamedElements): Updated to use raw pointer
1319         and the vector find function. Added a FIXME about the comment.
1320         (WebCore::HTMLFormElement::documentDidBecomeActive): Use autoComplete
1321         function instead of m_autocomplete data member.
1322         (WebCore::HTMLFormElement::willMoveToNewOwnerDocument): Ditto.
1323         (WebCore::HTMLFormElement::didMoveToNewOwnerDocument): Ditto.
1324         (WebCore::HTMLFormElement::autoComplete): Ditto.
1325         * html/HTMLFormElement.h: Added a FIXME about renaming the autoComplete
1326         function. Renamed prepareSubmit to prepareForSubmission. Got rid of the
1327         frame argument from the submit function and added a new submitFromJavaScript
1328         variant. Removed the unneeded isDemoted function. Changed the return type
1329         of elementForAlias to a raw pointer. Removed m_autocomplete. Renamed
1330         m_insubmit to m_isSubmittingOrPreparingForSubmission, m_doingsubmit to
1331         m_shouldSubmit, m_inreset to m_inResetFunction, m_malformed to m_wasMalformed,
1332         m_demoted to m_wasDemoted. Use plain bool instead of bitfields.
1333
1334         * html/HTMLFormElement.idl: Use the function named submitFromJavaScript
1335         instead of using CallWith=DynamicFrame because we don't need to know
1336         what frame is calling. If we did, it's not clear that the "dynamic"
1337         frame would be the right one anyway.
1338
1339         * html/HTMLSelectElement.cpp:
1340         (WebCore::HTMLSelectElement::remove): Added an overload that takes an option
1341         element, since the JavaScript binding supports this.
1342         * html/HTMLSelectElement.h: Ditto.
1343
1344         * html/ImageInputType.cpp:
1345         (WebCore::ImageInputType::handleDOMActivateEvent): Updated for name changes.
1346         * html/ImageInputType.h: Ditto.
1347         * html/SubmitInputType.cpp:
1348         (WebCore::SubmitInputType::handleDOMActivateEvent): Ditto.
1349
1350 2010-12-31  Daniel Bates  <dbates@rim.com>
1351
1352         Reviewed by Darin Adler.
1353
1354         Pass style for <area> instead of associated <img> when querying whether
1355         the theme draws the focus ring for an <area>
1356         https://bugs.webkit.org/show_bug.cgi?id=51632
1357
1358         Fixes an issue where the style for the associated <img> of an <area>
1359         was passed when considering whether the theme should draw a focus ring
1360         for the <area>. Instead, we should pass the theme the style for the <area>.
1361
1362         It's not possible to test this at this time since there are no themes
1363         that override focus ring drawing for <area>s.
1364
1365         * rendering/RenderImage.cpp:
1366         (WebCore::RenderImage::paintFocusRing): Moved call to RenderTheme::supportsFocusRing()
1367         such that it's called with respect to the focused <area>.
1368
1369 2010-12-31  Darin Adler  <darin@apple.com>
1370
1371         * WebCore.xcodeproj/project.pbxproj: Added back the language.
1372         Developers should be using Xcode 3.2.5 or newer.
1373
1374 2010-12-31  Adam Barth  <abarth@webkit.org>
1375
1376         Reviewed by Eric Seidel.
1377
1378         Move V8 to WebCore Location implementation
1379         https://bugs.webkit.org/show_bug.cgi?id=51768
1380
1381         * bindings/generic/BindingFrame.h:
1382         * bindings/generic/BindingLocation.h:
1383         * bindings/v8/V8Binding.h:
1384         * bindings/v8/V8DOMWindowShell.cpp:
1385         (WebCore::V8DOMWindowShell::setLocation):
1386         * bindings/v8/V8Utilities.cpp:
1387         * bindings/v8/V8Utilities.h:
1388         * bindings/v8/custom/V8LocationCustom.cpp:
1389         (WebCore::V8Location::hashAccessorSetter):
1390         (WebCore::V8Location::hostAccessorSetter):
1391         (WebCore::V8Location::hostnameAccessorSetter):
1392         (WebCore::V8Location::hrefAccessorSetter):
1393         (WebCore::V8Location::pathnameAccessorSetter):
1394         (WebCore::V8Location::portAccessorSetter):
1395         (WebCore::V8Location::protocolAccessorSetter):
1396         (WebCore::V8Location::searchAccessorSetter):
1397         (WebCore::V8Location::reloadCallback):
1398         (WebCore::V8Location::replaceCallback):
1399         (WebCore::V8Location::assignCallback):
1400
1401 2010-12-31  Yi Shen  <yi.4.shen@nokia.com>
1402
1403         Reviewed by Eric Seidel.
1404
1405         Make retrieving extraMediaControlsStyleSheet be page dependent.
1406         https://bugs.webkit.org/show_bug.cgi?id=51752
1407
1408         Use themeForPage to retrieve extraMediaControlsStyleSheet for media
1409         controls.
1410
1411         No new tests because no platform-specific theme implementation uses
1412         the passed page pointer yet.
1413
1414         * css/CSSStyleSelector.cpp:
1415         (WebCore::CSSStyleSelector::styleForElement):
1416
1417 2010-12-31  Ilya Tikhonovsky  <loislo@chromium.org>
1418
1419         Reviewed by Pavel Feldman.
1420
1421         Web Inspector: [REGRESSION] WebInspector.ResourcesPanel.prototype.canShowSourceLine() broken.
1422
1423         https://bugs.webkit.org/show_bug.cgi?id=51709
1424
1425         * inspector/front-end/ResourcesPanel.js:
1426         (WebInspector.ResourcesPanel.prototype.canShowSourceLine):
1427
1428 2010-12-31  Patrick Gansterer  <paroga@webkit.org>
1429
1430         Unreviewed build fix after r74800.
1431
1432         * bindings/js/JSDOMWindowCustom.cpp: Add missing header.
1433         * bindings/js/JSLocationCustom.cpp: Ditto.
1434
1435 2010-12-31  Adam Barth  <abarth@webkit.org>
1436
1437         Rubber-stamped by Eric Seidel.
1438
1439         Move HTML and XML parser benchmarks into PerformanceTests/Parser
1440         https://bugs.webkit.org/show_bug.cgi?id=51772
1441
1442         Remove the benchmarks folder now that it's empty.  Future benchmarks
1443         should go in the PerformanceTests directory.
1444
1445         * benchmarks: Removed.
1446         * benchmarks/parser: Removed.
1447         * benchmarks/parser/html-parser.html: Removed.
1448         * benchmarks/parser/resources: Removed.
1449         * benchmarks/parser/resources/html5.html: Removed.
1450         * benchmarks/parser/resources/runner.js: Removed.
1451         * benchmarks/parser/xml-parser.html: Removed.
1452
1453 2010-12-31  Patrick Gansterer  <paroga@webkit.org>
1454
1455         Reviewed by Adam Barth.
1456
1457         Add XML parser benchmark
1458         https://bugs.webkit.org/show_bug.cgi?id=51612
1459
1460         Move the JavaScript code of html parser into a separate file to share it with xml parser.
1461
1462         * benchmarks/parser/html-parser.html:
1463         * benchmarks/parser/resources/runner.js: Copied from WebCore/benchmarks/parser/html-parser.html.
1464         (runFunction):
1465         (run):
1466         (start):
1467         * benchmarks/parser/xml-parser.html: Copied from WebCore/benchmarks/parser/html-parser.html.
1468
1469 2010-12-29  Zhenyao Mo  <zmo@google.com>
1470
1471         Reviewed by Kenneth Russell.
1472
1473         Update validation of stencil mask and ref values
1474         https://bugs.webkit.org/show_bug.cgi?id=50716
1475
1476         * html/canvas/WebGLRenderingContext.cpp:
1477         (WebCore::WebGLRenderingContext::initializeNewContext): Initialize cached stencil settings.
1478         (WebCore::WebGLRenderingContext::drawArrays): Validate stencil settings.
1479         (WebCore::WebGLRenderingContext::drawElements): Ditto.
1480         (WebCore::WebGLRenderingContext::stencilFunc): Cache stencil settings, but generate no error.
1481         (WebCore::WebGLRenderingContext::stencilFuncSeparate): Ditto.
1482         (WebCore::WebGLRenderingContext::stencilMask): Ditto.
1483         (WebCore::WebGLRenderingContext::stencilMaskSeparate): Ditto.
1484         (WebCore::WebGLRenderingContext::validateStencilSettings): Helper function to validate stencil settings.
1485         * html/canvas/WebGLRenderingContext.h: Declare stencil setting members.
1486
1487 2010-12-30  Martin Robinson  <mrobinson@igalia.com>
1488
1489         Reviewed by Xan Lopez.
1490
1491         [GTK] Fork pieces of RenderThemeGtk that will differ for GTK+ 3
1492         https://bugs.webkit.org/show_bug.cgi?id=51755
1493
1494         Split out pieces of RenderThemeGtk into RenderThemeGtk2 and RenderThemeGtk3
1495         if they are going to differ between GTK+ 2.x and GTK+ 3.x. This is the preliminary
1496         step to landing support for the new GTK+ 3.x theming API.
1497
1498         No new tests. This should not change functionality.
1499
1500         * GNUmakefile.am: Add RenderThemeGtk2 and RenderThemeGtk3 to the sources list.
1501         * platform/gtk/RenderThemeGtk.cpp:
1502         (WebCore::RenderThemeGtk::adjustTextFieldStyle): Call the setTextInputBorders static method.
1503         (WebCore::RenderThemeGtk::adjustTextAreaStyle): Ditto.
1504         (WebCore::RenderThemeGtk::paintMediaButton): Ditto.
1505         (WebCore::RenderThemeGtk::adjustProgressBarStyle): ditto.
1506         * platform/gtk/RenderThemeGtk.h: Make setTextInputBorders a method, so that
1507         it can be exist in RenderThemeGtk{2,3} and be called from RenderThemeGtk.
1508         * platform/gtk/RenderThemeGtk2.cpp: Added. A fork of the bits of RenderThemeGtk
1509         that will eventually be platform-dependent.
1510         * platform/gtk/RenderThemeGtk3.cpp: Added. Ditto.
1511
1512 2010-12-30  Justin Schuh  <jschuh@chromium.org>
1513
1514         Reviewed by James Robinson.
1515
1516         Reverting r74292 because it introduced a crash with ruby text.
1517         https://bugs.webkit.org/show_bug.cgi?id=51637
1518
1519         Test: fast/css/counters/counter-ruby-text-cleared.html
1520
1521         * rendering/RenderCounter.cpp:
1522         (WebCore::findPlaceForCounter):
1523         * rendering/RenderObject.cpp:
1524         (WebCore::RenderObject::addChild):
1525         * rendering/RenderObjectChildList.cpp:
1526         (WebCore::RenderObjectChildList::appendChildNode):
1527         (WebCore::RenderObjectChildList::insertChildNode):
1528
1529 2010-12-30  Darin Adler  <darin@apple.com>
1530
1531         Reviewed by David Kilzer.
1532
1533         Remove unused JSBinding source files
1534         https://bugs.webkit.org/show_bug.cgi?id=51762
1535
1536         * bindings/js/JSBinding.h: Removed.
1537         * bindings/js/specialization: Removed.
1538         * bindings/js/specialization/JSBindingState.cpp: Removed.
1539         * bindings/js/specialization/JSBindingState.h: Removed.
1540
1541         * CMakeLists.txt: Removed references to files.
1542         * GNUmakefile.am: Ditto.
1543         * WebCore.gypi: Ditto.
1544         * WebCore.pro: Ditto.
1545         * WebCore.vcproj/WebCore.vcproj: Ditto.
1546         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
1547
1548 2010-12-30  Tony Gentilcore  <tonyg@chromium.org>
1549
1550         Reviewed by Darin Adler.
1551
1552         Remove Document.h include from some headers where it isn't necessary
1553         https://bugs.webkit.org/show_bug.cgi?id=51730
1554
1555         No new tests because no new functionality.
1556
1557         * editing/EditingStyle.cpp:
1558         * editing/EditingStyle.h:
1559         * editing/SelectionController.h:
1560         * editing/visible_units.h:
1561         * html/HTMLAudioElement.h:
1562         * html/HTMLBodyElement.h:
1563         * inspector/InspectorCSSAgent.h:
1564         * inspector/InspectorDOMAgent.h:
1565         * inspector/InspectorInstrumentation.h:
1566         * xml/DOMParser.cpp:
1567         * xml/DOMParser.h:
1568         (WebCore::DOMParser::create):
1569         (WebCore::DOMParser::DOMParser):
1570
1571 2010-12-30  Benjamin C Meyer  <bmeyer@rim.com>
1572
1573         Reviewed by Darin Adler.
1574
1575         bindings/js/JSDesktopNotificationsCustom.cpp is not included in the cmake build
1576         which is required when NOTIFICATIONS is enabled.
1577
1578         https://bugs.webkit.org/show_bug.cgi?id=51761
1579
1580         * CMakeLists.txt:
1581
1582 2010-12-30  Antti Koivisto  <antti@apple.com>
1583
1584         Not reviewed.
1585
1586         Revert accidental project file change.
1587
1588         * WebCore.xcodeproj/project.pbxproj:
1589
1590 2010-12-30  Antti Koivisto  <antti@apple.com>
1591
1592         Reviewed by Darin Adler.
1593
1594         https://bugs.webkit.org/show_bug.cgi?id=51134
1595         Move loading related code from MemoryCache to CachedResourceLoader
1596
1597         - Merge MemoryCache::requestResource to CachedResourceLoader::requestResource
1598         - Merge MemoryCache::requestUserCSSStyleSheet to CachedResourceLoader::requestUserCSSStyleSheet
1599         - Move MemoryCache::revalidateResource to CachedResourceLoader::revalidateResource
1600         - Add MemoryCache::add
1601         - Refactor the decision on whether to reload, revalidate or use the existing resource to 
1602           a single function, CachedResourceLoader::determineRevalidationPolicy
1603
1604         * css/CSSImageValue.cpp:
1605         (WebCore::CSSImageValue::cachedImage):
1606             
1607             Remove a code path that called MemoryCache::requestResource directly. This code path would have crashed
1608             if ever taken (since it passes null CachedResourceLoader pointer).
1609             
1610         * loader/ImageLoader.cpp:
1611         (WebCore::ImageLoader::updateFromElement):
1612         * loader/cache/CachedImage.cpp:
1613         * loader/cache/CachedResource.cpp:
1614         (WebCore::CachedResource::CachedResource):
1615         (WebCore::CachedResource::~CachedResource):
1616         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
1617         
1618             Moved tests that were not about cache headers to CachedResourceLoader::determineRevalidationPolicy and renamed.
1619         
1620         (WebCore::CachedResource::setLoadPriority):
1621         
1622             Check for Unresolved value before setting.
1623         
1624         * loader/cache/CachedResource.h:
1625         (WebCore::CachedResource::setOwningCachedResourceLoader):
1626         
1627             Rename to be bit less mysterious.
1628         
1629         * loader/cache/CachedResourceLoader.cpp:
1630         (WebCore::createResource):
1631         
1632             This was moved from MemoryCache.
1633         
1634         (WebCore::CachedResourceLoader::~CachedResourceLoader):
1635         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1636         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1637         
1638             This was moved/merged from MemoryCache.
1639         
1640         (WebCore::CachedResourceLoader::canRequest):
1641         (WebCore::CachedResourceLoader::requestResource):
1642         
1643             This combines MemoryCache::requestResource and the existing method.
1644         
1645         (WebCore::CachedResourceLoader::revalidateResource):
1646         
1647             This was moved from MemoryCache.
1648         
1649         (WebCore::CachedResourceLoader::loadResource):
1650         
1651             New method for initiating loading.
1652         
1653         (WebCore::CachedResourceLoader::notifyLoadedFromMemoryCache):
1654         
1655             Renamed the mysterious CachedResourceLoader::checkCacheObjectStatus
1656         
1657         * loader/cache/CachedResourceLoader.h:
1658         * loader/cache/MemoryCache.cpp:
1659         (WebCore::MemoryCache::add):
1660         * loader/cache/MemoryCache.h:
1661         (WebCore::MemoryCache::remove):
1662
1663 2010-12-30  Steve Block  <steveblock@google.com>
1664
1665         Reviewed by Gavin Barraclough.
1666
1667         Enable JSC Rich Source Info for Android even when Inspector and Debugger are disabled
1668         https://bugs.webkit.org/show_bug.cgi?id=51740
1669
1670         This is a policy decision for Android.
1671
1672         No new tests, simply enabling existing, tested code on Android.
1673
1674         * bindings/js/JSDOMWindowBase.cpp:
1675         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
1676
1677 2010-12-30  Yael Aharon  <yael.aharon@nokia.com>
1678
1679         Reviewed by Adam Barth.
1680
1681         REGRESSION: fast/dom/cssTarget-crash.html fails
1682         https://bugs.webkit.org/show_bug.cgi?id=20342
1683
1684         Do not reload the page when submitting a form, using "GET" method, and the
1685         form action url matches the location url, except for the fragment.
1686       
1687         Test: fast/forms/submit-change-fragment.html
1688
1689         * loader/FrameLoader.cpp:
1690         (WebCore::FrameLoader::loadURL):
1691         (WebCore::FrameLoader::loadWithDocumentLoader):
1692         (WebCore::FrameLoader::shouldScrollToAnchor):
1693         * loader/FrameLoader.h:
1694
1695 2010-12-30  Darin Adler  <darin@apple.com>
1696
1697         Reviewed by Adam Barth.
1698
1699         Move security logic out of the JavaScript binding for location into the DOM class
1700         https://bugs.webkit.org/show_bug.cgi?id=51714
1701
1702         * WebCore.xcodeproj/project.pbxproj: Removed JSBindingState.cpp, JSBindingState.h,
1703         and JSBinding.h. Later, we'll remove them from other project files and delete
1704         the source files.
1705
1706         * bindings/js/JSBinding.h: Emptied out, marked for later deletion.
1707
1708         * bindings/js/JSDOMBinding.cpp: Removed unused overload of the jsOwnedStringOrNull
1709         function, unused shouldAllowNavigation function, unused allowSettingSrcToJavascriptURL
1710         function, unused toLexicalFrame function, unused completeURL function, unused
1711         getCachedDOMStructure and cacheDOMStructure overloads, and unused
1712         getCachedDOMConstructor and cacheDOMConstruction functions.
1713         (WebCore::activeDOMWindow): Added.
1714         (WebCore::firstDOMWindow): Added.
1715         (WebCore::toDynamicFrame): Changed to use firstDOMWindow instead of calling through
1716         JSBindingState, since the latter is an unneeded abstraction.
1717         (WebCore::processingUserGesture): Changed to call ScriptController's function
1718         rather than calling through JSBindingState, which is an unneeded abstraction
1719
1720         * bindings/js/JSDOMBinding.h: Removed the functions mentioned above. Added
1721         activeDOMWindow and firstDOMWindow. Also added a FIXME for the extremely poorly
1722         named allowsAccessFromFrame functions, which answer the question of whether
1723         script is allowed access *to* a frame.
1724
1725         * bindings/js/JSDOMWindowCustom.cpp: Removed many unneeded includes.
1726         (WebCore::JSDOMWindow::setLocation): Streamlined by using the new
1727         activeDOMWindow and firstDOMWindow functions.
1728         (WebCore::JSDOMWindow::open): Ditto.
1729         (WebCore::JSDOMWindow::showModalDialog): Ditto.
1730         (WebCore::JSDOMWindow::postMessage): Ditto.
1731
1732         * bindings/js/JSLocationCustom.cpp:
1733         (WebCore::JSLocation::setHref): Changed to pass the active and first windows through
1734         to the Location::setHref function, with it doing the rest of the work. This moves
1735         work out of the DOM binding that belongs in the DOM itself. Eventually such functions
1736         could even be automatically generated by the bindings script.
1737         (WebCore::JSLocation::setProtocol): Ditto.
1738         (WebCore::JSLocation::setHost): Ditto.
1739         (WebCore::JSLocation::setHostname): Ditto.
1740         (WebCore::JSLocation::setPort): Ditto.
1741         (WebCore::JSLocation::setPathname): Ditto.
1742         (WebCore::JSLocation::setSearch): Ditto.
1743         (WebCore::JSLocation::setHash): Ditto.
1744         (WebCore::JSLocation::replace): Ditto.
1745         (WebCore::JSLocation::reload): Ditto.
1746         (WebCore::JSLocation::assign): Ditto.
1747
1748         * bindings/js/specialization/JSBindingState.cpp: Emptied out, marked for later deletion.
1749         * bindings/js/specialization/JSBindingState.h: Emptied out, marked for later deletion.
1750
1751         * page/DOMWindow.cpp:
1752         (WebCore::DOMWindow::setLocation): Added a SetLocationLocking argument that allows us
1753         to use this function for Location::replace, which is the same as setLocation except that
1754         it locks both history and the back/forward list.
1755         * page/DOMWindow.h: Ditto.
1756
1757         * page/Location.cpp:
1758         (WebCore::Location::setHref): Added. Uses DOMWindow::setLocation so that the security
1759         logic there does not have to be repeated or even refactored.
1760         (WebCore::Location::setProtocol): Ditto.
1761         (WebCore::Location::setHost): Ditto.
1762         (WebCore::Location::setHostname): Ditto.
1763         (WebCore::Location::setPort): Ditto.
1764         (WebCore::Location::setPathname): Ditto.
1765         (WebCore::Location::setSearch): Ditto.
1766         (WebCore::Location::setHash): Ditto.
1767         (WebCore::Location::assign): Ditto.
1768         (WebCore::Location::replace): Ditto.
1769         (WebCore::Location::reload): Added. Security logic was refactored from the code in
1770         JSLocationCustom.cpp. Added a FIXME about the fact that this security logic seems
1771         possibly unneeded.
1772
1773         * page/Location.h: Fixed indentation on the whole file. Added the new functions above.
1774         (WebCore::Location::create):
1775         (WebCore::Location::frame):
1776
1777 2010-12-30  Alexander Pavlov  <apavlov@chromium.org>
1778
1779         Reviewed by Pavel Feldman.
1780
1781         Web Inspector: Pasting a style property with value should automatically split it into prop/value
1782         https://bugs.webkit.org/show_bug.cgi?id=51581
1783
1784         The "paste" DOM event is handled for the CSS property name field to parse out the name and value parts
1785         of a CSS property being pasted (by the first ':' found). The property is committed (if not a new one),
1786         and the edit focus is transferred to the value field.
1787
1788         * inspector/front-end/StylesSidebarPane.js:
1789         (WebInspector.StylePropertyTreeElement.prototype.selectElement):
1790         (WebInspector.StylePropertyTreeElement.prototype):
1791         * inspector/front-end/inspector.js:
1792         (WebInspector.completeURL): Drive-by: return full URLs as-is.
1793         (WebInspector.startEditing.cleanUpAfterEditing):
1794         (WebInspector.startEditing):
1795         (WebInspector.startEditing.pasteEventListener):
1796         (WebInspector.startEditing.keyDownEventListener):
1797
1798 2010-12-30  Pavel Podivilov  <podivilov@chromium.org>
1799
1800         Reviewed by Pavel Feldman.
1801
1802         Web Inspector: breakpoint is not disabled when clicking on breakpoints sidebar pane checkbox.
1803         https://bugs.webkit.org/show_bug.cgi?id=51745
1804
1805         * inspector/front-end/Breakpoint.js:
1806         (WebInspector.Breakpoint.prototype.set enabled):
1807
1808 2010-12-30  Pavel Podivilov  <podivilov@chromium.org>
1809
1810         Reviewed by Pavel Feldman.
1811
1812         Web Inspector: call stack shows "Paused on a JavaScript breakpoint" when stepping.
1813         https://bugs.webkit.org/show_bug.cgi?id=51748
1814
1815         * inspector/front-end/CallStackSidebarPane.js:
1816         (WebInspector.CallStackSidebarPane.prototype.update):
1817         (WebInspector.CallStackSidebarPane.prototype.registerShortcuts):
1818         (WebInspector.CallStackSidebarPane.prototype._scriptBreakpointHit):
1819         (WebInspector.CallStackSidebarPane.prototype._nativeBreakpointHit):
1820
1821 2010-12-30  Mikhail Naganov  <mnaganov@chromium.org>
1822
1823         Reviewed by Pavel Feldman.
1824
1825         Fix leak of MemoryInfo wrappers introduced in r57004 (see issue 51712).
1826
1827         https://bugs.webkit.org/show_bug.cgi?id=51713
1828
1829         * WebCore.gypi:
1830         * WebCore.pro:
1831         * bindings/v8/custom/V8ConsoleCustom.cpp:
1832         (WebCore::V8Console::memoryAccessorGetter):
1833         * bindings/v8/custom/V8PerformanceCustom.cpp: Copied from V8ConsoleCustom.cpp.
1834         (WebCore::V8Performance::memoryAccessorGetter):
1835         * page/Console.idl:
1836         * page/Performance.idl:
1837
1838 2010-12-30  Steve Block  <steveblock@google.com>
1839
1840         Reviewed by Sam Weinig.
1841
1842         Visiting macnn.com often causes SQL spew via geolocation database
1843         https://bugs.webkit.org/show_bug.cgi?id=51557
1844
1845         If the Geolocation position cache database path has not been set, early-out
1846         rather than using an empty path and thus failing to open the database.
1847         This avoids SQL log spew.
1848
1849         Also, avoid starting the database thread until the path has been set, and
1850         shorten the thread name to avoid warnings due to exceeding 30 characters.
1851
1852         No new tests, implementation clean-up only.
1853
1854         * page/GeolocationPositionCache.cpp:
1855         (WebCore::GeolocationPositionCache::addUser):
1856         (WebCore::GeolocationPositionCache::removeUser):
1857         (WebCore::GeolocationPositionCache::setDatabasePath):
1858         (WebCore::GeolocationPositionCache::startBackgroundThread):
1859
1860 2010-12-29  Philippe Normand  <pnormand@igalia.com>
1861
1862         Reviewed by Martin Robinson.
1863
1864         [GTK] minimal build fails at link time due to missing sqlite3 symbols
1865         https://bugs.webkit.org/show_bug.cgi?id=51327
1866
1867         Guard the code calling sqlite3 with the ENABLE(DATABASE) check.
1868
1869         No new tests, build fix only.
1870
1871         * platform/sql/SQLiteAuthorizer.cpp:
1872         * platform/sql/SQLiteDatabase.cpp:
1873         * platform/sql/SQLiteFileSystem.cpp:
1874         * platform/sql/SQLiteStatement.cpp:
1875         * platform/sql/SQLiteTransaction.cpp:
1876
1877 2010-12-30  Justin Schuh  <jschuh@chromium.org>
1878
1879         Reviewed by Dirk Schulze.
1880
1881         Prevent stringToLengthType() from skipping past end-of-string on invalid length unit. 
1882         https://bugs.webkit.org/show_bug.cgi?id=51692
1883
1884         * svg/SVGLength.cpp:
1885         (WebCore::stringToLengthType):
1886         (WebCore::SVGLength::setValueAsString):
1887
1888 2010-12-30  Abhishek Arya  <inferno@chromium.org>
1889
1890         Reviewed by Eric Seidel.
1891
1892         Create a helper function for finding descendent video elements for a node.
1893         https://bugs.webkit.org/show_bug.cgi?id=51696
1894
1895         Test: media/video-element-other-namespace-crash.html
1896
1897         * html/MediaDocument.cpp:
1898         (WebCore::descendentVideoElement): helper function.
1899         (WebCore::MediaDocument::defaultEventHandler): use the new helper function. fix code repetitions.
1900         (WebCore::MediaDocument::replaceMediaElementTimerFired): use the new helper function.
1901
1902 2010-12-29  Pavel Feldman  <pfeldman@chromium.org>
1903
1904         Reviewed by Yury Semikhatsky.
1905
1906         Web Inspector: extract Database & DOM Storage agents; remove InspectorBackend.
1907         https://bugs.webkit.org/show_bug.cgi?id=51707
1908
1909         This change brushes up storage agents + removes redundant InspectorBackend class.
1910
1911         * CMakeLists.txt:
1912         * GNUmakefile.am:
1913         * WebCore.gypi:
1914         * WebCore.pro:
1915         * WebCore.vcproj/WebCore.vcproj:
1916         * WebCore.xcodeproj/project.pbxproj:
1917         * inspector/CodeGeneratorInspector.pm:
1918         * inspector/InjectedScriptHost.cpp:
1919         (WebCore::InjectedScriptHost::databaseForId):
1920         (WebCore::InjectedScriptHost::selectDatabase):
1921         (WebCore::InjectedScriptHost::selectDOMStorage):
1922         (WebCore::InjectedScriptHost::inspectorDOMAgent):
1923         * inspector/Inspector.idl:
1924         * inspector/InspectorBackend.cpp: Removed.
1925         * inspector/InspectorBackend.h: Removed.
1926         * inspector/InspectorController.cpp:
1927         (WebCore::InspectorController::InspectorController):
1928         (WebCore::InspectorController::~InspectorController):
1929         (WebCore::InspectorController::connectFrontend):
1930         (WebCore::InspectorController::releaseFrontendLifetimeAgents):
1931         (WebCore::InspectorController::didUseDOMStorage):
1932         (WebCore::InspectorController::setInjectedScriptSource):
1933         (WebCore::InspectorController::dispatchOnInjectedScript):
1934         (WebCore::InspectorController::releaseWrapperObjectGroup):
1935         * inspector/InspectorController.h:
1936         * inspector/InspectorDOMStorageAgent.cpp: Added.
1937         (WebCore::InspectorDOMStorageAgent::~InspectorDOMStorageAgent):
1938         (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
1939         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
1940         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
1941         (WebCore::InspectorDOMStorageAgent::selectDOMStorage):
1942         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
1943         (WebCore::InspectorDOMStorageAgent::getDOMStorageResourceForId):
1944         * inspector/InspectorDOMStorageAgent.h: Copied from WebCore/inspector/InspectorStorageAgent.h.
1945         (WebCore::InspectorDOMStorageAgent::create):
1946         (WebCore::InspectorDOMStorageAgent::frontend):
1947         * inspector/InspectorDatabaseAgent.cpp: Renamed from WebCore/inspector/InspectorStorageAgent.cpp.
1948         (WebCore::InspectorDatabaseAgent::~InspectorDatabaseAgent):
1949         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
1950         (WebCore::InspectorDatabaseAgent::executeSQL):
1951         (WebCore::InspectorDatabaseAgent::databaseForId):
1952         (WebCore::InspectorDatabaseAgent::selectDatabase):
1953         (WebCore::InspectorDatabaseAgent::clearFrontend):
1954         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
1955         * inspector/InspectorDatabaseAgent.h: Renamed from WebCore/inspector/InspectorStorageAgent.h.
1956         (WebCore::InspectorDatabaseAgent::create):
1957         (WebCore::InspectorDatabaseAgent::frontend):
1958         * inspector/front-end/ScriptsPanel.js:
1959         (WebInspector.ScriptsPanel.prototype.show):
1960         (WebInspector.ScriptsPanel.prototype.attachDebuggerWhenShown):
1961         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
1962
1963 2010-12-29  Dirk Schulze  <krit@webkit.org>
1964
1965         Reviewed by Darin Adler.
1966
1967         Cleanup SVG code according to the webkit style rules 3
1968         https://bugs.webkit.org/show_bug.cgi?id=51490
1969
1970         Last patch to fix indention and other style issues according to the WebKit style rules in the SVG code.
1971         Just one file can't be fixed for check-webkit-style.
1972         * SVGAllInOne.cpp: check-webkit-style wants a config.h at the beginning
1973
1974         No changes of functionality, so no new tests. 
1975
1976         * svg/SVGAllInOne.cpp:
1977         * svg/SVGImage.cpp:
1978         * svg/SVGLength.cpp:
1979         (WebCore::SVGLength::setValue):
1980         * svg/SVGPolygonElement.h:
1981         * svg/SVGPolylineElement.h:
1982         * svg/SVGPreserveAspectRatio.cpp:
1983         (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
1984         (WebCore::SVGPreserveAspectRatio::transformRect):
1985         * svg/SVGSVGElement.cpp:
1986         (WebCore::SVGSVGElement::viewport):
1987         * svg/SVGSetElement.h:
1988         * svg/SVGStylable.h:
1989         (WebCore::SVGStylable::~SVGStylable):
1990         * svg/SVGStyledLocatableElement.h:
1991         (WebCore::SVGStyledLocatableElement::localCoordinateSpaceTransform):
1992         (WebCore::SVGStyledLocatableElement::isStyledLocatable):
1993         * svg/SVGStyledTransformableElement.cpp:
1994         (WebCore::SVGStyledTransformableElement::isKnownAttribute):
1995         * svg/SVGSwitchElement.cpp:
1996         (WebCore::SVGSwitchElement::childShouldCreateRenderer):
1997         * svg/SVGTests.cpp:
1998         (WebCore::SVGTests::parseMappedAttribute):
1999         * svg/SVGTextContentElement.cpp:
2000         (WebCore::SVGTextContentElement::isKnownAttribute):
2001         * svg/SVGTextPathElement.cpp:
2002         * svg/SVGTextPathElement.h:
2003         * svg/SVGTitleElement.h:
2004         (WebCore::SVGTitleElement::rendererIsNeeded):
2005         * svg/SVGTransformDistance.cpp:
2006         (WebCore::SVGTransformDistance::SVGTransformDistance):
2007         (WebCore::SVGTransformDistance::scaledDistance):
2008         (WebCore::SVGTransformDistance::addSVGTransforms):
2009         (WebCore::SVGTransformDistance::addSVGTransform):
2010         (WebCore::SVGTransformDistance::addToSVGTransform):
2011         (WebCore::SVGTransformDistance::isZero):
2012         * svg/SVGTransformList.cpp:
2013         * svg/SVGURIReference.cpp:
2014         (WebCore::SVGURIReference::getTarget):
2015         * svg/SVGVKernElement.h:
2016         * svg/SVGViewSpec.cpp:
2017         (WebCore::SVGViewSpec::parseViewSpec):
2018         * svg/SVGZoomAndPan.h:
2019         (WebCore::SVGZoomAndPan::SVGZoomAndPan):
2020         (WebCore::SVGZoomAndPan::~SVGZoomAndPan):
2021         (WebCore::SVGZoomAndPan::zoomAndPan):
2022         * svg/SVGZoomEvent.h:
2023         (WebCore::SVGZoomEvent::create):
2024         * svg/animation/SMILTime.cpp:
2025         (WebCore::operator*):
2026         * svg/animation/SMILTime.h:
2027         (WebCore::SMILTime::SMILTime):
2028         (WebCore::SMILTime::unresolved):
2029         (WebCore::SMILTime::indefinite):
2030         (WebCore::SMILTime::operator=):
2031         (WebCore::SMILTime::value):
2032         (WebCore::SMILTime::isFinite):
2033         (WebCore::SMILTime::isIndefinite):
2034         (WebCore::SMILTime::isUnresolved):
2035         (WebCore::operator==):
2036         (WebCore::operator!): new operator checks for 0 or infinite values.
2037         (WebCore::operator!=):
2038         (WebCore::operator>):
2039         (WebCore::operator<):
2040         (WebCore::operator>=):
2041         (WebCore::operator<=):
2042         * svg/animation/SMILTimeContainer.h:
2043         (WebCore::SMILTimeContainer::create):
2044         (WebCore::SMILTimeContainer::setDocumentOrderIndexesDirty):
2045         * svg/animation/SVGSMILElement.cpp:
2046         (WebCore::ConditionEventListener::operator==):
2047         (WebCore::SVGSMILElement::repeatingDuration):
2048         (WebCore::SVGSMILElement::resolveInterval):
2049         (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat):
2050         * svg/animation/SVGSMILElement.h:
2051         (WebCore::SVGSMILElement::timeContainer):
2052         (WebCore::SVGSMILElement::intervalBegin):
2053         (WebCore::SVGSMILElement::intervalEnd):
2054         (WebCore::SVGSMILElement::previousIntervalBegin):
2055         (WebCore::SVGSMILElement::documentOrderIndex):
2056         (WebCore::SVGSMILElement::setDocumentOrderIndex):
2057         * svg/graphics/SVGImage.h:
2058         (WebCore::SVGImage::create):
2059         (WebCore::SVGImage::destroyDecodedData):
2060         (WebCore::SVGImage::decodedSize):
2061         (WebCore::SVGImage::frameAtIndex):
2062         * svg/graphics/filters/SVGFilterBuilder.h:
2063         (WebCore::SVGFilterBuilder::create):
2064         (WebCore::SVGFilterBuilder::lastEffect):
2065         (WebCore::SVGFilterBuilder::getEffectReferences):
2066         (WebCore::SVGFilterBuilder::addBuiltinEffects):
2067
2068 2010-12-29  Abhishek Arya  <inferno@chromium.org>
2069
2070         Reviewed by Darin Adler.
2071
2072         ASSERT(oldchild->parent() == owner) fails.
2073         https://bugs.webkit.org/show_bug.cgi?id=50480
2074
2075         In RenderBlock removeChild function, when the inlineChildrenBlock(equal to prev or next)
2076         is reparented to blockChildrenBlock, it is no longer a child of "this". This causes the
2077         assertion failure when removeChildNode executes on the child(equal to prev or next).
2078         Fix a typo in canMergeContiguousAnonymousBlocks.
2079
2080         Test: fast/multicol/span/double-merge-anonymous-block-crash.html
2081
2082         * rendering/RenderBlock.cpp:
2083         (WebCore::canMergeContiguousAnonymousBlocks): fix typo, change prev to next.
2084         (WebCore::RenderBlock::removeChild): if prev or not is reparented, then set it to zero.
2085
2086 2010-12-29  Justin Schuh  <jschuh@chromium.org>
2087
2088         Reviewed by Darin Adler.
2089
2090         Check SVG element type in FrameView::scrollToAnchor
2091         https://bugs.webkit.org/show_bug.cgi?id=51718
2092
2093         Test: svg/custom/scroll-to-anchor-in-symbol.svg
2094
2095         * page/FrameView.cpp:
2096         (WebCore::FrameView::scrollToAnchor):
2097
2098 2010-12-29  Anton Muhin  <antonm@chromium.org>
2099
2100         Reviewed by Eric Seidel.
2101
2102         [v8] Minor cleanup: remove unused method (the only method which can mutate context of V8DOMWindowShell)
2103         https://bugs.webkit.org/show_bug.cgi?id=51704
2104
2105         * bindings/v8/V8DOMWindowShell.cpp:
2106         * bindings/v8/V8DOMWindowShell.h:
2107
2108 2010-12-29  Kenichi Ishibashi  <bashi@google.com>
2109
2110         Reviewed by Darin Adler.
2111
2112         Use a HashMap for m_continuation to save memory
2113         https://bugs.webkit.org/show_bug.cgi?id=43716
2114
2115         Saving memory consumption by applying a HashMap convention to
2116         continuation pointers of RenderInline and RenderBlock classes.
2117
2118         * rendering/RenderBlock.cpp: Removed m_continuation.
2119         (WebCore::RenderBlock::RenderBlock):
2120         (WebCore::RenderBlock::destroy):
2121         (WebCore::RenderBlock::inlineElementContinuation):
2122         (WebCore::RenderBlock::blockElementContinuation):
2123         * rendering/RenderBlock.h: Removed m_continuation.
2124         * rendering/RenderBoxModelObject.cpp: Added a hash map for continuations.
2125         (WebCore::RenderBoxModelObject::destroy): Added an assertion.
2126         (WebCore::RenderBoxModelObject::continuation): Added.
2127         (WebCore::RenderBoxModelObject::setContinuation): Added.
2128         * rendering/RenderBoxModelObject.h:
2129         * rendering/RenderInline.cpp: Removed m_continuation.
2130         (WebCore::RenderInline::RenderInline):
2131         (WebCore::RenderInline::destroy):
2132         (WebCore::RenderInline::inlineElementContinuation):
2133         * rendering/RenderInline.h: Removed m_continuation.
2134
2135 2010-12-27  Amruth Raj  <amruthraj@motorola.com> and Ravi Kasibhatla  <ravi.kasibhatla@motorola.com>
2136
2137         Reviewed by Martin Robinson.
2138
2139         [GTK] Enable building whatever already exists of WebKit2
2140         https://bugs.webkit.org/show_bug.cgi?id=37369
2141
2142         No new functionality added or deleted. Only makefile change. Hence, no tests added.
2143
2144         * GNUmakefile.am: Removed bindings/gobject from webcore_sources & webcore_cppflags and
2145         added them to WebKit/gtk/GNUmakefile.am
2146         * platform/network/soup/cache/webkit/soup-cache.h: Remove include <webkit/webkitdefines.h>
2147         and declare WEBKIT_API directly
2148
2149 2010-12-29  Eric Seidel  <eric@webkit.org>
2150
2151         Unreviewed.
2152
2153         Simplify make-hash-tools.pl
2154         https://bugs.webkit.org/show_bug.cgi?id=49922
2155
2156         Added HashTools.h to the project file now that its not autogenerated.
2157         I also sorted the project file using sort-xcode-project-file
2158
2159         * WebCore.xcodeproj/project.pbxproj:
2160
2161 2010-12-29  Pavel Feldman  <pfeldman@chromium.org>
2162
2163         Not reviewed: revert r74755 and 74757.
2164
2165 2010-12-29  Martin Robinson  <mrobinson@igalia.com>
2166
2167         Reviewed by Sam Weinig.
2168
2169         JSDataViewCustom.cpp gives the fastcall calling convention to functions called via C++
2170         https://bugs.webkit.org/show_bug.cgi?id=51722
2171
2172         Remove the JSC_HOST_CALL from methods that are called from C++. JSC_HOST_CALL gives
2173         methods the fastcall calling convention, which leads to runtime errors when they are
2174         called from C++. Also remove a bit of unnecessary code duplication.
2175
2176         No new tests. This is covered by fast/canvas/webgl/data-view-test.html.
2177
2178         * bindings/js/JSDataViewCustom.cpp:
2179         (WebCore::getDataViewMember): Remove duplicated code.
2180         (WebCore::JSDataView::getInt8): Remove JSC_HOST_CALL.
2181         (WebCore::JSDataView::getUint8): Ditto.
2182         (WebCore::JSDataView::getFloat32): Ditto.
2183         (WebCore::JSDataView::getFloat64): Ditto.
2184         (WebCore::setDataViewMember): Remove duplicated code.
2185         (WebCore::JSDataView::setInt8): Remove JSC_HOST_CALL.
2186         (WebCore::JSDataView::setUint8): Ditto.
2187
2188 2010-12-29  Dan Bernstein  <mitz@apple.com>
2189
2190         Reviewed by Kenneth Russel.
2191
2192         A more robust fix for https://bugs.webkit.org/show_bug.cgi?id=51681
2193
2194         * html/HTMLCanvasElement.cpp:
2195         (WebCore::HTMLCanvasElement::attach): Added. Like recalcStyle(), calls
2196         CanvasRenderingContext2D::updateFont() if necessary. This covers the case of a detach/
2197         attach-type style recalc.
2198         * html/HTMLCanvasElement.h:
2199         * html/canvas/CanvasRenderingContext2D.cpp:
2200         (WebCore::CanvasRenderingContext2D::drawTextInternal): Removed the early return added in
2201         r74716. A font that is loading custom fonts is okay to use, as long as it is valid.
2202         (WebCore::CanvasRenderingContext2D::accessFont): Added a call to
2203         Document::updateStyleIfNeeded(). This ensures that any pending style recalc will take place
2204         and update the font if it is invalid.
2205         * platform/graphics/Font.h:
2206         (WebCore::Font::loadingCustomFonts): Made this private.
2207
2208 2010-12-29  Pavel Feldman  <pfeldman@chromium.org>
2209
2210         Not reviewed: Qt build fix.
2211
2212         * inspector/InspectorController.cpp:
2213
2214 2010-12-29  Pavel Feldman  <pfeldman@chromium.org>
2215
2216         Reviewed by Yury Semikhatsky.
2217
2218         Web Inspector: extract Database & DOM Storage
2219         agents; remove InspectorBackend.
2220         https://bugs.webkit.org/show_bug.cgi?id=51707
2221
2222         This change brushes up storage agents + removes redundant
2223         InspectorBackend class.
2224
2225         * CMakeLists.txt:
2226         * GNUmakefile.am:
2227         * WebCore.gypi:
2228         * WebCore.pro:
2229         * WebCore.vcproj/WebCore.vcproj:
2230         * WebCore.xcodeproj/project.pbxproj:
2231         * inspector/CodeGeneratorInspector.pm:
2232         * inspector/InjectedScriptHost.cpp:
2233         (WebCore::InjectedScriptHost::databaseForId):
2234         (WebCore::InjectedScriptHost::selectDatabase):
2235         (WebCore::InjectedScriptHost::selectDOMStorage):
2236         (WebCore::InjectedScriptHost::inspectorDOMAgent):
2237         * inspector/Inspector.idl:
2238         * inspector/InspectorBackend.cpp: Removed.
2239         * inspector/InspectorBackend.h: Removed.
2240         * inspector/InspectorController.cpp:
2241         (WebCore::InspectorController::InspectorController):
2242         (WebCore::InspectorController::~InspectorController):
2243         (WebCore::InspectorController::connectFrontend):
2244         (WebCore::InspectorController::releaseFrontendLifetimeAgents):
2245         (WebCore::InspectorController::didUseDOMStorage):
2246         (WebCore::InspectorController::setInjectedScriptSource):
2247         (WebCore::InspectorController::dispatchOnInjectedScript):
2248         (WebCore::InspectorController::releaseWrapperObjectGroup):
2249         * inspector/InspectorController.h:
2250         * inspector/InspectorDOMStorageAgent.cpp: Added.
2251         (WebCore::InspectorDOMStorageAgent::~InspectorDOMStorageAgent):
2252         (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
2253         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2254         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2255         (WebCore::InspectorDOMStorageAgent::selectDOMStorage):
2256         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
2257         (WebCore::InspectorDOMStorageAgent::getDOMStorageResourceForId):
2258         * inspector/InspectorDOMStorageAgent.h: Copied from WebCore/inspector/InspectorStorageAgent.h.
2259         (WebCore::InspectorDOMStorageAgent::create):
2260         (WebCore::InspectorDOMStorageAgent::frontend):
2261         * inspector/InspectorDatabaseAgent.cpp: Renamed from WebCore/inspector/InspectorStorageAgent.cpp.
2262         (WebCore::InspectorDatabaseAgent::~InspectorDatabaseAgent):
2263         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
2264         (WebCore::InspectorDatabaseAgent::executeSQL):
2265         (WebCore::InspectorDatabaseAgent::databaseForId):
2266         (WebCore::InspectorDatabaseAgent::selectDatabase):
2267         (WebCore::InspectorDatabaseAgent::clearFrontend):
2268         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
2269         * inspector/InspectorDatabaseAgent.h: Renamed from WebCore/inspector/InspectorStorageAgent.h.
2270         (WebCore::InspectorDatabaseAgent::create):
2271         (WebCore::InspectorDatabaseAgent::frontend):
2272         * inspector/InspectorFrontendClientLocal.cpp:
2273         * inspector/InspectorFrontendClientLocal.h:
2274         * inspector/front-end/ScriptsPanel.js:
2275         (WebInspector.ScriptsPanel.prototype.show):
2276
2277 2010-12-29  Tony Gentilcore  <tonyg@chromium.org>
2278
2279         Reviewed by Eric Seidel.
2280
2281         Assertion failure: element->inDocument() in AsyncScriptRunner::executeScriptSoon()
2282         https://bugs.webkit.org/show_bug.cgi?id=51067
2283
2284         Typically when a script element is removed from the document, the cached script
2285         client is removed. However, during the before load event, the cached script client
2286         hasn't been created yet so it can't be removed.
2287
2288         This patch handles that case by explicitly checking if the script element was
2289         removed during the beforeload event. Also, it avoids caching the Document references
2290         over the arbitrary script execution in the before load event.
2291
2292         Test: fast/dom/HTMLScriptElement/move-in-beforeload.html
2293               fast/dom/HTMLScriptElement/remove-in-beforeload.html
2294
2295         * dom/ScriptElement.cpp:
2296         (WebCore::ScriptElement::requestScript):
2297
2298 2010-12-29  Alexander Pavlov  <apavlov@chromium.org>
2299
2300         Reviewed by Yury Semikhatsky.
2301
2302         Web Inspector: Element highlight tooltip displays wrong element size when zoomed in
2303         https://bugs.webkit.org/show_bug.cgi?id=51703
2304
2305         * inspector/InspectorController.cpp:
2306         (WebCore::InspectorController::drawElementTitle):
2307
2308 2010-12-29  Yael Aharon  <yael.aharon@nokia.com>
2309
2310         Reviewed by Kent Tamura.
2311
2312         [HTML5][Forms] Support for :in-range and :out-of-range CSS selectors
2313         https://bugs.webkit.org/show_bug.cgi?id=29071
2314
2315         Use InputType::rangeUnderflow() and InputType::rangeOverflow()
2316         to determine if a control is in-range or out-of-range.
2317
2318         Tests: fast/css/pseudo-in-range-invalid-value.html
2319                fast/css/pseudo-in-range.html
2320                fast/css/pseudo-out-of-range.html
2321
2322         * css/CSSSelector.cpp:
2323         (WebCore::CSSSelector::pseudoId):
2324         (WebCore::nameToPseudoTypeMap):
2325         (WebCore::CSSSelector::extractPseudoType):
2326         * css/CSSSelector.h:
2327         * css/CSSStyleSelector.cpp:
2328         (WebCore::CSSStyleSelector::canShareStyleWithElement):
2329         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
2330         * dom/Element.h:
2331         (WebCore::Element::isInRange):
2332         (WebCore::Element::isOutOfRange):
2333         * html/BaseDateAndTimeInputType.cpp:
2334         (WebCore::BaseDateAndTimeInputType::supportsRangeLimitation):
2335         * html/BaseDateAndTimeInputType.h:
2336         * html/HTMLInputElement.cpp:
2337         (WebCore::HTMLInputElement::isInRange):
2338         (WebCore::HTMLInputElement::isOutOfRange):
2339         * html/HTMLInputElement.h:
2340         * html/InputType.cpp:
2341         (WebCore::InputType::supportsRangeLimitation):
2342         * html/InputType.h:
2343         * html/NumberInputType.cpp:
2344         (WebCore::NumberInputType::supportsRangeLimitation):
2345         * html/NumberInputType.h:
2346         * html/RangeInputType.cpp:
2347         (WebCore::RangeInputType::supportsRangeLimitation):
2348         * html/RangeInputType.h:
2349
2350 2010-12-29  Abhishek Arya  <inferno@chromium.org>
2351
2352         Reviewed by Eric Seidel.
2353
2354         When cloning an anonymous block, make sure to set the childrenInline flag based
2355         on the state of the block to be cloned.
2356         https://bugs.webkit.org/show_bug.cgi?id=51489
2357
2358         Test: fast/multicol/span/clone-anonymous-block-non-inline-child-crash.html
2359
2360         * rendering/RenderBlock.cpp:
2361         (WebCore::RenderBlock::clone): add code to handle cloning of anonymous blocks.
2362         (WebCore::RenderBlock::splitBlocks): remove anonymous block creation calls since it is now handled by clone().
2363
2364 2010-12-29  Patrick Gansterer  <paroga@webkit.org>
2365
2366         Unreviewed build fix for WinCE after r73802.
2367
2368         Reapply parts from r72585:
2369         Port ContextMenuWin.cpp to WinCE
2370         https://bugs.webkit.org/show_bug.cgi?id=48408
2371
2372         * CMakeLists.txt:
2373         * platform/ContextMenu.h:
2374         * platform/win/ContextMenuWin.cpp:
2375         (WebCore::ContextMenu::getContextMenuItems):
2376         (WebCore::ContextMenu::createNativeMenuFromItems):
2377
2378 2010-12-29  Kent Hansen  <kent.hansen@nokia.com>
2379
2380         Reviewed by Simon Hausmann.
2381
2382         [Qt] Fix compilation with Qt in namespace
2383         https://bugs.webkit.org/show_bug.cgi?id=51701
2384
2385         * platform/graphics/ContextShadow.h:
2386         * platform/graphics/GraphicsContext3D.h:
2387         * platform/network/NetworkingContext.h:
2388         * platform/network/qt/QtNAMThreadSafeProxy.h:
2389         * plugins/PluginView.h:
2390
2391 2010-12-28  Alexander Pavlov  <apavlov@chromium.org>
2392
2393         Reviewed by Pavel Feldman.
2394
2395         Web Inspector: A disabled style property should get enabled when edited
2396         https://bugs.webkit.org/show_bug.cgi?id=51679
2397
2398         Test: inspector/styles-disable-then-change.html
2399
2400         * inspector/front-end/CSSStyleModel.js:
2401         (WebInspector.CSSProperty.prototype.setText):
2402         (WebInspector.CSSProperty.prototype.setText.callback):
2403
2404 2010-12-29  Patrick Gansterer  <paroga@webkit.org>
2405
2406         Reviewed by Andreas Kling.
2407
2408         [CMake] Remove WebKitGenerators
2409         https://bugs.webkit.org/show_bug.cgi?id=50445
2410
2411         * CMakeLists.txt: Pass preprocessor to generate-bindings.pl.
2412
2413 2010-12-28  Pratik Solanki  <psolanki@apple.com>
2414
2415         Reviewed by Eric Seidel.
2416
2417         https://bugs.webkit.org/show_bug.cgi?id=51522
2418         Use deviceRGBColorSpaceRef() instead of calling CGColorSpaceCreateDeviceRGB()
2419
2420         * page/win/FrameCGWin.cpp:
2421         (WebCore::imageFromRect):
2422         * platform/graphics/cg/GradientCG.cpp:
2423         (WebCore::Gradient::platformGradient):
2424         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2425         (WebCore::GraphicsContext3D::paintToCanvas):
2426         * platform/graphics/cg/ImageCG.cpp:
2427         (WebCore::BitmapImage::checkForSolidColor):
2428         * platform/graphics/gstreamer/ImageGStreamerCG.mm:
2429         (ImageGStreamer::ImageGStreamer):
2430         * platform/graphics/win/GraphicsContextCGWin.cpp:
2431         (WebCore::CGContextWithHDC):
2432         (WebCore::GraphicsContext::releaseWindowsContext):
2433         (WebCore::GraphicsContext::drawWindowsBitmap):
2434         * platform/graphics/win/ImageCGWin.cpp:
2435         (WebCore::BitmapImage::create):
2436         (WebCore::BitmapImage::getHBITMAPOfSize):
2437         * platform/image-decoders/cg/ImageDecoderCG.cpp:
2438         (WebCore::createColorSpace):
2439         * platform/win/DragImageCGWin.cpp:
2440         (WebCore::allocImage):
2441         (WebCore::createCgContextFromBitmap):
2442         * rendering/RenderThemeMac.mm:
2443         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
2444         (WebCore::RenderThemeMac::paintSliderTrack):
2445         * rendering/RenderThemeSafari.cpp:
2446         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
2447         (WebCore::RenderThemeSafari::paintSliderTrack):
2448
2449 2010-12-28  Daniel Bates  <dbates@rim.com>
2450
2451         Reviewed by Sam Weinig.
2452
2453         Substitute // MARK: for compiler-specific #pragma mark
2454         https://bugs.webkit.org/show_bug.cgi?id=51657
2455
2456         Fix compilation warnings about "#pragma mark" on GTK+ bots by
2457         substituting  "// MARK:" for "#pragma mark", which provides
2458         analogous code-bookmarking functionality under Xcode.
2459
2460         * platform/graphics/cg/PathCG.cpp:
2461         * platform/graphics/mac/WebLayer.mm:
2462
2463 2010-12-28  Jan Erik Hanssen  <jhanssen@sencha.com>
2464
2465         Reviewed by Eric Seidel.
2466
2467         [Qt] GraphicsContext::getCTM() does not need to make a copy of QPainter::combinedTransform()
2468         https://bugs.webkit.org/show_bug.cgi?id=51687
2469
2470         Use a const reference instead of a copy of QPainter::combinedTransform() 
2471         in GraphicsContext::getCTM()
2472
2473         * platform/graphics/qt/GraphicsContextQt.cpp:
2474         (WebCore::GraphicsContext::getCTM):
2475
2476 2010-12-28  Takashi Toyoshima  <toyoshim@google.com>
2477
2478         Reviewed by Eric Seidel.
2479
2480         gcc detected 'control reaches end of non-void function' with
2481         -finstrument-functions option.
2482         https://bugs.webkit.org/show_bug.cgi?id=51669
2483
2484         No new tests. These fixes are trivial.
2485
2486         * dom/Element.cpp:
2487         (WebCore::Element::childTypeAllowed):
2488         * inspector/InspectorResourceAgent.cpp:
2489         (WebCore::cachedResourceTypeString):
2490
2491 2010-12-28  Tony Gentilcore  <tonyg@chromium.org>
2492
2493         Reviewed by Eric Seidel.
2494
2495         Remove unused member of PendingScript
2496         https://bugs.webkit.org/show_bug.cgi?id=51684
2497
2498         This was used when HTMLScriptRunner::runScript created a PendingScript
2499         for inline scripts. But now it just calls executeScript() directly.
2500         External scripts always have the minimum starting line number.
2501
2502         No new tests because no changed functionality.
2503
2504         * dom/PendingScript.cpp:
2505         (WebCore::PendingScript::releaseElementAndClear):
2506         * dom/PendingScript.h:
2507         (WebCore::PendingScript::PendingScript):
2508         (WebCore::PendingScript::operator=):
2509         * html/parser/HTMLScriptRunner.cpp:
2510         (WebCore::HTMLScriptRunner::sourceFromPendingScript):
2511
2512 2010-12-20  Antonio Gomes  <agomes@rim.com>
2513
2514         Reviewed by Daniel Bates.
2515
2516         Spatial Navigation: code clean up (Part VI)
2517         https://bugs.webkit.org/show_bug.cgi?id=50666
2518
2519         No new tests needed.
2520
2521         * page/FocusController.cpp:
2522         (WebCore::updatFocusCandidateIfNeeded): Assert renderer() and
2523         isElementNode() now that we are bailing out earlier in both the
2524         FocusCandidate constructor and FocusController::findFocusCandidateInContainer().
2525         * page/SpatialNavigation.h: Swapped the parameters order in canScrollInDirection
2526         and virtualRectForAreaElementAndDirection functions.
2527         (WebCore::FocusController::findFocusCandidateInContainer):
2528         (WebCore::FocusController::advanceFocusDirectionallyInContainer): Adjusted callsites
2529         of canScrollInDirection(), and added an early return if !isElementNode().
2530         (WebCore::FocusController::advanceFocusDirectionally): Adjusted callsite of
2531         virtualRectForAreaElementAndDirection();
2532         * page/SpatialNavigation.cpp:
2533         (WebCore::FocusCandidate::FocusCandidate): Assert if node is not a element node;
2534         (WebCore::isScrollableNode): Renamed from isScrollableContainerNode;
2535         (WebCore::scrollInDirection): Adjusted callsite after function name change;
2536         (WebCore::scrollableEnclosingBoxOrParentFrameForNodeInDi:rection): Assert if node is
2537         a documentNode.
2538         (WebCore::canScrollInDirection): Signature changed.
2539         (WebCore::canBeScrolledIntoView): Ditto.
2540         (WebCore::virtualRectForAreaElementAndDirection): Ditto.
2541
2542 2010-12-28  Adrienne Walker  <enne@google.com>
2543
2544         Reviewed by Kenneth Russell.
2545
2546         [chromium] Fix tiled compositor assertion after GPU process recovery.
2547         https://bugs.webkit.org/show_bug.cgi?id=51682
2548
2549         After the GPU process recovers, the layer size is set to IntSize(),
2550         but IntRect::unite() has a special case for empty rects.  This
2551         behavior was causing the layer size to be too small, causing an
2552         out-of-bounds array access elsewhere.
2553
2554         No new tests.
2555
2556         * platform/graphics/chromium/LayerTilerChromium.cpp:
2557         (WebCore::LayerTilerChromium::growLayerToContain):
2558
2559 2010-12-23  Zhenyao Mo  <zmo@google.com>
2560
2561         Reviewed by Kenneth Russell.
2562
2563         Initialize to 0 for undefined values in CopyTexImage2D
2564         https://bugs.webkit.org/show_bug.cgi?id=51421
2565
2566         * html/canvas/WebGLFramebuffer.cpp: Track width/height/internalFormat of color buffer.
2567         (WebCore::WebGLFramebuffer::WebGLFramebuffer):
2568         (WebCore::WebGLFramebuffer::setAttachment):
2569         (WebCore::WebGLFramebuffer::getWidth):
2570         (WebCore::WebGLFramebuffer::getHeight):
2571         (WebCore::WebGLFramebuffer::getColorBufferFormat):
2572         * html/canvas/WebGLFramebuffer.h:
2573         * html/canvas/WebGLRenderingContext.cpp:
2574         (WebCore::WebGLRenderingContext::copyTexImage2D): Initialize undefined pixels to 0.
2575         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
2576         (WebCore::WebGLRenderingContext::framebufferTexture2D):
2577         (WebCore::WebGLRenderingContext::renderbufferStorage):
2578         (WebCore::WebGLRenderingContext::getBoundFramebufferWidth):
2579         (WebCore::WebGLRenderingContext::getBoundFramebufferHeight):
2580         * html/canvas/WebGLRenderingContext.h:
2581         * html/canvas/WebGLTexture.cpp: Track width/height/internalFormat of a texture by target/level.
2582         (WebCore::WebGLTexture::getInternalFormat):
2583         (WebCore::WebGLTexture::getWidth):
2584         (WebCore::WebGLTexture::getHeight):
2585         (WebCore::WebGLTexture::mapTargetToIndex):
2586         (WebCore::WebGLTexture::getLevelInfo):
2587         * html/canvas/WebGLTexture.h:
2588         (WebCore::WebGLTexture::isTexture):
2589         * platform/graphics/GraphicsContext3D.h: Add getInternalFramebufferSize() function.
2590         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2591         (WebCore::GraphicsContext3D::getInternalFramebufferSize):
2592         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2593         (WebCore::GraphicsContext3D::getInternalFramebufferSize):
2594
2595 2010-12-23  Zhenyao Mo  <zmo@google.com>
2596
2597         Reviewed by Kenneth Russell.
2598
2599         Map GLsizei to long instead of unsigned long in WebGLRenderingContext and GraphicsContext3D
2600         https://bugs.webkit.org/show_bug.cgi?id=39855
2601
2602         * html/canvas/WebGLRenderingContext.cpp:
2603         (WebCore::WebGLRenderingContext::copyTexImage2D): Map GLsizei to long.
2604         (WebCore::WebGLRenderingContext::copyTexSubImage2D): Ditto.
2605         (WebCore::WebGLRenderingContext::renderbufferStorage): Ditto.
2606         (WebCore::WebGLRenderingContext::scissor): Ditto.
2607         (WebCore::WebGLRenderingContext::texImage2DBase): Ditto.
2608         (WebCore::WebGLRenderingContext::texImage2D): Ditto.
2609         (WebCore::WebGLRenderingContext::texSubImage2DBase): Ditto.
2610         (WebCore::WebGLRenderingContext::texSubImage2DImpl): Ditto.
2611         (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
2612         (WebCore::WebGLRenderingContext::viewport): Ditto.
2613         (WebCore::WebGLRenderingContext::validateSize): Check the sizes are non-negative.
2614         * html/canvas/WebGLRenderingContext.h:
2615         * html/canvas/WebGLRenderingContext.idl:
2616
2617 2010-12-28  Abhishek Arya  <inferno@chromium.org>
2618
2619         Reviewed by Kenneth Russell.
2620
2621         Fix crash with invalid font in m_fontList by not drawing text when a custom font is in the
2622         process of loading.
2623         https://bugs.webkit.org/show_bug.cgi?id=51681
2624
2625         Test: canvas/philip/tests/2d.text-custom-font-load-crash.html
2626
2627         * html/canvas/CanvasRenderingContext2D.cpp:
2628         (WebCore::CanvasRenderingContext2D::drawTextInternal): bail out if a custom font is loading.
2629         * platform/graphics/Font.cpp:
2630         (WebCore::Font::operator==): Replace condition with new function loadingCustomFonts()
2631         (WebCore::Font::drawText): Replace condition with new function loadingCustomFonts()
2632         (WebCore::Font::drawEmphasisMarks): Replace condition with new function loadingCustomFonts()
2633         * platform/graphics/Font.h:
2634         (WebCore::Font::loadingCustomFonts): new function that returns if a custom font is loading.
2635
2636 2010-12-28  Dimitri Glazkov  <dglazkov@chromium.org>
2637
2638         Reviewed by Eric Seidel.
2639
2640         Combine setShadowRoot and clearShadowRoot into a simpler API
2641         https://bugs.webkit.org/show_bug.cgi?id=50971
2642
2643         No change in behavior, and API is not used yet.
2644
2645         * dom/Element.cpp:
2646         (WebCore::Element::setShadowRoot): Combined clearing and setting of
2647             the shadowRoot, also hooked up with setting and clearing of the
2648             corresponding shadowHost values.
2649         * dom/Element.h: renamed clearShadowRoot to removeShadowRoot and made it
2650             private.
2651         * dom/Node.h: Made shadow host-related functions public so that
2652             Element::setShadowRoot can access setShadowHost. It seems logical
2653             to make shadowHost public as well to keep the defs together.
2654
2655 2010-12-28  Andrey Kosyakov  <caseq@chromium.org>
2656
2657         Reviewed by Pavel Feldman.
2658
2659         Web Inspector: [Chromium] Expose extension API to select a node in WebInspector
2660         Do not request content for resources with non-numeric identifiers.
2661         https://bugs.webkit.org/show_bug.cgi?id=49727
2662
2663         Test: http/tests/inspector/extensions-resources-redirect.html
2664
2665         * inspector/front-end/NetworkManager.js:
2666         (WebInspector.NetworkManager.prototype._appendRedirect):
2667
2668 2010-12-28  Ilya Tikhonovsky  <loislo@chromium.org>
2669
2670         Unreviewed build fix for Qt.
2671
2672         ResourceTreeModel.js was added.
2673
2674         * inspector/front-end/WebKit.qrc:
2675
2676 2010-12-28  Mikhail Naganov  <mnaganov@chromium.org>
2677
2678         Reviewed by Pavel Feldman.
2679
2680         [Chromium] Fix memory leak in Profiles tab concerned with heap profiles views.
2681
2682         https://bugs.webkit.org/show_bug.cgi?id=51680
2683
2684         * inspector/front-end/ProfilesPanel.js:
2685         (WebInspector.ProfilesPanel.prototype._reset):
2686
2687 2010-12-28  Alexander Pavlov  <apavlov@chromium.org>
2688
2689         Reviewed by Pavel Feldman.
2690
2691         Web Inspector: REGRESSION: Clicking image resource in style sidebar doesn't actually go to resource anymore
2692         https://bugs.webkit.org/show_bug.cgi?id=51663
2693
2694         The base URI is now computed correctly for links from CSS property uri(...) values. Additionally,
2695         optional quotes/apostrophes and spaces are now allowed inside uri(...).
2696
2697         Test: inspector/styles-url-linkify.html
2698
2699         * inspector/front-end/StylesSidebarPane.js:
2700         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL):
2701         (WebInspector.StylePropertyTreeElement.prototype.updateTitle):
2702
2703 2010-12-21  Ilya Tikhonovsky  <loislo@chromium.org>
2704
2705         Reviewed by Pavel Feldman.
2706
2707         Web Inspector: Protocol cleanup task. Introduce Network, DOMStorage and Database domains.
2708
2709         Domain was changed for Resources, FileSystem etc. related methods.
2710         ResourcesManager was renamed to NetworkManager.
2711         ResourceTreeModel was extracted as separate file.
2712         FileSystem, Database, DOMStorage and ApplicationCache methods were
2713         removed from NetworkManager and added to corresponding classes.
2714
2715         https://bugs.webkit.org/show_bug.cgi?id=51334
2716
2717         * WebCore.gypi:
2718         * WebCore.vcproj/WebCore.vcproj:
2719         * inspector/CodeGeneratorInspector.pm:
2720         * inspector/Inspector.idl:
2721         * inspector/front-end/AuditRules.js:
2722         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback):
2723         * inspector/front-end/CSSStyleModel.js:
2724         (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback):
2725         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
2726         * inspector/front-end/ConsoleView.js:
2727         (WebInspector.ConsoleView.prototype.addMessage):
2728         (WebInspector.ConsoleView.prototype.clearMessages):
2729         * inspector/front-end/DOMAgent.js:
2730         (WebInspector.ApplicationCache.updateApplicationCacheStatus):
2731         (WebInspector.ApplicationCache.updateNetworkState):
2732         * inspector/front-end/DOMStorage.js:
2733         (WebInspector.DOMStorage.addDOMStorage):
2734         (WebInspector.DOMStorage.selectDOMStorage):
2735         (WebInspector.DOMStorage.updateDOMStorage):
2736         * inspector/front-end/Database.js:
2737         (WebInspector.Database.prototype.executeSql):
2738         (WebInspector.Database.addDatabase):
2739         (WebInspector.Database.selectDatabase):
2740         (WebInspector.Database.sqlTransactionSucceeded):
2741         (WebInspector.Database.sqlTransactionFailed):
2742         * inspector/front-end/FileSystemView.js:
2743         (WebInspector.FileSystem.didGetFileSystemPath):
2744         (WebInspector.FileSystem.didGetFileSystemError):
2745         (WebInspector.FileSystem.didGetFileSystemDisabled):
2746         * inspector/front-end/NetworkItemView.js:
2747         (WebInspector.NetworkItemView):
2748         * inspector/front-end/NetworkManager.js: Added.
2749         (WebInspector.NetworkManager):
2750         (WebInspector.NetworkManager.prototype._createResource):
2751         (WebInspector.NetworkManager.prototype.identifierForInitialRequest):
2752         (WebInspector.NetworkManager.prototype.willSendRequest):
2753         (WebInspector.NetworkManager.prototype._updateResourceWithRequest):
2754         (WebInspector.NetworkManager.prototype._appendRedirect):
2755         (WebInspector.NetworkManager.prototype.markResourceAsCached):
2756         (WebInspector.NetworkManager.prototype.didReceiveResponse):
2757         (WebInspector.NetworkManager.prototype._updateResourceWithResponse):
2758         (WebInspector.NetworkManager.prototype.didReceiveContentLength):
2759         (WebInspector.NetworkManager.prototype.didFinishLoading):
2760         (WebInspector.NetworkManager.prototype.didFailLoading):
2761         (WebInspector.NetworkManager.prototype.didLoadResourceFromMemoryCache):
2762         (WebInspector.NetworkManager.prototype._updateResourceWithCachedResource):
2763         (WebInspector.NetworkManager.prototype.setInitialContent):
2764         (WebInspector.NetworkManager.prototype.didCommitLoadForFrame):
2765         (WebInspector.NetworkManager.prototype.frameDetachedFromParent):
2766         (WebInspector.NetworkManager.prototype.didCreateWebSocket):
2767         (WebInspector.NetworkManager.prototype.willSendWebSocketHandshakeRequest):
2768         (WebInspector.NetworkManager.prototype.didReceiveWebSocketHandshakeResponse):
2769         (WebInspector.NetworkManager.prototype.didCloseWebSocket):
2770         (WebInspector.NetworkManager.prototype._processCachedResources):
2771         (WebInspector.NetworkManager.prototype._addFramesRecursively):
2772         (WebInspector.NetworkManager.requestContent):
2773         * inspector/front-end/NetworkPanel.js:
2774         (WebInspector.NetworkPanel.prototype.refreshResource):
2775         * inspector/front-end/Resource.js:
2776         (WebInspector.Resource.prototype._innerRequestContent):
2777         * inspector/front-end/ResourceManager.js: Removed.
2778         * inspector/front-end/ResourceTreeModel.js: Added.
2779         (WebInspector.ResourceTreeModel):
2780         (WebInspector.ResourceTreeModel.prototype.addOrUpdateFrame):
2781         (WebInspector.ResourceTreeModel.prototype.didCommitLoadForFrame):
2782         (WebInspector.ResourceTreeModel.prototype.frameDetachedFromParent):
2783         (WebInspector.ResourceTreeModel.prototype._clearChildFramesAndResources):
2784         (WebInspector.ResourceTreeModel.prototype.addResourceToFrame):
2785         (WebInspector.ResourceTreeModel.prototype._clearResources):
2786         (WebInspector.ResourceTreeModel.prototype.forAllResources):
2787         (WebInspector.ResourceTreeModel.prototype.addConsoleMessage):
2788         (WebInspector.ResourceTreeModel.prototype.clearConsoleMessages):
2789         (WebInspector.ResourceTreeModel.prototype._callForFrameResources):
2790         (WebInspector.ResourceTreeModel.prototype.resourceForURL):
2791         (WebInspector.ResourceTreeModel.prototype.bindResourceURL):
2792         (WebInspector.ResourceTreeModel.prototype._unbindResourceURL):
2793         (WebInspector.ResourceTreeModel.createResource):
2794         * inspector/front-end/ResourceView.js:
2795         (WebInspector.ResourceView.createResourceView):
2796         (WebInspector.ResourceView.resourceViewTypeMatchesResource):
2797         (WebInspector.ResourceView.resourceViewForResource):
2798         (WebInspector.ResourceView.recreateResourceView):
2799         (WebInspector.ResourceView.existingResourceViewForResource):
2800         * inspector/front-end/ResourcesPanel.js:
2801         (WebInspector.ResourcesPanel.prototype.canShowSourceLine):
2802         (WebInspector.ResourcesPanel.prototype.showSourceLine):
2803         (WebInspector.ResourcesPanel.prototype.showResource):
2804         (WebInspector.ResourcesPanel.prototype.get searchableViews.callback):
2805         (WebInspector.ResourcesPanel.prototype.get searchableViews):
2806         (WebInspector.FrameResourceTreeElement.prototype._errorsWarningsUpdated):
2807         (WebInspector.FrameResourceTreeElement.prototype._contentChanged):
2808         * inspector/front-end/ScriptsPanel.js:
2809         (WebInspector.ScriptsPanel.prototype._addScript):
2810         (WebInspector.ScriptsPanel.prototype.reset):
2811         (WebInspector.ScriptsPanel.prototype._sourceFrameForResource):
2812         (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
2813         * inspector/front-end/WebKit.qrc:
2814         * inspector/front-end/inspector.html:
2815         * inspector/front-end/inspector.js:
2816         (WebInspector.forAllResources):
2817         (WebInspector.resourceForURL):
2818
2819 2010-12-27  Helder Correia  <helder@sencha.com>
2820
2821         Reviewed by Ariya Hidayat.
2822
2823         ContextShadow should use AffineTransform instead of TransformationMatrix
2824         https://bugs.webkit.org/show_bug.cgi?id=51661
2825
2826         ContextShadow needs the CTM to make sure shadows are not affected by
2827         transformations when drawing on a canvas. AffineTransform is sufficient
2828         in this case.
2829
2830         Existing tests: fast/canvas/canvas*shadow*html
2831
2832         * platform/graphics/ContextShadow.cpp:
2833         (WebCore::ContextShadow::mustUseContextShadow):
2834         (WebCore::ContextShadow::adjustBlurDistance):
2835         (WebCore::ContextShadow::calculateLayerBoundingRect):
2836         * platform/graphics/ContextShadow.h:
2837         * platform/graphics/cairo/ContextShadowCairo.cpp:
2838         (WebCore::ContextShadow::getTransformationMatrixFromContext):
2839         * platform/graphics/qt/ContextShadowQt.cpp:
2840         (WebCore::ContextShadow::getTransformationMatrixFromContext):
2841
2842 2010-12-27  Daniel Bates  <dbates@rim.com>
2843
2844         Reviewed by Antonio Gomes.
2845
2846         Clean up: Rename HTMLFrameElementBase::getMarginWidth() and HTMLFrameElementBase::getMarginHeight()
2847         https://bugs.webkit.org/show_bug.cgi?id=51634
2848
2849         Rename HTMLFrameElementBase::getMarginWidth() and HTMLFrameElementBase::getMarginHeight()
2850         to HTMLFrameElementBase::marginWidth() and HTMLFrameElementBase::marginHeight(), respectively.
2851         This will make the names of these getters consistent with the naming convention we use for
2852         getters.
2853
2854         * html/HTMLBodyElement.cpp:
2855         (WebCore::HTMLBodyElement::insertedIntoDocument):
2856         * html/HTMLFrameElementBase.h:
2857         (WebCore::HTMLFrameElementBase::marginWidth): Renamed; Formerly getMarginWidth().
2858         (WebCore::HTMLFrameElementBase::marginHeight): Renamed; Formerly getMarginHeight().
2859         * loader/SubframeLoader.cpp:
2860         (WebCore::SubframeLoader::loadSubframe):
2861         * page/FrameView.cpp:
2862         (WebCore::FrameView::init):
2863         * rendering/RenderEmbeddedObject.cpp:
2864         (WebCore::RenderEmbeddedObject::viewCleared): Also renamed variables marginw and marginh
2865         to marginWidth and marginHeight, respectively. This makes the names of these variables
2866         consistent with the names of similar variables in SubframeLoader::loadSubframe() and FrameView::init().
2867         * rendering/RenderFrame.cpp:
2868         (WebCore::RenderFrame::viewCleared): Ditto.
2869
2870 2010-12-27  Martin Robinson  <mrobinson@igalia.com>
2871
2872         Reviewed by Daniel Bates.
2873
2874         [GTK] RenderThemeGtk::m_HScale and RenderThemeGtk::m_VScale are not initialized
2875         https://bugs.webkit.org/show_bug.cgi?id=51654
2876
2877         Properly initialize slider members of RenderThemeGtk. This can lead to test crashes
2878         on some debug configurations.
2879
2880         No new tests. This is already covered by current slider tests. It isn't crashing on
2881         the bots, but it does crash locally.
2882
2883         * platform/gtk/RenderThemeGtk.cpp:
2884         (WebCore::RenderThemeGtk::RenderThemeGtk): Properly initialize members.
2885
2886 2010-12-27  Anton Muhin  <antonm@chromium.org>
2887
2888         Reviewed by David Levin.
2889
2890         [v8] Remove unused methods to protect/unprotect wrappers during garbage collection
2891         https://bugs.webkit.org/show_bug.cgi?id=51648
2892
2893         * bindings/v8/ScriptController.cpp:
2894         * bindings/v8/ScriptController.h:
2895         * bindings/v8/V8GCController.cpp:
2896         (WebCore::V8GCController::gcEpilogue):
2897         * bindings/v8/V8GCController.h:
2898
2899 2010-12-27  Yury Semikhatsky  <yurys@chromium.org>
2900
2901         Unreviewed. Removed trailing spaces from a localized
2902         string to make it the same as the one used in the code.
2903
2904         * English.lproj/localizedStrings.js:
2905
2906 2010-12-27  Yael Aharon  <yael.aharon@nokia.com>
2907
2908         Reviewed by Eric Seidel.
2909
2910         Browser is failing 16 baseline test from Selector API Test Suite
2911         https://bugs.webkit.org/show_bug.cgi?id=42968
2912
2913         Throw an exception if there is no argument to querySelector or 
2914         querySelectorAll. This replaces the current behavior of passing the string
2915         "undefined" as the argument.
2916
2917         No new tests, just updating the existing results for 
2918         fast/dom/SelectorAPI/resig-SelectorAPI-test.xhtml.
2919
2920         * dom/Document.idl:
2921         * dom/DocumentFragment.idl:
2922         * dom/Element.idl:
2923
2924 2010-12-26  MORITA Hajime  <morrita@google.com>
2925
2926         Reviewed by Dan Bernstein.
2927
2928         For box-shadow, non-primary shadows should have specified radii.
2929         https://bugs.webkit.org/show_bug.cgi?id=51386
2930
2931         On paintBoxShadow(), the spread value accidentally accumulated accidentally
2932         during the loop, which should be applied individually for radius of each shadow. 
2933         This change makes the radii for rects computed for each shadow.
2934         
2935         Test: fast/box-shadow/spread-multiple-normal.html
2936
2937         * rendering/RenderBoxModelObject.cpp:
2938         (WebCore::RenderBoxModelObject::paintBoxShadow):
2939
2940 2010-12-26  Patrick Gansterer  <paroga@webkit.org>
2941
2942         Reviewed by Eric Seidel.
2943
2944         Improve output of HTML parser benchmark
2945         https://bugs.webkit.org/show_bug.cgi?id=51611
2946
2947         Calculate and show median, min and max values.
2948
2949         * benchmarks/parser/html-parser.html:
2950
2951 2010-12-26  Abhishek Arya  <inferno@chromium.org>
2952
2953         Reviewed by Simon Fraser.
2954
2955         Remove the bad assert in paintPaginatedChildLayer, hitTestPaginatedChildLayer. 
2956         https://bugs.webkit.org/show_bug.cgi?id=48772
2957
2958         Test: fast/multicol/renderer-positioned-assert-crash.html
2959
2960         * rendering/RenderLayer.cpp:
2961         (WebCore::RenderLayer::paintPaginatedChildLayer):
2962         (WebCore::RenderLayer::hitTestPaginatedChildLayer):
2963
2964 2010-12-25  Peter Rybin  <peter.rybin@gmail.com>
2965
2966         Reviewed by Adam Barth.
2967
2968         Adds currentColumn (and currentLine) to SegmentedString. Switches
2969         HTMLTreeBuilder to HTMLDocumentParser::textPosition when it
2970         needs position for a <script> tag.
2971
2972         SegmentedString should provide column position
2973         https://bugs.webkit.org/show_bug.cgi?id=51311
2974
2975         * html/parser/HTMLDocumentParser.cpp:
2976         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
2977         (WebCore::HTMLDocumentParser::textPosition):
2978         * html/parser/HTMLInputStream.h:
2979         (WebCore::HTMLInputStream::current):
2980         (WebCore::InsertionPointRecord::InsertionPointRecord):
2981         (WebCore::InsertionPointRecord::~InsertionPointRecord):
2982         * html/parser/HTMLTreeBuilder.cpp:
2983         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2984         (WebCore::HTMLTreeBuilder::processScriptStartTag):
2985         * html/parser/HTMLTreeBuilder.h:
2986         (WebCore::HTMLTreeBuilder::create):
2987         * platform/text/SegmentedString.cpp:
2988         (WebCore::SegmentedString::operator=):
2989         (WebCore::SegmentedString::numberOfCharactersConsumedSlow):
2990         (WebCore::SegmentedString::advanceSlowCase):
2991         (WebCore::SegmentedString::currentLine):
2992         (WebCore::SegmentedString::currentColumn):
2993         (WebCore::SegmentedString::setCurrentPosition):
2994         * platform/text/SegmentedString.h:
2995         (WebCore::SegmentedString::SegmentedString):
2996         (WebCore::SegmentedString::advancePastNewline):
2997         (WebCore::SegmentedString::advance):
2998         (WebCore::SegmentedString::numberOfCharactersConsumed):
2999
3000 2010-12-25  Andreas Kling  <kling@webkit.org>
3001
3002         Reviewed by Kenneth Rohde Christiansen.
3003
3004         GraphicsContext: Don't pass StrokeStyle (enum) as const reference
3005         https://bugs.webkit.org/show_bug.cgi?id=51608
3006
3007         * platform/graphics/GraphicsContext.cpp:
3008         (WebCore::GraphicsContext::setStrokeStyle):
3009         (WebCore::GraphicsContext::setPlatformStrokeStyle):
3010         (WebCore::GraphicsContext::adjustLineToPixelBoundaries):
3011         * platform/graphics/GraphicsContext.h:
3012         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3013         (WebCore::GraphicsContext::setPlatformStrokeStyle):
3014         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
3015         (WebCore::GraphicsContext::setPlatformStrokeStyle):
3016         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
3017         (WebCore::GraphicsContext::setPlatformStrokeStyle):
3018         * platform/graphics/openvg/PainterOpenVG.cpp:
3019         (WebCore::PainterOpenVG::setStrokeStyle):
3020         * platform/graphics/openvg/PainterOpenVG.h:
3021         * platform/graphics/qt/GraphicsContextQt.cpp:
3022         (WebCore::GraphicsContext::setPlatformStrokeStyle):
3023         * platform/graphics/skia/GraphicsContextSkia.cpp:
3024         (WebCore::GraphicsContext::setPlatformStrokeStyle):
3025
3026 2010-12-24  Dan Bernstein  <mitz@apple.com>
3027
3028         Reviewed by Alexey Proskuryakov.
3029
3030         REGRESSION (r74648): XHR layout test failures
3031         https://bugs.webkit.org/show_bug.cgi?id=51603
3032
3033         Reverted r74648.
3034
3035         * WebCore.exp.in:
3036
3037 2010-12-24  Dan Bernstein  <mitz@apple.com>
3038
3039         Try to fix the Qt build after r74648.
3040
3041         * WebCore.gypi:
3042         * WebCore.pro:
3043         * platform/network/qt/CredentialStorageQt.cpp: Added.
3044         (WebCore::CredentialStorage::getFromPersistentStorage):
3045
3046 2010-12-24  Simon Fraser  <simon.fraser@apple.com>
3047
3048         Reviewed by Dan Bernstein.
3049
3050         CSSStyleSelector cleanup
3051         https://bugs.webkit.org/show_bug.cgi?id=51597
3052
3053         Make some methods const. Add assertion to checkOneSelector, with the
3054         intention of later removing the if (!e) check (this is hot code).
3055
3056         * css/CSSStyleSelector.cpp:
3057         (WebCore::CSSStyleSelector::locateCousinList):
3058         (WebCore::CSSStyleSelector::canShareStyleWithElement):
3059         (WebCore::CSSStyleSelector::locateSharedStyle):
3060         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
3061         (WebCore::CSSStyleSelector::mmLength):
3062         (WebCore::CSSStyleSelector::inchLength):
3063         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
3064         (WebCore::CSSStyleSelector::hasSelectorForAttribute):
3065         * css/CSSStyleSelector.h:
3066         (WebCore::CSSStyleSelector::fontSelector):
3067
3068 2010-12-24  Dan Bernstein  <mitz@apple.com>
3069
3070         Reviewed by Anders Carlsson.
3071
3072         <rdar://problem/8758386> The web process uses its own credential storage
3073         https://bugs.webkit.org/show_bug.cgi?id=51599
3074
3075         * WebCore.exp.in: Export CredentialStorage::getFromPersistentStorage(), Credential::hasPassword(),
3076         and Credential::isEmpty().
3077
3078 2010-12-24  Yury Semikhatsky  <yurys@chromium.org>
3079
3080         Reviewed by Darin Adler.
3081
3082         [V8] Rename V8CustomEventListener.{h,cpp} to V8EventListener.{h,cpp}
3083         https://bugs.webkit.org/show_bug.cgi?id=51595
3084
3085         * WebCore.gypi:
3086         * bindings/v8/V8DOMWrapper.cpp:
3087         * bindings/v8/V8EventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8CustomEventListener.cpp.
3088         (WebCore::V8EventListener::V8EventListener):
3089         (WebCore::V8EventListener::getListenerFunction):
3090         (WebCore::V8EventListener::callListenerFunction):
3091         * bindings/v8/V8EventListener.h: Renamed from WebCore/bindings/v8/custom/V8CustomEventListener.h.
3092         (WebCore::V8EventListener::create):
3093         * bindings/v8/V8EventListenerList.h:
3094         * bindings/v8/V8WorkerContextEventListener.h:
3095         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3096         * bindings/v8/custom/V8LocationCustom.cpp:
3097         * bindings/v8/custom/V8NodeCustom.cpp:
3098         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
3099
3100 2010-12-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3101
3102         Reviewed by Xan Lopez.
3103
3104         [GTK] Show current time / total in media player
3105         https://bugs.webkit.org/show_bug.cgi?id=51535
3106
3107         * css/mediaControlsGtk.css:
3108         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
3109         * platform/gtk/RenderThemeGtk.cpp:
3110         (WebCore::RenderThemeGtk::formatMediaControlsCurrentTime):
3111         (WebCore::RenderThemeGtk::paintMediaCurrentTime):
3112         * platform/gtk/RenderThemeGtk.h:
3113
3114 2010-12-24  Jan Erik Hanssen  <jhanssen@sencha.com>
3115
3116         Reviewed by Eric Seidel.
3117
3118         Clean up CSSRuleData in CSSStyleSelector.h
3119         https://bugs.webkit.org/show_bug.cgi?id=27753
3120
3121         Move CSSRuleData and CSSRuleDataList from CSSStyleSelector.h to the .cpp file.
3122
3123         * css/CSSStyleSelector.cpp:
3124         (WebCore::CSSRuleData::CSSRuleData):
3125         (WebCore::CSSRuleData::~CSSRuleData):
3126         (WebCore::CSSRuleData::position):
3127         (WebCore::CSSRuleData::rule):
3128         (WebCore::CSSRuleData::selector):
3129         (WebCore::CSSRuleData::next):
3130         (WebCore::CSSRuleDataList::CSSRuleDataList):
3131         (WebCore::CSSRuleDataList::~CSSRuleDataList):
3132         (WebCore::CSSRuleDataList::first):
3133         (WebCore::CSSRuleDataList::last):
3134         (WebCore::CSSRuleDataList::append):
3135         * css/CSSStyleSelector.h:
3136
3137 2010-12-24  Yury Semikhatsky  <yurys@chromium.org>
3138
3139         Unreviewed. Fix compilation on Windows.
3140
3141         * inspector/InspectorStyleSheet.cpp:
3142         (WebCore::InspectorStyle::~InspectorStyle): added explicit empty destructor
3143         * inspector/InspectorStyleSheet.h:
3144
3145 2010-12-24  Yury Semikhatsky  <yurys@chromium.org>
3146
3147         Reviewed by Darin Adler.
3148
3149         inspector/debugger-step-out.html crashing intermittently in the bots
3150         https://bugs.webkit.org/show_bug.cgi?id=50868
3151
3152         Use RefPtr rather instead of raw pointers when keeping references
3153         to refcounted objects.
3154
3155         * inspector/InspectorCSSAgent.cpp:
3156         (WebCore::InspectorCSSAgent::getStylesForNode2):
3157         (WebCore::InspectorCSSAgent::getComputedStyleForNode2):
3158         * inspector/InspectorStyleSheet.cpp:
3159         (WebCore::InspectorStyle::create):
3160         (WebCore::InspectorStyle::InspectorStyle):
3161         (WebCore::InspectorStyle::buildObjectForStyle):
3162         (WebCore::InspectorStyle::setPropertyText):
3163         (WebCore::InspectorStyle::toggleProperty):
3164         (WebCore::InspectorStyle::styleText):
3165         (WebCore::InspectorStyle::populateAllProperties):
3166         (WebCore::InspectorStyle::replacePropertyInStyleText):
3167         (WebCore::InspectorStyleSheet::create):
3168         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
3169         (WebCore::InspectorStyleSheetForInlineStyle::create):
3170         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
3171         (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
3172         * inspector/InspectorStyleSheet.h:
3173         (WebCore::InspectorStyle::cssStyle):
3174         (WebCore::InspectorStyleSheet::pageStyleSheet):
3175
3176 2010-12-24  Justin Schuh  <jschuh@chromium.org>
3177
3178         Reviewed by Nikolas Zimmermann.
3179
3180         SVGElementInstance::m_useElement should be cleared when use element is removed from document
3181         https://bugs.webkit.org/show_bug.cgi?id=51486
3182
3183         Test: svg/custom/use-instanceRoot-with-use-removed.svg
3184
3185         * svg/SVGElementInstance.cpp:
3186         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
3187         * svg/SVGElementInstance.h:
3188         (WebCore::SVGElementInstance::clearUseElement):
3189         * svg/SVGUseElement.cpp:
3190         (WebCore::SVGUseElement::removedFromDocument):
3191         (WebCore::ShadowTreeUpdateBlocker::if):
3192         (WebCore::SVGUseElement::detachInstance):
3193         (WebCore::SVGUseElement::detach):
3194         * svg/SVGUseElement.h:
3195
3196 2010-12-23  Joseph Pecoraro  <joepeck@webkit.org>
3197
3198         Reviewed by Yury Semikhatsky.
3199
3200         Web Inspector: Missing Localized Strings
3201         https://bugs.webkit.org/show_bug.cgi?id=51542
3202
3203         Added missing strings: "WebSocket",  "Frames", "Text", "Transfer",
3204         "Preserve Log upon Navigation", and "Go to Line".
3205
3206         * English.lproj/localizedStrings.js:
3207
3208 2010-12-24  Alexander Pavlov  <apavlov@chromium.org>
3209
3210         Reviewed by Yury Semikhatsky.
3211
3212         Web Inspector: Inline HTML style property out of sync with element.style in Sidebar
3213         https://bugs.webkit.org/show_bug.cgi?id=51478
3214
3215         Now the element attribute modifications (including "style") are tracked, which results in the
3216         source offsets update (in the backend) and Styles/Metrics pane updates (in the frontend)
3217         on the "style" attribute modification through the Elements tree. Also, it appears that
3218         a complete "style" attribute removal destroys the inline style declaration
3219         (StyledElement::m_inlineStyleDecl), while the code used to rely on it being immutable (hence a crash).
3220
3221         Test: inspector/elements-delete-inline-style.html
3222
3223         * inspector/InspectorCSSAgent.cpp:
3224         (WebCore::InspectorCSSAgent::didModifyDOMAttr):
3225         * inspector/InspectorCSSAgent.h:
3226         * inspector/InspectorDOMAgent.cpp:
3227         (WebCore::InspectorDOMAgent::didModifyDOMAttr):
3228         * inspector/InspectorDOMAgent.h:
3229         * inspector/InspectorStyleSheet.cpp:
3230         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
3231         (WebCore::InspectorStyleSheetForInlineStyle::didModifyElementAttribute):
3232         (WebCore::InspectorStyleSheetForInlineStyle::text):
3233         (WebCore::InspectorStyleSheetForInlineStyle::setStyleText):
3234         (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
3235         * inspector/InspectorStyleSheet.h:
3236         * inspector/front-end/ElementsTreeOutline.js:
3237         (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
3238
3239 2010-12-24  Noel Gordon  <noel.gordon@gmail.com>
3240
3241         Reviewed by Andreas Kling.
3242
3243         [chromium] Fix a style nit in the JPEG encoder
3244         https://bugs.webkit.org/show_bug.cgi?id=51574
3245
3246         * platform/image-encoders/skia/JPEGImageEncoder.cpp: nit begone.
3247
3248 2010-12-23  Alexander Pavlov  <apavlov@chromium.org>
3249
3250         Reviewed by Maciej Stachowiak.
3251
3252         Web Inspector: CSS shorthand properties expand unnecessarily
3253         https://bugs.webkit.org/show_bug.cgi?id=36304
3254
3255         "border-radius" is a shorthand property that has a "non-standard" format and longhands, see
3256         http://www.w3.org/TR/css3-background/#border-radius for reference. CSSParser does not use the
3257         standard parseShorthand() or parse4Values() methods but instead a custom parseBorderRadius() method.
3258         This method didn't use to create a ShorthandScope instance and set the m_implicitShorthand value
3259         appropriately when adding implicit longhands, thus they were added as normal properties
3260         found in the CSS (neither implicit, nor longhands). This is now fixed.
3261
3262         * css/CSSParser.cpp:
3263         (WebCore::CSSParser::parseBorderRadius):
3264
3265 2010-12-24  Justin Schuh  <jschuh@chromium.org>
3266
3267         Reviewed by Darin Adler.
3268
3269         setTargetAttributeAnimatedValue should check for a null shadowTreeElement.
3270         https://bugs.webkit.org/show_bug.cgi?id=51576
3271
3272         Disallowed elements may be pruned from the shadow tree, leaving a null
3273         shadowTreeElement. We should check for that before setting attributes.
3274
3275         Test: svg/custom/animate-disallowed-use-element.svg
3276
3277         * svg/SVGAnimationElement.cpp:
3278         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
3279
3280 2010-12-24  Evan Martin  <evan@chromium.org>
3281
3282         Reviewed by Darin Adler.
3283
3284         TextMetrics::width is an integer, but the member is a float
3285         https://bugs.webkit.org/show_bug.cgi?id=51566
3286
3287         Change the return type to a float.
3288
3289         No tests, fixing a compiler warning.
3290         (I was unable to produce a difference in the values exposed to pages
3291         with a float versus the previous conversion to an integer.)
3292
3293         * html/TextMetrics.h:
3294         (WebCore::TextMetrics::width):
3295
3296 2010-12-24  Ryuan Choi  <ryuan.choi@samsung.com>
3297
3298         Reviewed by Kenneth Rohde Christiansen.
3299
3300         [EFL] Add option to enable Touch Events.
3301         https://bugs.webkit.org/show_bug.cgi?id=49125
3302
3303         Add files for EFL to support TOUCH_EVENTS.
3304
3305         * CMakeLists.txt:
3306         * CMakeListsEfl.txt:
3307         * platform/PlatformTouchEvent.h: Add EFL related constructor.
3308         * platform/PlatformTouchPoint.h: ditto.
3309         * platform/efl/PlatformTouchEventEfl.cpp: Added.
3310         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
3311         * platform/efl/PlatformTouchPointEfl.cpp: Added.
3312         (WebCore::PlatformTouchPoint::PlatformTouchPoint):
3313
3314 2010-12-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3315
3316         Reviewed by Kenneth Rohde Christiansen.
3317
3318         [EFL] Return an empty string instead of 'application/octet-stream' in getMIMETypeForExtension()
3319         https://bugs.webkit.org/show_bug.cgi?id=51457
3320
3321         WebKit EFL can't play html5 audio because of wrong mime type checking.
3322         So, 'application/octet-stream' is changed with an empty string.
3323
3324         * platform/efl/MIMETypeRegistryEfl.cpp:
3325         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
3326         Returns an empty string instead of application/octet-stream when it can't find proper mime type.
3327
3328 2010-12-24  Justin Schuh  <jschuh@chromium.org>
3329
3330         Reviewed by Darin Adler.
3331
3332         SVGFontFaceElement::rebuildFontFace() should exit when not in document
3333         https://bugs.webkit.org/show_bug.cgi?id=51571
3334
3335         We were hitting a NULL deref crash. Since most of the callers checked
3336         inDocument() anyway, I moved it into the start of rebuildFontFace.
3337
3338         Test: svg/custom/use-invalid-font-face.svg
3339
3340         * svg/SVGFontFaceElement.cpp:
3341         (WebCore::SVGFontFaceElement::parseMappedAttribute):
3342         (WebCore::SVGFontFaceElement::rebuildFontFace):
3343         (WebCore::SVGFontFaceElement::childrenChanged):
3344
3345 2010-12-24  Justin Schuh  <jschuh@chromium.org>
3346
3347         Reviewed by Darin Adler.
3348
3349         Remove unnecessary check in CSSCanvasValue::canvasDestroyed().
3350         https://bugs.webkit.org/show_bug.cgi?id=51564
3351
3352         This check was duplicating an ASSERT for a case fixed in r73927.
3353         Now that the bug is fixed the check is no longer necessary.
3354
3355         Removing dead code, so no new tests needed.
3356
3357         * css/CSSCanvasValue.cpp:
3358         (WebCore::CSSCanvasValue::canvasDestroyed):
3359
3360 2010-12-23  Evan Martin  <evan@chromium.org>
3361
3362         Reviewed by Darin Adler.
3363
3364         ViewportArguments.h uses an enum to intialize a bool
3365         https://bugs.webkit.org/show_bug.cgi?id=50982
3366
3367         Initialize userScalable to true, rather than -1.
3368         No tests; fixes a compiler warning.
3369
3370         * dom/ViewportArguments.h:
3371         (WebCore::ViewportArguments::ViewportArguments):
3372
3373 2010-12-23  Jan Erik Hanssen  <jhanssen@sencha.com>
3374
3375         Reviewed by Adam Barth.
3376
3377         [Qt] User name/password stripped from URLs
3378         https://bugs.webkit.org/show_bug.cgi?id=36232
3379
3380         If a username but no password or no username but a password is present
3381         in a URL, QtWebKit won't send any authentication information down to Qt
3382         as it should.
3383
3384         Tests: http/tests/xmlhttprequest/basic-auth-nopassword.html
3385                http/tests/xmlhttprequest/basic-auth-nouser.html
3386
3387         * platform/network/qt/ResourceHandleQt.cpp:
3388         (WebCore::ResourceHandle::start):
3389         (WebCore::ResourceHandle::loadResourceSynchronously):
3390
3391 2010-12-23  Ryosuke Niwa  <rniwa@webkit.org>
3392
3393         Reviewed by Darin Adler.
3394
3395         queryCommandValue("FormatBlock") does not respect editing boundaries
3396         https://bugs.webkit.org/show_bug.cgi?id=51219
3397
3398         Fixed the bug by checking the element we found in elementForFormatBlockCommand
3399         does not contain the editable root.
3400
3401         * editing/FormatBlockCommand.cpp:
3402         (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
3403
3404 2010-12-23  Ryosuke Niwa  <rniwa@webkit.org>
3405
3406         Reviewed by Darin Adler.
3407
3408         FormatBlock doesn't preserve typing style but it should
3409         https://bugs.webkit.org/show_bug.cgi?id=51140
3410
3411         Fixed the bug by making preserveTypingStyle return true.
3412
3413         Test: editing/execCommand/format-block-typing-style.html
3414
3415         * editing/FormatBlockCommand.h:
3416         (WebCore::FormatBlockCommand::preservesTypingStyle):
3417
3418 2010-12-23  Jessie Berlin  <jberlin@apple.com>
3419
3420         Reviewed by Sam Weinig.
3421
3422         Need WebKit2 API to create a SecurityOrigin from protocol, host, and port
3423         https://bugs.webkit.org/show_bug.cgi?id=51563
3424
3425         Add SecurityOrigin::create(const String& protocol, const String& host, int port).
3426
3427         * WebCore.exp.in:
3428         Export the symbols for WebCore::SecurityOrigin::create(String, String, int).
3429
3430         * page/SecurityOrigin.cpp:
3431         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
3432         Use the constant MaxAllowedPort.
3433         (WebCore::SecurityOrigin::create):
3434         Sanitizing based off of that done in createFromDatabaseIdentifier.
3435         * page/SecurityOrigin.h:
3436
3437 2010-12-23  Patrick Gansterer  <paroga@webkit.org>
3438
3439         Unreviewed build fix for WinCE after r73802.
3440
3441         Reapply r70812:
3442         Port ContextMenuItemWin.cpp to WinCE
3443         https://bugs.webkit.org/show_bug.cgi?id=48407
3444
3445         * platform/win/ContextMenuItemWin.cpp:
3446
3447 2010-12-23  Adam Barth  <abarth@webkit.org>
3448
3449         Remove include of non-existant file.
3450
3451         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3452
3453 2010-12-23  Ryosuke Niwa  <rniwa@webkit.org>
3454
3455         Reviewed by Darin Adler.
3456
3457         Selection becomes stale when CharacterData is manipulated directly
3458         https://bugs.webkit.org/show_bug.cgi?id=51389
3459
3460         The bug was caused by SelectionController's not adjusting selection when CharacterData's
3461         m_data is modified by its API.
3462
3463         Fixed the bug by adding textWillBeReplaced to SelectionController and calling it in
3464         CharacterData::textWillBeReplaced. Added newLength to setDataAndUpdate, which is passed to
3465         textWillBeReplaced because inserting, replacing, or removing data may require moving
3466         the offset of the selection end points (done by shouldRemovePositionAfterAdoptingTextReplacement).
3467
3468         Also fixed the condition for determining whether or not a node intersects the selection
3469         in respondToNodeModification, which is extracted from nodeWillBeRemoved. The old condition
3470         failed to recognize certain cases when selection started and ended with non-zero offsets.
3471
3472         Tests: editing/selection/character-data-mutation-crash.html
3473                editing/selection/character-data-mutation.html
3474
3475         * dom/CharacterData.cpp:
3476         (WebCore::CharacterData::setData): Passes newLegnth to setDataAndUpdate.
3477         (WebCore::CharacterData::appendData): Ditto.
3478         (WebCore::CharacterData::insertData): Ditto.
3479         (WebCore::CharacterData::deleteData): Ditto.
3480         (WebCore::CharacterData::replaceData): Ditto.
3481         (WebCore::CharacterData::setDataAndUpdate): Added newLegnth to the argument list,
3482         and renamed lengthOfReplacedData to oldLength; calls textWillBeReplaced.
3483         * dom/CharacterData.h:
3484         * editing/SelectionController.cpp:
3485         (WebCore::removingNodeRemovesPosition): Removed indentations from blank lines.
3486         (WebCore::SelectionController::nodeWillBeRemoved): Calls nodeWillBeRemoved.
3487         (WebCore::SelectionController::respondToNodeModification): Extracted from nodeWillBeRemoved;
3488         fixed the logic to figure out whether a node is inside the range or not.
3489         (WebCore::shouldRemovePositionAfterAdoptingTextReplacement): Added.
3490         (WebCore::SelectionController::textWillBeReplaced): Added.
3491         * editing/SelectionController.h:
3492
3493 2010-12-23  Adam Barth  <abarth@webkit.org>
3494
3495         Reviewed by Darin Adler.
3496
3497         Remove unneeded V8 bindings files
3498         https://bugs.webkit.org/show_bug.cgi?id=51570
3499
3500         * WebCore.gypi:
3501         * bindings/generic/BindingDOMWindow.h: Removed.
3502         * bindings/v8/specialization/V8BindingDOMWindow.h: Removed.
3503
3504 2010-12-23  Dan Bernstein  <mitz@apple.com>
3505
3506         Build fix.
3507
3508         * editing/EditorCommand.cpp:
3509         (WebCore::enabledDismissCorrectionPanel):
3510
3511 2010-12-23  Darin Adler  <darin@apple.com>
3512
3513         Try to fix crash seen on GTK bot.
3514
3515         * editing/EditorCommand.cpp:
3516         (WebCore::internalCommand): Add back empty string check I accidentally deleted in r74580.
3517
3518         * WebCore.xcodeproj/project.pbxproj: Let Xcode edit the file.
3519
3520 2010-12-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3521
3522         Unreviewed, rolling out r74561.
3523         http://trac.webkit.org/changeset/74561
3524         https://bugs.webkit.org/show_bug.cgi?id=51565
3525
3526         "Broke Chromium UI tests on Vista" (Requested by kbr_google on
3527         #webkit).
3528
3529         * platform/graphics/chromium/ImageLayerChromium.cpp:
3530         (WebCore::ImageLayerChromium::updateContentsIfDirty):
3531         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
3532         (WebCore::GraphicsContext3D::getImageData):
3533
3534 2010-12-23  Mihai Parparita  <mihaip@chromium.org>
3535
3536         Reviewed by Kent Tamura.
3537
3538         [Chromium] Add WebThemeEngine for Mac to allow scrollbar rendering to be overridden for the DRT
3539         https://bugs.webkit.org/show_bug.cgi?id=51507
3540         
3541         Adds WebThemeEngine for the Mac (it already has parallel definitions for
3542         Windows and Linux) so that scrollbar thumb rendering can be overridden
3543         for the DRT (to be consistent with the NSScroller-based rendering
3544         used by the Mac port).
3545
3546         No new tests since the functionality is not exposed yet. Eventually will
3547         result in the Chromium/Mac port being able to use the same pixel
3548         baselines for layout tests as the Mac port.
3549
3550         * platform/chromium/ChromiumBridge.h:
3551         * platform/chromium/ScrollbarThemeChromiumMac.mm:
3552         (WebCore::scrollbarStateToThemeState):
3553         (WebCore::ScrollbarThemeChromiumMac::paint):
3554
3555 2010-12-23  Darin Adler  <darin@apple.com>
3556
3557         Reviewed by Sam Weinig.
3558
3559         WKView should not try to do asynchronous validation for selectors that are not editor commands
3560         https://bugs.webkit.org/show_bug.cgi?id=51555
3561
3562         * WebCore.exp.in: Added commandIsSupportedFromMenuOrKeyBinding.
3563         * editing/Editor.h: Reordered arguments in the Editor::Command constructor
3564         and the data members too so the frame is last. Added