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