9d88f062366d706640bd0a34a6a181397bbf599b
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-06-30  Patrick Gansterer  <paroga@webkit.org>
2
3         Reviewed by Adam Roben.
4
5         [WIN] Don't redefine the keyboard codes
6         https://bugs.webkit.org/show_bug.cgi?id=63726
7
8         Only define the codes when undefined.
9         r64957 fixed this problem for COMPILER(MINGW) but not for OS(WINCE).
10
11         * platform/WindowsKeyboardCodes.h:
12
13 2011-06-30  Yury Semikhatsky  <yurys@chromium.org>
14
15         Reviewed by Pavel Feldman.
16
17         Web Inspector: hide "Enabled background events collection" option in context menu until the setting is persisted
18         https://bugs.webkit.org/show_bug.cgi?id=63708
19
20         The option has no much sense if it is not preserved between browser restarts.
21
22         * inspector/front-end/NetworkPanel.js:
23         (WebInspector.NetworkPanel.prototype._contextMenu):
24
25 2011-06-30  Patrick Gansterer  <paroga@webkit.org>
26
27         Reviewed by Darin Adler.
28
29         Remove dependnecy on IDL generation for disabled features in JSC bindings
30         https://bugs.webkit.org/show_bug.cgi?id=63718
31
32         Move the #if ENABLE() line directly after #include "config.h".
33         This enables us to compile all files even when we don't generate the IDL output.
34
35         * bindings/js/IDBBindingUtilities.cpp:
36         * bindings/js/JSConsoleCustom.cpp:
37         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
38         * bindings/js/JSCustomXPathNSResolver.cpp:
39         * bindings/js/JSDOMApplicationCacheCustom.cpp:
40         * bindings/js/JSDeviceMotionEventCustom.cpp:
41         * bindings/js/JSDeviceOrientationEventCustom.cpp:
42         * bindings/js/JSInjectedScriptHostCustom.cpp:
43         * bindings/js/JSInjectedScriptManager.cpp:
44         * bindings/js/JSInspectorFrontendHostCustom.cpp:
45         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
46         * bindings/js/JSSQLResultSetRowListCustom.cpp:
47         * bindings/js/JSSQLTransactionCustom.cpp:
48         * bindings/js/JSSQLTransactionSyncCustom.cpp:
49         * bindings/js/JSSVGElementInstanceCustom.cpp:
50         * bindings/js/JSStorageCustom.cpp:
51         * bindings/js/JSTouchCustom.cpp:
52         * bindings/js/JSTouchListCustom.cpp:
53         * bindings/js/JSXPathResultCustom.cpp:
54         * bindings/js/JavaScriptCallFrame.cpp:
55         * bindings/js/PageScriptDebugServer.cpp:
56         * bindings/js/ScriptDebugServer.cpp:
57         * bindings/js/ScriptGCEvent.cpp:
58         * bindings/js/ScriptProfile.cpp:
59         * bindings/js/WorkerScriptDebugServer.cpp:
60
61 2011-06-30  Alexander Pavlov  <apavlov@chromium.org>
62
63         Reviewed by Kent Tamura.
64
65         [Chromium] Autofill suggestions appear in upper left corner after input change
66         https://bugs.webkit.org/show_bug.cgi?id=63702
67
68         This change fixes a few popup layout issues, some of which have existed for quite a while:
69         - the absence of the ChromeClientImpl::screenToWindow() implementation (the method used to always return (0, 0));
70         - the confusion of window and screen coordinates passed into the autofill popup client's setWindowRect() method;
71         - the use of the current frameRect() width as the target element's width (which was wrong when refreshing
72           a popup resized during the initial layout (e.g. made wider than the target element)).
73
74         No new tests, as this is a change to platform-specific widget code. The test case is provided in the bug description.
75
76         * platform/chromium/PopupMenuChromium.cpp:
77         (WebCore::PopupContainer::layoutAndGetRTLOffset): Use original target element width, not frameRect().width(),
78         since the latter gets updated if the popup is not the same width as the target element.
79         (WebCore::PopupContainer::refresh): Restore only the popup bounds rather than its original rectangle,
80         since it sometimes breaks the invalidation region and layout.
81
82 2011-06-30  Sheriff Bot  <webkit.review.bot@gmail.com>
83
84         Unreviewed, rolling out r90102.
85         http://trac.webkit.org/changeset/90102
86         https://bugs.webkit.org/show_bug.cgi?id=63714
87
88         Lots of tests asserting beneath
89         SVGSMILElement::findInstanceTime (Requested by aroben on
90         #webkit).
91
92         * svg/animation/SVGSMILElement.cpp:
93         (WebCore::SVGSMILElement::findInstanceTime):
94
95 2011-06-30  Andrey Kosyakov  <caseq@chromium.org>
96
97         Reviewed by Yury Semikhatsky.
98
99         Web Inspector: remove ExtensionAPISchema.json
100         https://bugs.webkit.org/show_bug.cgi?id=63687
101
102         * inspector/front-end/ExtensionAPISchema.json: Removed.
103
104 2011-06-30  Ilya Tikhonovsky  <loislo@chromium.org>
105
106         Unreviewed build fix for chromium.
107
108         * inspector/CodeGeneratorInspector.pm:
109
110 2011-06-30  Ilya Tikhonovsky  <loislo@chromium.org>
111
112         Unreviewed build fix for mac.
113
114         * inspector/CodeGeneratorInspector.pm:
115
116 2011-06-30  Ilya Tikhonovsky  <loislo@chromium.org>
117
118         Reviewed by Pavel Feldman.
119
120         Web Inspector: Protocol: error object needs some improvement.
121         https://bugs.webkit.org/show_bug.cgi?id=63707
122
123         Current implementation is not useful in the code.
124         We need to have toString implementation with nice formatting
125         I'd like to use error.message property as the main place for the error's text.
126
127         * inspector/CodeGeneratorInspector.pm:
128
129 2011-06-30  Mikhail Naganov  <mnaganov@chromium.org>
130
131         Reviewed by Yury Semikhatsky.
132
133         Web Inspector: [Chromium] Support annotations for arrays in heap profiler.
134         https://bugs.webkit.org/show_bug.cgi?id=63690
135
136         * inspector/front-end/DetailedHeapshotGridNodes.js:
137         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
138
139
140 2011-06-30  Patrick Gansterer  <paroga@webkit.org>
141
142         Unreviewed build fix for !ENABLE(SVG_ANIMATION) after r88663, r89187, r89220, r89431 and r89661.
143
144         * svg/SVGAnimatedAngle.h:
145         * svg/SVGAnimatedLength.h:
146         * svg/SVGAnimatedNumber.h:
147         * svg/SVGAnimatedRect.h:
148         * svg/SVGAnimatedString.h:
149
150 2011-06-30  Gabor Loki  <loki@webkit.org>
151
152         Reviewed by Csaba Osztrogonác.
153
154         Fixed several style and typo issues after r90091.
155         https://bugs.webkit.org/show_bug.cgi?id=63692
156
157         Rename yStart to extremaStartY during computing extremas
158
159         * platform/graphics/filters/FEMorphology.cpp:
160         (WebCore::FEMorphology::platformApplyGeneric):
161         * platform/graphics/filters/FEMorphology.h:
162
163 2011-06-30  Oliver Varga  <Varga.Oliver@stud.u-szeged.hu>
164
165         Reviewed by Nikolas Zimmermann.
166
167         Speed up SVGSMILElement::findInstanceTime.
168         https://bugs.webkit.org/show_bug.cgi?id=61025
169
170         Replace the linear search to binary search on ordered list because
171         the previous searches from the beginning was not efficient.
172
173         No new tests this is only a performance tweak.
174
175         * svg/animation/SVGSMILElement.cpp:
176         (WebCore::extractTimeFromVector):
177         (WebCore::SVGSMILElement::findInstanceTime):
178
179 2011-06-30  Kentaro Hara  <haraken@google.com>
180
181         Reviewed by Kent Tamura.
182
183         Change the label of an HTML5 file chooser button to "Choose Files"
184         https://bugs.webkit.org/show_bug.cgi?id=49245
185
186         We should notify capability of multiple files to users.
187
188         Test: fast/forms/input-file-label.html
189
190         * English.lproj/Localizable.strings:
191         * html/FileInputType.cpp:
192         (WebCore::UploadButtonElement::createForMultiple): Constructs a multiple file chooser button.
193         (WebCore::FileInputType::createShadowSubtree): Constructs a single/multiple file chooser button depending on 'multiple' attribute.
194         (WebCore::FileInputType::multipleAttributeChanged): Updates the label of the file chooser button.
195         * html/FileInputType.h:
196         * html/HTMLInputElement.cpp:
197         (WebCore::HTMLInputElement::parseMappedAttribute): Updates the shadow tree of the file chooser button when 'multiple' attribute is set or unset.
198         * html/InputType.cpp:
199         (WebCore::InputType::multipleAttributeChanged): Virtual method to be overridden by FileInputType.
200         * html/InputType.h:
201         * platform/DefaultLocalizationStrategy.cpp:
202         (WebCore::DefaultLocalizationStrategy::fileButtonChooseFileLabel): Updated the description for "Choose File".
203         (WebCore::DefaultLocalizationStrategy::fileButtonChooseMultipleFilesLabel): Returns a string "Choose Files".
204         * platform/DefaultLocalizationStrategy.h:
205         * platform/LocalizationStrategy.h:
206         * platform/LocalizedStrings.cpp:
207         (WebCore::fileButtonChooseMultipleFilesLabel): Wrapper method for getting the "Choose Files" label.
208         * platform/LocalizedStrings.h:
209         * platform/brew/LocalizedStringsBrew.cpp:
210         (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
211         * platform/efl/LocalizedStringsEfl.cpp:
212         (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
213         * platform/gtk/LocalizedStringsGtk.cpp:
214         (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
215         * platform/haiku/LocalizedStringsHaiku.cpp:
216         (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
217         * platform/wx/LocalizedStringsWx.cpp:
218         (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
219
220 2011-06-30  Ryosuke Niwa  <rniwa@webkit.org>
221
222         Reviewed by Kent Tamura.
223
224         Replace isNodeInTextFormControl(Node*) by enclosingTextFormControl(const Position&)
225         https://bugs.webkit.org/show_bug.cgi?id=63672
226
227         Replaced isNodeInTextFormControl(Node*) by enclosingTextFormControl(const Position&).
228         Also added a safe toTextFormControl to HTMLFormControlElement.h.
229
230         * editing/DeleteSelectionCommand.cpp:
231         (WebCore::DeleteSelectionCommand::doApply): Calls enclosingTextFormControl instead of manually
232         checking the tag name of shadowAncestorNode.
233         * editing/Editor.cpp:
234         (WebCore::Editor::selectionForCommand): Rewritten using enclosingTextFormControl and toTextFormControl.
235         (WebCore::Editor::cut): Calls enclosingTextFormControl instead of isNodeInTextFormControl.
236         (WebCore::Editor::copy): Ditto.
237         (WebCore::Editor::setBaseWritingDirection): Calls toTextFormControl instead of manually checking tag name.
238         * editing/FrameSelection.cpp:
239         (WebCore::FrameSelection::isInPasswordField): Calls enclosingTextFormControl.
240         * editing/ReplaceSelectionCommand.cpp:
241         (WebCore::ReplaceSelectionCommand::doApply): Ditto.
242         * editing/htmlediting.cpp:
243         (WebCore::enclosingTextFormControl): Added.
244         * editing/htmlediting.h:
245         * html/HTMLFormControlElement.h:
246         (WebCore::toTextFormControl): Added.
247         * page/DragController.cpp:
248         (WebCore::DragController::startDrag): Calls enclosingTextFormControl instead of isNodeInTextFormControl.
249
250 2011-06-27  Pavel Podivilov  <podivilov@chromium.org>
251
252         Reviewed by Pavel Feldman.
253
254         Web Inspector: source code is not highlighted after drawer height animations.
255         https://bugs.webkit.org/show_bug.cgi?id=62860
256
257         * inspector/front-end/Drawer.js:
258         (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished):
259         (WebInspector.Drawer.prototype._animateDrawerHeight):
260
261 2011-06-30  MORITA Hajime  <morrita@google.com>
262
263         Reviewed by Dimitri Glazkov.
264
265         Crash if ShadowRoot has a text node.
266         https://bugs.webkit.org/show_bug.cgi?id=63607
267         
268         Node::styleForRenderer() for Text node wasn't shadow-aware.
269         This change allow styleForRenderer() to know its visual parent by
270         passing NodeRenderingContext.
271         
272         Changes other than NodeRenderingContext and Element is just a
273         follow up for change above.
274
275         * dom/Element.cpp: use NodeRenderingContext to resolve parent node.
276         (WebCore::Element::recalcStyle):
277         * dom/Node.cpp:
278         (WebCore::Node::styleForRenderer): Added NodeRenderingContext as a parameter.
279         * dom/Node.h:
280         * dom/NodeRenderingContext.cpp:
281         (WebCore::NodeRendererFactory::createRendererAndStyle):
282         * html/HTMLOptGroupElement.cpp:
283         (WebCore::HTMLOptGroupElement::attach):
284         * html/HTMLOptionElement.cpp:
285         (WebCore::HTMLOptionElement::attach):
286         * html/HTMLTitleElement.cpp:
287         (WebCore::HTMLTitleElement::textWithDirection):
288         * html/shadow/TextControlInnerElements.cpp:
289         (WebCore::TextControlInnerElement::styleForRenderer):
290         (WebCore::TextControlInnerTextElement::styleForRenderer):
291         * html/shadow/TextControlInnerElements.h:
292
293         Test: fast/dom/shadow/shadow-root-text-child.html
294         
295 2011-06-30  Piroska András  <Piroska.Andras@stud.u-szeged.hu>
296
297         Reviewed by Dirk Schulze.
298
299         Apply the ParallelJobs support to FEMorphology
300         https://bugs.webkit.org/show_bug.cgi?id=63064
301
302         The FEMorphology filter of SVG can consume lots of resources if it is
303         applied to a large area. The computation can be distributed to multiple
304         cores if the architecture supports.
305         The average performance progression is 20-25% on dual-core machines.
306
307         * platform/graphics/filters/FEMorphology.cpp:
308         (WebCore::FEMorphology::platformApplyGeneric): Apply the filter between yStart and yEnd interval
309         (WebCore::FEMorphology::platformApplyWorker): Call the generic apply from a parallel worker
310         (WebCore::FEMorphology::platformApply):
311         (WebCore::FEMorphology::apply): Move the functionality into platformApply
312         (WebCore::FEMorphology::externalRepresentation): Remove whitespaces
313         * platform/graphics/filters/FEMorphology.h:
314
315 2011-06-29  Kent Tamura  <tkent@chromium.org>
316
317         Reviewed by Dimitri Glazkov.
318
319         Avoid custom layout code of RenderTextControlSingleLine
320         https://bugs.webkit.org/show_bug.cgi?id=61415
321
322         If a text field has a search results button, a search cancel
323         button, a speech button, or a spin button, the editable inner text
324         element and the buttons are wrapped by a flexible box container,
325         and the editable inner text element has flexibility. As the result
326         of applying the flexible box, we don't need any horizontal layout
327         code in RenderTextControlSingleLine except the inner spin button.
328
329         Also, we remove custom hit-testing code in nodeAtPoint(). If a
330         user clicks on a position left of the inner editable text but not
331         on the search results button, the search results button doesn't
332         work though it worked.
333
334         * css/html.css:
335         (input::-webkit-textfield-decoration-container):
336           New style definition for the "container" element.
337         (input[type="search"]::-webkit-search-cancel-button):
338           It should be a block element because it's a child of the flexible box.
339           Also, this doesn't have flexibility.
340         (input[type="search"]::-webkit-search-decoration): ditto.
341         (input[type="search"]::-webkit-search-results-decoration): ditto.
342         (input[type="search"]::-webkit-search-results-button): ditto.
343         (input::-webkit-inner-spin-button): ditto.
344         (input::-webkit-input-speech-button): ditto.
345         * html/HTMLInputElement.cpp:
346         (WebCore::HTMLInputElement::containerElement):
347           Add an accessor of the flexible box container.
348           It just calls InputType::containerElement().
349         * html/HTMLInputElement.h: Declare it.
350         * html/InputType.h:
351         (WebCore::InputType::containerElement): New accessor for a shadow element.
352         * html/SearchInputType.cpp:
353         (WebCore::SearchInputType::SearchInputType):
354           m_innerBlock is moved to TextFieldInputType.
355         (WebCore::SearchInputType::needsContainer):
356           A search field always needs the flexible box container because
357           of the results button and the cancel button.
358         (WebCore::SearchInputType::createShadowSubtree):
359           Use TextFieldInputType::createShadowSubtree(), then modify the tree.
360         (WebCore::SearchInputType::destroyShadowSubtree):
361           m_innerBlock is moved to TextFieldInputType.
362         * html/SearchInputType.h:
363         * html/TextFieldInputType.cpp:
364         (WebCore::TextFieldInputType::TextFieldInputType):
365           Initialize the new members.
366         (WebCore::TextFieldInputType::needsContainer):
367           Returns true if x-webkit-speech. We check a spin button separately.
368         (WebCore::TextFieldInputType::createShadowSubtree):
369           Wrap everything with the flexible box container if needsContainer() or we need a spin button.
370         (WebCore::TextFieldInputType::containerElement): Added an accessor.
371         (WebCore::TextFieldInputType::innerBlockElement): ditto.
372         (WebCore::TextFieldInputType::innerTextElement): ditto.
373         (WebCore::TextFieldInputType::innerSpinButtonElement): ditto.
374         (WebCore::TextFieldInputType::speechButtonElement): ditto.
375         (WebCore::TextFieldInputType::destroyShadowSubtree):
376           Clear references to new shadow nodes.
377         * html/TextFieldInputType.h:
378         * rendering/RenderTextControlSingleLine.cpp:
379         (WebCore::RenderTextControlSingleLine::containerElement): Added an accessor.
380         (WebCore::RenderTextControlSingleLine::innerTextElement):
381         (WebCore::RenderTextControlSingleLine::layout):
382          - Correct heights check
383           Comparing with height(), not contentHeigth(), was incorrect.
384          - Adjust the container height like the editable inner text.
385          - Remove width adjustment
386          - Remove the speech button layout code
387           The flexible box layout is enough.
388         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
389           Remove custom code for results/cancel/speech buttons, and
390           Simplify comments.
391         (WebCore::RenderTextControlSingleLine::forwardEvent):
392           Remove custom forwarding code for results/cancel buttons.
393         (WebCore::RenderTextControlSingleLine::styleDidChange):
394           Clear the style of the container because we update it in layout().
395         (WebCore::RenderTextControlSingleLine::hasControlClip):
396           Decoration buttons should be clipped by the container.
397         (WebCore::RenderTextControlSingleLine::controlClipRect): ditto.
398         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
399           We don't need to use display:inline-block any more.
400         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
401           The text wrapper element should have flexibility.
402         (WebCore::RenderTextControlSingleLine::textBlockInsetTop):
403           Updated for the tree structure change.
404         * rendering/RenderTextControlSingleLine.h:
405
406 2011-06-29  Kent Tamura  <tkent@chromium.org>
407
408         [Mac] Attempt to fix Leopard build.
409
410         * platform/mac/CursorMac.mm:
411         (WebCore::Cursor::ensurePlatformCursor):
412
413 2011-06-29  Darin Adler  <darin@apple.com>
414
415         Reviewed by Dan Bernstein.
416
417         [Mac] Use system cursors instead of custom bitmaps where possible
418         https://bugs.webkit.org/show_bug.cgi?id=63679
419
420         * Resources/crossHairCursor.png: Removed.
421         * Resources/notAllowedCursor.png: Removed.
422         * WebCore.exp.in: Added wkCursor.
423         * WebCore/WebCore.gyp/WebCore.gyp: Removed the two now-unused PNG files.
424         * WebCore.xcodeproj/project.pbxproj: Ditto.
425
426         * platform/mac/CursorMac.mm:
427         (WebCore::Cursor::ensurePlatformCursor): Use NSCursor API for Cross, Hand,
428         VerticalText, ContextMenu, Copy, and NotAllowed. Use wkCursor for Move,
429         Alias, Progress, and the resize and panning cursors.
430
431         * platform/mac/WebCoreSystemInterface.h: Added wkCursor.
432         * platform/mac/WebCoreSystemInterface.mm: Ditto.
433
434 2011-06-29  Keishi Hattori  <keishi@webkit.org>
435
436         Reviewed by Adam Barth.
437
438         Remove extra space at EOL in view source mode
439         https://bugs.webkit.org/show_bug.cgi?id=63620
440
441         Test: fast/frames/viewsource-linebreak.html
442
443         * css/view-source.css:
444         (tbody:last-child .webkit-line-content:empty:before): If we don't do this
445         the last line will be empty and the height will be shorter than the rest.
446         * html/HTMLViewSourceDocument.cpp:
447         (WebCore::HTMLViewSourceDocument::addSource): If source file is empty, add an empty line.
448         (WebCore::HTMLViewSourceDocument::finishLine): Call when you are done with the current line.
449         Adds a BR element if the line is empty and sets current to tbody.
450         (WebCore::HTMLViewSourceDocument::addText):
451         * html/HTMLViewSourceDocument.h:
452
453 2011-06-29  Brent Fulgham  <bfulgham@webkit.org>
454
455         [WinCE] Correct logical state of WINCE test.
456
457         * platform/win/ScrollbarThemeWin.cpp: The #if OS(WINCE)
458           should have been #if !OS(WINCE)
459         (WebCore::ScrollbarThemeWin::paintTrackPiece):
460         (WebCore::ScrollbarThemeWin::paintButton):
461         (WebCore::ScrollbarThemeWin::paintThumb):
462         * rendering/RenderThemeWin.cpp: ditto.
463         (WebCore::drawControl):
464
465 2011-06-29  Justin Garcia  <justin.garcia@apple.com>
466
467         Reviewed by Enrica Casucci.
468         
469         I forgot to include these (reviewed) style fix-ups in my previous check-in.
470
471         * editing/htmlediting.cpp:
472         (WebCore::indexForVisiblePosition):
473         (WebCore::visiblePositionForIndex):
474
475 2011-06-29  Justin Garcia  <justin.garcia@apple.com>
476
477         Reviewed by Enrica Casucci.
478
479         https://bugs.webkit.org/show_bug.cgi?id=62922
480         indexForVisiblePosition(const VisiblePosition& visiblePosition) does not consider shadow content
481         
482         VisiblePositions can be inside web form text regions, which use shadow trees. Made indexForVisiblePosition
483         aware of this, and added a new parameter to obtain the scope for a VisiblePosition, in addition to its index.
484         
485         Added visiblePositionForIndex to go in the opposite direction, taking into account the scope
486         used to compute the index.
487         
488         These two functions use TextIterators to convert between VisiblePositions and indices. But 
489         TextIterator iteration using TextIteratorEmitsCharactersBetweenAllVisiblePositions does not 
490         exactly match VisiblePosition iteration, so using them to preserve a selection during an 
491         editing operation is unreliable. This can be seen in the expected results for:
492         
493         editing/execCommand/indent-pre-list.html
494         editing/execCommand/crash-indenting-list-item.html
495         
496         TextIterator's TextIteratorEmitsCharactersBetweenAllVisiblePositions mode needs to be fixed, or 
497         these functions need to be changed to iterate using actual VisiblePositions. See:
498         
499         https://bugs.webkit.org/show_bug.cgi?id=63590
500         TextIterators in TextIteratorEmitsCharactersBetweenAllVisiblePositions do not exactly match VisiblePositions
501         
502         Also:
503         
504         https://bugs.webkit.org/show_bug.cgi?id=63592
505         Use visiblePositionForIndex and indexForVisiblePosition everywhere that TextIterators are used to convert between VisiblePositions and indices
506         
507         No new tests added because indexForVisiblePosition is currently only used for editing operations
508         that cannot be performed inside web form fields.
509
510         * editing/ApplyBlockElementCommand.cpp:
511         (WebCore::ApplyBlockElementCommand::doApply):
512         * editing/InsertListCommand.cpp:
513         (WebCore::InsertListCommand::doApply):
514         * editing/htmlediting.cpp:
515         (WebCore::indexForVisiblePosition):
516         (WebCore::visiblePositionForIndex):
517         * editing/htmlediting.h:
518
519 2011-06-29  Dimitri Glazkov  <dglazkov@chromium.org>
520
521         Reviewed by Kent Tamura.
522
523         Remove ElementWithPseudoId, since now an Element can store it all by itself.
524         https://bugs.webkit.org/show_bug.cgi?id=63657
525
526         Refactoring, covered by existing tests.
527
528         * CMakeLists.txt: Removed ElementWithPseudoId from build.
529         * GNUmakefile.list.am: Ditto.
530         * WebCore.gypi: Ditto.
531         * WebCore.order: Ditto.
532         * WebCore.pro: Ditto.
533         * WebCore.vcproj/WebCore.vcproj: Ditto.
534         * WebCore.xcodeproj/project.pbxproj: Ditto.
535         * html/ColorInputType.cpp:
536         (WebCore::ColorInputType::createShadowSubtree): Changed to use plain-old HTMLDivElement.
537         * html/RangeInputType.cpp:
538         (WebCore::RangeInputType::createShadowSubtree): Ditto.
539         * html/ValidationMessage.cpp:
540         (WebCore::ValidationMessage::buildBubbleTree): Ditto.
541         * html/shadow/ElementWithPseudoId.cpp: Removed.
542         * html/shadow/ElementWithPseudoId.h: Removed.
543
544 2011-06-29  Levi Weintraub  <leviw@chromium.org>
545
546         Reviewed by Eric Seidel.
547
548         Switch computeWidth and computeHeight functions to new layout types
549         https://bugs.webkit.org/show_bug.cgi?id=63655
550
551         Switch computeWidth and computeHeight functions over to the new layout unit abstraction.
552
553         Making a point to mark rounding that should eventually be removed by linking to a new
554         tracking bug: 63645.
555
556         No new tests, no functionality changes.
557
558         * rendering/AutoTableLayout.cpp:
559         (WebCore::AutoTableLayout::computePreferredLogicalWidths):
560         * rendering/AutoTableLayout.h:
561         * rendering/FixedTableLayout.cpp:
562         (WebCore::FixedTableLayout::computePreferredLogicalWidths):
563         * rendering/FixedTableLayout.h:
564         * rendering/LayoutTypes.h:
565         * rendering/RenderBlock.cpp:
566         (WebCore::RenderBlock::computePreferredLogicalWidths):
567         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
568         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
569         * rendering/RenderBox.cpp:
570         (WebCore::RenderBox::computeLogicalWidthUsing):
571         (WebCore::RenderBox::computeLogicalHeight):
572         (WebCore::RenderBox::computeLogicalHeightUsing):
573         (WebCore::RenderBox::computePercentageLogicalHeight):
574         (WebCore::RenderBox::computeReplacedLogicalWidth):
575         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
576         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
577         (WebCore::RenderBox::computeReplacedLogicalHeight):
578         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
579         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
580         * rendering/RenderBox.h:
581         * rendering/RenderIFrame.cpp:
582         (WebCore::RenderIFrame::computeLogicalWidth):
583         * rendering/RenderImage.cpp:
584         (WebCore::RenderImage::computeReplacedLogicalWidth):
585         (WebCore::RenderImage::computeReplacedLogicalHeight):
586         * rendering/RenderImage.h:
587         * rendering/RenderListBox.cpp:
588         (WebCore::RenderListBox::computePreferredLogicalWidths):
589         * rendering/RenderListMarker.cpp:
590         (WebCore::RenderListMarker::computePreferredLogicalWidths):
591         * rendering/RenderMenuList.cpp:
592         (WebCore::RenderMenuList::computePreferredLogicalWidths):
593         * rendering/RenderReplaced.cpp:
594         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
595         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
596         (WebCore::RenderReplaced::computePreferredLogicalWidths):
597         * rendering/RenderReplaced.h:
598         * rendering/RenderSlider.cpp:
599         (WebCore::RenderSlider::computePreferredLogicalWidths):
600         * rendering/RenderTable.cpp:
601         (WebCore::RenderTable::computeLogicalWidth):
602         * rendering/RenderTextControl.cpp:
603         (WebCore::RenderTextControl::computePreferredLogicalWidths):
604         * rendering/RenderVideo.cpp:
605         (WebCore::RenderVideo::computeReplacedLogicalWidth):
606         (WebCore::RenderVideo::computeReplacedLogicalHeight):
607         * rendering/RenderVideo.h:
608         * rendering/svg/RenderSVGForeignObject.cpp:
609         (WebCore::RenderSVGForeignObject::computeLogicalWidth):
610         (WebCore::RenderSVGForeignObject::computeLogicalHeight):
611         * rendering/svg/RenderSVGRoot.cpp:
612         (WebCore::RenderSVGRoot::computePreferredLogicalWidths):
613         (WebCore::RenderSVGRoot::computeIntrinsicWidth):
614         (WebCore::RenderSVGRoot::computeIntrinsicHeight):
615         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
616         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
617         (WebCore::RenderSVGRoot::layout):
618         * rendering/svg/RenderSVGRoot.h:
619
620 2011-06-23  Abhishek Arya  <inferno@chromium.org>
621
622         Reviewed by James Robinson.
623
624         In RenderBlock, RenderWidget and RenderReplaced destroy functions,
625         call dirtyLinesFromChangedChild to tell our parent that we are going away.
626         https://bugs.webkit.org/show_bug.cgi?id=60307
627
628         Test: fast/block/child-not-removed-from-parent-lineboxes-crash.html
629               fast/block/block-not-removed-from-parent-lineboxes-crash.html
630
631         * rendering/RenderBlock.cpp:
632         (WebCore::RenderBlock::destroy):
633         * rendering/RenderReplaced.cpp:
634         (WebCore::RenderReplaced::destroy):
635         * rendering/RenderReplaced.h:
636         * rendering/RenderWidget.cpp:
637         (WebCore::RenderWidget::destroy):
638
639 2011-06-29  Brent Fulgham  <bfulgham@webkit.org>
640
641         Speculative WinCE build correction.
642
643         * rendering/RenderThemeWin.cpp:
644         (WebCore::drawControl): Don't call setRGBABitmapAlpha
645           for WinCE case.
646
647 2011-06-29  Ryosuke Niwa  <rniwa@webkit.org>
648
649         Reviewed by Darin Adler.
650
651         REGRESSION(r89952): r89952 added a wrong assertion in visible_units.cpp
652         https://bugs.webkit.org/show_bug.cgi?id=63668
653
654         We need to assert the offset to be zero only when the position is NOT offset in node.
655
656         * editing/visible_units.cpp:
657         (WebCore::startOfParagraph):
658
659 2011-06-29  Brent Fulgham  <bfulgham@webkit.org>
660
661         Speculative WinCE build correction after r90057.
662
663         * CMakeListsWinCE.txt: Roll back r90061, since GetWorldTransform
664           is not available in WinCE.
665         * platform/win/ScrollbarThemeWin.cpp: Conditionally exclude calls
666           to DIBPixelData::setRGBABitmapAlpha for WinCE.
667         (WebCore::ScrollbarThemeWin::paintTrackPiece):
668         (WebCore::ScrollbarThemeWin::paintButton):
669         (WebCore::ScrollbarThemeWin::paintThumb):
670
671 2011-06-29  Brent Fulgham  <bfulgham@webkit.org>
672
673         Speculative WinCE build correction after r90057.
674
675         * CMakeListsWinCE.txt: Add missing DIBPixelData.cpp to
676         WinCE build to support setting bitmap image alpha value.
677
678 2011-06-29  Simon Fraser  <simon.fraser@apple.com>
679
680         Reviewed by Beth Dakin.
681
682         Lay some groundwork for rubber-banding in overflow:scroll divs
683         https://bugs.webkit.org/show_bug.cgi?id=63654
684
685         Make it possible for scrollTop and scrollLeft on a RenderLayer to be
686         set to negative values, which we will do during rubber-banding in
687         future. Continue to clamp programmatic scrolls, and scroll positions
688         set by layout between 0 and the max value.
689
690         Test: fast/layers/negative-scroll-positions.html
691
692         * rendering/RenderBox.cpp:
693         (WebCore::RenderBox::setScrollLeft):
694         (WebCore::RenderBox::setScrollTop):
695         * rendering/RenderLayer.cpp:
696         (WebCore::RenderLayer::scrollToOffset):
697         (WebCore::RenderLayer::scrollTo):
698         * rendering/RenderLayer.h:
699         (WebCore::RenderLayer::scrollToXOffset):
700         (WebCore::RenderLayer::scrollToYOffset):
701         * rendering/RenderTextControlSingleLine.cpp:
702         (WebCore::RenderTextControlSingleLine::forwardEvent):
703
704 2011-06-29  Anders Carlsson  <andersca@apple.com>
705
706         Reviewed by Simon Fraser.
707
708         RenderLayer::maximumScrollPosition() is wrong
709         https://bugs.webkit.org/show_bug.cgi?id=62667
710
711         * platform/ScrollableArea.h:
712         (WebCore::ScrollableArea::isVerticalScrollerPinnedToMinimumPosition):
713         (WebCore::ScrollableArea::isVerticalScrollerPinnedToMaximumPosition):
714         Add these for good measure; they will be needed in an upcoming patch.
715
716         * rendering/RenderLayer.cpp:
717         (WebCore::RenderLayer::maximumScrollPosition):
718         Subtract the visible content rect, including the scroll bars.
719
720 2011-06-29  Brent Fulgham  <bfulgham@webkit.org>
721
722         Speculative WinCE build correction after r90053.
723
724         * platform/graphics/GraphicsContext.h:
725         (WebCore::GraphicsContext::inTransparencyLayer): Provide
726         stub implementation for 'inTransparencyLayer'.
727
728 2011-06-29  Xu Fan  <qifuren1985@gmail.com>
729
730         Reviewed by Brent Fulgham.
731
732         Fix Scrollbars Transparent in Windows XP if WebKit is using Layered Window
733         https://bugs.webkit.org/show_bug.cgi?id=61136
734
735         * platform/graphics/win/DIBPixelData.h: add a static method setRGBABitmapAlpha
736         * platform/graphics/win/DIBPixelData.cpp: add implementation
737         * platform/win/ScrollbarThemeWin.cpp: fix scroolbar transparent
738         * rendering/RenderThemeWin.cpp: fix textbox and button transparent
739
740 2011-06-29  Emil A Eklund  <eae@chromium.org>
741
742         Reviewed by Eric Seidel.
743
744         Switch RenderBoxModelObject::margin* and setMargin* to to new layout types
745         https://bugs.webkit.org/show_bug.cgi?id=63652
746
747         Switch margin methods for render tree over to the new layout unit abstraction.
748
749         No new tests, no functionality changes.
750
751         * rendering/InlineFlowBox.h:
752         * rendering/RenderBlock.cpp:
753         * rendering/RenderBlock.h:
754         * rendering/RenderBox.cpp:
755         * rendering/RenderBox.h:
756         * rendering/RenderBoxModelObject.h:
757         * rendering/RenderInline.cpp:
758         * rendering/RenderInline.h:
759         * rendering/RenderText.h:
760
761 2011-06-29  Levi Weintraub  <leviw@chromium.org>
762
763         Reviewed by Eric Seidel.
764
765         Switch paint to new layout types
766         https://bugs.webkit.org/show_bug.cgi?id=63645
767
768         Switch vanilla paint function over to the new layout unit abstraction.
769
770         No new tests, no functionality changes.
771
772         * rendering/RenderBlock.cpp:
773         (WebCore::RenderBlock::paint):
774         * rendering/RenderBlock.h:
775         * rendering/RenderBox.cpp:
776         (WebCore::RenderBox::paint):
777         * rendering/RenderBox.h:
778         * rendering/RenderDetailsMarker.cpp:
779         (WebCore::RenderDetailsMarker::paint):
780         * rendering/RenderDetailsMarker.h:
781         * rendering/RenderEmbeddedObject.cpp:
782         (WebCore::RenderEmbeddedObject::paint):
783         * rendering/RenderEmbeddedObject.h:
784         * rendering/RenderFrameSet.cpp:
785         (WebCore::RenderFrameSet::paint):
786         * rendering/RenderFrameSet.h:
787         * rendering/RenderImage.cpp:
788         (WebCore::RenderImage::paint):
789         * rendering/RenderImage.h:
790         * rendering/RenderInline.cpp:
791         (WebCore::RenderInline::paint):
792         * rendering/RenderInline.h:
793         * rendering/RenderLineBoxList.h:
794         * rendering/RenderListItem.cpp:
795         (WebCore::RenderListItem::paint):
796         * rendering/RenderListItem.h:
797         * rendering/RenderListMarker.cpp:
798         (WebCore::RenderListMarker::paint):
799         * rendering/RenderListMarker.h:
800         * rendering/RenderObject.h:
801         * rendering/RenderReplaced.cpp:
802         (WebCore::RenderReplaced::paint):
803         * rendering/RenderReplaced.h:
804         * rendering/RenderReplica.cpp:
805         (WebCore::RenderReplica::paint):
806         * rendering/RenderReplica.h:
807         * rendering/RenderTable.cpp:
808         (WebCore::RenderTable::paint):
809         * rendering/RenderTable.h:
810         * rendering/RenderTableCell.cpp:
811         (WebCore::RenderTableCell::paint):
812         * rendering/RenderTableCell.h:
813         * rendering/RenderTableRow.cpp:
814         (WebCore::RenderTableRow::paint):
815         * rendering/RenderTableRow.h:
816         * rendering/RenderTableSection.cpp:
817         (WebCore::RenderTableSection::paint):
818         * rendering/RenderTableSection.h:
819         * rendering/RenderTextControlSingleLine.cpp:
820         (WebCore::RenderTextControlSingleLine::paint):
821         * rendering/RenderTextControlSingleLine.h:
822         * rendering/RenderTheme.h:
823         * rendering/RenderView.cpp:
824         (WebCore::RenderView::paint):
825         * rendering/RenderView.h:
826         * rendering/RenderWidget.cpp:
827         (WebCore::RenderWidget::paint):
828         * rendering/RenderWidget.h:
829         * rendering/mathml/RenderMathMLBlock.h:
830         * rendering/mathml/RenderMathMLFraction.h:
831         * rendering/mathml/RenderMathMLRoot.h:
832         * rendering/mathml/RenderMathMLSquareRoot.h:
833         * rendering/svg/RenderSVGContainer.h:
834         * rendering/svg/RenderSVGForeignObject.h:
835         * rendering/svg/RenderSVGHiddenContainer.h:
836         * rendering/svg/RenderSVGImage.h:
837         * rendering/svg/RenderSVGPath.h:
838         * rendering/svg/RenderSVGRoot.cpp:
839         (WebCore::RenderSVGRoot::paint):
840         * rendering/svg/RenderSVGRoot.h:
841         * rendering/svg/RenderSVGText.h:
842
843 2011-06-29  Jian Li  <jianli@chromium.org>
844
845         Reviewed by Kenneth Russell.
846
847         WebGL test failing on SL bots: fast/canvas/webgl/data-view-test.html 
848         https://bugs.webkit.org/show_bug.cgi?id=63151
849
850         The fix is to change to throw TypeError in custom JS/V8 bindings.
851
852         * bindings/js/JSDataViewCustom.cpp:
853         (WebCore::getDataViewMember):
854         (WebCore::setDataViewMember):
855         * bindings/v8/custom/V8DataViewCustom.cpp:
856         (WebCore::V8DataView::constructorCallback):
857         (WebCore::V8DataView::getInt8Callback):
858
859 2011-06-29  Luke Macpherson   <macpherson@chromium.org>
860
861         Reviewed by Darin Adler.
862
863         Convert uses of computeLengthIntForLength() to computeLength<Length>()
864         https://bugs.webkit.org/show_bug.cgi?id=63641
865
866         No new tests / refactoring only.
867
868         * css/CSSStyleSelector.cpp:
869         (WebCore::convertToLength):
870         (WebCore::CSSStyleSelector::applyProperty):
871         (WebCore::CSSStyleSelector::applyPageSizeProperty):
872         (WebCore::CSSStyleSelector::mmLength):
873         (WebCore::CSSStyleSelector::inchLength):
874         (WebCore::CSSStyleSelector::mapFillSize):
875         (WebCore::CSSStyleSelector::mapFillXPosition):
876         (WebCore::CSSStyleSelector::mapFillYPosition):
877
878 2011-06-29  Chris Rogers  <crogers@google.com>
879
880         Reviewed by Kenneth Russell.
881
882         Simplify AudioBufferSourceNode rendering
883         https://bugs.webkit.org/show_bug.cgi?id=63586
884
885         No new tests since this doesn't change API.
886
887         * webaudio/AudioBufferSourceNode.cpp:
888         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
889         (WebCore::AudioBufferSourceNode::process):
890         (WebCore::AudioBufferSourceNode::renderFromBuffer):
891         (WebCore::AudioBufferSourceNode::reset):
892         (WebCore::AudioBufferSourceNode::setBuffer):
893         (WebCore::AudioBufferSourceNode::noteOn):
894         (WebCore::AudioBufferSourceNode::noteGrainOn):
895         (WebCore::AudioBufferSourceNode::totalPitchRate):
896         * webaudio/AudioBufferSourceNode.h:
897
898 2011-06-29  Martin Robinson  <mrobinson@igalia.com>
899
900         Reviewed by Xan Lopez.
901
902         [Freetype] Many tests report ERROR: Failed to get glyph page zero.
903         https://bugs.webkit.org/show_bug.cgi?id=63498
904
905         Instead of conditionally instantiating the m_scaledFont member of FontPlatformData,
906         always instantiate it. For times when the size is 0 and the instantiation would lead
907         to a Cairo error, we use size 1 and just make operations which would fail conditional
908         on the m_size > 0.
909
910         No new tests. This change is covered by existing tests. We should
911         observe no errors on the bots after landing.
912
913         * platform/graphics/cairo/FontCairo.cpp:
914         (WebCore::Font::drawGlyphs): Instead of looking at whether or not there is
915         a scaled font to determine whether to draw, just look at the size.
916         * platform/graphics/freetype/FontPlatformData.h: Remove the m_font member.
917         * platform/graphics/freetype/FontPlatformDataFreeType.cpp: Always instantiate
918         a scaled font member and remove references to m_font. If we are instantiating
919         a scaled font for a 0 size font, instantiate a size 1 font, so that we can
920         still use Cairo to query font properties.
921         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
922         (WebCore::GlyphPage::fill): We can assume there is always a scaled font now.
923         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
924         (WebCore::SimpleFontData::platformInit): Ditto.
925         (WebCore::SimpleFontData::createScaledFontData): Ditto.
926         (WebCore::SimpleFontData::containsCharacters): Ditto.
927         (WebCore::SimpleFontData::platformWidthForGlyph): Ditto.
928
929 2011-06-29  Eric Carlson  <eric.carlson@apple.com>
930
931         Reviewed by Darin Adler.
932
933         Media element loads blocked by a resource load delegate do not generate an error event
934         https://bugs.webkit.org/show_bug.cgi?id=63558
935
936         Tests: media/media-blocked-by-beforeload.html
937                media/media-blocked-by-willsendrequest.html
938
939         * html/HTMLMediaElement.cpp:
940         (WebCore::HTMLMediaElement::selectMediaResource): Call mediaLoadingFailed instead of noneSupported
941             so all failures follow the same code path.
942         (WebCore::HTMLMediaElement::loadResource): Call mediaLoadingFailed when there is no frame, when 
943             the loader delegate rejects the url, or when MediaPlayer doesn't find a media engine that
944             supports the type.
945         (WebCore::HTMLMediaElement::selectNextSourceChild): Fix incorrect logging.
946         (WebCore::HTMLMediaElement::mediaLoadingFailed): Change name of parameter from "state" to
947             "error" to make its purpose obvious.
948
949         * platform/graphics/MediaPlayer.cpp:
950         (WebCore::MediaPlayer::load): Return a bool indicating whether or not the url was given to
951             a media engine.
952         (WebCore::MediaPlayer::loadWithNextMediaEngine): Add some logging.
953         * platform/graphics/MediaPlayer.h:
954
955 2011-06-29  Darin Adler  <darin@apple.com>
956
957         Reviewed by Anders Carlsson.
958
959         [WebKit2] Crash loading page that adds/removes frame in DOMContentLoaded/loaded
960         https://bugs.webkit.org/show_bug.cgi?id=63483
961
962         Test: fast/loader/create-frame-in-DOMContentLoaded.html
963
964         * loader/FrameLoader.cpp:
965         (WebCore::FrameLoader::init): Added an assertion.
966         (WebCore::FrameLoader::finishedLoadingDocument): Removed a non-helpful #if
967         statement. The rule that we do not call the client when creating the initial
968         empty document was nominally specific to Windows and Chromium but is needed
969         for all platforms.
970
971 2011-06-29  Emil A Eklund  <eae@chromium.org>
972
973         Reviewed by Darin Adler.
974
975         Switch hitTestColumns/Contents/Floats to to new layout types
976         https://bugs.webkit.org/show_bug.cgi?id=63589
977
978         Switch location and size methods for RenderBox over to the new layout unit abstraction.
979
980         No new tests, no functionality changes.
981
982         * rendering/ColumnInfo.h:
983         (WebCore::ColumnInfo::desiredColumnWidth):
984         (WebCore::ColumnInfo::setDesiredColumnWidth):
985         (WebCore::ColumnInfo::columnHeight):
986         (WebCore::ColumnInfo::setColumnCountAndHeight):
987         (WebCore::ColumnInfo::setColumnHeight):
988         (WebCore::ColumnInfo::updateMinimumColumnHeight):
989         (WebCore::ColumnInfo::minimumColumnHeight):
990         * rendering/RenderBlock.cpp:
991         (WebCore::RenderBlock::addOverflowFromChildren):
992         (WebCore::RenderBlock::paintColumnRules):
993         (WebCore::RenderBlock::paintColumnContents):
994         (WebCore::RenderBlock::hitTestFloats):
995         (WebCore::RenderBlock::hitTestColumns):
996         (WebCore::RenderBlock::hitTestContents):
997         (WebCore::RenderBlock::columnRectAt):
998         * rendering/RenderBlock.h:
999         (WebCore::RenderBlock::xPositionForFloatIncludingMargin):
1000         (WebCore::RenderBlock::yPositionForFloatIncludingMargin):
1001         * rendering/RenderLayer.cpp:
1002         (WebCore::RenderLayer::hitTestContents):
1003         * rendering/RenderLayer.h:
1004
1005 2011-06-29  Adrienne Walker  <enne@google.com>
1006
1007         Reviewed by James Robinson.
1008
1009         [chromium] Divide by zero in TilingData
1010         https://bugs.webkit.org/show_bug.cgi?id=63305
1011
1012         Add safety checks for empty layers.
1013
1014         * platform/graphics/chromium/LayerTilerChromium.cpp:
1015         (WebCore::LayerTilerChromium::prepareToUpdate):
1016         (WebCore::LayerTilerChromium::reset):
1017         (WebCore::LayerTilerChromium::updateRect):
1018
1019 2011-06-29  Dimitri Glazkov  <dglazkov@chromium.org>
1020
1021         Reviewed by Adam Barth.
1022
1023         Extract setShadowRoot function, harden it in preparation to be exposed to script.
1024         https://bugs.webkit.org/show_bug.cgi?id=63596
1025
1026         Refactoring, covered by existing tests.
1027
1028         * dom/Element.cpp:
1029         (WebCore::validateShadowRoot): Added.
1030         (WebCore::Element::setShadowRoot): Extracted from ensureShadowRoot.
1031         (WebCore::Element::ensureShadowRoot): Changed to use setShadowRoot.
1032         * dom/Element.h: Added decl.
1033
1034 2011-06-29  Vsevolod Vlasov  <vsevik@chromium.org>
1035
1036         Reviewed by Pavel Feldman.
1037
1038         Web Inspector: REGRESSION Resource revision fails to request content if it was not yet loaded for resource.
1039         https://bugs.webkit.org/show_bug.cgi?id=63631
1040
1041         Test: http/tests/inspector/network/network-request-revision-content.html
1042
1043         * inspector/front-end/Resource.js:
1044         (WebInspector.ResourceRevision.prototype.requestContent):
1045
1046 2011-06-29  Igor Oliveira  <igor.oliveira@openbossa.org>
1047
1048         Reviewed by Andreas Kling.
1049
1050         [Qt] GraphicsContext::clipToImageBuffer does not support scale transformation
1051         https://bugs.webkit.org/show_bug.cgi?id=63555
1052
1053         Scale alphaMask if GraphicsContext is scaled
1054
1055         * platform/graphics/qt/GraphicsContextQt.cpp:
1056         (WebCore::GraphicsContext::pushTransparencyLayerInternal):
1057         * platform/graphics/qt/ImageBufferQt.cpp:
1058         (WebCore::ImageBuffer::clip):
1059
1060 2011-06-29  Andrey Kosyakov  <caseq@chromium.org>
1061
1062         Reviewed by Pavel Feldman.
1063
1064         Web Inspector: backend needs to provide system-unique object ids, so these remain unique across navigation
1065         https://bugs.webkit.org/show_bug.cgi?id=62894
1066
1067         * inspector/InspectorController.cpp:
1068         (WebCore::InspectorController::setAgentProcessIdentifier):
1069         * inspector/InspectorController.h:
1070         * inspector/InspectorPageAgent.cpp:
1071         (WebCore::InspectorPageAgent::setAgentIdentifier):
1072         (WebCore::InspectorPageAgent::createIdentifier):
1073         (WebCore::InspectorPageAgent::frameForId):
1074         (WebCore::InspectorPageAgent::frameId):
1075         (WebCore::InspectorPageAgent::frameDestroyed):
1076         * inspector/InspectorPageAgent.h:
1077
1078 2011-06-29  Pavel Feldman  <pfeldman@google.com>
1079
1080         Reviewed by Yury Semikhatsky.
1081
1082         Web Inspector: create status bar buttons programmatically. Add "Inspect" button to all panels.
1083         https://bugs.webkit.org/show_bug.cgi?id=63450
1084
1085         Buttons should be created in code, not in HTML. Also making Inspect Element
1086         action available on all panels (as an experiment).
1087
1088         * inspector/front-end/ConsoleView.js:
1089         (WebInspector.ConsoleView.prototype.show):
1090         (WebInspector.ConsoleView.prototype.hide):
1091         * inspector/front-end/ElementsPanel.js:
1092         (WebInspector.ElementsPanel):
1093         (WebInspector.ElementsPanel.prototype.get statusBarItems):
1094         (WebInspector.ElementsPanel.prototype.updateFocusedNode):
1095         (WebInspector.ElementsPanel.prototype._setSearchingForNode):
1096         (WebInspector.ElementsPanel.prototype.toggleSearchingForNode):
1097         * inspector/front-end/inspector.css:
1098         (button.dock-status-bar-item.status-bar-item .glyph):
1099         (button.dock-status-bar-item.status-bar-item.toggled-on .glyph):
1100         (.console-status-bar-item .glyph):
1101         * inspector/front-end/inspector.html:
1102         * inspector/front-end/inspector.js:
1103         (WebInspector._createGlobalStatusBarItems):
1104         (WebInspector.set attached):
1105
1106 2011-06-29  Pavel Feldman  <pfeldman@google.com>
1107
1108         Reviewed by Yury Semikhatsky.
1109
1110         Web Inspector: tab crash after deleting trailing quote when editing attribute
1111         https://bugs.webkit.org/show_bug.cgi?id=63544
1112
1113         * inspector/InspectorDOMAgent.cpp:
1114         (WebCore::InspectorDOMAgent::setAttributesText):
1115         * inspector/front-end/ElementsTreeOutline.js:
1116         (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted.moveToNextAttributeIfNeeded):
1117         (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
1118
1119 2011-06-29  Vsevolod Vlasov  <vsevik@chromium.org>
1120
1121         Reviewed by Pavel Feldman.
1122
1123         Web Inspector: REGRESSION Inspector failing to load resource content after navigation. Safari.
1124         https://bugs.webkit.org/show_bug.cgi?id=63480
1125
1126         * inspector/front-end/NetworkManager.js:
1127         (WebInspector.NetworkDispatcher):
1128         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
1129
1130 2011-06-29  Mike West  <mkwst@chromium.org>
1131
1132         Reviewed by Pavel Feldman.
1133
1134         Web Inspector: Missing fields in HAR
1135         https://bugs.webkit.org/show_bug.cgi?id=58127
1136         
1137         Specifically, this patch adds:
1138         - entry.request.httpVersion
1139         - entry.request.headersSize
1140         - entry.request.bodySize
1141         - entry.response.httpVersion
1142         - entry.response.headersSize
1143         - entry.response.bodySize
1144         - entry.response.content.compression
1145         
1146         Tests: http/tests/inspector/resource-har-conversion.html
1147                http/tests/inspector/resource-har-headers.html
1148                http/tests/inspector/resource-parameters.html
1149                http/tests/inspector/network/network-size.html
1150
1151         * inspector/front-end/HAREntry.js:
1152         (WebInspector.HAREntry.prototype.build):
1153         (WebInspector.HAREntry.prototype._buildRequest):
1154         (WebInspector.HAREntry.prototype._buildResponse):
1155         (WebInspector.HAREntry.prototype._buildContent):
1156         (WebInspector.HAREntry.prototype._buildCookie):
1157         (WebInspector.HAREntry.prototype._interval):
1158         (WebInspector.HAREntry.prototype.get requestBodySize):
1159         (WebInspector.HAREntry.prototype.get responseBodySize):
1160         (WebInspector.HAREntry.prototype.get responseCompression):
1161         (WebInspector.HARLog.prototype.build):
1162         * inspector/front-end/Resource.js:
1163         (WebInspector.Resource.prototype.set requestHeaders):
1164         (WebInspector.Resource.prototype.get requestHeadersText):
1165         (WebInspector.Resource.prototype.set requestHeadersText):
1166         (WebInspector.Resource.prototype.get requestHeadersSize):
1167         (WebInspector.Resource.prototype.get requestHttpVersion):
1168         (WebInspector.Resource.prototype.set responseHeaders):
1169         (WebInspector.Resource.prototype.get responseHeadersText):
1170         (WebInspector.Resource.prototype.set responseHeadersText):
1171         (WebInspector.Resource.prototype.get responseHeadersSize):
1172         (WebInspector.Resource.prototype.get responseHttpVersion):
1173
1174 2011-06-29  Hayato Ito  <hayato@chromium.org>
1175
1176         Reviewed by Hajime Morita.
1177
1178         Make a shadow host transfer a focus to the first focusable element in the shadow root when its focus() is called.
1179         https://bugs.webkit.org/show_bug.cgi?id=62358.
1180
1181         This patch doesn't take an effect on the following elements to keep a compatibility.
1182         - <input>, <textarea>, <video> and <audio> elements
1183         We'll address these elements separately after re-targeting focus events
1184         (bug 61421) is implemented.
1185
1186         A shadow root's <content> is not considered in this patch.
1187         That should be addressed in another patch. See bug 63522.
1188
1189         Test: fast/dom/shadow/shadow-host-transfer-focus.html
1190
1191         * dom/Element.cpp:
1192         (WebCore::Element::focus):
1193         * page/FocusController.cpp:
1194         (WebCore::shadowRoot):
1195         (WebCore::isTreeScopeOwner):
1196         (WebCore::FocusController::transferFocusToElementInShadowRoot):
1197         (WebCore::hasCustomFocusLogic):
1198         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocumentOrShadowRoot):
1199         (WebCore::FocusController::advanceFocusInDocumentOrder):
1200         (WebCore::ownerOfTreeScope):
1201         (WebCore::FocusController::findFocusableNodeAcrossTreeScope):
1202         * page/FocusController.h:
1203
1204 2011-06-29  Ryan Sleevi  <rsleevi@chromium.org>
1205
1206         Reviewed by Dirk Schulze.
1207
1208         SVGRadialGradientElement::selfHasRelativeLengths() doesn't consider if cx() is relative
1209         https://bugs.webkit.org/show_bug.cgi?id=61600
1210
1211         Correct the logic for checking for relative lengths in a SVGRadialGradientElement to consider cx() in addition to cy()
1212         
1213         No new tests, as there is no way to currently test this. With the bug present, a side-effect is causing the
1214         expected/correct image to be rendered. This is because the cached SVG resource is getting invalided through a
1215         different path, forcing a repaint. The repaint takes into consideration the proper dimensions, hiding the bug.
1216
1217         * svg/SVGRadialGradientElement.cpp:
1218         (WebCore::SVGRadialGradientElement::selfHasRelativeLengths):
1219
1220 2011-06-28  Dirk Schulze  <krit@webkit.org>
1221
1222         Reviewed by Nikolas Zimmermann.
1223
1224         SVGAnimatedType should support SVGBoolean animation
1225         https://bugs.webkit.org/show_bug.cgi?id=63529
1226
1227         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
1228         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGBoolean.
1229         
1230         The new animator does not affect any behavior, since it was animated with SVGAnimatedString before. The new animator is still needed
1231         to support animVal and baseVal later.
1232
1233         Test: svg/animations/svgboolean-animation-1.html
1234
1235         * CMakeLists.txt: Add new file to build system.
1236         * GNUmakefile.list.am: Ditto.
1237         * WebCore.gypi: Ditto.
1238         * WebCore.pro: Ditto.
1239         * WebCore.xcodeproj/project.pbxproj: Ditto.
1240         * svg/SVGAllInOne.cpp: Ditto.
1241         * svg/SVGAnimateElement.cpp: Make use of AnimatedBoolean.
1242         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
1243         (WebCore::SVGAnimateElement::calculateAnimatedValue):
1244         (WebCore::SVGAnimateElement::calculateFromAndToValues):
1245         (WebCore::SVGAnimateElement::calculateFromAndByValues):
1246         (WebCore::SVGAnimateElement::resetToBaseValue):
1247         (WebCore::SVGAnimateElement::applyResultsToTarget):
1248         (WebCore::SVGAnimateElement::calculateDistance):
1249         * svg/SVGAnimatedBoolean.cpp: Added. New animator for SVGBoolean.
1250         (WebCore::SVGAnimatedBooleanAnimator::SVGAnimatedBooleanAnimator):
1251         (WebCore::SVGAnimatedBooleanAnimator::constructFromString):
1252         (WebCore::SVGAnimatedBooleanAnimator::calculateFromAndToValues):
1253         (WebCore::SVGAnimatedBooleanAnimator::calculateFromAndByValues):
1254         (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue):
1255         (WebCore::SVGAnimatedBooleanAnimator::calculateDistance):
1256         * svg/SVGAnimatedBoolean.h:
1257         (WebCore::SVGAnimatedBooleanAnimator::~SVGAnimatedBooleanAnimator):
1258         * svg/SVGAnimatedType.cpp: Use bool for SVGBoolean.
1259         (WebCore::SVGAnimatedType::~SVGAnimatedType):
1260         (WebCore::SVGAnimatedType::createBoolean):
1261         (WebCore::SVGAnimatedType::boolean):
1262         (WebCore::SVGAnimatedType::valueAsString):
1263         (WebCore::SVGAnimatedType::setValueAsString):
1264         * svg/SVGAnimatedType.h:
1265         * svg/SVGAnimatorFactory.h: New crate function for SVGAnimatedSVGBooleanAnimator.
1266         (WebCore::SVGAnimatorFactory::create):
1267
1268 2011-06-28  Dimitri Glazkov  <dglazkov@chromium.org>
1269
1270         Reviewed by Adam Barth.
1271
1272         Make applyAuthorSheets settable on ShadowRoot.
1273         https://bugs.webkit.org/show_bug.cgi?id=63599
1274
1275         Refactoring and adding not-yet used function, tests to follow when API lands.
1276
1277         * dom/ShadowRoot.cpp:
1278         (WebCore::ShadowRoot::ShadowRoot): Added initializer.
1279         (WebCore::ShadowRoot::applyAuthorSheets): Made to use member variable.
1280         (WebCore::ShadowRoot::setApplyAuthorSheets): Added.
1281         * dom/ShadowRoot.h: Tweaked, added decls.
1282
1283 2011-06-28  Ilya Sherman  <isherman@chromium.org>
1284
1285         Reviewed by Adam Barth.
1286
1287         form.autocomplete="off" does not work
1288         Rename the autoComplete() method for HTMLFormElement, HTMLFormControlElementWithState, and HTMLInputElement to shouldAutocomplete()
1289         Add the autocomplete attribute to HTMLFormElement.idl and HTMLInputElement.idl
1290         https://bugs.webkit.org/show_bug.cgi?id=35823
1291
1292         Test: fast/forms/autocomplete.html
1293
1294         * html/HTMLFormControlElement.cpp:
1295         (WebCore::HTMLFormControlElementWithState::shouldAutocomplete): Renamed from ::autoComplete()
1296         (WebCore::HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState): Update callsite.
1297         * html/HTMLFormControlElement.h:
1298         * html/HTMLFormElement.cpp:
1299         (WebCore::HTMLFormElement::~HTMLFormElement): Update callsite.
1300         (WebCore::HTMLFormElement::parseMappedAttribute): Update callsite.
1301         (WebCore::HTMLFormElement::documentDidBecomeActive): Update callsite.
1302         (WebCore::HTMLFormElement::willMoveToNewOwnerDocument): Update callsite.
1303         (WebCore::HTMLFormElement::didMoveToNewOwnerDocument): Update callsite.
1304         (WebCore::HTMLFormElement::shouldAutocomplete): Renamed from ::autoComplete()
1305         * html/HTMLFormElement.h:
1306         * html/HTMLFormElement.idl: Bind the autocomplete attribute to a JavaScript property.
1307         * html/HTMLInputElement.cpp:
1308         (WebCore::HTMLInputElement::shouldAutocomplete): Renamed from ::autoComplete()
1309         * html/HTMLInputElement.h:
1310         * html/HTMLInputElement.idl: Bind the autocomplete attribute to a JavaScript property.
1311         * WebCore.exp.in: Updated autoComplete() -> shouldAutocomplete()
1312
1313 2011-06-28  Dimitri Glazkov  <dglazkov@chromium.org>
1314
1315         Reviewed by Kent Tamura.
1316
1317         Store shadowPseudoId in ElementRareData.
1318         https://bugs.webkit.org/show_bug.cgi?id=63604
1319
1320         No new tests, because the code isn't yet used.
1321
1322         * css/CSSSelector.cpp:
1323         (WebCore::CSSSelector::isUnknownPseudoType): Added convenience helper.
1324         * css/CSSSelector.h: Added decl.
1325         * dom/Element.cpp:
1326         (WebCore::Element::shadowPseudoId): Changed to use ElementRareData.
1327         (WebCore::Element::setShadowPseudoId): Ditto.
1328         * dom/Element.h: Added decls.
1329         * dom/ElementRareData.h: Added a member to keep shadowPseudoId.
1330
1331 2011-06-28  Kenichi Ishibashi  <bashi@chromium.org>
1332
1333         Reviewed by Tony Chang.
1334
1335         [Chromium] Remove dependencies on harfbuzz from FontPlatformDataLinux and FontLinux
1336         https://bugs.webkit.org/show_bug.cgi?id=62530
1337
1338         - Moved codes of FontLinux which depend on harfbuzz APIs to ComplexTextController.  Removed Some methods of ComplexTextController(advances() and logClusters()) since they are no longer needed.
1339         - Moved RefCountedHarfbuzzFace from FontPlatformDataLinux to HarfbuzzSkia and renamed it to HarfbuzzFace.
1340
1341         No new tests because there is no behavior change (The existing tests should cover the changes).
1342
1343         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
1344         (WebCore::ComplexTextController::ComplexTextController): Added arguments so eliminating setter invocations.
1345         (WebCore::ComplexTextController::setupForRTL): Added.
1346         (WebCore::ComplexTextController::setupFontForScriptRun): Adopt the change of HarfbuzzFace class.
1347         (WebCore::ComplexTextController::setGlyphPositions): Use m_item.log_clusters instead of removed method.
1348         (WebCore::ComplexTextController::glyphIndexForXPositionInScriptRun): Added.
1349         (WebCore::ComplexTextController::offsetForPosition): Ditto.
1350         (WebCore::ComplexTextController::selectionRect): Ditto.
1351         * platform/graphics/chromium/ComplexTextControllerLinux.h:
1352         (WebCore::ComplexTextController::width):
1353         * platform/graphics/chromium/FontLinux.cpp: Removed truncateFixedPointToInteger().
1354         (WebCore::Font::drawComplexText): Removed setter invocations of ComplexTextController.
1355         (WebCore::Font::floatWidthForComplexText): Ditto.
1356         (WebCore::Font::offsetForPositionForComplexText): Moved harfbuzz dependent code to ComplexTextController.
1357         (WebCore::Font::selectionRectForComplexText): Ditto.
1358         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
1359         (WebCore::FontPlatformData::harfbuzzFace): Wrapped up HB_FaceRec in HarfbuzzFace class.
1360         * platform/graphics/chromium/FontPlatformDataLinux.h: Moved RefCountedHarfbuzzFace class and renamed to HarfbuzzFace.
1361         * platform/graphics/chromium/HarfbuzzSkia.cpp:
1362         (WebCore::allocHarfbuzzFont): Moved from ComplexTextControllerLinux.cpp.
1363         (WebCore::HarfbuzzFace::HarfbuzzFace): Added.
1364         (WebCore::HarfbuzzFace::~HarfbuzzFace): Added.
1365         * platform/graphics/chromium/HarfbuzzSkia.h:
1366         (WebCore::HarfbuzzFace::create): Added.
1367         (WebCore::HarfbuzzFace::face): Added.
1368         * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp:
1369         (WebCore::substituteWithVerticalGlyphs): Adopt  the change of HarfbuzzFace class.
1370
1371 2011-06-28  Roland Steiner  <rolandsteiner@chromium.org>
1372
1373         Reviewed by Eric Seidel.
1374
1375         Bug 55930 - (CVE-2011-1440) Incorrect handling of 'display:' property within nested <ruby> tags
1376         https://bugs.webkit.org/show_bug.cgi?id=55930
1377
1378         Don't set style type BEFORE/AFTER on anonymous wrapper block.
1379         Rather, check style type on generated wrapped child.
1380
1381         Tests: fast/ruby/generated-after-counter-doesnt-crash.html
1382                fast/ruby/generated-before-and-after-counter-doesnt-crash.html
1383                fast/ruby/generated-before-counter-doesnt-crash.html
1384
1385         * rendering/RenderRuby.cpp:
1386         (WebCore::isAnonymousRubyInlineBlock):
1387         (WebCore::isRubyBeforeBlock):
1388         (WebCore::isRubyAfterBlock):
1389         (WebCore::rubyBeforeBlock):
1390         (WebCore::rubyAfterBlock):
1391         (WebCore::createAnonymousRubyInlineBlock):
1392         (WebCore::RenderRubyAsInline::addChild):
1393         (WebCore::RenderRubyAsBlock::addChild):
1394
1395 2011-06-28  Emil A Eklund  <eae@chromium.org>
1396
1397         Reviewed by Eric Seidel.
1398
1399         Switch RenderLayer position/size to to new layout types
1400         https://bugs.webkit.org/show_bug.cgi?id=63578
1401
1402         Switch location and size methods for RenderLayer over to the new layout unit abstraction.
1403         
1404         No new tests, no functionality changes.
1405
1406         * rendering/RenderLayer.cpp:
1407         (WebCore::RenderLayer::resize):
1408         (WebCore::RenderLayer::visibleHeight):
1409         (WebCore::RenderLayer::visibleWidth):
1410         (WebCore::RenderLayer::offsetFromResizeCorner):
1411         * rendering/RenderLayer.h:
1412         (WebCore::RenderLayer::location):
1413         (WebCore::RenderLayer::setLocation):
1414         (WebCore::RenderLayer::size):
1415         (WebCore::RenderLayer::setSize):
1416         (WebCore::RenderLayer::rect):
1417         (WebCore::RenderLayer::renderBoxLocation):
1418         (WebCore::RenderLayer::renderBoxX):
1419         (WebCore::RenderLayer::renderBoxY):
1420         * rendering/RenderListBox.cpp:
1421         (WebCore::RenderListBox::visibleHeight):
1422         (WebCore::RenderListBox::visibleWidth):
1423         * rendering/RenderListBox.h:
1424
1425 2011-06-28  Levi Weintraub  <leviw@chromium.org>
1426
1427         Reviewed by Eric Seidel.
1428
1429         Switch paintObject and paintReplaced to new layout types
1430         https://bugs.webkit.org/show_bug.cgi?id=63585
1431
1432         Switching paintObject and paintReplaced to layout type abstractions from more integral types.
1433
1434         No new tests as this is just moving to an abstraction.
1435
1436         * rendering/RenderBlock.cpp:
1437         (WebCore::RenderBlock::paintObject):
1438         * rendering/RenderBlock.h:
1439         * rendering/RenderBox.h:
1440         (WebCore::RenderBox::paintObject):
1441         * rendering/RenderEmbeddedObject.cpp:
1442         (WebCore::RenderEmbeddedObject::paintReplaced):
1443         * rendering/RenderEmbeddedObject.h:
1444         * rendering/RenderFileUploadControl.cpp:
1445         (WebCore::RenderFileUploadControl::paintObject):
1446         * rendering/RenderFileUploadControl.h:
1447         * rendering/RenderHTMLCanvas.cpp:
1448         (WebCore::RenderHTMLCanvas::paintReplaced):
1449         * rendering/RenderHTMLCanvas.h:
1450         * rendering/RenderImage.cpp:
1451         (WebCore::RenderImage::paintReplaced):
1452         * rendering/RenderImage.h:
1453         * rendering/RenderListBox.cpp:
1454         (WebCore::RenderListBox::paintObject):
1455         * rendering/RenderListBox.h:
1456         * rendering/RenderReplaced.h:
1457         (WebCore::RenderReplaced::paintReplaced):
1458         * rendering/RenderTable.cpp:
1459         (WebCore::RenderTable::paintObject):
1460         * rendering/RenderTable.h:
1461         * rendering/RenderTableSection.cpp:
1462         (WebCore::RenderTableSection::paintObject):
1463         * rendering/RenderTableSection.h:
1464         * rendering/RenderTextControl.cpp:
1465         (WebCore::RenderTextControl::paintObject):
1466         * rendering/RenderTextControl.h:
1467         * rendering/RenderVideo.cpp:
1468         (WebCore::RenderVideo::paintReplaced):
1469         * rendering/RenderVideo.h:
1470
1471 2011-06-28  Adam Langley  <agl@chromium.org>
1472
1473         Reviewed by Adam Barth.
1474
1475         Skip cache validation on back with HTTPS.
1476         https://bugs.webkit.org/show_bug.cgi?id=63537
1477
1478         For back navigations over HTTP, WebKit sets a flag to use cached data
1479         irrespective of whether it has expired. However, this isn't currently
1480         done for HTTPS.
1481
1482         The logic in question was added in
1483         https://bugs.webkit.org/show_bug.cgi?id=33993 and appears to have been
1484         precautionary. However, both Firefox and IE will use this back
1485         navigation trick for HTTPS as well and so we should probably behave
1486         likewise.
1487
1488         Test: http/tests/cache/history-only-cached-subresource-loads-max-age-https.html
1489
1490         * loader/FrameLoader.cpp:
1491         (WebCore::FrameLoader::addExtraFieldsToRequest):
1492
1493 2011-06-28  Dimitri Glazkov  <dglazkov@chromium.org>
1494
1495         Reviewed by Adam Barth.
1496
1497         Remove errant isShadowBoundary on ShadowRoot.
1498         https://bugs.webkit.org/show_bug.cgi?id=63588
1499
1500         Removing dead code, no tests for that.
1501
1502         * dom/ShadowRoot.h: Removed a function that's no longer used.
1503
1504 2011-06-28  Zeng Huiqing  <huiqing.zeng@intel.com>
1505
1506         Reviewed by Kenneth Russell.
1507
1508         [chromium]Optimize GraphicsLayerChromium::setChildren()
1509         https://bugs.webkit.org/show_bug.cgi?id=62837
1510
1511         No new tests. 
1512
1513         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1514         (WebCore::GraphicsLayerChromium::GraphicsLayerChromium):
1515         (WebCore::GraphicsLayerChromium::setChildren):
1516         (WebCore::GraphicsLayerChromium::addChild):
1517         * platform/graphics/chromium/GraphicsLayerChromium.h:
1518
1519 2011-06-28  Levi Weintraub  <leviw@chromium.org>
1520
1521         Reviewed by Eric Seidel.
1522
1523         Switch paintBoxShadow and paintBoxDecorations to new layout types
1524         https://bugs.webkit.org/show_bug.cgi?id=63577
1525
1526         Switching paintBoxShadow and paintBoxDecorations to layout type abstraction 
1527         from more integral types.
1528
1529         No new tests as this is just moving to an abstraction.
1530
1531         * rendering/InlineFlowBox.cpp:
1532         (WebCore::InlineFlowBox::paintBoxShadow):
1533         (WebCore::InlineFlowBox::paintBoxDecorations):
1534         * rendering/InlineFlowBox.h:
1535         * rendering/RenderBox.cpp:
1536         (WebCore::RenderBox::paintBoxDecorations):
1537         * rendering/RenderBox.h:
1538         * rendering/RenderBoxModelObject.cpp:
1539         (WebCore::RenderBoxModelObject::paintBoxShadow):
1540         * rendering/RenderBoxModelObject.h:
1541         * rendering/RenderFieldset.cpp:
1542         (WebCore::RenderFieldset::paintBoxDecorations):
1543         * rendering/RenderFieldset.h:
1544         * rendering/RenderTable.cpp:
1545         (WebCore::RenderTable::paintBoxDecorations):
1546         * rendering/RenderTable.h:
1547         * rendering/RenderTableCell.cpp:
1548         (WebCore::RenderTableCell::paintBoxDecorations):
1549         * rendering/RenderTableCell.h:
1550         * rendering/RenderView.cpp:
1551         (WebCore::RenderView::paintBoxDecorations):
1552         * rendering/RenderView.h:
1553
1554 2011-06-28  Emil A Eklund  <eae@chromium.org>
1555
1556         Reviewed by Eric Seidel.
1557
1558         Switch RenderBox position/size to to new layout types
1559         https://bugs.webkit.org/show_bug.cgi?id=63571
1560
1561         Switch location and size methods for RenderBox over to the new layout unit abstraction.
1562
1563         No new tests, no functionality changes.
1564
1565         * rendering/RenderBox.cpp:
1566         * rendering/RenderBox.h:
1567         * rendering/RenderBoxModelObject.cpp:
1568         * rendering/RenderBoxModelObject.h:
1569         * rendering/RenderInline.cpp:
1570         * rendering/RenderInline.h:
1571         * rendering/RenderVideo.cpp:
1572         * rendering/RenderVideo.h:
1573
1574 2011-06-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1575
1576         Unreviewed, rolling out r89968.
1577         http://trac.webkit.org/changeset/89968
1578         https://bugs.webkit.org/show_bug.cgi?id=63581
1579
1580         Broke chromium windows compile (Requested by jamesr on
1581         #webkit).
1582
1583         * WebCore.gyp/WebCore.gyp:
1584         * loader/cache/CachedFont.cpp:
1585         * platform/chromium/DragImageRef.h:
1586         * platform/graphics/FloatPoint.h:
1587         * platform/graphics/FloatRect.h:
1588         * platform/graphics/FloatSize.h:
1589         * platform/graphics/FontPlatformData.h:
1590         (WebCore::FontPlatformData::hash):
1591         * platform/graphics/GlyphBuffer.h:
1592         (WebCore::GlyphBuffer::advanceAt):
1593         (WebCore::GlyphBuffer::add):
1594         (WebCore::GlyphBuffer::expandLastAdvance):
1595         * platform/graphics/IntPoint.h:
1596         * platform/graphics/IntRect.h:
1597         * platform/graphics/IntSize.h:
1598         * platform/graphics/SimpleFontData.h:
1599         * platform/graphics/cg/FloatPointCG.cpp:
1600         * platform/graphics/cg/FloatRectCG.cpp:
1601         * platform/graphics/cg/FloatSizeCG.cpp:
1602         * platform/graphics/cg/IntPointCG.cpp:
1603         * platform/graphics/cg/IntRectCG.cpp:
1604         * platform/graphics/cg/IntSizeCG.cpp:
1605         * platform/graphics/mac/FontCustomPlatformData.cpp:
1606         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1607         (WebCore::createFontCustomPlatformData):
1608         * platform/graphics/mac/FontCustomPlatformData.h:
1609         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1610
1611 2011-06-28  Levi Weintraub  <leviw@chromium.org>
1612
1613         Reviewed by Eric Seidel.
1614
1615         Switch PaintMask* to new layout types
1616         https://bugs.webkit.org/show_bug.cgi?id=63576
1617
1618         Switching paintMask* to layout type abstraction from more integral types.
1619
1620         No new tests as this is just moving to an abstraction.
1621
1622         * rendering/InlineFlowBox.cpp:
1623         (WebCore::InlineFlowBox::paintMask):
1624         * rendering/InlineFlowBox.h:
1625         * rendering/RenderBox.cpp:
1626         (WebCore::RenderBox::paintMask):
1627         (WebCore::RenderBox::paintMaskImages):
1628         * rendering/RenderBox.h:
1629         * rendering/RenderFieldset.cpp:
1630         (WebCore::RenderFieldset::paintMask):
1631         * rendering/RenderFieldset.h:
1632         * rendering/RenderTable.cpp:
1633         (WebCore::RenderTable::paintMask):
1634         * rendering/RenderTable.h:
1635         * rendering/RenderTableCell.cpp:
1636         (WebCore::RenderTableCell::paintMask):
1637         * rendering/RenderTableCell.h:
1638
1639 2011-06-28  Levi Weintraub  <leviw@chromium.org>
1640
1641         Reviewed by Eric Seidel.
1642
1643         Switch paintFillLayer* to new layout types
1644         https://bugs.webkit.org/show_bug.cgi?id=63570
1645
1646         Switching painFillLayer* to layout type abstraction from more integral types.
1647
1648         No new tests as this is just moving to an abstraction.
1649
1650         * rendering/InlineFlowBox.cpp:
1651         (WebCore::InlineFlowBox::paintFillLayers):
1652         (WebCore::InlineFlowBox::paintFillLayer):
1653         * rendering/InlineFlowBox.h:
1654         * rendering/RenderBox.cpp:
1655         (WebCore::RenderBox::paintFillLayers):
1656         (WebCore::RenderBox::paintFillLayer):
1657         * rendering/RenderBox.h:
1658         * rendering/RenderBoxModelObject.cpp:
1659         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1660         * rendering/RenderBoxModelObject.h:
1661         * rendering/RenderObject.h:
1662
1663 2011-06-28  Luke Macpherson   <macpherson@chromium.org>
1664
1665         Reviewed by Eric Seidel.
1666
1667         Use appropriate macro for CSSPropertyWebkitAppearance in CSSStyleSelector::applyProperty()
1668         https://bugs.webkit.org/show_bug.cgi?id=63197
1669
1670         No new tests / no functionality changed.
1671
1672         * css/CSSStyleSelector.cpp:
1673         (WebCore::CSSStyleSelector::applyProperty):
1674         Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro and delete duplicate code.
1675
1676 2011-06-28  Cary Clark  <caryclark@google.com>
1677
1678         Reviewed by James Robinson.
1679
1680         Use Skia if Skia on Mac Chrome is enabled
1681         https://bugs.webkit.org/show_bug.cgi?id=62999
1682
1683         No new tests. This does not affect existing
1684         functionality.
1685
1686         * WebCore.gyp/WebCore.gyp:
1687         Include Skia and related files and exclude CG
1688         and related files when building Chromium for Skia
1689         on the Mac.
1690
1691         * loader/cache/CachedFont.cpp:
1692         Rename CHROME to CHROMIUM.
1693
1694         * platform/chromium/DragImageRef.h:
1695         * platform/graphics/FloatPoint.h:
1696         * platform/graphics/FloatRect.h:
1697         * platform/graphics/FloatSize.h:
1698         * platform/graphics/FontPlatformData.h:
1699         (WebCore::FontPlatformData::hash):
1700         * platform/graphics/GlyphBuffer.h:
1701         (WebCore::GlyphBuffer::advanceAt):
1702         (WebCore::GlyphBuffer::add):
1703         (WebCore::GlyphBuffer::expandLastAdvance):
1704         * platform/graphics/IntPoint.h:
1705         * platform/graphics/IntRect.h:
1706         * platform/graphics/IntSize.h:
1707         * platform/graphics/SimpleFontData.h:
1708         * platform/graphics/cg/FloatPointCG.cpp:
1709         * platform/graphics/cg/FloatRectCG.cpp:
1710         * platform/graphics/cg/FloatSizeCG.cpp:
1711         * platform/graphics/cg/IntPointCG.cpp:
1712         * platform/graphics/cg/IntRectCG.cpp:
1713         * platform/graphics/cg/IntSizeCG.cpp:
1714         * platform/graphics/mac/FontCustomPlatformData.cpp:
1715         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1716         (WebCore::createFontCustomPlatformData):
1717         * platform/graphics/mac/FontCustomPlatformData.h:
1718         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1719         Ditto.
1720
1721 2011-06-28  Ryosuke Niwa  <rniwa@webkit.org>
1722
1723         Reviewed by Darin Adler.
1724
1725         Stop instantiating Position with PositionIsOffsetInAnchor in various files
1726         https://bugs.webkit.org/show_bug.cgi?id=63384
1727
1728         Refactoring.
1729
1730         Removed many if conditions that compared the anchor type to Position::PositionIsOffsetInAnchor
1731         because there were also checking that containerNode is a text node.
1732
1733         Also added Position::containerText() to avoid manually casting containerNode().
1734
1735         * dom/Position.cpp:
1736         (WebCore::Position::Position): Added an assertion to ensure BeforeChildren/AfterChildren
1737         anchor type won't be used for a node whose contents is ignored by editing.
1738         (WebCore::Position::containerText): Added.
1739         * dom/Position.h:
1740         * editing/ApplyBlockElementCommand.cpp:
1741         (WebCore::isNewLineAtPosition): Removed a redundant comparison of anchor type.
1742         (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded): Since containerNode
1743         is always a text node when renderStyleOfEnclosingTextNode returns a render style, use new Position
1744         constructor that takes Text* and offset.
1745         (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded): Removed redundant
1746         comparison of anchor type and use new Position constructor that takes Text* and offset.
1747         * editing/ApplyStyleCommand.cpp:
1748         (WebCore::ApplyStyleCommand::splitTextAtStart): Replaced an assertion that compared anchor type by
1749         an assertion that the container node is a text node; use new constructor.
1750         (WebCore::ApplyStyleCommand::splitTextAtEnd): Ditto; also added early exits in the case script
1751         modified DOM.
1752         (WebCore::ApplyStyleCommand::splitTextElementAtStart): Ditto.
1753         (WebCore::ApplyStyleCommand::splitTextElementAtEnd): Ditto.
1754         (WebCore::ApplyStyleCommand::joinChildTextNodes): Use new constructor.
1755         * editing/CompositeEditCommand.cpp:
1756         (WebCore::Editor::replaceSelectedTextInNode): Calls containerText instead of manually casting containerNode.
1757         * editing/Editor.cpp:
1758         (WebCore::Editor::canDeleteRange): Call Range::startPosition instead of manually instantiating Position
1759         by calling startContainer and startOffset.
1760         * editing/FrameSelection.cpp:
1761         (WebCore::FrameSelection::setSelectedRange): Ditto.
1762         * editing/InsertTextCommand.cpp:
1763         (WebCore::InsertTextCommand::input): Calls containerText instead of manually casting containerNode.
1764         * editing/ReplaceSelectionCommand.cpp:
1765         (WebCore::ReplaceSelectionCommand::doApply): Calls containerText instead of manually casting containerNode.
1766         * editing/VisiblePosition.cpp:
1767         (WebCore::VisiblePosition::characterAfter): Removed a redundant anchor type comparison.
1768         (WebCore::startVisiblePosition): Call Range::startPosition instead of startContainer and startOffset.
1769         (WebCore::endVisiblePosition): Call Range::endPosition instead of endContainer and endOffset.
1770         * editing/htmlediting.cpp:
1771         (WebCore::firstInSpecialElement): Call containerNode() to address <rdar://problem/5027702>.
1772         (WebCore::lastInSpecialElement): Ditto; use new constructor.
1773         * editing/visible_units.cpp:
1774         (WebCore::endPositionForLine): Use new constructor.
1775         (WebCore::startOfParagraph): Ditto.
1776         (WebCore::endOfParagraph): Ditto.
1777
1778 2011-06-28  Rob Buis  <rbuis@rim.com>
1779
1780         Reviewed by Nikolas Zimmermann.
1781
1782         SVG1.1SE test text-tref-03-b.svg fails
1783         https://bugs.webkit.org/show_bug.cgi?id=63390
1784
1785         Support tref on forward referenced content by listening to DOMSubtreeModified events. This also
1786         allows updating after modifications in the referenced content subtree.
1787
1788         Tests: svg/W3C-SVG-1.1-SE/text-tref-03-b.svg
1789                svg/custom/text-tref-03-b-change-href-dom.svg
1790                svg/custom/text-tref-03-b-change-href.svg
1791                svg/custom/text-tref-03-b-dynamic.svg
1792                svg/custom/text-tref-03-b-dynamic2.svg
1793                svg/custom/text-tref-03-b-referenced-element-removal.svg
1794                svg/custom/text-tref-03-b-tref-removal.svg
1795
1796         * svg/SVGTRefElement.cpp:
1797         (WebCore::SubtreeModificationEventListener::create):
1798         (WebCore::SubtreeModificationEventListener::cast):
1799         (WebCore::SubtreeModificationEventListener::removeFromTarget):
1800         (WebCore::SubtreeModificationEventListener::SubtreeModificationEventListener):
1801         (WebCore::SubtreeModificationEventListener::operator==):
1802         (WebCore::SubtreeModificationEventListener::handleEvent):
1803         (WebCore::SVGTRefElement::updateReferencedText):
1804         (WebCore::SVGTRefElement::parseMappedAttribute):
1805         (WebCore::SVGTRefElement::svgAttributeChanged):
1806         (WebCore::SVGTRefElement::buildPendingResource):
1807         (WebCore::SVGTRefElement::removedFromDocument):
1808         * svg/SVGTRefElement.h:
1809
1810 2011-06-28  Abhishek Arya  <inferno@chromium.org>
1811
1812         Reviewed by Anders Carlsson.
1813
1814         Split the string creation into a local (while creating text runs)
1815         so that it is not destroyed prematurely.
1816         https://bugs.webkit.org/show_bug.cgi?id=63543
1817
1818         Run fast/forms/text-control-intrinsic-widths.html under valgrind/ASAN.       
1819         * rendering/RenderFileUploadControl.cpp:
1820         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
1821         this one is just done for caution, in case, we don't do the same
1822         mistake when adding legacy rounding hacks option.
1823         * rendering/RenderTextControl.cpp:
1824         (WebCore::RenderTextControl::getAvgCharWidth):
1825
1826 2011-06-28  Greg Simon  <gregsimon@chromium.org>
1827
1828         Reviewed by Dimitri Glazkov.
1829
1830         Migrate SQLite backing store to LevelDB backing store for Indexeddb.
1831         https://bugs.webkit.org/show_bug.cgi?id=62780
1832
1833         * storage/IDBFactoryBackendImpl.cpp:
1834         (WebCore::computeFileIdentifier):
1835         (WebCore::computeUniqueIdentifier):
1836         (WebCore::IDBFactoryBackendImpl::open):
1837         (WebCore::migrateObjectStores):
1838         (WebCore::IDBFactoryBackendImpl::migrateFromSQLiteToLevelDB):
1839         * storage/IDBLevelDBBackingStore.cpp:
1840         (WebCore::IDBLevelDBBackingStore::backingStoreExists):
1841         * storage/IDBLevelDBBackingStore.h:
1842         * storage/IDBObjectStoreBackendImpl.cpp:
1843         (WebCore::IDBObjectStoreBackendImpl::populateIndex):
1844         * storage/IDBObjectStoreBackendImpl.h:
1845         * storage/IDBSQLiteBackingStore.cpp:
1846         (WebCore::IDBSQLiteBackingStore::backingStoreExists):
1847         * storage/IDBSQLiteBackingStore.h:
1848
1849 2011-06-28  Levi Weintraub  <leviw@chromium.org>
1850
1851         Reviewed by Darin Adler.
1852
1853         Create intermediate classes as a path towards getting off of pixel offsets
1854         https://bugs.webkit.org/show_bug.cgi?id=61896
1855
1856         Creating three intermediate typedefs to aid in moving layout and hit testing from integers
1857         to floats. We'll transition the render tree over to these intermediate types and add
1858         infrastructure to support the new types behind USE(FLOAT_LAYOUT_OFFSETS). This allows the ultimate
1859         changeover to be easier.
1860
1861         Switching LayoutState over to this abstraction to verify it works correctly.
1862
1863         No new tests since this is creating a new abstraction, not changing current behavior.
1864
1865         * GNUmakefile.list.am:
1866         * WebCore.gypi:
1867         * WebCore.pro:
1868         * WebCore.vcproj/WebCore.vcproj:
1869         * WebCore.xcodeproj/project.pbxproj:
1870         * rendering/LayoutState.cpp:
1871         (WebCore::LayoutState::LayoutState):
1872         (WebCore::LayoutState::pageLogicalOffset):
1873         (WebCore::LayoutState::addForcedColumnBreak):
1874         * rendering/LayoutState.h:
1875         * rendering/LayoutTypes.h: Added.
1876
1877 2011-06-28  Jeff Miller  <jeffm@apple.com>
1878
1879         Add fullscreen.css and fullscreenQuickTime.css to the WebCore Visual Studio project for convenience.
1880         Looks like Visual Studio also re-sorted one more file since my last checkin.
1881
1882         * WebCore.vcproj/WebCore.vcproj:
1883
1884 2011-06-28  Jeff Miller  <jeffm@apple.com>
1885
1886         Re-sort the WebCore project with Visual Studio after recent changes that I assume were done by manually editing the XML.
1887
1888         * WebCore.vcproj/WebCore.vcproj:
1889
1890 2011-06-28  Joone Hur  <joone.hur@collabora.co.uk>
1891
1892         Reviewed by Martin Robinson.
1893
1894         [GTK] Rename 3D transforms to 3D rendering
1895         https://bugs.webkit.org/show_bug.cgi?id=63508
1896
1897         This patch allows to include ENABLE_3D_RENDERING to build WebKitGtk+.
1898
1899         * GNUmakefile.am: Add ENABLE_3D_RENDERING
1900
1901 2011-06-22  Pavel Podivilov  <podivilov@chromium.org>
1902
1903         Reviewed by Yury Semikhatsky.
1904
1905         Web Inspector: use column numbers when linking to script location in timeline and console.
1906         https://bugs.webkit.org/show_bug.cgi?id=63126
1907
1908         * inspector/front-end/ConsoleView.js:
1909         (WebInspector.ConsoleMessage.prototype._populateStackTraceTreeElement):
1910         * inspector/front-end/TimelinePanel.js:
1911         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
1912         (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace):
1913
1914 2011-06-28  Joone Hur  <joone.hur@collabora.co.uk>
1915
1916         Reviewed by Martin Robinson.
1917
1918         [GTK] Allow to build WebKitGtk+ with accelerated compositing
1919         https://bugs.webkit.org/show_bug.cgi?id=63404
1920
1921         WebKitGtk+ needs to implement accelerated compositing for running CSS3 3D transforms 
1922         and animation through GPU acceleration. We could implement GraphicsLayer using Clutter.
1923
1924         * GNUmakefile.list.am:
1925         * platform/graphics/clutter/GraphicsLayerClutter.cpp: Added.
1926         (WebCore::GraphicsLayer::create): Not implemented yet.
1927         (WebCore::GraphicsLayerClutter::GraphicsLayerClutter):
1928         (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter):
1929         (WebCore::GraphicsLayerClutter::setNeedsDisplay): Ditto.
1930         (WebCore::GraphicsLayerClutter::setNeedsDisplayInRect): Ditto.
1931         * platform/graphics/clutter/GraphicsLayerClutter.h: Added.
1932
1933 2011-06-28  Dan Bernstein  <mitz@apple.com>
1934
1935         Reviewed by Darin Adler.
1936
1937         REGRESSION (r89733): fast/text/zero-font-size.html is failing on Leopard
1938         https://bugs.webkit.org/show_bug.cgi?id=63512
1939
1940         * platform/graphics/mac/SimpleFontDataMac.mm:
1941         (WebCore::SimpleFontData::platformWidthForGlyph): Initialize the advance local variable, because
1942         on Leopard wkGetGlyphTransformedAdvances can return successfully yet not update the variable when
1943         the font size is 0. Presumably, r89733 exposed this by changing the values put on the stack just
1944         before this function is called.
1945
1946 2011-06-27  Alexander Pavlov  <apavlov@chromium.org>
1947
1948         Reviewed by Pavel Feldman.
1949
1950         Web Inspector: Change the inspector model API and backend to allow CSS pseudoclass inspection
1951         https://bugs.webkit.org/show_bug.cgi?id=63446
1952
1953         * inspector/Inspector.json:
1954         * inspector/InspectorCSSAgent.cpp:
1955         (WebCore::computePseudoClassMask):
1956         (WebCore::InspectorCSSAgent::getStylesForNode):
1957         * inspector/InspectorCSSAgent.h:
1958         * inspector/front-end/AuditRules.js:
1959         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles):
1960         * inspector/front-end/CSSStyleModel.js:
1961         (WebInspector.CSSStyleModel.prototype.getStylesAsync):
1962         * inspector/front-end/StylesSidebarPane.js:
1963         (WebInspector.StylesSidebarPane.prototype.update):
1964
1965 2011-06-28  Kent Tamura  <tkent@chromium.org>
1966
1967         Fix a build error on Mac by r89907.
1968
1969         * svg/animation/SVGSMILElement.cpp:
1970         (WebCore::SVGSMILElement::endListChanged):
1971
1972 2011-06-27  Alexander Pavlov  <apavlov@chromium.org>
1973
1974         Reviewed by Kent Tamura.
1975
1976         [Chromium] SELECT or autofill popup is trimmed by screen edge on Windows
1977         https://bugs.webkit.org/show_bug.cgi?id=63438
1978
1979         If the popup is calculated to be trimmed by a screen edge, an attempt is made
1980         to alter its vertical edge alignment (set to the right edge for LTR or to the left edge for RTL)
1981         to see if the trimmed portion becomes smaller than that with the original layout.
1982         The change involves remembering the original frameRect for the popup and restoring it in refresh().
1983         This is due to the fact that the frameRect originally set in showInRect() is overwritten
1984         by layoutAndGetRTLOffset(), which breaks the originally requested popup container layout metrics.
1985         The max width is reset on every layoutAndCalculateWidgetRect(), as it can be constrained by the screen edge,
1986         and thus should be re-checked every time the popup is displayed, in case the browser window has been moved.
1987
1988         Tests: manual-tests/popup-width-restriction-within-screen.html partly covers the fix (should not regress).
1989         Other than that, there is no way to unit-test the platform-specific native code.
1990
1991         * platform/chromium/PopupMenuChromium.cpp:
1992         (WebCore::PopupListBox::setMaxWidth): Added. Avoid duplicate popup content layouts (in contrast with setMaxWidthAndLayout()).
1993         (WebCore::PopupListBox::PopupListBox):
1994         (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Attempt a left-right popup alignment inversion
1995         to minimize the trimmed content. Also restore a default max popup width.
1996         (WebCore::PopupContainer::layoutAndGetRTLOffset): Always return the popup listbox offset for the RTL (right alignment) case.
1997         The method rename is due to the return value semantics change.
1998         (WebCore::PopupContainer::showInRect): Store the originally requested frameRect for the popup.
1999         (WebCore::PopupContainer::refresh): Restore the original popup frameRect to avoid layout artifacts on refresh.
2000         (WebCore::PopupContainer::isRTL): This check should be made by the layoutAndGetRTLOffset() clients.
2001         * platform/chromium/PopupMenuChromium.h:
2002
2003 2011-06-28  Kentaro Hara  <haraken@google.com>
2004
2005         Reviewed by Kent Tamura.
2006
2007         Allow spaces between e-mail addresses in 'email' input type.
2008         https://bugs.webkit.org/show_bug.cgi?id=55987
2009
2010         Allowed spaces between e-mail addresses in 'email' input type,
2011         e.g. ' a@p.com , b@p.com ' is a valid value. Implemented the
2012         value sanitization algorithm for an e-mail value.  Added more unit
2013         tests that check the e-mail value parser.
2014
2015         Test: fast/forms/ValidityState-typeMismatch-email.html
2016
2017         * html/EmailInputType.cpp:
2018         (WebCore::EmailInputType::typeMismatchFor):
2019         (WebCore::EmailInputType::sanitizeValue):
2020         * html/EmailInputType.h:
2021         * html/parser/HTMLParserIdioms.cpp:
2022         (WebCore::stripHTMLLineBreaks):
2023         * html/parser/HTMLParserIdioms.h:
2024         (WebCore::isHTMLLineBreak):
2025
2026 2011-06-28  Kent Tamura  <tkent@chromium.org>
2027
2028         Reviewed by Hajime Morita.
2029
2030         Refactor RenderTextControl::text().
2031         https://bugs.webkit.org/show_bug.cgi?id=63519
2032
2033         No new tests because this is just a refactoring.
2034
2035         * rendering/RenderTextControl.cpp:
2036         (WebCore::RenderTextControl::setInnerTextValue):
2037          Resuce the number of text() calls.
2038         (WebCore::finishText):
2039           - Use StringBuilder.
2040           - Make this a static function.
2041             This function doesn't access anything of RenderTextControl.
2042         (WebCore::RenderTextControl::text):
2043          Use emptyString() and StringBuilder.
2044         (WebCore::RenderTextControl::textWithHardLineBreaks): ditto.
2045         * rendering/RenderTextControl.h: Remove finishText().
2046
2047 2011-06-28  Yury Semikhatsky  <yurys@chromium.org>
2048
2049         Reviewed by Pavel Feldman.
2050
2051         Web Inspector: console.group messages should never be coalesced
2052         https://bugs.webkit.org/show_bug.cgi?id=63521
2053
2054         * inspector/InspectorConsoleAgent.cpp:
2055         (WebCore::isGroupMessage):
2056         (WebCore::InspectorConsoleAgent::addConsoleMessage):
2057
2058 2011-06-28  Yury Semikhatsky  <yurys@chromium.org>
2059
2060         Reviewed by Pavel Feldman.
2061
2062         Web Inspector: console group boundaries should be more distinct in UI
2063         https://bugs.webkit.org/show_bug.cgi?id=63455
2064
2065         Show grey bracket to on the left side of a console group message to highlight
2066         the group extent.
2067
2068         * inspector/front-end/ConsoleView.js:
2069         (WebInspector.ConsoleGroup):
2070         * inspector/front-end/inspector.css:
2071         (#console-prompt):
2072         (.console-message, .console-user-command):
2073         (.console-message::before, .console-user-command::before, #console-prompt::before, .console-group-title::before):
2074         (.console-group-title::before):
2075         (.console-group):
2076         (.console-group-bracket):
2077         (.console-group.collapsed > .console-group-bracket):
2078
2079 2011-06-28  Kent Tamura  <tkent@chromium.org>
2080
2081         Reviewed by Hajime Morita.
2082
2083         Use RefPtr for the HTMLElement data members of TextFieldInptType
2084         and SearchInputType.
2085         https://bugs.webkit.org/show_bug.cgi?id=63511
2086
2087         No new tests because of no behavior change.
2088
2089         * html/SearchInputType.cpp:
2090         (WebCore::SearchInputType::SearchInputType):
2091         No need to initialize the element members explicitly because
2092         RefPtr constructor works well.
2093         (WebCore::SearchInputType::createShadowSubtree):
2094         Substitute an element to a data member, and don't call RefPtr<>::release().
2095         (WebCore::SearchInputType::innerBlockElement):
2096         Moved from the header file, and adjustment for RefPtr<>.
2097         (WebCore::SearchInputType::resultsButtonElement): ditto.
2098         (WebCore::SearchInputType::cancelButtonElement): ditto.
2099         (WebCore::SearchInputType::destroyShadowSubtree):
2100          Adjustment for RefPtr<>.
2101         * html/SearchInputType.h:
2102          - Move accessor functions to the cpp file because they are virtual.
2103          - Change element data member types: HTMLElement* -> RefPtr<HTMLElement>.
2104         * html/TextFieldInputType.cpp:
2105         (WebCore::TextFieldInputType::TextFieldInputType):
2106         No need to initialize the element members explicitly because
2107         RefPtr constructor works well.
2108         (WebCore::TextFieldInputType::~TextFieldInputType):
2109         Explicityly defines the destructor in the cpp file to avoid to
2110         make it implicitly in the header file. If the destructor was made
2111         in the header file, we would need to include HTMLElement.h in the
2112         header file.
2113         (WebCore::TextFieldInputType::createShadowSubtree):
2114         - Don't call RenderTheme::themeForPage().
2115         - Substitute an element to a data member, and don't call RefPtr<>::release().
2116         (WebCore::TextFieldInputType::setInnerTextElement):
2117          Moved from the header file to avoid to include HTMLElement.h.
2118         (WebCore::TextFieldInputType::setSpeechButtonElement): ditto.
2119         (WebCore::TextFieldInputType::innerTextElement):
2120         Moved from the header file, and adjustment for RefPtr<>.
2121         (WebCore::TextFieldInputType::innerSpinButtonElement): ditto.
2122         (WebCore::TextFieldInputType::speechButtonElement): ditto.
2123         (WebCore::TextFieldInputType::destroyShadowSubtree):
2124          Adjustment for RefPtr<>.
2125         * html/TextFieldInputType.h:
2126          - Move accessor functions to the cpp file because they are virtual.
2127          - Change element data member types: HTMLElement* -> RefPtr<HTMLElement>.
2128
2129 2011-06-28  Felician Marton  <marton.felician.zoltan@stud.u-szeged.hu>
2130
2131         Reviewed by Nikolas Zimmermann.
2132
2133         SVG animation flickers when restarting
2134         https://bugs.webkit.org/show_bug.cgi?id=18450
2135
2136         Add new parameter to the following methods. The new parameter is the time of adding a "begin" or "end" time to the SVG animation.
2137          - WebCore::SVGSMILElement::addBeginTime
2138          - WebCore::SVGSMILElement::beginListChanged
2139          - WebCore::SVGSMILElement::addEndTime
2140          - WebCore::SVGSMILElement::endListChanged
2141         In case of beginTime and beginListChanged it's necessary, because the delay between the event of adding a new begin time
2142         (in WebCore::SVGAnimationElement::beginElementAt) and the actual processing (in WebCore::SVGSMILElement::endListChanged)
2143         is significant. In lack of event time we can't decide that we should consider the new time or not.
2144         If the new begin time is smaller than the event time, we musn't begin the animation, else we shoud do further calculations.
2145
2146         The following methods just modified for consistency:
2147          - WebCore::SVGSMILElement::addEndTime
2148          - WebCore::SVGSMILElement::endListChanged
2149
2150         No new tests, because currently there is no way to test SVG flickering at zero time.
2151
2152         * svg/SVGAnimationElement.cpp:
2153         (WebCore::SVGAnimationElement::beginElementAt):
2154         (WebCore::SVGAnimationElement::endElementAt):
2155         * svg/animation/SVGSMILElement.cpp:
2156         (WebCore::SVGSMILElement::attributeChanged):
2157         (WebCore::SVGSMILElement::addBeginTime):
2158         (WebCore::SVGSMILElement::addEndTime):
2159         (WebCore::SVGSMILElement::beginListChanged):
2160         (WebCore::SVGSMILElement::endListChanged):
2161           The body changed:
2162            - Use new parameter, the time of adding the new begin time.
2163            - Cancel some incorrect optimalization. We should also do further calculations when elapsed >= m_intervalBegin.
2164         (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
2165         (WebCore::SVGSMILElement::handleConditionEvent):
2166         (WebCore::SVGSMILElement::beginByLinkActivation):
2167         * svg/animation/SVGSMILElement.h:
2168
2169 2011-06-28  Csaba Osztrogonác  <ossy@webkit.org>
2170
2171         Reviewed by Andreas Kling.
2172
2173         Adding MHTML reading support.
2174         https://bugs.webkit.org/show_bug.cgi?id=7168
2175
2176         * features.pri: Disable MHTML on Qt by default in a proper way.
2177
2178 2011-06-28  Csaba Osztrogonác  <ossy@webkit.org>
2179
2180         Reviewed by Andreas Kling.
2181
2182         [Qt] Remove ENABLE_XBL, because there aren't ENABLE(XBL) macros anymore.
2183
2184         * features.pri:
2185
2186 2011-06-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2187
2188         Unreviewed. Fix style error related to wrong include order.
2189
2190         * platform/graphics/efl/ImageEfl.cpp:
2191
2192 2011-06-27  Brian Weinstein  <bweinstein@apple.com>
2193
2194         Fix the WebCore vcproj file after r89851.
2195
2196         * WebCore.vcproj/WebCore.vcproj:
2197
2198 2011-06-27  Joe Wild  <joseph.wild@nokia.com>
2199
2200         Reviewed by Simon Fraser.
2201
2202         Crash on www.crave.cnet.com in FrameView::windowClipRect()
2203         https://bugs.webkit.org/show_bug.cgi?id=56393
2204
2205         Check for a null renderer to fix a crash. This situation can
2206         arise when external content/plugins is referenced from html
2207         elements with style="display:none".
2208
2209         Test: plugins/hidden-iframe-with-swf-plugin.html
2210
2211         * page/FrameView.cpp:
2212         (WebCore::FrameView::windowClipRect):
2213
2214 2011-06-27  Raymes Khoury  <raymes@chromium.org>
2215
2216         Reviewed by Tony Chang.
2217
2218         WebCore fails to compile in thumb mode when neon instructions are
2219         enabled.
2220
2221         There are two files (FELightingNEON.cpp and FEGaussianBlur.cpp)
2222         which fail to build when -mthumb is passed to gcc. These contain inline
2223         assembly for neon instructions on arm. This patch forces the -marm flag
2224         to be passed when compiling these files to work around this.
2225
2226         https://bugs.webkit.org/show_bug.cgi?id=62916
2227
2228         Built WebKit in Chromium and checked that -marm is passed
2229         only when building these files.
2230
2231         https://bugs.webkit.org/show_bug.cgi?id=62916
2232
2233         * WebCore.gyp/WebCore.gyp:
2234
2235 2011-06-27  Jay Civelli  <jcivelli@chromium.org>
2236
2237         Reviewed by Darin Fisher.
2238
2239         Adding binary part support to MHTML.
2240         https://bugs.webkit.org/show_bug.cgi?id=63310
2241
2242         * loader/archive/mhtml/MHTMLArchive.cpp:
2243         (WebCore::MHTMLArchive::generateMHTMLData):
2244         (WebCore::MHTMLArchive::generateMHTMLDataUsingBinaryEncoding):
2245         * loader/archive/mhtml/MHTMLArchive.h:
2246         * loader/archive/mhtml/MHTMLParser.cpp:
2247         (WebCore::MHTMLParser::parseNextPart):
2248         * platform/SharedBuffer.cpp:
2249         (WebCore::SharedBuffer::append):
2250         * platform/SharedBuffer.h:
2251         * platform/network/MIMEHeader.cpp:
2252         (WebCore::MIMEHeader::parseContentTransferEncoding):
2253         * platform/network/MIMEHeader.h:
2254
2255 2011-06-27  Levi Weintraub  <leviw@chromium.org>
2256
2257         Reviewed by Eric Seidel.
2258
2259         Add support for unicode-bidi:plaintext CSS property
2260         https://bugs.webkit.org/show_bug.cgi?id=50949
2261
2262         Adding support for unicode-bidi: plaintext. This involves invoking P2 and P3
2263         of the Unicode BiDi algorithm on each paragraph of a block with that style.
2264         This is similar to dir=auto but done per-paragraph instead of per element.
2265
2266         Test: fast/text/international/unicode-bidi-plaintext.html
2267
2268         * css/CSSParser.cpp:
2269         (WebCore::CSSParser::parseValue):  Added plaintext.
2270         * css/CSSPrimitiveValueMappings.h:
2271         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Ditto.
2272         (WebCore::CSSPrimitiveValue::operator EUnicodeBidi): Ditto.
2273         * css/CSSValueKeywords.in: Ditto.
2274         * html/HTMLElement.cpp:
2275         (WebCore::unicodeBidiAttributeForDirAuto): Helper to map elements with dir=auto
2276         to their proper unicode-bidi attribute.
2277         (WebCore::HTMLElement::parseMappedAttribute): Assign plaintext to pre and textarea
2278         when dir=auto.
2279         * platform/text/UnicodeBidi.h: Added plaintext.
2280         * rendering/RenderBlockLineLayout.cpp:
2281         (WebCore::determineParagraphDirection): Determines the direction of a paragraph
2282         based on the first strong character. Stops at first paragraph separator.
2283         (WebCore::RenderBlock::layoutInlineChildren): Uses determineParagraphDirection
2284         when in unicode-bidi: plaintext mode (and operating at the block's BidiContext)
2285         to set each paragraph to the proper base BidiContext.
2286         (WebCore::RenderBlock::determineStartPosition): Ditto.
2287         * rendering/style/RenderStyle.h: Gave _unicodebidi another bit to accomodate
2288         for plaintext.
2289
2290 2011-06-27  Alexis Menard  <alexis.menard@openbossa.org>
2291
2292         Reviewed by Darin Adler.
2293
2294         Use specific headers includes rather than full system headers.
2295         https://bugs.webkit.org/show_bug.cgi?id=63475
2296
2297         Use only needed headers rather than system headers.
2298
2299         No new tests, it's just a little cosmetic change.
2300
2301         * platform/mac/WebVideoFullscreenController.h:
2302         * platform/mac/WebVideoFullscreenHUDWindowController.h:
2303
2304 2011-06-27  Joseph Pecoraro  <joepeck@webkit.org>
2305
2306         Reviewed by Darin Adler.
2307
2308         Allow non-main thread text drawing in ICU ports
2309         https://bugs.webkit.org/show_bug.cgi?id=63482
2310
2311         Some ports allow multiple threads to draw strings.
2312         LineBreakIteratorPool is not thread safe and the existing
2313         ASSERT caught cases where multiple threads were trying
2314         to access the shared pool. This makes the pool a lazily
2315         created per-thread pool to allow for thread safe pool use.
2316
2317         * platform/ThreadGlobalData.h:
2318         * platform/ThreadGlobalData.cpp:
2319         (WebCore::ThreadGlobalData::ThreadGlobalData): start with null.
2320         (WebCore::ThreadGlobalData::lineBreakIteratorPool): lazily create.
2321         (WebCore::ThreadGlobalData::destroy): delete.
2322         Manage the lifetime of the per-thread pool instance.
2323
2324         * platform/text/LineBreakIteratorPoolICU.h:
2325         (WebCore::LineBreakIteratorPool::sharedPool):
2326         Use the per-thread pool instance and remove the ASSERT that
2327         this needs to be on the main thread.
2328
2329         (WebCore::LineBreakIteratorPool::create):
2330         Create a PassOwnPtr so we can use OwnPtr on pools.
2331
2332         (WebCore::LineBreakIteratorPool::LineBreakIteratorPool):
2333         Private now that there is a public create function.
2334
2335 2011-06-27  Joseph Pecoraro  <joepeck@webkit.org>
2336
2337         Reviewed by Darin Adler.
2338
2339         Extract LineBreakIteratorPool class into its own file
2340         https://bugs.webkit.org/show_bug.cgi?id=63471
2341
2342         * GNUmakefile.list.am:
2343         * WebCore.gypi:
2344         * WebCore.vcproj/WebCore.vcproj:
2345         * WebCore.xcodeproj/project.pbxproj:
2346         Add the new file to builds that used TextBreakIteratorPoolICU.h.
2347
2348         * platform/text/LineBreakIteratorPoolICU.h: Added.
2349         (WebCore::LineBreakIteratorPool::sharedPool):
2350         (WebCore::LineBreakIteratorPool::LineBreakIteratorPool):
2351         Expose the constructor so it can be used by others.
2352
2353         * platform/text/TextBreakIteratorICU.cpp:
2354         Remove the old LineBreakIteratorPool implementation.
2355
2356 2011-06-27  Justin Garcia  <justin.garcia@apple.com>
2357
2358         Reviewed by Ryosuke Niwa.
2359
2360         CompositeEditCommand::inputText(const String& text, bool selectedInsertText) is unused
2361         https://bugs.webkit.org/show_bug.cgi?id=62921
2362
2363         * editing/CompositeEditCommand.cpp:
2364         * editing/CompositeEditCommand.h:
2365         * editing/InsertTextCommand.cpp:
2366         (WebCore::InsertTextCommand::input):
2367
2368 2011-05-17  Nat Duca  <nduca@chromium.org>
2369
2370         Reviewed by James Robinson.
2371
2372         [chromium] Implement CCLayerTreeHost and CCLayerTreeHostImpl portions of threaded compositor
2373         https://bugs.webkit.org/show_bug.cgi?id=58408
2374
2375         Create CCLayerTreeHost and CCLayerTreeHostImpl, which are the main
2376         thread and compositor thread halves of a composited view. Communication
2377         between the two is based on the design used in FileStreamProxy.
2378
2379         * WebCore.gypi:
2380         * platform/chromium/TraceEvent.h:
2381         * platform/graphics/chromium/LayerRendererChromium.cpp:
2382         (WebCore::LayerRendererChromium::create):
2383         (WebCore::LayerRendererChromium::LayerRendererChromium):
2384         (WebCore::LayerRendererChromium::setViewport):
2385         (WebCore::LayerRendererChromium::updateLayers):
2386         (WebCore::LayerRendererChromium::drawLayers):
2387         (WebCore::LayerRendererChromiumImpl::create):
2388         (WebCore::LayerRendererChromiumImpl::drawLayersAndPresent):
2389         (WebCore::LayerRendererChromiumImpl::LayerRendererChromiumImpl):
2390         (WebCore::LayerRendererChromiumImpl::drawLayersOnMainThread):
2391         (WebCore::LayerRendererChromiumImplProxy::create):
2392         (WebCore::LayerRendererChromiumImplProxy::createLayerTreeHostImpl):
2393         (WebCore::LayerRendererChromiumImplProxy::LayerRendererChromiumImplProxy):
2394         (WebCore::LayerRendererChromium::createLayerTreeHostImplProxy):
2395         * platform/graphics/chromium/LayerRendererChromium.h:
2396         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2397         (WebCore::CCHeadsUpDisplay::setShowFPSCounter):
2398         (WebCore::CCHeadsUpDisplay::setShowPlatformLayerTree):
2399         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
2400         (WebCore::CCHeadsUpDisplay::currentFrameNumber):
2401         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
2402         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2403         (WebCore::CCLayerTreeHost::init):
2404         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
2405         (WebCore::CCLayerTreeHost::beginCommit):
2406         (WebCore::CCLayerTreeHost::commitComplete):
2407         (WebCore::CCLayerTreeHost::animateAndLayout):
2408         (WebCore::CCLayerTreeHost::createLayerTreeHostCommitter):
2409         (WebCore::CCLayerTreeHost::setNeedsCommitAndRedraw):
2410         (WebCore::CCLayerTreeHost::setNeedsRedraw):
2411         (WebCore::CCLayerTreeHost::updateLayers):
2412         * platform/graphics/chromium/cc/CCLayerTreeHost.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
2413         (WebCore::CCLayerTreeHost::frameNumber):
2414         * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
2415         (WebCore::CCLayerTreeHostCommitter::create):
2416         (WebCore::CCLayerTreeHostCommitter::commit):
2417         * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
2418         (WebCore::CCLayerTreeHostCommitter::CCLayerTreeHostCommitter):
2419         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Added.
2420         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2421         (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl):
2422         (WebCore::CCLayerTreeHostImpl::beginCommit):
2423         (WebCore::CCLayerTreeHostImpl::commitComplete):
2424         (WebCore::CCLayerTreeHostImpl::drawLayers):
2425         (WebCore::CCLayerTreeHostImpl::setNeedsCommitAndRedraw):
2426         (WebCore::CCLayerTreeHostImpl::setNeedsRedraw):
2427         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
2428         (WebCore::CCLayerTreeHostImplClient::~CCLayerTreeHostImplClient):
2429         (WebCore::CCLayerTreeHostImpl::frameNumber):
2430         (WebCore::CCLayerTreeHostImpl::sourceFrameNumber):
2431         (WebCore::CCLayerTreeHostImpl::setSourceFrameNumber):
2432         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: Added.
2433         (WebCore::CCLayerTreeHostImplProxy::CCLayerTreeHostImplProxy):
2434         (WebCore::CCLayerTreeHostImplProxy::start):
2435         (WebCore::CCLayerTreeHostImplProxy::~CCLayerTreeHostImplProxy):
2436         (WebCore::CCLayerTreeHostImplProxy::isStarted):
2437         (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedraw):
2438         (WebCore::CCLayerTreeHostImplProxy::setNeedsRedraw):
2439         (WebCore::CCLayerTreeHostImplProxy::stop):
2440         (WebCore::CCLayerTreeHostImplProxy::postDrawLayersTaskOnCCThread):
2441         (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommitOnCCThread):
2442         (WebCore::CCLayerTreeHostImplProxy::isMainThread):
2443         (WebCore::CCLayerTreeHostImplProxy::isCCThread):
2444         (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommit):
2445         (WebCore::CCLayerTreeHostImplProxy::commitOnCCThread):
2446         (WebCore::CCLayerTreeHostImplProxy::drawLayersOnCCThread):
2447         (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread):
2448         (WebCore::CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread):
2449         (WebCore::CCLayerTreeHostImplProxy::initImplOnCCThread):
2450         (WebCore::CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread):
2451         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h: Added.
2452         (WebCore::CCLayerTreeHostImplProxy::host):
2453         * platform/graphics/chromium/cc/CCMainThreadTask.h:
2454         * platform/graphics/chromium/cc/CCThread.cpp:
2455         (WebCore::CCThread::runLoop):
2456         * platform/graphics/chromium/cc/CCThreadTask.h:
2457
2458 2011-06-27  Abhishek Arya  <inferno@chromium.org>
2459
2460         Reviewed by Simon Fraser.
2461
2462         Fix removal of overhanging floats on style changes to absolute/fixed position.
2463         https://bugs.webkit.org/show_bug.cgi?id=63355
2464
2465         1. If we are not currently positioned.
2466         2. And we are not floating. (If we are floating, then this will be automatically
2467            done in RenderBox::styleWillChange as part of removeFloatingOrPositionedChildFromBlockLists) 
2468         3. And we have overhanging floats from previous sibling blocks.
2469         4. And our new new style tells that we will have absolute or fixed position.
2470
2471         Then, we mark all our descendants with floats for layout. This will make sure that
2472         overhanging floats are removed. Also, it is important to do that since if that previous
2473         sibling block goes away, it is not able to tell us that to remove those floats thinking 
2474         that being a positioned block, we should have removed them already.
2475
2476         Tests: fast/block/float/intruding-float-add-in-sibling-block-on-static-position.html
2477                fast/block/float/intruding-float-add-in-sibling-block-on-static-position2.html
2478                fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position.html
2479                fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position2.html
2480                fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position.html
2481                fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position2.html
2482                fast/block/float/overhanging-float-add-in-static-position-block.html
2483                fast/block/float/overhanging-float-add-in-static-position-block2.html
2484                fast/block/float/overhanging-float-remove-from-absolute-position-block.html
2485                fast/block/float/overhanging-float-remove-from-absolute-position-block2.html
2486                fast/block/float/overhanging-float-remove-from-fixed-position-block.html
2487                fast/block/float/overhanging-float-remove-from-fixed-position-block2.html
2488
2489         * rendering/RenderBlock.cpp:
2490         (WebCore::RenderBlock::styleWillChange):
2491
2492 2011-06-27  Dirk Schulze  <krit@webkit.org>
2493
2494         Reviewed by Nikolas Zimmermann.
2495
2496         SVGAnimatedType should support SVGPreserveAspectRatio animation
2497         https://bugs.webkit.org/show_bug.cgi?id=63456
2498         
2499         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
2500         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGAnimatedPreserveAspectRatio.
2501         
2502         The new animator does not affect any behavior, since it was animated with SVGAnimatedString before. The new animator is still needed
2503         to support animVal and baseVal later.
2504
2505         Test: svg/animations/svgPreserveAspectRatio-animation-1.html
2506
2507         * CMakeLists.txt: Added new file.
2508         * GNUmakefile.list.am: Ditto.
2509         * WebCore.gypi: Ditto.
2510         * WebCore.pro: Ditto.
2511         * WebCore.xcodeproj/project.pbxproj: Ditto.
2512         * svg/SVGAllInOne.cpp: Ditto.
2513         * svg/SVGAnimateElement.cpp: Handle AnimatedPreserveAspectRatio.
2514         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
2515         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2516         (WebCore::SVGAnimateElement::calculateFromAndToValues):
2517         (WebCore::SVGAnimateElement::calculateFromAndByValues):
2518         (WebCore::SVGAnimateElement::resetToBaseValue):
2519         (WebCore::SVGAnimateElement::applyResultsToTarget):
2520         (WebCore::SVGAnimateElement::calculateDistance):
2521         * svg/SVGAnimatedPreserveAspectRatio.cpp: Added. New animator for SVGAnimatedPreserveAspectRatio.
2522         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::SVGAnimatedPreserveAspectRatioAnimator):
2523         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString):
2524         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateFromAndToValues):
2525         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateFromAndByValues):
2526         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):
2527         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateDistance):
2528         * svg/SVGAnimatedPreserveAspectRatio.h:
2529         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::~SVGAnimatedPreserveAspectRatioAnimator):
2530         * svg/SVGAnimatedType.cpp: Support for SVGPreserveAspectRatio.
2531         (WebCore::SVGAnimatedType::~SVGAnimatedType):
2532         (WebCore::SVGAnimatedType::createPreserveAspectRatio):
2533         (WebCore::SVGAnimatedType::preserveAspectRatio):
2534         (WebCore::SVGAnimatedType::valueAsString):
2535         (WebCore::SVGAnimatedType::setValueAsString):
2536         (WebCore::SVGAnimatedType::setPreserveAspectRatioBaseValue):
2537         * svg/SVGAnimatedType.h:
2538         * svg/SVGAnimatorFactory.h:
2539         (WebCore::SVGAnimatorFactory::create):
2540
2541 2011-06-27  Alexis Menard  <alexis.menard@openbossa.org>
2542
2543         Reviewed by Kenneth Rohde Christiansen.
2544
2545         [Qt] Remove Phonon MediaPlayer from the tree.
2546         https://bugs.webkit.org/show_bug.cgi?id=63448
2547
2548         Remove Phonon mediaplayer as it is unused, not finished and
2549         unmaintained.
2550
2551         * WebCore.gypi:
2552         * WebCore.pri:
2553         * WebCore.pro:
2554         * features.pri:
2555         * platform/graphics/MediaPlayer.cpp:
2556         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Removed.
2557         * platform/graphics/qt/MediaPlayerPrivatePhonon.h: Removed.
2558
2559 2011-06-27  Ryosuke Niwa  <rniwa@webkit.org>
2560
2561         Reviewed by Kent Tamura.
2562
2563         Crash in TextIterator
2564         https://bugs.webkit.org/show_bug.cgi?id=63334
2565
2566         Fix a crash in TextIterator. Keep m_sortedTextBoxes and renderer consistent
2567         and check !m_offset when handling first letter.
2568
2569         Also add more assertions to help detecting similar bugs.
2570
2571         Test: editing/text-iterator/first-letter-rtl-crash.html
2572
2573         * editing/TextIterator.cpp:
2574         (WebCore::TextIterator::handleTextNode):
2575         (WebCore::TextIterator::emitText):
2576
2577 2011-06-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2578
2579         Reviewed by Andreas Kling.
2580
2581         [Qt] tst_QWebFrame::overloadedSlots() fails
2582         https://bugs.webkit.org/show_bug.cgi?id=37319
2583
2584         This patch is based on Noam Rosenthal original patch in the same bug.
2585
2586         When hinted with QWebElement metatype, we qualify the conversion
2587         from JSElement as a "perfect match".
2588
2589         The test was failing because the wrong slot was called, since the QWebElement
2590         match was taken as equal to the others and not chosen when the metacall happened.
2591
2592         * bridge/qt/qt_runtime.cpp:
2593         (JSC::Bindings::convertValueToQVariant): Identify the conversion between JSElement
2594         to QWebElement as a "perfect match" (dist = 0). Add comments to explain the reason
2595         why we have the implicit conversion.
2596
2597 2011-06-27  ChangSeok Oh  <shivamidow@gmail.com>
2598
2599         Reviewed by Martin Robinson.
2600
2601         [GTK] Fix build break to support webgl
2602         https://bugs.webkit.org/show_bug.cgi?id=63425
2603
2604         Some missing files in ANGLE are just added to fix build-break.
2605
2606         No test reqired
2607
2608         * GNUmakefile.list.am:
2609
2610 2011-06-27  Hyowon Kim  <hw1008.kim@samsung.com>
2611
2612         Reviewed by Martin Robinson.
2613
2614         [EFL] Add some PLATFORM(EFL) ifdefs to GraphicsContext3D.h
2615         https://bugs.webkit.org/show_bug.cgi?id=62959
2616
2617         Add PLATFORM(EFL) ifdefs to use GraphicsContextInternal.
2618
2619         * platform/graphics/GraphicsContext3D.h:
2620
2621 2011-06-27  Alexandru Chiculita  <achicu@adobe.com>
2622
2623         Reviewed by Ojan Vafai.
2624
2625         css combinator "+" in combination with NAV tag is buggy
2626         https://bugs.webkit.org/show_bug.cgi?id=47971
2627
2628         Added a new state in css/tokenizer.flex for the "nth" rule. The state begins
2629         at nth-*( functions and ends at the first ")". It avoids parsing selectors 
2630         like "#div+nav" as: "#div" "+n" "av".
2631
2632         Test: fast/css/div_plus_nav_bug47971.html
2633
2634         * css/maketokenizer:
2635         * css/tokenizer.flex:
2636
2637 2011-06-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2638
2639         Unreviewed, rolling out r89822.
2640         http://trac.webkit.org/changeset/89822
2641         https://bugs.webkit.org/show_bug.cgi?id=63461
2642
2643         Broken builds (Requested by apavlov on #webkit).
2644
2645         * inspector/Inspector.json:
2646         * inspector/InspectorCSSAgent.cpp:
2647         (WebCore::InspectorCSSAgent::getStylesForNode):
2648         * inspector/InspectorCSSAgent.h:
2649         * inspector/front-end/AuditRules.js:
2650         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles):
2651         * inspector/front-end/CSSStyleModel.js:
2652         (WebInspector.CSSStyleModel.prototype.getStylesAsync):
2653         * inspector/front-end/StylesSidebarPane.js:
2654         (WebInspector.StylesSidebarPane.prototype.update):
2655
2656 2011-06-27  Noel Gordon  <noel.gordon@gmail.com>
2657
2658         Reviewed by Adam Roben.
2659
2660         Send keypress events to windowless plugins on the windows port.
2661         https://bugs.webkit.org/show_bug.cgi?id=63144
2662
2663         No new tests.  Covered by existing windowless plugin tests plugins/mouse-events.html
2664         and plugins/keyboard-events.html.  Both are not yet working as desired because focus
2665         events are not being fowarded to windowed plugins on the win port (bug 62375).  Test
2666         plugin logging on the win port was added in bug 61721.  New failing expectations for
2667         plugins/keyboard-events.html were subsequently added in bug 33973 so there's no need
2668         to update test expectations in this patch.
2669
2670          * plugins/win/PluginViewWin.cpp:
2671         (WebCore::PluginView::handleKeyboardEvent): Add an ASSERT(m_plugin && !m_isWindowed)
2672         to indicate that the routine is for windowless plugins.  Remove trailing whitespace.
2673         Add handling for keyPress events (map to WM_CHAR).
2674         (WebCore::PluginView::handleMouseEvent): Add the ASSERT to indicate that the routine
2675         is for windowless plugins.  Add FIXME note.  Remove trailing whitespace.
2676
2677 2011-06-27  Alexander Pavlov  <apavlov@chromium.org>
2678
2679         Reviewed by Pavel Feldman.
2680
2681         Web Inspector: Change the inspector model API and backend to allow CSS pseudoclass inspection
2682         https://bugs.webkit.org/show_bug.cgi?id=63446
2683
2684         * inspector/Inspector.json:
2685         * inspector/InspectorCSSAgent.cpp:
2686         (WebCore::computePseudoClassMask):
2687         (WebCore::InspectorCSSAgent::getStylesForNode):
2688         * inspector/InspectorCSSAgent.h:
2689         * inspector/front-end/AuditRules.js:
2690         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles):
2691         * inspector/front-end/CSSStyleModel.js:
2692         (WebInspector.CSSStyleModel.prototype.getStylesAsync):
2693         * inspector/front-end/StylesSidebarPane.js:
2694         (WebInspector.StylesSidebarPane.prototype.update):
2695
2696 2011-06-27  Pavel Feldman  <pfeldman@google.com>
2697
2698         Reviewed by Yury Semikhatsky.
2699
2700         Web Inspector: [REGRESSION r84481] updateLayout called from DrawNodeHighlight
2701         https://bugs.webkit.org/show_bug.cgi?id=63405
2702
2703         We should not call layout from paint.
2704
2705         * inspector/DOMNodeHighlighter.cpp:
2706         (WebCore::DOMNodeHighlighter::drawNodeHighlight):
2707         * inspector/DOMNodeHighlighter.h:
2708         * inspector/InspectorDOMAgent.cpp:
2709         (WebCore::InspectorDOMAgent::drawNodeHighlight):
2710
2711 2011-06-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2712
2713         Unreviewed. Fix style error in EFL port.
2714
2715         * platform/efl/PlatformKeyboardEventEfl.cpp:
2716         * platform/efl/PlatformScreenEfl.cpp:
2717         * platform/efl/SharedBufferEfl.cpp:
2718
2719 2011-06-27  Pavel Feldman  <pfeldman@google.com>
2720
2721         Reviewed by Yury Semikhatsky.
2722
2723         Web Inspector: node selection is slow in the Elements panel.
2724         https://bugs.webkit.org/show_bug.cgi?id=60813
2725
2726         * inspector/front-end/StylesSidebarPane.js:
2727         (WebInspector.StylesSidebarPane.prototype.update.stylesCallback):
2728         (WebInspector.StylesSidebarPane.prototype.update.computedStyleCallback):
2729         (WebInspector.StylesSidebarPane.prototype.update):
2730
2731 2011-06-26  Pavel Feldman  <pfeldman@chromium.org>
2732
2733         Reviewed by Yury Semikhatsky.
2734
2735         Web Inspector: roll out r88337 for making tests flaky.
2736         https://bugs.webkit.org/show_bug.cgi?id=63422
2737
2738         * inspector/front-end/ElementsPanel.js:
2739         (WebInspector.ElementsPanel):
2740         (WebInspector.ElementsPanel.prototype.updateStyles):
2741         (WebInspector.ElementsPanel.prototype._stylesUpdated):
2742         * inspector/front-end/StylesSidebarPane.js:
2743         (WebInspector.StylesSidebarPane.prototype.update.stylesCallback):
2744         (WebInspector.StylesSidebarPane.prototype.update.computedStyleCallback):
2745         (WebInspector.StylesSidebarPane.prototype.update):
2746
2747 2011-06-27  Huang Dongsung  <luxtella@company100.net>
2748
2749         Reviewed by Kenneth Rohde Christiansen.
2750
2751         TiledBackingStore endlessly creates and destroys tiles due to an off-by-one
2752         error.
2753         https://bugs.webkit.org/show_bug.cgi?id=62422
2754
2755         REGRESSION(r77286): Remove bottomRight().
2756         REGRESSION(r77312): Change the logic to get the bottom right point.
2757         REGRESSION(r77928): Cause off-by-one error in TiledBackingStore.
2758         REGRESSION(r78783): Cause off-by-one error in TiledDrawingAreaProxy.
2759         REGRESSION(r78785): Cause off-by-one error in TiledDrawingAreaProxy.
2760
2761         If the viewport width equals the contents width, especially in the mobile
2762         device, TiledBackingStore endlessly creates and deletes the rightmost
2763         column and bottom row of tiles.
2764         In the detail, dropTilesOutsideRect() in TiledBackingStore::createTiles()
2765         deletes tiles and setTile(coordinate, Tile::create(this, coordinate)) creates
2766         tiles infinitely.
2767         Modified TiledDrawingAreaProxy also.
2768
2769         * platform/graphics/TiledBackingStore.cpp:
2770         (WebCore::innerBottomRight):
2771         (WebCore::TiledBackingStore::invalidate):
2772         (WebCore::TiledBackingStore::paint):
2773         (WebCore::TiledBackingStore::createTiles):
2774
2775 2011-06-26  Adam Barth  <abarth@webkit.org>
2776
2777         Reviewed by Eric Seidel.
2778
2779         Remove LegacyDefaultOptionalArguments from WebAudio IDL files
2780         https://bugs.webkit.org/show_bug.cgi?id=63416
2781
2782         WebAudio isn't that widely used, so it's seems somewhat safe to remove
2783         legacy code generation hacks.  I'm not an expert on WebAudio, but the
2784         API doesn't appear to need many optional arguments.
2785
2786         There are a bunch of APIs that have custom bindings that look like they
2787         could be autogenerated.  I've added FIXME comments where appropriate.
2788
2789         * webaudio/AudioBuffer.idl:
2790         * webaudio/AudioContext.idl:
2791         * webaudio/AudioListener.idl:
2792         * webaudio/AudioNode.idl:
2793         * webaudio/AudioPannerNode.idl:
2794         * webaudio/AudioParam.idl:
2795         * webaudio/RealtimeAnalyserNode.idl:
2796
2797 2011-06-26  Yury Semikhatsky  <yurys@chromium.org>
2798
2799         Reviewed by Pavel Feldman.
2800
2801         Web Inspector: REGRESSION Scripts panel sidebar pane context menu has no "Remove breakpoint" item
2802         https://bugs.webkit.org/show_bug.cgi?id=63421
2803
2804         Show generic sidebar menu only if no pane-specific menu has been shown.
2805
2806         * inspector/front-end/ScriptsPanel.js:
2807         (WebInspector.ScriptsPanel):
2808
2809 2011-06-26  Adam Barth  <abarth@webkit.org>
2810
2811         Build fix for clang.  Apparently clang doesn't want us to use the std
2812         namespace in headers, which makes sense.
2813
2814         * svg/SVGAnimatedType.h:
2815
2816 2011-06-26  Adam Barth  <abarth@webkit.org>
2817
2818         Reviewed by Eric Seidel.
2819
2820         Remove LegacyDefaultOptionalArguments from XMLHttpRequest.idl and XMLHttpRequestUpload.idl
2821         https://bugs.webkit.org/show_bug.cgi?id=63418
2822
2823         The XMLHttpRequest.idl interface used to implement the new behavior
2824         manually using the RequiresAllArguments attribute.  Now that we have
2825         that behavior by default, we can simply remove the
2826         LegacyDefaultOptionalArguments attribute.
2827
2828         * xml/XMLHttpRequest.idl:
2829         * xml/XMLHttpRequestUpload.idl:
2830
2831 2011-06-26  Dirk Schulze  <krit@webkit.org>
2832
2833         Reviewed by Nikolas Zimmermann.
2834
2835         SVGAnimatedType should support SVGLengthList animation
2836         https://bugs.webkit.org/show_bug.cgi?id=63399
2837
2838         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
2839         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGAnimatedLengthList.
2840         
2841         Interpolated animations of glyph positions are possible now.
2842
2843         Tests: svg/animations/svglengthlist-animation-1.html
2844                svg/animations/svglengthlist-animation-2.html
2845                svg/animations/svglengthlist-animation-3.html
2846                svg/animations/svglengthlist-animation-4.html
2847
2848         * CMakeLists.txt: Add new file to build system.
2849         * GNUmakefile.list.am: Ditto.
2850         * WebCore.gypi: Ditto.
2851         * WebCore.pro: Ditto.
2852         * WebCore.xcodeproj/project.pbxproj: Ditto.
2853         * svg/SVGAllInOne.cpp: Ditto.
2854         * svg/SVGAnimateElement.cpp: Make use of AnimatedLengthList.
2855         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
2856         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2857         (WebCore::SVGAnimateElement::calculateFromAndToValues):
2858         (WebCore::SVGAnimateElement::calculateFromAndByValues):
2859         (WebCore::SVGAnimateElement::resetToBaseValue):
2860         (WebCore::SVGAnimateElement::applyResultsToTarget):
2861         (WebCore::SVGAnimateElement::calculateDistance):
2862         * svg/SVGAnimatedLengthList.cpp: Added. New animator for SVGLengthList.
2863         (WebCore::SVGAnimatedLengthListAnimator::SVGAnimatedLengthListAnimator):
2864         (WebCore::SVGAnimatedLengthListAnimator::constructFromString):
2865         (WebCore::SVGAnimatedLengthListAnimator::calculateFromAndToValues):
2866         (WebCore::SVGAnimatedLengthListAnimator::calculateFromAndByValues):
2867         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
2868         (WebCore::SVGAnimatedLengthListAnimator::calculateDistance):
2869         * svg/SVGAnimatedLengthList.h:
2870         (WebCore::SVGAnimatedLengthListAnimator::~SVGAnimatedLengthListAnimator):
2871         * svg/SVGAnimatedType.cpp: Add SVGLengthList.
2872         (WebCore::SVGAnimatedType::~SVGAnimatedType):
2873         (WebCore::SVGAnimatedType::createLengthList):
2874         (WebCore::SVGAnimatedType::lengthList):
2875         (WebCore::SVGAnimatedType::valueAsString):
2876         (WebCore::SVGAnimatedType::setValueAsString):
2877         * svg/SVGAnimatedType.h:
2878         * svg/SVGAnimatorFactory.h:
2879         (WebCore::SVGAnimatorFactory::create):
2880         * svg/SVGLength.cpp: Add new constructor with LengthType, LengthMode and value.
2881         (WebCore::SVGLength::SVGLength):
2882         * svg/SVGLength.h:
2883
2884 2011-06-26  Adam Barth  <abarth@webkit.org>
2885
2886         Reviewed by Eric Seidel.
2887
2888         window.location should use the holder's prototype chain
2889         https://bugs.webkit.org/show_bug.cgi?id=63411
2890
2891         This patch corrects the prototype chain for Location, but we really
2892         should do a complete cleanup of the prototype chain generation, like we
2893         did for JavaScriptCore.
2894
2895         Test: http/tests/security/location-prototype.html
2896
2897         * bindings/scripts/CodeGeneratorV8.pm:
2898
2899 2011-06-26  Adam Barth  <abarth@webkit.org>
2900
2901         Reviewed by Eric Seidel.
2902
2903         Add [Optional] attributes where appropriate for addEventListener and removeEventListener
2904         https://bugs.webkit.org/show_bug.cgi?id=63417
2905
2906         This patch doesn't actually change behavior because these interfaces
2907         have the LegacyDefaultOptionalArguments attribute.  This patch paves
2908         the way to removing LegacyDefaultOptionalArguments from some of these
2909         interfaces as well as making the project safer for copy-and-pasting
2910         these methods into new IDL files that don't have the
2911         LegacyDefaultOptionalArguments attribute.
2912
2913         * bindings/scripts/test/TestObj.idl:
2914         * dom/EventTarget.idl:
2915         * dom/MediaStream.idl:
2916         * dom/MessagePort.idl:
2917         * dom/Node.idl:
2918         * loader/appcache/DOMApplicationCache.idl:
2919         * notifications/Notification.idl:
2920         * page/DOMWindow.idl:
2921         * page/EventSource.idl:
2922         * storage/IDBRequest.idl:
2923         * storage/IDBTransaction.idl:
2924         * svg/SVGElementInstance.idl:
2925         * websockets/WebSocket.idl:
2926         * workers/AbstractWorker.idl:
2927         * workers/WorkerContext.idl:
2928         * xml/XMLHttpRequest.idl:
2929         * xml/XMLHttpRequestUpload.idl:
2930
2931 2011-06-26  Adam Barth  <abarth@webkit.org>
2932
2933         Reviewed by Kent Tamura.
2934
2935         m_formElementsWithFormAttribute doesn't ref the objects it holds
2936         https://bugs.webkit.org/show_bug.cgi?id=62956
2937
2938         Test: fast/forms/form-associated-element-crash3.html
2939
2940         * dom/Document.h:
2941
2942 2011-06-26  Dimitri Glazkov  <dglazkov@chromium.org>
2943
2944         Reviewed by Adam Barth.
2945
2946         FileList::filenames should be FileList::paths, because it's more accurate.
2947         https://bugs.webkit.org/show_bug.cgi?id=63414
2948
2949         Refactoring, no change in behavior.
2950
2951         * fileapi/FileList.cpp:
2952         (WebCore::FileList::paths): Renamed from filenames.
2953         * fileapi/FileList.h:
2954         * html/FileInputType.cpp:
2955         (WebCore::FileInputType::handleDOMActivateEvent): Changed to use filenames, also fixed a reach-unto-thyself whoopsie.
2956         (WebCore::FileInputType::requestIcon): Ditto.
2957         (WebCore::FileInputType::filesChosen): Ditto.
2958         * rendering/RenderFileUploadControl.cpp:
2959         (WebCore::RenderFileUploadControl::fileTextValue): Ditto.
2960
2961 2011-06-26  Young Han Lee  <joybro@company100.net>
2962
2963         Reviewed by Dirk Schulze.
2964
2965         SVGAnimation - keyTime value 1 never get animated
2966         https://bugs.webkit.org/show_bug.cgi?id=63230
2967
2968         According to the SMIL 3.0 specification, the index of the keyTimes should be 
2969         determined under the end-point-exclusive rule (e.g. Given keyTimes(0;0.5;1) 
2970         and t=0.5, the current index of the keyTimes have to be 1 not 0).
2971         http://www.w3.org/TR/SMIL3/smil-animation.html#animationNS-InterpolationExamplesAdvanced
2972
2973         Test: svg/animations/animate-number-calcMode-discrete-keyTimes.html
2974
2975         * svg/SVGAnimationElement.cpp:
2976         (WebCore::SVGAnimationElement::calculateKeyTimesIndex):
2977
2978 2011-06-26  Dan Bernstein  <mitz@apple.com>
2979
2980         Reviewed by Darin Adler.
2981
2982         With word-break: break-all, words do not break correctly before a surrogate pair
2983         https://bugs.webkit.org/show_bug.cgi?id=63401
2984
2985         The code to check for mid-word breaks accumulates width one character at a time. It was actually
2986         measuring the two parts of the surrogate pair individually, so they appeared to have zero width.
2987         Fixed by checking for surrogate pairs and measuring the pair as one unit.
2988
2989         Test: fast/text/midword-break-before-surrogate-pair.html
2990
2991         * rendering/RenderBlockLineLayout.cpp:
2992         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
2993
2994 2011-06-26  Dirk Schulze  <krit@webkit.org>
2995
2996         Reviewed by Nikolas Zimmermann.
2997
2998         SVGAnimatedType should support SVGNumberOptionalNumber animation
2999         https://bugs.webkit.org/show_bug.cgi?id=63397
3000         
3001         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
3002         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGAnimatedNumberOptionalNumber.
3003         
3004         Animations of attributes with type SVGAnimatedNumberOptionalNumber can be interpolated now. This can be used for smooth
3005         growing shadows with feGaussianBlur, feDropShadow or other filter effects.
3006
3007         Tests: svg/animations/svgnumberoptionalnumber-animation-1.html
3008                svg/animations/svgnumberoptionalnumber-animation-2.html
3009                svg/animations/svgnumberoptionalnumber-animation-3.html
3010                svg/animations/svgnumberoptionalnumber-animation-4.html
3011
3012         * CMakeLists.txt: Added new files to build system.
3013         * GNUmakefile.list.am: Ditto.
3014         * WebCore.gypi: Ditto.
3015         * WebCore.pro: Ditto.
3016         * WebCore.vcproj/WebCore.vcproj: Ditto.
3017         * WebCore.xcodeproj/project.pbxproj: Ditto.
3018         * svg/SVGAllInOne.cpp: Ditto.
3019         * svg/SVGAnimateElement.cpp: Make use of attribute type AnimatedNumberOptionalNumber.
3020         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
3021         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3022         (WebCore::SVGAnimateElement::calculateFromAndToValues):
3023         (WebCore::SVGAnimateElement::calculateFromAndByValues):
3024         (WebCore::SVGAnimateElement::resetToBaseValue):
3025         (WebCore::SVGAnimateElement::applyResultsToTarget):
3026         (WebCore::SVGAnimateElement::calculateDistance):
3027         * svg/SVGAnimatedNumberOptionalNumber.cpp: Added. New animator for SVGAnimatedNumberOptionalNumber.
3028         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::SVGAnimatedNumberOptionalNumberAnimator):
3029         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString):
3030         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateFromAndToValues):
3031         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateFromAndByValues):
3032         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
3033         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateDistance):
3034         * svg/SVGAnimatedNumberOptionalNumber.h: Added.
3035         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::~SVGAnimatedNumberOptionalNumberAnimator):
3036         * svg/SVGAnimatedType.cpp: Added new type: pair<float, float>.
3037         (WebCore::SVGAnimatedType::~SVGAnimatedType):
3038         (WebCore::SVGAnimatedType::createNumberOptionalNumber):
3039         (WebCore::SVGAnimatedType::numberOptionalNumber):
3040         (WebCore::SVGAnimatedType::valueAsString):
3041         (WebCore::SVGAnimatedType::setValueAsString):
3042         * svg/SVGAnimatedType.h:
3043         * svg/SVGAnimatorFactory.h: Add new animator to factory.
3044         (WebCore::SVGAnimatorFactory::create):
3045
3046 2011-06-25  Dimitri Glazkov  <dglazkov@chromium.org>
3047
3048         Reviewed by Adam Barth.
3049
3050         Crash in frameless document with media element.
3051         https://bugs.webkit.org/show_bug.cgi?id=63393
3052
3053         Since MediaControls::create can return 0 (and does for frameless documents), we must anticipate it
3054         in the calling code.
3055
3056         Test: fast/dom/shadow/frameless-media-element-crash.html
3057
3058         * html/HTMLMediaElement.cpp:
3059         (WebCore::HTMLMediaElement::attributeChanged): Changed to bail out if controls weren't successfully created.
3060         (WebCore::HTMLMediaElement::createMediaControls): Renamed to better reflect the purpose, changed to handle failure of creation.
3061         (WebCore::HTMLMediaElement::preDispatchEventHandler): Changed to bail out if controls weren't successfully created.
3062         * html/HTMLMediaElement.h: Adjusted def.
3063
3064 2011-06-25  Joseph Pecoraro  <joepeck@webkit.org>
3065
3066         Reviewed by Darin Adler.
3067
3068         Fix some minor style issues
3069         https://bugs.webkit.org/show_bug.cgi?id=63391
3070
3071         * inspector/DOMNodeHighlighter.cpp:
3072         (WebCore::DOMNodeHighlighter::DrawNodeHighlight):
3073         The explicit WebCore namespace usage can be dropped.
3074
3075         * rendering/RenderView.cpp:
3076         (WebCore::RenderView::mapLocalToContainer):
3077         Use ASSERT_UNUSED for a parameter that we want to ASSERT
3078         on for a debug build, but is UNUSED in a release build.
3079
3080 2011-06-25  Joseph Pecoraro  <joepeck@webkit.org>
3081
3082         Unreviewed build fix.
3083
3084         Use UNUSED_PARAM on the correct param!
3085
3086         * rendering/RenderView.cpp:
3087         (WebCore::RenderView::mapLocalToContainer):
3088
3089 2011-06-25  Joseph Pecoraro  <joepeck@webkit.org>
3090
3091         Reviewed by Simon Fraser.
3092
3093         Inspector highlight rect is wrong for contents of transformed iframes
3094         https://bugs.webkit.org/show_bug.cgi?id=53627
3095
3096         Part 2: Only adjust for the FrameView's scroll position when
3097         the localToAbsolute mapping did not end with fixed content.
3098         Content that is inside of a fixed position container is already
3099         adjusted for the FrameView's scrollPosition when RenderView
3100         maps local to container.
3101
3102         This patch uses a "wasFixed" out parameter to determine if
3103         the localToAbsolute transformation ended inside a fixed block,
3104         and if so does not apply the scroll position.
3105
3106         * page/FrameView.cpp:
3107         (WebCore::FrameView::convertFromRenderer):
3108         Respect wasFixed as described above.
3109
3110         * rendering/RenderBox.h:
3111         * rendering/RenderBox.cpp:
3112         (WebCore::RenderBox::mapLocalToContainer):
3113         This is the only time that "fixed" ever changed. So when
3114         fixed changes, update the optional wasFixed out parameter.
3115
3116         * rendering/RenderObject.cpp:
3117         (WebCore::RenderObject::localToAbsolute):
3118         (WebCore::RenderObject::mapLocalToContainer):
3119         (WebCore::RenderObject::localToContainerQuad):
3120         * rendering/RenderObject.h:
3121         (WebCore::RenderObject::localToAbsoluteQuad):
3122         Ignore wasFixed by default, but pipe it though where needed.
3123
3124         * rendering/RenderView.h:
3125         * rendering/RenderView.cpp:
3126         (WebCore::RenderView::mapLocalToContainer):
3127         This is the final recursive call, so wasFixed goes no
3128         further. We sanity check its value in debug builds.
3129
3130         * rendering/RenderBlock.cpp:
3131         (WebCore::RenderBlock::selectionGapRectsForRepaint):
3132         * rendering/RenderInline.cpp:
3133         (WebCore::RenderInline::mapLocalToContainer):
3134         * rendering/RenderInline.h:
3135         * rendering/svg/RenderSVGForeignObject.cpp:
3136         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
3137         * rendering/svg/RenderSVGForeignObject.h:
3138         * rendering/svg/RenderSVGInline.cpp:
3139         (WebCore::RenderSVGInline::mapLocalToContainer):
3140         * rendering/svg/RenderSVGInline.h:
3141         * rendering/svg/RenderSVGModelObject.cpp:
3142         (WebCore::RenderSVGModelObject::mapLocalToContainer):
3143         * rendering/svg/RenderSVGModelObject.h:
3144         * rendering/svg/RenderSVGRoot.cpp:
3145         (WebCore::RenderSVGRoot::mapLocalToContainer):
3146         * rendering/svg/RenderSVGRoot.h:
3147         * rendering/svg/RenderSVGText.cpp:
3148         (WebCore::RenderSVGText::mapLocalToContainer):
3149         * rendering/svg/RenderSVGText.h:
3150         * rendering/svg/SVGRenderSupport.cpp:
3151         (WebCore::SVGRenderSupport::mapLocalToContainer):
3152         * rendering/svg/SVGRenderSupport.h:
3153         Pipe wasFixed through where needed.
3154
3155 2011-06-25  Joseph Pecoraro  <joepeck@webkit.org>
3156
3157         Reviewed by Simon Fraser.
3158
3159         Inspector highlight rect is wrong for contents of transformed iframes
3160         https://bugs.webkit.org/show_bug.cgi?id=53627
3161
3162         Part 1: Provide FloatQuad versions of convertFromRenderer,
3163         convertToContainingView, and convertChildToSelf, so that we
3164         can get the fully transformed quad of a renderer all the
3165         way up to the root widget.
3166
3167         * page/FrameView.cpp:
3168         (WebCore::FrameView::convertFromRenderer):
3169         (WebCore::FrameView::convertToContainingView):
3170         * page/FrameView.h:
3171         * platform/ScrollView.h:
3172         (WebCore::ScrollView::convertChildToSelf):
3173         * platform/Widget.h:
3174         * platform/Widget.cpp:
3175         (WebCore::Widget::convertToContainingView):
3176         Provide FloatQuad versions of these already existing functions.
3177
3178         (WebCore::Widget::convertToRootContainingView):
3179         Provide a helper conversion function to recursively
3180         convert a given FloatQuad up to the root widget.
3181
3182         * inspector/DOMNodeHighlighter.cpp:
3183         (WebCore::DOMNodeHighlighter::DrawNodeHighlight):
3184         Use the new methods to convert the FloatQuad for the highlighted
3185         node to the root container, without losing transformation
3186         information. Add a FIXME for SVG, which is still broken.
3187
3188         * WebCore.exp.in:
3189         Export the new Widget functions so WebKit can link properly.
3190
3191 2011-06-25  Dirk Schulze  <krit@webkit.org>
3192
3193         Unreviewed build fix.
3194
3195         SVGAnimatedType should support SVGNumberList animation
3196         https://bugs.webkit.org/show_bug.cgi?id=63387
3197
3198         * svg/SVGAnimatedNumberList.cpp:
3199         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
3200
3201 2011-06-25  Dirk Schulze  <krit@webkit.org>
3202
3203         Reviewed by Nikolas Zimmermann.
3204
3205         SVGAnimatedType should support SVGNumberList animation
3206         https://bugs.webkit.org/show_bug.cgi?id=63387
3207         
3208         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
3209         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGNumberList.
3210         
3211         Animations of attributes with type SVGNumberList can be interpolated now.
3212
3213         Tests: svg/animations/svgnumberlist-animation-1.html
3214                svg/animations/svgnumberlist-animation-2.html
3215
3216         * CMakeLists.txt: Added new file to build system.
3217         * GNUmakefile.list.am: Ditto.
3218         * WebCore.gypi: Ditto.
3219         * WebCore.pro: Ditto.
3220         * WebCore.xcodeproj/project.pbxproj: Ditto.
3221         * svg/SVGAllInOne.cpp: Ditto.
3222         * svg/SVGAnimateElement.cpp: Make use of attribute type AnimatedNumberList.
3223         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
3224         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3225         (WebCore::SVGAnimateElement::calculateFromAndToValues):
3226         (WebCore::SVGAnimateElement::calculateFromAndByValues):
3227         (WebCore::SVGAnimateElement::resetToBaseValue):
3228         (WebCore::SVGAnimateElement::applyResultsToTarget):
3229         (WebCore::SVGAnimateElement::calculateDistance):
3230         * svg/SVGAnimatedNumber.cpp:
3231         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedNumber): Made method static for reuse in SVGAnimatedNumberList (and SVGAnimatedNumberOptionalNumber later).
3232         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue): Use new static function.
3233         * svg/SVGAnimatedNumber.h:
3234         * svg/SVGAnimatedNumberList.cpp: Added. New animator for SVGNumberList.
3235         (WebCore::SVGAnimatedNumberListAnimator::SVGAnimatedNumberListAnimator):
3236         (WebCore::SVGAnimatedNumberListAnimator::constructFromString):
3237         (WebCore::SVGAnimatedNumberListAnimator::calculateFromAndToValues):
3238         (WebCore::SVGAnimatedNumberListAnimator::calculateFromAndByValues):
3239         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
3240         (WebCore::SVGAnimatedNumberListAnimator::calculateDistance):
3241         * svg/SVGAnimatedNumberList.h:
3242         (WebCore::SVGAnimatedNumberListAnimator::~SVGAnimatedNumberListAnimator):
3243         * svg/SVGAnimatedType.cpp: Use new Animator.
3244         (WebCore::SVGAnimatedType::~SVGAnimatedType):
3245         (WebCore::SVGAnimatedType::createNumberList):
3246         (WebCore::SVGAnimatedType::numberList):
3247         (WebCore::SVGAnimatedType::valueAsString):
3248         (WebCore::SVGAnimatedType::setValueAsString):
3249         * svg/SVGAnimatedType.h:
3250         * svg/SVGAnimatorFactory.h:
3251         (WebCore::SVGAnimatorFactory::create):
3252
3253 2011-06-25  Nikolas Zimmermann  <nzimmermann@rim.com>
3254
3255         Reviewed by Dirk Schulze.
3256
3257         Convert SVGPath to SVGAnimatorFactory concept
3258         https://bugs.webkit.org/show_bug.cgi?id=63336
3259
3260         Convert <animate attributeName="d"> parsing to the new SVGAnimatorFactory concept, removing
3261         the last special data types from SVGAnimateElement: SVGPathByteStream m_fromPath/m_toPath/m_animatedPath.
3262         All existing non-string primitives have been converted to the new concept.
3263
3264         Doesn't change any functionality.
3265
3266         * CMakeLists.txt: Added SVGAnimatedPath.*.
3267         * GNUmakefile.list.am: Ditto.
3268         * WebCore.gypi: Ditto.
3269         * WebCore.pro: Ditto.
3270         * WebCore.vcproj/WebCore.vcproj: Ditto.
3271         * WebCore.xcodeproj/project.pbxproj: Ditto.
3272         * svg/SVGAllInOne.cpp: Ditto.
3273         * svg/SVGAnimateElement.cpp:
3274         (WebCore::SVGAnimateElement::SVGAnimateElement):
3275         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3276         (WebCore::SVGAnimateElement::calculateFromAndToValues):
3277         (WebCore::SVGAnimateElement::calculateFromAndByValues):
3278         (WebCore::SVGAnimateElement::resetToBaseValue):
3279         (WebCore::SVGAnimateElement::applyResultsToTarget):
3280         * svg/SVGAnimateElement.h:
3281         * svg/SVGAnimatedPath.cpp: Added.
3282         (WebCore::SVGAnimatedPathAnimator::SVGAnimatedPathAnimator):
3283         (WebCore::SVGAnimatedPathAnimator::constructFromString):
3284         (WebCore::SVGAnimatedPathAnimator::calculateFromAndToValues):
3285         (WebCore::SVGAnimatedPathAnimator::calculateFromAndByValues):
3286         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
3287         (WebCore::SVGAnimatedPathAnimator::calculateDistance):
3288         * svg/SVGAnimatedPath.h: Added.
3289         (WebCore::SVGAnimatedPathAnimator::~SVGAnimatedPathAnimator):
3290         * svg/SVGAnimatedType.cpp:
3291         (WebCore::SVGAnimatedType::~SVGAnimatedType):
3292         (WebCore::SVGAnimatedType::createPath):
3293         (WebCore::SVGAnimatedType::path):
3294         (WebCore::SVGAnimatedType::valueAsString):
3295         (WebCore::SVGAnimatedType::setValueAsString):
3296         * svg/SVGAnimatedType.h:
3297         * svg/SVGAnimatorFactory.h:
3298         (WebCore::SVGAnimatorFactory::create):
3299         * svg/SVGPathByteStream.h:
3300         (WebCore::SVGPathByteStream::initializeFrom):
3301         * svg/SVGPathParserFactory.cpp:
3302         (WebCore::SVGPathParserFactory::buildSVGPathByteStreamFromSVGPathSegList):
3303         (WebCore::SVGPathParserFactory::buildSVGPathByteStreamFromString):
3304         (WebCore::SVGPathParserFactory::buildAnimatedSVGPathByteStream):
3305
3306 2011-06-25  Jer Noble  <jer.noble@apple.com>
3307
3308         Reviewed by Maciej Stachowiak.
3309
3310         SOFT_LINK_POINTER_OPTIONAL isn't optional.
3311         https://bugs.webkit.org/show_bug.cgi?id=63378
3312
3313         Continuation of r89718.  SOFT_LINK_POINTER_OPTIONAL should check the value returned by dlsym before dereferencing it.
3314
3315         * platform/mac/SoftLinking.h:
3316
3317 2011-06-25  Rob Buis  <rbuis@rim.com>
3318
3319         Reviewed by Nikolas Zimmermann.
3320
3321         SVG1.1SE test linking-uri-01-b.svg fails
3322         https://bugs.webkit.org/show_bug.cgi?id=63322
3323
3324         Allow navigating to internal <view> targets. When choosing Back ensure
3325         the <svg> current view is initialized correctly.
3326
3327         Tests: svg/W3C-SVG-1.1-SE/linking-uri-01-b.svg
3328                svg/custom/linking-uri-01-b.svg
3329
3330         * page/FrameView.cpp: Delegate to setupInitialView.
3331         (WebCore::FrameView::scrollToAnchor):
3332         * svg/SVGAElement.cpp: Allow navigating to internal <view> targets.
3333         (WebCore::SVGAElement::defaultEventHandler):
3334         * svg/SVGSVGElement.cpp:
3335         (WebCore::SVGSVGElement::setupInitialView): Initialize current view depending on fragment identifier.
3336         (WebCore::SVGSVGElement::inheritViewAttributes):
3337         * svg/SVGSVGElement.h:
3338
3339 2011-06-24  Dimitri Glazkov  <dglazkov@chromium.org>
3340
3341         Reviewed by Darin Adler.
3342
3343         REGRESSION (r77740): Shadow DOM pseudo elements aren't matching when combined with descendant selectors
3344         https://bugs.webkit.org/show_bug.cgi?id=63373
3345
3346         * css/CSSStyleSelector.cpp:
3347         (WebCore::CSSStyleSelector::pushParentStackFrame): Changed to use parentOrHostElement.
3348         (WebCore::CSSStyleSelector::pushParent): Ditto.
3349         * dom/Node.cpp:
3350         (WebCore::Node::parentOrHostElement): Added.
3351         * dom/Node.h:
3352
3353 2011-06-24  Dan Bernstein  <mitz@apple.com>
3354
3355         Reviewed by Anders Carlsson.
3356
3357         Add an option to enable legacy rounding hacks
3358         https://bugs.webkit.org/show_bug.cgi?id=63363
3359
3360         Restored most of text rounding hacks which were removed in r78846, with a global flag to control
3361         whether rounding hacks are allowed, which defaults to false.
3362
3363         Test: platform/mac/fast/text/rounding-hacks.html
3364
3365         * CMakeLists.txt: Added TextRun.cpp.
3366         * GNUmakefile.list.am: Ditto.
3367         * WebCore.exp.in: Export new TextRun function and global and updated StringTruncator functions.
3368         * WebCore.gypi: Added TextRun.cpp.
3369         * WebCore.pro: Ditto.
3370         * WebCore.vcproj/WebCore.vcproj: Ditto.
3371         * WebCore.xcodeproj/project.pbxproj: Ditto.
3372         * html/canvas/CanvasRenderingContext2D.cpp:
3373         (WebCore::CanvasRenderingContext2D::drawTextInternal): Disable rounding hacks in the one place
3374         they used to be disabled.
3375         * platform/graphics/Font.cpp: Re-added the rounding character table.
3376         * platform/graphics/Font.h:
3377         (WebCore::Font::isRoundingHackCharacter): Re-added.
3378         * platform/graphics/FontFastPath.cpp:
3379         (WebCore::Font::getGlyphsAndAdvancesForSimpleText): Account for final rounding width.
3380         * platform/graphics/SimpleFontData.cpp:
3381         (WebCore::SimpleFontData::platformGlyphInit): Initialize m_adjustedSpaceWidth.
3382         * platform/graphics/SimpleFontData.h:
3383         (WebCore::SimpleFontData::adjustedSpaceWidth): Re-added.
3384         * platform/graphics/StringTruncator.cpp:
3385         (WebCore::stringWidth): Re-added disableRoundingHacks parameter.
3386         (WebCore::truncateString): Ditto.
3387         (WebCore::StringTruncator::centerTruncate): Added EnableRoundingHacksOrNot parameter.
3388         (WebCore::StringTruncator::rightTruncate): Ditto.
3389         (WebCore::StringTruncator::width): Ditto.
3390         * platform/graphics/StringTruncator.h:
3391         * platform/graphics/TextRun.cpp: Added.
3392         (WebCore::TextRun::setAllowsRoundingHacks): Added.
3393         * platform/graphics/TextRun.h:
3394         (WebCore::TextRun::TextRun): Added RoundingHacks parameter to the constructors, used to initialize
3395         the m_applyRunRounding and m_applyWordRounding member variables, subject to rounding hacks being allowed.
3396         (WebCore::TextRun::applyRunRounding): Re-added this accessor.
3397         (WebCore::TextRun::applyWordRounding): Ditto.
3398         (WebCore::TextRun::disableRoundingHacks): Re-added.
3399         * platform/graphics/WidthIterator.cpp:
3400         (WebCore::WidthIterator::WidthIterator): Re-added code to apply rounding hacks.
3401         (WebCore::WidthIterator::advance): Ditto.
3402         * platform/graphics/WidthIterator.h:
3403         * platform/graphics/mac/ComplexTextController.cpp:
3404         (WebCore::ceilCGFloat): Re-added.
3405         (WebCore::ComplexTextController::ComplexTextController): Re-added code to apply rounding hacks.
3406         (WebCore::ComplexTextController::advance): Ditto.
3407         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto.
3408         * platform/graphics/mac/ComplexTextController.h:
3409         (WebCore::ComplexTextController::finalRoundingWidth): Re-added this accessor.
3410         * platform/graphics/mac/FontComplexTextMac.cpp:
3411         (WebCore::Font::getGlyphsAndAdvancesForComplexText): Accound for final rounding width.
3412         * platform/graphics/qt/SimpleFontDataQt.cpp:
3413         (WebCore::SimpleFontData::platformGlyphInit): Initialize m_adjustedSpaceWidth.
3414         * platform/gtk/RenderThemeGtk.cpp:
3415         (WebCore::RenderThemeGtk::fileListNameForWidth): Enabled rounding hacks in the string truncator.
3416         * platform/mac/DragImageMac.mm:
3417         (WebCore::widthWithFont): Disable rounding hacks when measuring.
3418         (WebCore::drawAtPoint): Disable rounding hacks when drawing.
3419         * platform/win/DragImageWin.cpp:
3420         (WebCore::createDragImageForLink): Enable rounding hacks in the string truncator.
3421         * platform/win/WebCoreTextRenderer.cpp:
3422         (WebCore::WebCoreTextFloatWidth): Ditto.
3423         * rendering/RenderFileUploadControl.cpp:
3424         (WebCore::RenderFileUploadControl::paintObject): Disable rounding hacks.
3425         * rendering/RenderListBox.cpp:
3426         (WebCore::RenderListBox::updateFromElement): Ditto.
3427         (WebCore::RenderListBox::paintItemForeground): Ditto.
3428         * rendering/RenderTextControl.cpp:
3429         (WebCore::RenderTextControl::getAvgCharWidth): Ditto.
3430         * rendering/RenderTheme.cpp:
3431         (WebCore::RenderTheme::fileListNameForWidth): Enabled rounding hacks in the string truncator.
3432         * rendering/RenderThemeMac.mm:
3433         (WebCore::RenderThemeMac::fileListNameForWidth): Ditto.
3434         * rendering/svg/SVGInlineTextBox.cpp:
3435         (WebCore::SVGInlineTextBox::constructTextRun): Disabled rounding hacks.
3436         * rendering/svg/SVGTextMetrics.cpp:
3437         (WebCore::constructTextRun): Ditto.
3438
3439 2011-06-24  Nikolas Zimmermann  <nzimmermann@rim.com>
3440
3441         Reviewed by Rob Buis.
3442
3443         Integrate SVG Fonts within GlyphPage concept, removing the special SVG code paths from Font, making it possible to reuse the simple text code path for SVG Fonts
3444         https://bugs.webkit.org/show_bug.cgi?id=59085
3445
3446         font substitution doesn't work for HTML text using SVG fonts
3447         https://bugs.webkit.org/show_bug.cgi?id=17608
3448
3449         Selection rects are wrong for text with SVG fonts
3450         https://bugs.webkit.org/show_bug.cgi?id=25460
3451
3452         With @font-face, SVG fonts only work as primary, non-segmented
3453         https://bugs.webkit.org/show_bug.cgi?id=32227
3454
3455         When using SVG fonts with @font-face word-spacing and text-align: justify are not being honored