a29a3f1a640085b0432a816b3f200e2224c74d50
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-07-13  Alexandru Chiculita  <achicu@adobe.com>
2
3         [CSS Exclusions] Fix for comment #23 on wrap-shape parsing bug 61726
4         https://bugs.webkit.org/show_bug.cgi?id=64464
5
6         Reviewed by Tony Chang.
7
8         No new tests needed.
9
10         * css/CSSParser.cpp:
11         (WebCore::CSSParser::parseWrapShapeRect): Removed the "valid" local.
12         (WebCore::CSSParser::parseWrapShapeCircle): Removed the "valid" local.
13         (WebCore::CSSParser::parseWrapShapeEllipse): Removed the "valid" local.
14         * css/CSSPrimitiveValue.cpp:
15         * css/CSSWrapShapes.h:
16         (WebCore::CSSWrapShapePolygon::getXAt): Replaced bit shift with multiplication.
17         (WebCore::CSSWrapShapePolygon::getYAt): Replaced bit shift with multiplication.
18         * rendering/style/RenderStyle.cpp:
19         * rendering/style/StyleRareNonInheritedData.h:
20
21 2011-07-13  Abhishek Arya  <inferno@chromium.org>
22
23         Reviewed by Adam Barth.
24
25         Issue with Frame lifetime due to deletion in beforeload event.
26         https://bugs.webkit.org/show_bug.cgi?id=64457
27
28         Copy the Frame protector higher in the stack from loadWithDocumentLoader
29         to loadFrameRequest since any of loadPostRequest or loadURL can call
30         loadWithDocumentLoader, thereby dispatching the beforeload event and
31         blowing away the frame. This deleted frame will be later accessed in
32         the loadFrameRequest function causing a crash.       
33  
34         Test: fast/events/form-iframe-target-before-load-crash2.html
35
36         * loader/FrameLoader.cpp:
37         (WebCore::FrameLoader::loadFrameRequest):
38         (WebCore::FrameLoader::loadWithDocumentLoader):
39
40 2011-07-13  Mihnea Ovidenie  <mihnea@adobe.com>
41
42         [CSSRegions]content:-webkit-from-flow not applied correctly
43         https://bugs.webkit.org/show_bug.cgi?id=64438
44
45         Reviewed by Tony Chang.
46
47         Forgot to modify getStringValue(), i was modifying only getStringValue(ExceptionCode&).
48
49         Test: fast/regions/content-webkit-from-flow-parsing.html (existing).
50
51         * css/CSSPrimitiveValue.cpp:
52         (WebCore::CSSPrimitiveValue::getStringValue):
53
54 2011-07-12  Ryosuke Niwa  <rniwa@webkit.org>
55
56         Don't reuse the last InsertTextCommand
57         https://bugs.webkit.org/show_bug.cgi?id=64416
58
59         Reviewed by Justin Garcia.
60
61         This patch makes the interface of InsertTextCommand less foreign. It now takes arguments in
62         its constructor and executes the command in doApply like other edit commands.
63
64         * editing/CompositeEditCommand.cpp:
65         (WebCore::CompositeEditCommand::applyCommandToComposite): Added.
66         * editing/CompositeEditCommand.h:
67         * editing/InsertTextCommand.cpp:
68         (WebCore::InsertTextCommand::InsertTextCommand): Takes arguments input used to take.
69         (WebCore::InsertTextCommand::doApply): Renamed from input.
70         * editing/InsertTextCommand.h:
71         (WebCore::InsertTextCommand::create): Takes arguments input used to take.
72         * editing/TypingCommand.cpp:
73         (WebCore::TypingCommand::insertTextRunWithoutNewlines): Creates InsertTextCommand.
74
75 2011-07-12  Dmitry Lomov  <dslomov@google.com>
76
77         https://bugs.webkit.org/show_bug.cgi?id=63041
78         [Chromium][V8] Make DOMDataStore per-isolate
79         This patch:
80          - makes DOMData class an utility class with static members only
81          - adds an isolate-specific DOMDataStore in V8BindingPerIsolateData.
82         Dromaeo benchmarks are not affected.
83
84         Reviewed by Adam Barth.
85
86         * bindings/v8/DOMData.cpp:
87         (WebCore::getDefaultStore):
88         (WebCore::DOMData::getCurrentStore):
89         * bindings/v8/DOMData.h:
90         * bindings/v8/DOMDataStore.cpp:
91         (WebCore::DOMDataStore::DOMDataStore):
92         (WebCore::DOMDataStore::allStores):
93         * bindings/v8/DOMDataStore.h:
94         * bindings/v8/ScopedDOMDataStore.cpp:
95         (WebCore::ScopedDOMDataStore::ScopedDOMDataStore):
96         * bindings/v8/ScopedDOMDataStore.h:
97         * bindings/v8/StaticDOMDataStore.cpp:
98         (WebCore::StaticDOMDataStore::StaticDOMDataStore):
99         * bindings/v8/StaticDOMDataStore.h:
100         * bindings/v8/V8Binding.h:
101         (WebCore::V8BindingPerIsolateData::allStores):
102         (WebCore::V8BindingPerIsolateData::getDOMDataStore):
103         (WebCore::V8BindingPerIsolateData::setDOMDataStore):
104         * bindings/v8/V8Binding.cpp:
105         (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
106         * bindings/v8/V8DOMMap.cpp:
107         (WebCore::DOMDataStoreHandle::DOMDataStoreHandle):
108         (WebCore::getDOMDataStore):
109         (WebCore::enableFasterDOMStoreAccess):
110
111 2011-07-12  Simon Fraser  <simon.fraser@apple.com>
112
113         Rename compositing-related updateContentsScale() methods
114         https://bugs.webkit.org/show_bug.cgi?id=64430
115
116         Reviewed by Joseph Pecoraro.
117
118         Rename updateContentsScale() to something less presumptuous; layers may choose
119         to do something other than update their contents scale when the page scale factor
120         changes. pageScaleFactorChanged() is a better name.
121
122         * page/Frame.cpp:
123         (WebCore::Frame::pageScaleFactorChanged):
124         (WebCore::Frame::scalePage):
125         * page/Frame.h:
126         * rendering/RenderLayer.cpp:
127         (WebCore::RenderLayer::pageScaleFactorChanged):
128         * rendering/RenderLayer.h:
129         * rendering/RenderLayerBacking.cpp:
130         (WebCore::RenderLayerBacking::pageScaleFactorChanged):
131         * rendering/RenderLayerBacking.h:
132         * rendering/RenderLayerCompositor.cpp:
133         (WebCore::RenderLayerCompositor::pageScaleFactorChanged):
134         * rendering/RenderLayerCompositor.h:
135
136 2011-07-13  Pierre Rossi  <pierre.rossi@gmail.com>
137
138         Fix compile for QRawFont.
139
140         https://bugs.webkit.org/show_bug.cgi?id=64453
141
142         Reviewed by Andreas Kling.
143
144         * platform/graphics/GraphicsContext.h:
145         * platform/graphics/qt/FontQt.cpp:
146         (WebCore::Font::drawGlyphs):
147
148 2011-07-13  John Knottenbelt  <jknotten@chromium.org>
149
150         Reference Geolocation object from GeoNotifier and Geolocation::setIsAllowed.
151         https://bugs.webkit.org/show_bug.cgi?id=64363
152
153         Reviewed by Tony Gentilcore.
154
155         Test: fast/dom/Geolocation/remove-remote-context-in-error-callback-crash.html
156
157         * page/Geolocation.cpp:
158         (WebCore::Geolocation::setIsAllowed):
159         * page/Geolocation.h:
160
161 2011-07-13  Vsevolod Vlasov  <vsevik@chromium.org>
162
163         Web Inspector: Network panel search needs each resource to have unique identifier.
164         https://bugs.webkit.org/show_bug.cgi?id=64287
165
166         Reviewed by Pavel Feldman.
167
168         * inspector/front-end/NetworkManager.js:
169         (WebInspector.NetworkManager.prototype.requestContent):
170         (WebInspector.NetworkDispatcher):
171         (WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
172         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
173         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
174         * inspector/front-end/NetworkPanel.js:
175         (WebInspector.NetworkPanel.prototype._appendResource):
176         (WebInspector.NetworkPanel.prototype._frameNavigated):
177         (WebInspector.NetworkPanel.prototype._updateSearchMatchedListAfterResourceIdentifierChanged):
178
179 2011-07-13  Alexandru Chiculita  <achicu@adobe.com>
180
181         Bridge RenderBoxModelObject::calculateBackgroundImageGeometry parameters into a class
182         https://bugs.webkit.org/show_bug.cgi?id=63987
183
184         Reviewed by Hajime Morita.
185
186         Change doesn't add new functionality. No test needed.
187
188         * rendering/RenderBox.cpp:
189         (WebCore::RenderBox::maskClipRect):
190         (WebCore::RenderBox::repaintLayerRectsForImage):
191         * rendering/RenderBoxModelObject.cpp:
192         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
193         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
194         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
195         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
196         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::clip):
197         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::relativePhase):
198         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
199         * rendering/RenderBoxModelObject.h:
200         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destOrigin):
201         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestOrigin):
202         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destRect):
203         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestRect):
204         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::phase):
205         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhase):
206         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::tileSize):
207         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setTileSize):
208         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseX):
209         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseY):
210
211 2011-07-13  MORITA Hajime  <morrita@google.com>
212
213         Refactoring: Ignored ExceptionCode value should be less annoying.
214         https://bugs.webkit.org/show_bug.cgi?id=63688
215
216         - Introduced ExceptionCodePlaceholder class for the default parameter of ExceptionCode.
217         - Introduced ASSERT_NO_EXCEPTION to check ExceptionCode not set to non-zero after the call.
218         - Adopted ASSERT_NO_EXCEPTION in Range.cpp
219
220         No new tests. No behaviour change.
221
222         Reviewed by Darin Adler.
223
224         * GNUmakefile.list.am:
225         * WebCore.gypi:
226         * WebCore.xcodeproj/project.pbxproj:
227         * dom/ExceptionCodePlaceholder.h: Added.
228         (WebCore::ExceptionCodePlaceholder::ExceptionCodePlaceholder):
229         (WebCore::ExceptionCodePlaceholder::operator ExceptionCode& ):
230         (WebCore::IgnorableExceptionCode::IgnorableExceptionCode):
231         (WebCore::CheckedExceptionCode::CheckedExceptionCode):
232         (WebCore::CheckedExceptionCode::~CheckedExceptionCode):
233         * dom/Range.cpp:
234         (WebCore::Range::Range):
235         (WebCore::Range::editingStartPosition):
236         * dom/Range.h:        
237
238 2011-07-13  Nikolas Zimmermann  <nzimmermann@rim.com>
239
240         Regression: OOB read in svg text run
241         https://bugs.webkit.org/show_bug.cgi?id=63627
242
243         Not reviewed.
244
245         Fixed last minute typo leading to assertions.
246
247         * rendering/InlineTextBox.cpp:
248         (WebCore::InlineTextBox::paintSelection):
249
250 2011-07-12  Andrey Kosyakov  <caseq@chromium.org>
251
252         Web Inspector: factor NetworkLogView out of Network panel
253         https://bugs.webkit.org/show_bug.cgi?id=64366
254
255         Reviewed by Pavel Feldman.
256
257         * inspector/front-end/NetworkPanel.js:
258         (WebInspector.NetworkLogView):
259         (WebInspector.NetworkLogView.prototype.get useLargeRows):
260         (WebInspector.NetworkLogView.prototype.set allowPopover):
261         (WebInspector.NetworkLogView.prototype.elementsToRestoreScrollPositionsFor):
262         (WebInspector.NetworkLogView.prototype.resize):
263         (WebInspector.NetworkLogView.prototype._createTable):
264         (WebInspector.NetworkLogView.prototype.show):
265         (WebInspector.NetworkLogView.prototype.hide):
266         (WebInspector.NetworkLogView.prototype._reset):
267         (WebInspector.NetworkLogView.prototype.switchToDetailedView):
268         (WebInspector.NetworkLogView.prototype.switchToBriefView):
269         (WebInspector.NetworkLogView.prototype.get _setLargerResources):
270         (WebInspector.NetworkLogView.prototype._getPopoverAnchor):
271         (WebInspector.NetworkPanel):
272         (WebInspector.NetworkPanel.prototype.get toolbarItemLabel):
273         (WebInspector.NetworkPanel.prototype.get statusBarItems):
274         (WebInspector.NetworkPanel.prototype.elementsToRestoreScrollPositionsFor):
275         (WebInspector.NetworkPanel.prototype.resize):
276         (WebInspector.NetworkPanel.prototype._reset):
277         (WebInspector.NetworkPanel.prototype.updateSidebarWidth):
278         (WebInspector.NetworkPanel.prototype.updateMainViewWidth):
279         (WebInspector.NetworkPanel.prototype.handleShortcut):
280         (WebInspector.NetworkPanel.prototype.show):
281         (WebInspector.NetworkPanel.prototype.hide):
282         (WebInspector.NetworkPanel.prototype.get resources):
283         (WebInspector.NetworkPanel.prototype.resourceById):
284         (WebInspector.NetworkPanel.prototype.canShowAnchorLocation):
285         (WebInspector.NetworkPanel.prototype.showAnchorLocation):
286         (WebInspector.NetworkPanel.prototype._onViewCleared):
287         (WebInspector.NetworkPanel.prototype._onRowSizeChanged):
288         (WebInspector.NetworkPanel.prototype._onResourceSelected):
289         (WebInspector.NetworkPanel.prototype._showResource):
290         (WebInspector.NetworkPanel.prototype._closeVisibleResource):
291         (WebInspector.NetworkPanel.prototype._toggleGridMode):
292         (WebInspector.NetworkPanel.prototype._toggleViewingResourceMode):
293         (WebInspector.NetworkPanel.prototype.performSearch):
294         (WebInspector.NetworkPanel.prototype.jumpToPreviousSearchResult):
295         (WebInspector.NetworkPanel.prototype.jumpToNextSearchResult):
296         (WebInspector.NetworkPanel.prototype.searchCanceled):
297         (WebInspector.NetworkDataGridNode):
298         (WebInspector.NetworkDataGridNode.prototype.isFilteredOut):
299         (WebInspector.NetworkDataGridNode.prototype.select):
300         (WebInspector.NetworkDataGridNode.prototype.get selectable):
301
302 2011-07-13  Sheriff Bot  <webkit.review.bot@gmail.com>
303
304         Unreviewed, rolling out r90634.
305         http://trac.webkit.org/changeset/90634
306         https://bugs.webkit.org/show_bug.cgi?id=64448
307
308         Qt HTTP Pipelining is not robust enough to be used in that
309         generic way. (Requested by benjaminp on #webkit).
310
311         * platform/network/qt/ResourceRequestQt.cpp:
312         (WebCore::ResourceRequest::toNetworkRequest):
313
314 2011-07-13  Nikolas Zimmermann  <nzimmermann@rim.com>
315
316         Regression: OOB read in svg text run
317         https://bugs.webkit.org/show_bug.cgi?id=63627
318
319         Reviewed by Zoltan Herczeg.
320
321         A TextRun is constructed for a portion of a string [a,b] whose original length is c (0 < a < b < c).
322         The TextRun charactersLength variable stores the length of the remaining text from (b..c) in order
323         to support ligatures in SVG Fonts. Example: <text>ffl</text>. When measuring the advance from char 0
324         to char 1 the whole 'ffl' text must be passed to the SVG glyph selection code, as the SVG Font may
325         define a single glyph for the characters 'ffl' thus leading to a single character long text
326         pointing to the ffl ligature, not three individual 'f' / 'f' / 'l' characters anymore.
327
328         constructTextRun(..const UChar*, int length, ..) did not correctly calculate the maximum length (b..c).
329         The passed in UChar buffer starts at eg. textRenderer->characters() + start(), and following condition
330         holds true for 'length': start() + length <= textRenderer->textLength() (which denotes the maximum length
331         of the textRenderer->characters() buffer). We have to keep track of the start() offset, so that we
332         can calculate the charactersLength for the TextRun correctly: textRenderer->textLength() - start().
333
334         There are also other cases like RenderCombinedText and/or the presence of hyphens that were incorrectly
335         tracked. Only InlineTextBox had to be fixed, the other callsites in eg. RenderBlockLineLayout already
336         computed the maximum length correctly - I assured this by valgrind runs on all SVG Font tests.
337
338         * rendering/InlineTextBox.cpp:
339         (WebCore::InlineTextBox::paint):
340         (WebCore::InlineTextBox::paintSelection):
341         (WebCore::InlineTextBox::constructTextRun): Add maximumLength parameter to constructTextRun.
342         * rendering/InlineTextBox.h: Ditto.
343
344 2011-07-12  Antti Koivisto  <antti@apple.com>
345
346         didFirstVisuallyNonEmptyLayout dispatched too early
347         https://bugs.webkit.org/show_bug.cgi?id=64412
348
349         Reviewed by Darin Adler and Sam Weinig.
350
351         Improve the mechanism that dispatches didFirstVisuallyNonEmptyLayout
352
353         - Wait until a threshold of characters and pixels has been exceeded before dispatching.
354         - Wait until stylesheets are loaded (painting is disabled in this case).
355
356         * page/FrameView.cpp:
357         (WebCore::FrameView::reset):
358         (WebCore::FrameView::performPostLayoutTasks):
359         * page/FrameView.h:
360         (WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount):
361         (WebCore::FrameView::incrementVisuallyNonEmptyPixelCount):
362         * rendering/RenderImage.cpp:
363         (WebCore::RenderImage::RenderImage):
364         (WebCore::RenderImage::imageChanged):
365         * rendering/RenderImage.h:
366         * rendering/RenderText.cpp:
367         (WebCore::RenderText::RenderText):
368
369 2011-07-12  MORITA Hajime  <morrita@google.com>
370
371         [Refactoring][ShadowContentElement] Forwarded node list should be a linked-list.
372         https://bugs.webkit.org/show_bug.cgi?id=64252
373
374         Reviewed by Dimitri Glazkov.
375
376         Introduced ShadowInclusionList and ShadowInclusion for maintaining
377         forwarded content children. ShadowInclusion is doubly-linked list.
378         ShadowContentElement::m_inclusions is replaced by ShadowInclusionList.
379         
380         This change is a prepration for bug 64251, which will introduce
381         forwarded-children to content-element table.
382         
383         No new tests. No behavioral change.
384
385         * dom/NodeRenderingContext.cpp:
386         (WebCore::nextRendererOf):
387         (WebCore::previousRendererOf):
388         (WebCore::firstRendererOf):
389         (WebCore::lastRendererOf):
390         * dom/ShadowContentElement.cpp:
391         (WebCore::ShadowInclusion::append):
392         (WebCore::ShadowInclusion::unlink):
393         (WebCore::ShadowInclusionList::ShadowInclusionList):
394         (WebCore::ShadowInclusionList::~ShadowInclusionList):
395         (WebCore::ShadowInclusionList::find):
396         (WebCore::ShadowInclusionList::clear):
397         (WebCore::ShadowInclusionList::append):
398         (WebCore::ShadowContentElement::attach):
399         * dom/ShadowContentElement.h:
400         (WebCore::ShadowInclusion::includer):
401         (WebCore::ShadowInclusion::content):
402         (WebCore::ShadowInclusion::next):
403         (WebCore::ShadowInclusion::previous):
404         (WebCore::ShadowInclusion::ShadowInclusion):
405         (WebCore::ShadowInclusion::create):
406         (WebCore::ShadowInclusionList::first):
407         (WebCore::ShadowInclusionList::last):
408         (WebCore::ShadowInclusionList::isEmpty):
409         (WebCore::ShadowInclusionList::append):
410         (WebCore::ShadowContentElement::inclusions):
411         * dom/ShadowContentSelector.cpp:
412         (WebCore::ShadowContentSelector::selectInclusion):
413         * dom/ShadowContentSelector.h:
414
415 2011-07-12  David Reveman  <reveman@chromium.org>
416
417         [Chromium] Use nearest filter method with pixel aligned transforms.
418         https://bugs.webkit.org/show_bug.cgi?id=64338
419
420         Reviewed by James Robinson.
421
422         Check for integer translation and use nearest texture filter when
423         possible to avoid filter precisions problems at the layer edges.
424
425         Test: compositing/iframes/nested-iframe-scrolling.html (existing)
426
427         * platform/graphics/chromium/LayerTilerChromium.cpp:
428         (WebCore::LayerTilerChromium::drawTiles):
429         * platform/graphics/transforms/TransformationMatrix.cpp:
430         (WebCore::TransformationMatrix::isIntegerTranslation):
431         * platform/graphics/transforms/TransformationMatrix.h:
432
433 2011-07-12  David Reveman  <reveman@chromium.org>
434
435         Removed unnecessary function parameters from TilingData::textureOffset.
436         https://bugs.webkit.org/show_bug.cgi?id=64245
437
438         Reviewed by Brent Fulgham.
439
440         No new tests, no functionality changes.
441
442         * platform/graphics/chromium/LayerTilerChromium.cpp:
443         (WebCore::LayerTilerChromium::drawTiles):
444         * platform/graphics/gpu/TilingData.cpp:
445         (WebCore::TilingData::textureOffset):
446         * platform/graphics/gpu/TilingData.h:
447
448 2011-07-12  Ryosuke Niwa  <rniwa@webkit.org>
449
450         Move RenderTextControl::indexForVisiblePosition to HTMLTextFormControlElement
451         https://bugs.webkit.org/show_bug.cgi?id=64403
452
453         Reviewed by Hajime Morita.
454
455         Moved indexForVisiblePosition from RenderTextControl to HTMLTextFormControlElement.
456
457         Also replaced the call to RenderTextControl::isSelectableElement by a call to enclosingTextFormControl
458         (moved from htmlediting to HTMLTextFormControlElement) because we are only interested in checking
459         whether the given position is inside the current text form control or not.
460
461         In addition, modernized the code in indexForVisiblePosition by calling parentAnchoredEquivalent on the
462         given position and replacing calls to deprecateNode and deprecatedEditingOffset by calls to containerNode
463         and offsetInContainer.
464
465         * accessibility/AccessibilityRenderObject.cpp:
466         (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Calls indexForVisiblePosition.
467         * editing/htmlediting.cpp: Removed enclosingTextFromControl.
468         * editing/htmlediting.h: Removed enclosingTextFromControl.
469         * html/HTMLTextFormControlElement.cpp:
470         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition): Moved from RenderTextControl.
471         (WebCore::HTMLTextFormControlElement::computeSelectionStart): Calls indexForVisiblePosition.
472         (WebCore::HTMLTextFormControlElement::computeSelectionEnd): Calls indexForVisiblePosition.
473         (WebCore::enclosingTextFormControl): Moved from htmlediting.cpp
474         * html/HTMLTextFormControlElement.h:
475         * rendering/RenderTextControl.cpp:
476         * rendering/RenderTextControl.h:
477
478 2011-07-12  Julien Chaffraix  <jchaffraix@webkit.org>
479
480         Make RenderObject::containingBlock virtual for better speed and clarity
481         https://bugs.webkit.org/show_bug.cgi?id=64318
482
483         Reviewed by Darin Adler.
484
485         No new tests, performance refactoring.
486
487         On some of my test cases, this method takes between 3 and 5% of the time spend.
488         The method makes 2 calls to virtual methods which could be moved to their overriden
489         version of containingBlock if we made it virtual.
490
491         That's what this patch does. It saves between 1 and 2% on some synthetic test cases
492         as well as made the current method shorter.
493
494         * rendering/RenderObject.cpp:
495         (WebCore::RenderObject::containingBlock): Removed code for RenderView and RenderTableCell,
496         replaced by ASSERTs.
497
498         * rendering/RenderObject.h: Made containingBlock virtual.
499
500         * rendering/RenderTableCell.h:
501         (WebCore::RenderTableCell::containingBlock):
502         * rendering/RenderView.h:
503         (WebCore::RenderView::containingBlock):
504         The code moved from RenderObject is inlined in those 2 methods.
505
506 2011-07-12  James Robinson  <jamesr@chromium.org>
507
508         [chromium] Chromium win build fix.
509
510         * platform/graphics/chromium/FontChromiumWin.cpp:
511         (WebCore::drawGlyphsWin):
512
513 2011-07-12  Pratik Solanki  <psolanki@apple.com>
514
515         Get webkit to compile with USE(CFNETWORK) enabled on Mac
516         https://bugs.webkit.org/show_bug.cgi?id=63674
517
518         Reviewed by David Kilzer.
519
520         Changes to ResourceHandle class to get it to compile with USE(CFNETWORK).
521
522         No new tests because no change in functionality and option is not enabled on Mac.
523
524         * platform/network/ResourceHandle.h:
525         * platform/network/ResourceHandleInternal.h:
526         * platform/network/cf/ResourceHandleCFNet.cpp:
527         (WebCore::didReceiveResponse):
528         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
529         (WebCore::ResourceHandle::start):
530         (WebCore::WebCoreSynchronousLoaderClient::willSendRequest): Call adjustMIMETypeIfNecessary
531         on Mac. Also port over fix for <rdar://problem/6901522> added in r43993 which forces the
532         MIME type to text/html if the request is annotated with a "ForceHTMLMIMEType" property.
533
534 2011-07-12  James Robinson  <jamesr@chromium.org>
535
536         [chromium] Delete the unused legacy accelerated canvas 2d code
537         https://bugs.webkit.org/show_bug.cgi?id=64214
538
539         Reviewed by Stephen White.
540
541         This removes the legacy accelerated canvas 2d path and support logic since we (chromium) are no longer using
542         this codepath and it seems clear that no other port is interested.
543
544         Refactoring and removing unused code, so no new tests.
545
546         * WebCore.gypi:
547         * WebCore.xcodeproj/project.pbxproj:
548         * html/canvas/CanvasRenderingContext2D.cpp:
549         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
550         (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation):
551         (WebCore::CanvasRenderingContext2D::didDraw):
552         * html/canvas/CanvasRenderingContext2D.h:
553         * loader/EmptyClients.h:
554         * page/ChromeClient.h:
555         * page/Page.cpp:
556         (WebCore::Page::sharedGraphicsContext3D):
557         * page/Page.h:
558         * platform/graphics/GraphicsContext.cpp:
559         (WebCore::GraphicsContext::setSharedGraphicsContext3D):
560         (WebCore::GraphicsContext::syncSoftwareCanvas):
561         * platform/graphics/GraphicsContext.h:
562         * platform/graphics/GraphicsContext3D.h:
563         * platform/graphics/chromium/DrawingBufferChromium.cpp:
564         (WebCore::DrawingBuffer::setGrContext):
565         * platform/graphics/chromium/FontLinux.cpp:
566         (WebCore::Font::drawGlyphs):
567         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
568         (WebCore::pointInTriangle):
569         * platform/graphics/gpu/BicubicShader.cpp: Removed.
570         * platform/graphics/gpu/BicubicShader.h: Removed.
571         * platform/graphics/gpu/ConvolutionShader.cpp: Removed.
572         * platform/graphics/gpu/ConvolutionShader.h: Removed.
573         * platform/graphics/gpu/GraphicsContextGPU.cpp: Removed.
574         * platform/graphics/gpu/GraphicsContextGPU.h: Removed.
575         * platform/graphics/gpu/SharedGraphicsContext3D.cpp: Removed.
576         * platform/graphics/gpu/SharedGraphicsContext3D.h: Removed.
577         * platform/graphics/gpu/SolidFillShader.cpp: Removed.
578         * platform/graphics/gpu/SolidFillShader.h: Removed.
579         * platform/graphics/gpu/TexShader.cpp: Removed.
580         * platform/graphics/gpu/TexShader.h: Removed.
581         * platform/graphics/skia/GraphicsContextSkia.cpp:
582         (WebCore::GraphicsContext::savePlatformState):
583         (WebCore::GraphicsContext::restorePlatformState):
584         (WebCore::GraphicsContext::addInnerRoundedRectClip):
585         (WebCore::GraphicsContext::clearRect):
586         (WebCore::GraphicsContext::clip):
587         (WebCore::GraphicsContext::canvasClip):
588         (WebCore::GraphicsContext::clipOut):
589         (WebCore::GraphicsContext::clipPath):
590         (WebCore::GraphicsContext::concatCTM):
591         (WebCore::GraphicsContext::setCTM):
592         (WebCore::GraphicsContext::drawConvexPolygon):
593         (WebCore::GraphicsContext::drawEllipse):
594         (WebCore::GraphicsContext::drawFocusRing):
595         (WebCore::GraphicsContext::drawLine):
596         (WebCore::GraphicsContext::drawLineForTextChecking):
597         (WebCore::GraphicsContext::drawLineForText):
598         (WebCore::GraphicsContext::drawRect):
599         (WebCore::GraphicsContext::fillPath):
600         (WebCore::GraphicsContext::fillRect):
601         (WebCore::GraphicsContext::fillRoundedRect):
602         (WebCore::GraphicsContext::scale):
603         (WebCore::GraphicsContext::setAlpha):
604         (WebCore::GraphicsContext::setPlatformCompositeOperation):
605         (WebCore::GraphicsContext::setPlatformFillColor):
606         (WebCore::GraphicsContext::setPlatformShadow):
607         (WebCore::GraphicsContext::strokeArc):
608         (WebCore::GraphicsContext::strokePath):
609         (WebCore::GraphicsContext::strokeRect):
610         (WebCore::GraphicsContext::rotate):
611         (WebCore::GraphicsContext::translate):
612         (WebCore::GraphicsContext::setSharedGraphicsContext3D):
613         (WebCore::GraphicsContext::syncSoftwareCanvas):
614         * platform/graphics/skia/ImageBufferSkia.cpp:
615         (WebCore::ImageBuffer::copyImage):
616         (WebCore::ImageBuffer::draw):
617         (WebCore::ImageBuffer::getUnmultipliedImageData):
618         (WebCore::ImageBuffer::getPremultipliedImageData):
619         (WebCore::ImageBuffer::putUnmultipliedImageData):
620         (WebCore::ImageBuffer::putPremultipliedImageData):
621         * platform/graphics/skia/ImageSkia.cpp:
622         (WebCore::BitmapImage::draw):
623         (WebCore::BitmapImageSingleFrameSkia::draw):
624         * platform/graphics/skia/NativeImageSkia.cpp:
625         (WebCore::NativeImageSkia::~NativeImageSkia):
626         * platform/graphics/skia/PlatformContextSkia.cpp:
627         (WebCore::PlatformContextSkia::PlatformContextSkia):
628         (WebCore::PlatformContextSkia::~PlatformContextSkia):
629         (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
630         (WebCore::PlatformContextSkia::makeGrContextCurrent):
631         * platform/graphics/skia/PlatformContextSkia.h:
632
633 2011-07-12  Emil A Eklund  <eae@chromium.org>
634
635         Switch InlineFlowBox to to new layout types
636         https://bugs.webkit.org/show_bug.cgi?id=64399
637
638         Reviewed by Eric Seidel.
639
640         First step in moving floats over to the new layout abstraction.
641
642         No new tests, no new functionality.
643
644         * rendering/InlineBox.cpp:
645         (WebCore::InlineBox::logicalHeight):
646         * rendering/InlineBox.h:
647         (WebCore::InlineBox::logicalTop):
648         (WebCore::InlineBox::logicalBottom):
649         (WebCore::InlineBox::setLogicalTop):
650         * rendering/InlineFlowBox.cpp:
651         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
652         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
653         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
654         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
655         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
656         (WebCore::InlineFlowBox::addReplacedChildOverflow):
657         (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded):
658         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
659         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
660         * rendering/InlineFlowBox.h:
661         * rendering/RenderBlock.cpp:
662         (WebCore::RenderBlock::logicalRightSelectionGap):
663         * rendering/RenderBlock.h:
664         * rendering/RootInlineBox.cpp:
665         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
666         (WebCore::RootInlineBox::lineSelectionGap):
667         (WebCore::RootInlineBox::ascentAndDescentForBox):
668         (WebCore::RootInlineBox::verticalPositionForBox):
669         * rendering/RootInlineBox.h:
670         * rendering/style/RenderStyle.cpp:
671         (WebCore::RenderStyle::getShadowExtent):
672         (WebCore::RenderStyle::getShadowHorizontalExtent):
673         (WebCore::RenderStyle::getShadowVerticalExtent):
674         * rendering/style/RenderStyle.h:
675         (WebCore::InheritedFlags::getTextShadowExtent):
676         (WebCore::InheritedFlags::getTextShadowHorizontalExtent):
677         (WebCore::InheritedFlags::getTextShadowVerticalExtent):
678         (WebCore::InheritedFlags::getTextShadowInlineDirectionExtent):
679         (WebCore::InheritedFlags::getTextShadowBlockDirectionExtent):
680         (WebCore::InheritedFlags::getBoxShadowExtent):
681         (WebCore::InheritedFlags::getBoxShadowHorizontalExtent):
682         (WebCore::InheritedFlags::getBoxShadowVerticalExtent):
683         (WebCore::InheritedFlags::getBoxShadowInlineDirectionExtent):
684         (WebCore::InheritedFlags::getBoxShadowBlockDirectionExtent):
685         (WebCore::InheritedFlags::getShadowInlineDirectionExtent):
686         (WebCore::InheritedFlags::getShadowBlockDirectionExtent):
687         * rendering/style/ShadowData.cpp:
688         (WebCore::calculateShadowExtent):
689         (WebCore::ShadowData::adjustRectForShadow):
690         * rendering/style/ShadowData.h:
691         (WebCore::ShadowData::ShadowData):
692         (WebCore::ShadowData::x):
693         (WebCore::ShadowData::y):
694
695 2011-07-12  Kenichi Ishibashi  <bashi@chromium.org>
696
697         [Chromium] SVG text is not rendered sometimes with geometricPrecision
698         https://bugs.webkit.org/show_bug.cgi?id=64341
699
700         Changing the type of x and y offsets of ComplexTextControllerLinux to make it possible to treat negative offsets.
701
702         Reviewed by Tony Chang.
703
704         Test: platform/chromium-linux/svg/text/text-with-geometric-precision.svg
705
706         * platform/graphics/chromium/ComplexTextControllerLinux.cpp: Changed the type of m_offsetX and m_startingY from unsigned to int.
707         (WebCore::ComplexTextController::ComplexTextController): Changed the type of the argument.
708         (WebCore::ComplexTextController::reset): Ditto.
709         * platform/graphics/chromium/ComplexTextControllerLinux.h:
710
711 2011-07-12  Alexandru Chiculita  <achicu@adobe.com>
712
713         Reviewed by David Hyatt.
714
715         [CSS Exclusions] Parse wrap-shape property
716         https://bugs.webkit.org/show_bug.cgi?id=61726
717
718         Parsing wrap-shape: rect, circle, ellipse and polygon.
719         Moved WindRule from Path.h to it's own file.
720
721         Test: fast/exclusions/parsing-wrap-shape.html
722
723         * WebCore.vcproj/WebCore.vcproj:
724         * WebCore.xcodeproj/project.pbxproj:
725         * css/CSSComputedStyleDeclaration.cpp:
726         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
727         * css/CSSParser.cpp:
728         (WebCore::CSSParser::parseValue):
729         (WebCore::CSSParser::parseWrapShapeRect):
730         (WebCore::CSSParser::parseWrapShapeCircle):
731         (WebCore::CSSParser::parseWrapShapeEllipse):
732         (WebCore::CSSParser::parseWrapShapePolygon):
733         (WebCore::CSSParser::parseWrapShape):
734         * css/CSSParser.h:
735         * css/CSSPrimitiveValue.cpp:
736         (WebCore::CSSPrimitiveValue::init):
737         (WebCore::CSSPrimitiveValue::cleanup):
738         (WebCore::CSSPrimitiveValue::cssText):
739         * css/CSSPrimitiveValue.h:
740         (WebCore::CSSPrimitiveValue::getShapeValue):
741         * css/CSSPropertyNames.in:
742         * css/CSSStyleSelector.cpp:
743         (WebCore::CSSStyleSelector::applyProperty):
744         * css/CSSValueKeywords.in:
745         * css/CSSWrapShapes.cpp: Added.
746         (WebCore::CSSWrapShapeRect::cssText):
747         (WebCore::CSSWrapShapeCircle::cssText):
748         (WebCore::CSSWrapShapeEllipse::cssText):
749         (WebCore::CSSWrapShapePolygon::cssText):
750         * css/CSSWrapShapes.h: Added.
751         (WebCore::CSSWrapShape::~CSSWrapShape):
752         (WebCore::CSSWrapShape::CSSWrapShape):
753         (WebCore::CSSWrapShapeRect::create):
754         (WebCore::CSSWrapShapeRect::left):
755         (WebCore::CSSWrapShapeRect::top):
756         (WebCore::CSSWrapShapeRect::width):
757         (WebCore::CSSWrapShapeRect::height):
758         (WebCore::CSSWrapShapeRect::radiusX):
759         (WebCore::CSSWrapShapeRect::radiusY):
760         (WebCore::CSSWrapShapeRect::setLeft):
761         (WebCore::CSSWrapShapeRect::setTop):
762         (WebCore::CSSWrapShapeRect::setWidth):
763         (WebCore::CSSWrapShapeRect::setHeight):
764         (WebCore::CSSWrapShapeRect::setRadiusX):
765         (WebCore::CSSWrapShapeRect::setRadiusY):
766         (WebCore::CSSWrapShapeRect::type):
767         (WebCore::CSSWrapShapeRect::CSSWrapShapeRect):
768         (WebCore::CSSWrapShapeCircle::create):
769         (WebCore::CSSWrapShapeCircle::left):
770         (WebCore::CSSWrapShapeCircle::top):
771         (WebCore::CSSWrapShapeCircle::radius):
772         (WebCore::CSSWrapShapeCircle::setLeft):
773         (WebCore::CSSWrapShapeCircle::setTop):
774         (WebCore::CSSWrapShapeCircle::setRadius):
775         (WebCore::CSSWrapShapeCircle::type):
776         (WebCore::CSSWrapShapeCircle::CSSWrapShapeCircle):
777         (WebCore::CSSWrapShapeEllipse::create):
778         (WebCore::CSSWrapShapeEllipse::left):
779         (WebCore::CSSWrapShapeEllipse::top):
780         (WebCore::CSSWrapShapeEllipse::radiusX):
781         (WebCore::CSSWrapShapeEllipse::radiusY):
782         (WebCore::CSSWrapShapeEllipse::setLeft):
783         (WebCore::CSSWrapShapeEllipse::setTop):
784         (WebCore::CSSWrapShapeEllipse::setRadiusX):
785         (WebCore::CSSWrapShapeEllipse::setRadiusY):
786         (WebCore::CSSWrapShapeEllipse::type):
787         (WebCore::CSSWrapShapeEllipse::CSSWrapShapeEllipse):
788         (WebCore::CSSWrapShapePolygon::create):
789         (WebCore::CSSWrapShapePolygon::appendPoint):
790         (WebCore::CSSWrapShapePolygon::getXAt):
791         (WebCore::CSSWrapShapePolygon::getYAt):
792         (WebCore::CSSWrapShapePolygon::setWindRule):
793         (WebCore::CSSWrapShapePolygon::windRule):
794         (WebCore::CSSWrapShapePolygon::type):
795         (WebCore::CSSWrapShapePolygon::CSSWrapShapePolygon):
796         * css/SVGCSSValueKeywords.in:
797         * platform/graphics/Path.h:
798         * platform/graphics/WindRule.h: Added.
799         * rendering/style/RenderStyle.cpp:
800         (WebCore::RenderStyle::diff):
801         * rendering/style/RenderStyle.h:
802         (WebCore::InheritedFlags::setWrapShape):
803         (WebCore::InheritedFlags::wrapShape):
804         (WebCore::InheritedFlags::initialWrapShape):
805         * rendering/style/StyleRareNonInheritedData.cpp:
806         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
807         (WebCore::StyleRareNonInheritedData::operator==):
808         * rendering/style/StyleRareNonInheritedData.h:
809
810 2011-07-12  Simon Fraser  <simon.fraser@apple.com>
811
812         Clean up some RenderLayerCompositor code relating to scroll and root layers
813         https://bugs.webkit.org/show_bug.cgi?id=64400
814
815         Reviewed by James Robinson.
816
817         There was no need for FrameView::syncCompositingStateForThisFrame()
818         to call syncCompositingStateForThisLayerOnly() on the various
819         scrollbar-related layers, because the subsequent call to 
820         compositor()->flushPendingLayerChanges() starts to flush at
821         m_overflowControlsHostLayer if one exists, and it's an ancestor
822         of the scrollbar layers.
823         
824         Also clean up terminology in RenderLayerCompositor.
825             m_rootPlatformLayer -> m_rootContentLayer
826             rootPlatformLayer() -> rootGraphicsLayer()
827         
828         No behavior change, so no new tests.
829         
830         * page/FrameView.cpp:
831         (WebCore::FrameView::syncCompositingStateForThisFrame):
832         * rendering/RenderLayerCompositor.cpp:
833         (WebCore::RenderLayerCompositor::enableCompositingMode):
834         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
835         (WebCore::RenderLayerCompositor::updateCompositingLayers):
836         (WebCore::RenderLayerCompositor::layerTreeAsText):
837         (WebCore::RenderLayerCompositor::parentFrameContentLayers):
838         (WebCore::RenderLayerCompositor::rootGraphicsLayer):
839         (WebCore::RenderLayerCompositor::didMoveOnscreen):
840         (WebCore::RenderLayerCompositor::willMoveOffscreen):
841         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
842         (WebCore::RenderLayerCompositor::ensureRootLayer):
843         (WebCore::RenderLayerCompositor::destroyRootLayer):
844         (WebCore::RenderLayerCompositor::attachRootLayer):
845         (WebCore::RenderLayerCompositor::detachRootLayer):
846         (WebCore::RenderLayerCompositor::updateRootLayerAttachment):
847         * rendering/RenderLayerCompositor.h:
848
849 2011-07-12  Sheriff Bot  <webkit.review.bot@gmail.com>
850
851         Unreviewed, rolling out r90842.
852         http://trac.webkit.org/changeset/90842
853         https://bugs.webkit.org/show_bug.cgi?id=64401
854
855         Causes crash in debug on compositing/overflow/content-gains-
856         scrollbars.html (Requested by jamesr on #webkit).
857
858         * WebCore.gypi:
859         * platform/graphics/chromium/ContentLayerChromium.cpp:
860         (WebCore::ContentLayerChromium::ContentLayerChromium):
861         (WebCore::ContentLayerChromium::paintContentsIfDirty):
862         (WebCore::ContentLayerChromium::cleanupResources):
863         (WebCore::ContentLayerChromium::setLayerRenderer):
864         (WebCore::ContentLayerChromium::tilingTransform):
865         (WebCore::ContentLayerChromium::contentBounds):
866         (WebCore::ContentLayerChromium::updateLayerSize):
867         (WebCore::ContentLayerChromium::draw):
868         (WebCore::ContentLayerChromium::drawsContent):
869         (WebCore::ContentLayerChromium::createTilerIfNeeded):
870         (WebCore::ContentLayerChromium::updateCompositorResources):
871         (WebCore::ContentLayerChromium::setTilingOption):
872         (WebCore::ContentLayerChromium::bindContentsTexture):
873         (WebCore::ContentLayerChromium::setIsMask):
874         (WebCore::writeIndent):
875         (WebCore::ContentLayerChromium::dumpLayerProperties):
876         * platform/graphics/chromium/ContentLayerChromium.h:
877         * platform/graphics/chromium/ImageLayerChromium.cpp:
878         (WebCore::ImageLayerChromium::ImageLayerChromium):
879         (WebCore::ImageLayerChromium::paintContentsIfDirty):
880         (WebCore::ImageLayerChromium::updateCompositorResources):
881         (WebCore::ImageLayerChromium::contentBounds):
882         * platform/graphics/chromium/ImageLayerChromium.h:
883         (WebCore::ImageLayerChromium::drawsContent):
884         * platform/graphics/chromium/LayerChromium.cpp:
885         (WebCore::LayerChromium::pushPropertiesTo):
886         (WebCore::LayerChromium::ccLayerImpl):
887         * platform/graphics/chromium/LayerChromium.h:
888         (WebCore::LayerChromium::draw):
889         * platform/graphics/chromium/LayerRendererChromium.cpp:
890         (WebCore::LayerRendererChromium::drawRootLayer):
891         * platform/graphics/chromium/LayerTilerChromium.cpp:
892         (WebCore::LayerTilerChromium::updateRect):
893         (WebCore::LayerTilerChromium::draw):
894         (WebCore::LayerTilerChromium::drawTiles):
895         * platform/graphics/chromium/LayerTilerChromium.h:
896         * platform/graphics/chromium/TiledLayerChromium.cpp: Removed.
897         * platform/graphics/chromium/TiledLayerChromium.h: Removed.
898         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
899         (WebCore::CCLayerImpl::drawsContent):
900         (WebCore::CCLayerImpl::draw):
901         * platform/graphics/chromium/cc/CCLayerImpl.h:
902         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Removed.
903         * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Removed.
904
905 2011-07-12  Joseph Pecoraro  <joepeck@webkit.org>
906
907         ApplicationCache update should not immediately fail when reaching per-origin quota
908         https://bugs.webkit.org/show_bug.cgi?id=64177
909
910         Reviewed by Alexey Proskuryakov.
911
912         New behavior of handling ApplicationCache per-origin quotas. Previously,
913         if the quota was reached while downloading we would fail the download
914         and then prompt the user for a storage increase. This required a refresh,
915         a redownload of resources, and the total storage was not known so the
916         process could be repeated multiple times before an acceptable quota
917         was found or the user disallowed an increase.
918         
919         The new behavior is to complete the download of the entire appcache.
920         When the cache completes downloading and it is greater than the origin
921         quota, prompt the user to allow a quota increase with the known space
922         needed. If the quota is increased, the cache will succeed, otherwise
923         it will fail with the normal failure steps.
924
925         An alternative behavior is prompting while downloading immediately
926         when the origin quota is reached, however at that point the entire
927         space needed is unknown and so quota increases might not be enough
928         and could result in multiple prompts to the user.
929
930         Tests: http/tests/appcache/origin-quota-continued-download-multiple-manifests.html
931                http/tests/appcache/origin-quota-continued-download.html
932
933         * loader/appcache/ApplicationCacheGroup.h:
934         * loader/appcache/ApplicationCacheGroup.cpp:
935         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
936         Rename instance variable to be more clear on its intent.
937
938         (WebCore::ApplicationCacheGroup::didFinishLoading):
939         Check the quota limit while downloading so we can fail early
940         if the user already denied a quota increase.
941
942         (WebCore::ApplicationCacheGroup::didReachOriginQuota):
943         Pass the space needed information to the chrome client.
944
945         (WebCore::ApplicationCacheGroup::cacheUpdateFailedDueToOriginQuota):
946         Removed. Instead convert the callers to update state and console
947         log when the per-origin quota is reached. This allows us to follow
948         the normal failure steps if the quota is reached at the end of a
949         download, and the alternative short path when we fail during downloading.
950
951         (WebCore::ApplicationCacheGroup::recalculateAvailableSpaceInQuota):
952         Extract to a helper function.
953
954         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
955         Allow for a quota increase at the end of the download now that
956         we know the space needed. Then proceed to fail or succeed
957         as we normally would.
958
959         * loader/appcache/ApplicationCacheStorage.h:
960         * loader/appcache/ApplicationCacheStorage.cpp:
961         (WebCore::ApplicationCacheStorage::checkOriginQuota):
962         (WebCore::ApplicationCacheStorage::storeNewestCache):
963         Extract checking the origin quota for when an ApplicationCacheGroup
964         will be replacing an ApplicationCacheGroup into a helper function.
965         The helper also provides an out parameter for the space needed
966         to properly fit the new cache group if it wouldn't fit.
967
968         * page/ChromeClient.h:
969         * loader/EmptyClients.h:
970         (WebCore::EmptyChromeClient::reachedApplicationCacheOriginQuota):
971         Add a space needed parameter when reaching the per-origin quota.
972
973 2011-07-12  Chris Rogers  <crogers@google.com>
974
975         AudioDevice::Stop can close NULL handle.
976         https://bugs.webkit.org/show_bug.cgi?id=64157
977
978         Reviewed by Kenneth Russell.
979
980         No new tests since audio API is not yet implemented.
981
982         * bindings/js/JSAudioContextCustom.cpp:
983         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
984         * bindings/v8/custom/V8AudioContextCustom.cpp:
985         (WebCore::V8AudioContext::constructorCallback):
986         * webaudio/AudioContext.cpp:
987         (WebCore::AudioContext::create):
988         (WebCore::AudioContext::uninitialize):
989         * webaudio/AudioContext.h:
990
991 2011-07-12  John Bates  <jbates@google.com>
992
993         Move call to syncCompositingLayers so that we do not trigger redundant draws.
994         https://bugs.webkit.org/show_bug.cgi?id=64224
995
996         doComposite was triggering two composites every time a canvas was dirtied.
997         By moving syncCompositingLayers call to layout, the client code can draw without triggering
998         a redundant frame. Also renamed WebViewImpl::updateLayers to
999         syncCompositingLayers, because it was confusing. CCLayerTreeHostImplProxy::updateLayers was
1000         no longer needed, because animateAndLayout calls WebViewImpl::layout.
1001
1002         Reviewed by James Robinson.
1003
1004         * platform/graphics/chromium/LayerRendererChromium.cpp:
1005         (WebCore::LayerRendererChromium::updateLayers):
1006         * platform/graphics/chromium/LayerRendererChromium.h:
1007         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1008         (WebCore::CCLayerTreeHost::syncCompositingLayers):
1009         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1010         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp:
1011         (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommit):
1012
1013 2011-07-12  Ryosuke Niwa  <rniwa@webkit.org>
1014
1015         Isolate HTMLTextFormControlElement into a separate file
1016         https://bugs.webkit.org/show_bug.cgi?id=64381
1017
1018         Reviewed by Dimitri Glazkov.
1019
1020         Extracted HTMLTextFormControlElement.h and HTMLTextFormControlElement.cpp out of
1021         HTMLFormControlElement.h and HTMLFormControlElement.cpp.
1022
1023         Also moved defaultEventHandler from HTMLFormControlElementWithState to HTMLTextFormControlElement
1024         because it was specific to HTMLTextFormControlElement, and replaced all references to
1025         HTMLFormControlElementWithState in HTMLInputElement and HTMLTextAreaElement by ones to
1026         HTMLTextFormControlElement.
1027
1028         * CMakeLists.txt:
1029         * GNUmakefile.list.am:
1030         * WebCore.gypi:
1031         * WebCore.pro:
1032         * WebCore.vcproj/WebCore.vcproj:
1033         * WebCore.xcodeproj/project.pbxproj:
1034         * editing/TextIterator.cpp:
1035         * editing/htmlediting.cpp:
1036         * html/HTMLElementsAllInOne.cpp:
1037         * html/HTMLFormControlElement.cpp:
1038         (WebCore::HTMLFormControlElement::isFocusable):
1039         * html/HTMLFormControlElement.h:
1040         * html/HTMLInputElement.cpp:
1041         (WebCore::HTMLInputElement::isKeyboardFocusable):
1042         (WebCore::HTMLInputElement::isMouseFocusable):
1043         (WebCore::HTMLInputElement::updateFocusAppearance):
1044         (WebCore::HTMLInputElement::canStartSelection):
1045         (WebCore::HTMLInputElement::parseMappedAttribute):
1046         (WebCore::HTMLInputElement::finishParsingChildren):
1047         (WebCore::HTMLInputElement::rendererIsNeeded):
1048         (WebCore::HTMLInputElement::attach):
1049         (WebCore::HTMLInputElement::detach):
1050         (WebCore::HTMLInputElement::copyNonAttributeProperties):
1051         (WebCore::HTMLInputElement::defaultEventHandler):
1052         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
1053         (WebCore::HTMLInputElement::didMoveToNewOwnerDocument):
1054         (WebCore::HTMLInputElement::addSubresourceAttributeURLs):
1055         (WebCore::HTMLInputElement::recalcWillValidate):
1056         * html/HTMLInputElement.h:
1057         * html/HTMLTextAreaElement.cpp:
1058         (WebCore::HTMLTextAreaElement::defaultEventHandler):
1059         * html/HTMLTextAreaElement.h:
1060         * html/HTMLTextFormControlElement.cpp: Copied from Source/WebCore/html/HTMLFormControlElement.cpp.
1061         (WebCore::HTMLTextFormControlElement::defaultEventHandler):
1062         * html/HTMLTextFormControlElement.h: Copied from Source/WebCore/html/HTMLFormControlElement.h.
1063
1064 2011-07-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1065
1066         Unreviewed, rolling out r90831.
1067         http://trac.webkit.org/changeset/90831
1068         https://bugs.webkit.org/show_bug.cgi?id=64389
1069
1070         Likely caused fast/canvas/DrawImageSinglePixelStretch.html to
1071         start timing out on the chromium GPU bots (Requested by ojan
1072         on #webkit).
1073
1074         * platform/graphics/skia/ImageBufferSkia.cpp:
1075         (WebCore::getImageData):
1076         (WebCore::putImageData):
1077
1078 2011-07-12  James Robinson  <jamesr@chromium.org>
1079
1080         Reviewed by Kenneth Russell.
1081
1082         [chromium] Move draw implementation for ContentLayerChromium/ImageLayerChromium to the appropriate CCLayerImpl subclass
1083         https://bugs.webkit.org/show_bug.cgi?id=58833
1084
1085         Adds a TiledLayerChromium class to handle the tiling logic shared by ContentLayerChromium and ImageLayerChromium
1086         so that they can be siblings in the class hierarchy instead of children. Also adds a CCTiledLayerImpl to handle
1087         the drawing responsibilities for tiled layers.
1088
1089         TiledLayerChromium maintains a tiler, tiling options, and calculates the tiling transform. Subclasses are
1090         responsible for providing an appropriate texture updater implementation. CCTiledLayerImpl takes the tiler,
1091         tiling transform and layer properties and draws the layer.  Longer term it'd be better of the CCTiledLayerImpl
1092         owned the tiler and the TiledLayerChromium only owned an updater, but getting there will require changing the
1093         way tile eviction works.
1094
1095         * WebCore.gypi:
1096         * platform/graphics/chromium/ContentLayerChromium.cpp:
1097         (WebCore::ContentLayerChromium::ContentLayerChromium):
1098         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1099         (WebCore::ContentLayerChromium::drawsContent):
1100         * platform/graphics/chromium/ContentLayerChromium.h:
1101         (WebCore::ContentLayerChromium::textureUpdater):
1102         * platform/graphics/chromium/ImageLayerChromium.cpp:
1103         (WebCore::ImageLayerChromium::ImageLayerChromium):
1104         (WebCore::ImageLayerChromium::cleanupResources):
1105         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1106         (WebCore::ImageLayerChromium::textureUpdater):
1107         (WebCore::ImageLayerChromium::contentBounds):
1108         (WebCore::ImageLayerChromium::drawsContent):
1109         (WebCore::ImageLayerChromium::createTextureUpdaterIfNeeded):
1110         * platform/graphics/chromium/ImageLayerChromium.h:
1111         * platform/graphics/chromium/LayerChromium.cpp:
1112         (WebCore::LayerChromium::pushPropertiesTo):
1113         (WebCore::LayerChromium::ccLayerImpl):
1114         * platform/graphics/chromium/LayerChromium.h:
1115         (WebCore::LayerChromium::contentBounds):
1116         * platform/graphics/chromium/LayerRendererChromium.cpp:
1117         (WebCore::LayerRendererChromium::drawRootLayer):
1118         (WebCore::visibleLayerRect):
1119         (WebCore::paintLayerContentsIfDirty):
1120         (WebCore::LayerRendererChromium::paintLayerContents):
1121         (WebCore::LayerRendererChromium::drawLayer):
1122         * platform/graphics/chromium/LayerTilerChromium.cpp:
1123         (WebCore::LayerTilerChromium::updateRect):
1124         (WebCore::LayerTilerChromium::draw):
1125         (WebCore::LayerTilerChromium::drawTiles):
1126         * platform/graphics/chromium/LayerTilerChromium.h:
1127         * platform/graphics/chromium/TiledLayerChromium.cpp: Added.
1128         (WebCore::TiledLayerChromium::TiledLayerChromium):
1129         (WebCore::TiledLayerChromium::~TiledLayerChromium):
1130         (WebCore::TiledLayerChromium::createCCLayerImpl):
1131         (WebCore::TiledLayerChromium::cleanupResources):
1132         (WebCore::TiledLayerChromium::setLayerRenderer):
1133         (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption):
1134         (WebCore::TiledLayerChromium::drawsContent):
1135         (WebCore::TiledLayerChromium::createTilerIfNeeded):
1136         (WebCore::TiledLayerChromium::updateCompositorResources):
1137         (WebCore::TiledLayerChromium::setTilingOption):
1138         (WebCore::TiledLayerChromium::setIsMask):
1139         (WebCore::TiledLayerChromium::tilingTransform):
1140         (WebCore::TiledLayerChromium::pushPropertiesTo):
1141         (WebCore::writeIndent):
1142         (WebCore::TiledLayerChromium::dumpLayerProperties):
1143         * platform/graphics/chromium/TiledLayerChromium.h: Copied from Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h.
1144         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1145         (WebCore::CCLayerImpl::draw):
1146         * platform/graphics/chromium/cc/CCLayerImpl.h:
1147         (WebCore::CCLayerImpl::setDrawsContent):
1148         (WebCore::CCLayerImpl::drawsContent):
1149         (WebCore::CCLayerImpl::contentBounds):
1150         (WebCore::CCLayerImpl::setContentBounds):
1151         (WebCore::CCLayerImpl::doubleSided):
1152         (WebCore::CCLayerImpl::setDoubleSided):
1153         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Added.
1154         (WebCore::CCTiledLayerImpl::CCTiledLayerImpl):
1155         (WebCore::CCTiledLayerImpl::~CCTiledLayerImpl):
1156         (WebCore::CCTiledLayerImpl::draw):
1157         (WebCore::CCTiledLayerImpl::bindContentsTexture):
1158         (WebCore::CCTiledLayerImpl::dumpLayerProperties):
1159         * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Added.
1160         (WebCore::CCTiledLayerImpl::create):
1161         (WebCore::CCTiledLayerImpl::setTilingTransform):
1162         (WebCore::CCTiledLayerImpl::setTiler):
1163
1164 2011-07-12  Arno Renevier  <arno@renevier.net>
1165
1166         [GTK] DOM bindings do not have gir annotations
1167         https://bugs.webkit.org/show_bug.cgi?id=45395
1168
1169         Reviewed by Xan Lopez.
1170
1171         * bindings/scripts/CodeGeneratorGObject.pm: generate introspection annotations.
1172         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: update for new output.
1173         * bindings/scripts/test/GObject/WebKitDOMTestObj.h: ditto.
1174         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: ditto.
1175
1176 2011-07-12  Chris Rogers  <crogers@google.com>
1177
1178         webkitAudioContext does not do proper sanity checking on its arguments.
1179         https://bugs.webkit.org/show_bug.cgi?id=64076
1180
1181         Reviewed by Kenneth Russell.
1182
1183         No new tests since audio API is not yet implemented.
1184
1185         * bindings/js/JSAudioContextCustom.cpp:
1186         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
1187         (WebCore::JSAudioContext::createBuffer):
1188         * bindings/v8/custom/V8AudioContextCustom.cpp:
1189         (WebCore::V8AudioContext::constructorCallback):
1190         (WebCore::V8AudioContext::createBufferCallback):
1191         * platform/audio/HRTFDatabaseLoader.h:
1192         (WebCore::HRTFDatabaseLoader::databaseSampleRate):
1193         * webaudio/AudioContext.cpp:
1194         (WebCore::AudioContext::create):
1195         (WebCore::AudioContext::createOfflineContext):
1196         (WebCore::AudioContext::createBuffer):
1197         * webaudio/AudioContext.h:
1198
1199 2011-07-12  Pratik Solanki  <psolanki@apple.com>
1200
1201         Implement didReceiveDataArray callback for CFNetwork based loader
1202         https://bugs.webkit.org/show_bug.cgi?id=64130
1203
1204         Reviewed by David Kilzer.
1205
1206         Factor out the didReceiveDataArray code from ResourceHandleMac.mm into
1207         a new method ResourceHandle::handleDataArray(). Implement the callback
1208         in the CFNetwork loader code and call handleDataArray() to process
1209         incoming data.
1210
1211         No new tests because the flag is not enabled for any bots.
1212
1213         * platform/network/ResourceHandle.h:
1214         * platform/network/cf/ResourceHandleCFNet.cpp:
1215         (WebCore::didReceiveDataArray):
1216         (WebCore::ResourceHandle::createCFURLConnection):
1217         (WebCore::ResourceHandle::handleDataArray):
1218         * platform/network/mac/ResourceHandleMac.mm:
1219         (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]):
1220
1221 2011-07-12  Emil A Eklund  <eae@chromium.org>
1222
1223         Switch preferred width/height and columns to to new layout types
1224         https://bugs.webkit.org/show_bug.cgi?id=64329
1225
1226         Reviewed by Eric Seidel.
1227
1228         No new tests, no new functionality.
1229
1230         * rendering/LayoutTypes.h:
1231         (WebCore::ceiledLayoutUnit):
1232         Add ceiledLayoutUnit to go with the floored version.
1233         
1234         * rendering/RenderBlock.cpp:
1235         (WebCore::RenderBlock::adjustRectForColumns):
1236         (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
1237         (WebCore::RenderBlock::adjustStartEdgeForWritingModeIncludingColumns):
1238         Rename rect version of flipForWritingModeIncludingColumns to
1239         adjustStartEdgeForWritingModeIncludingColumns as it adjust the start edge
1240         and does not flip the rect.
1241        
1242         (WebCore::RenderBlock::adjustForColumns):
1243         (WebCore::updatePreferredWidth):
1244         * rendering/RenderBlock.h:
1245         * rendering/RenderBox.cpp:
1246         (WebCore::RenderBox::minPreferredLogicalWidth):
1247         (WebCore::RenderBox::maxPreferredLogicalWidth):
1248         (WebCore::RenderBox::offsetFromContainer):
1249         (WebCore::RenderBox::computePercentageLogicalHeight):
1250         (WebCore::RenderBox::flipForWritingMode):
1251         (WebCore::RenderBox::flipForWritingModeIncludingColumns):
1252         * rendering/RenderBox.h:
1253         * rendering/RenderListBox.cpp:
1254         (WebCore::RenderListBox::itemBoundingBoxRect):
1255         * rendering/RenderListBox.h:
1256         * rendering/RenderObject.h:
1257         (WebCore::RenderObject::minPreferredLogicalWidth):
1258         (WebCore::RenderObject::maxPreferredLogicalWidth):
1259         (WebCore::RenderObject::adjustForColumns):
1260         * rendering/RenderReplaced.cpp:
1261         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1262         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
1263         * rendering/TableLayout.h:
1264
1265 2011-07-12  Levi Weintraub  <leviw@chromium.org>
1266
1267         Change roundedIntRect to roundedRect
1268         https://bugs.webkit.org/show_bug.cgi?id=64326
1269
1270         Reviewed by Eric Seidel.
1271
1272         Renaming RoundedIntRect to RoundedRect and moving the underlying type to Layout units from
1273         integer-based versions.
1274
1275         No new tests, no new functionality
1276
1277         * WebCore.gypi:
1278         * WebCore.pro:
1279         * WebCore.vcproj/WebCore.vcproj:
1280         * WebCore.xcodeproj/project.pbxproj:
1281         * platform/graphics/GraphicsContext.cpp:
1282         (WebCore::GraphicsContext::addRoundedRectClip):
1283         (WebCore::GraphicsContext::clipOutRoundedRect):
1284         (WebCore::GraphicsContext::fillRoundedRect):
1285         (WebCore::GraphicsContext::fillRectWithRoundedHole):
1286         * platform/graphics/GraphicsContext.h:
1287         * platform/graphics/Path.cpp:
1288         (WebCore::Path::addRoundedRect):
1289         * platform/graphics/Path.h:
1290         * platform/graphics/RoundedIntRect.cpp: Removed.
1291         * platform/graphics/RoundedIntRect.h: Removed.
1292         * platform/graphics/RoundedRect.cpp: Copied from Source/WebCore/platform/graphics/RoundedIntRect.cpp.
1293         (WebCore::RoundedRect::Radii::isZero):
1294         (WebCore::RoundedRect::Radii::scale):
1295         (WebCore::RoundedRect::Radii::expand):
1296         (WebCore::RoundedRect::inflateWithRadii):
1297         (WebCore::RoundedRect::Radii::includeLogicalEdges):
1298         (WebCore::RoundedRect::Radii::excludeLogicalEdges):
1299         (WebCore::RoundedRect::RoundedRect):
1300         (WebCore::RoundedRect::includeLogicalEdges):
1301         (WebCore::RoundedRect::excludeLogicalEdges):
1302         (WebCore::RoundedRect::isRenderable):
1303         * platform/graphics/RoundedRect.h: Copied from Source/WebCore/platform/graphics/RoundedIntRect.h.
1304         (WebCore::RoundedRect::Radii::Radii):
1305         (WebCore::RoundedRect::Radii::setTopLeft):
1306         (WebCore::RoundedRect::Radii::setTopRight):
1307         (WebCore::RoundedRect::Radii::setBottomLeft):
1308         (WebCore::RoundedRect::Radii::setBottomRight):
1309         (WebCore::RoundedRect::Radii::topLeft):
1310         (WebCore::RoundedRect::Radii::topRight):
1311         (WebCore::RoundedRect::Radii::bottomLeft):
1312         (WebCore::RoundedRect::Radii::bottomRight):
1313         (WebCore::RoundedRect::Radii::expand):
1314         (WebCore::RoundedRect::Radii::shrink):
1315         (WebCore::RoundedRect::rect):
1316         (WebCore::RoundedRect::setRect):
1317         (WebCore::RoundedRect::move):
1318         (WebCore::RoundedRect::inflate):
1319         (WebCore::RoundedRect::expandRadii):
1320         (WebCore::RoundedRect::shrinkRadii):
1321         (WebCore::operator==):
1322         * platform/graphics/ShadowBlur.cpp:
1323         (WebCore::ScratchBuffer::setLastShadowValues):
1324         (WebCore::ScratchBuffer::setLastInsetShadowValues):
1325         (WebCore::ScratchBuffer::matchesLastShadow):
1326         (WebCore::ScratchBuffer::matchesLastInsetShadow):
1327         (WebCore::computeSliceSizesFromRadii):
1328         (WebCore::ShadowBlur::templateSize):
1329         (WebCore::ShadowBlur::drawRectShadow):
1330         (WebCore::ShadowBlur::drawInsetShadow):
1331         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
1332         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
1333         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
1334         (WebCore::ShadowBlur::drawRectShadowWithTiling):
1335         (WebCore::ShadowBlur::drawLayerPieces):
1336         * platform/graphics/ShadowBlur.h:
1337         * platform/graphics/cg/GraphicsContextCG.cpp:
1338         (WebCore::GraphicsContext::fillRect):
1339         (WebCore::GraphicsContext::fillRoundedRect):
1340         (WebCore::GraphicsContext::fillRectWithRoundedHole):
1341         * rendering/RenderBox.cpp:
1342         (WebCore::RenderBox::paintBoxDecorations):
1343         * rendering/RenderBoxModelObject.cpp:
1344         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
1345         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1346         (WebCore::RenderBoxModelObject::paintOneBorderSide):
1347         (WebCore::RenderBoxModelObject::paintBorderSides):
1348         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
1349         (WebCore::RenderBoxModelObject::paintBorder):
1350         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
1351         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
1352         (WebCore::RenderBoxModelObject::paintBoxShadow):
1353         * rendering/RenderBoxModelObject.h:
1354         * rendering/RenderThemeMac.mm:
1355         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
1356         (WebCore::RenderThemeMac::paintSliderTrack):
1357         * rendering/style/RenderStyle.cpp:
1358         (WebCore::calcRadiiFor):
1359         (WebCore::calcConstraintScaleFor):
1360         (WebCore::RenderStyle::getRoundedBorderFor):
1361         (WebCore::RenderStyle::getRoundedInnerBorderFor):
1362         * rendering/style/RenderStyle.h:
1363
1364 2011-07-12  Mike Reed  <reed@google.com>
1365
1366         [skia] optimize getImageData to avoid a copy when not needed. lockPixels() now does the right thing.
1367         https://bugs.webkit.org/show_bug.cgi?id=64302
1368
1369         Reviewed by Stephen White.
1370
1371         No new tests. Just an optimization for getImageData(), existing <canvas> tests apply
1372
1373         * platform/graphics/skia/ImageBufferSkia.cpp:
1374         (WebCore::getImageData):
1375         (WebCore::putImageData):
1376
1377 2011-07-12  Pavel Feldman  <pfeldman@google.com>
1378
1379         Web Inspector: introduce UserMetrics for collecting stats in Chromium port.
1380         https://bugs.webkit.org/show_bug.cgi?id=64350
1381
1382         Reviewed by Yury Semikhatsky.
1383
1384         Test: inspector/user-metrics.html
1385
1386         * WebCore.gypi:
1387         * WebCore.vcproj/WebCore.vcproj:
1388         * bindings/js/JSInspectorFrontendHostCustom.cpp:
1389         (WebCore::JSInspectorFrontendHost::recordActionTaken):
1390         (WebCore::JSInspectorFrontendHost::recordPanelShown):
1391         (WebCore::JSInspectorFrontendHost::recordSettingChanged):
1392         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1393         (WebCore::histogramEnumeration):
1394         (WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
1395         (WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
1396         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
1397         * inspector/InspectorFrontendHost.idl:
1398         * inspector/front-end/AuditsPanel.js:
1399         (WebInspector.AuditsPanel.prototype.initiateAudit):
1400         * inspector/front-end/ConsoleView.js:
1401         * inspector/front-end/DebuggerModel.js:
1402         (WebInspector.DebuggerModel.prototype.setBreakpoint):
1403         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
1404         * inspector/front-end/InspectorFrontendHostStub.js:
1405         (.WebInspector.InspectorFrontendHostStub.prototype.loadSessionSetting):
1406         (.WebInspector.InspectorFrontendHostStub.prototype.recordActionTaken):
1407         (.WebInspector.InspectorFrontendHostStub.prototype.recordPanelShown):
1408         (.WebInspector.InspectorFrontendHostStub.prototype.recordSettingChanged):
1409         * inspector/front-end/ProfilesPanel.js:
1410         (WebInspector.ProfilesPanel.prototype._setRecordingProfile):
1411         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
1412         * inspector/front-end/TimelinePanel.js:
1413         (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
1414         * inspector/front-end/UserMetrics.js: Added.
1415         (WebInspector.UserMetrics.settingChanged):
1416         (WebInspector.UserMetrics):
1417         (WebInspector.UserMetrics.prototype.panelShown):
1418         (WebInspector.UserMetrics._Recorder):
1419         (WebInspector.UserMetrics._Recorder.prototype.record):
1420         * inspector/front-end/WebKit.qrc:
1421         * inspector/front-end/inspector.html:
1422         * inspector/front-end/inspector.js:
1423         (WebInspector._toggleAttach):
1424
1425 2011-07-12  Pratik Solanki  <psolanki@apple.com>
1426
1427         Reviewed by David Kilzer.
1428
1429         Add NSURLResponse wrapper in ResourceResponse when USE(CFNETWORK) is enabled
1430         https://bugs.webkit.org/show_bug.cgi?id=63286
1431
1432         When USE(CFNETWORK) is enabled on Mac, keep an NSURLResponse object along with the
1433         CFURLResponseRef so that WebKit can continue using the NSURLResponse.
1434
1435         No new tests because no change in functionality and option is not enabled on Mac.
1436
1437         * platform/network/cf/ResourceResponse.h:
1438         (WebCore::ResourceResponse::ResourceResponse):
1439         * platform/network/mac/ResourceResponseMac.mm:
1440         (WebCore::ResourceResponse::initNSURLResponse):
1441         (WebCore::ResourceResponse::nsURLResponse):
1442         (WebCore::ResourceResponse::ResourceResponse):
1443
1444 2011-07-12  Pavel Podivilov  <podivilov@chromium.org>
1445
1446         Web Inspector: Cancelling an empty edit fails.
1447         https://bugs.webkit.org/show_bug.cgi?id=64351
1448
1449         Reviewed by Pavel Feldman.
1450
1451         * inspector/front-end/ResourceView.js:
1452         (WebInspector.EditableResourceSourceFrame.prototype.cancelEditing):
1453
1454 2011-07-12  Pavel Podivilov  <podivilov@chromium.org>
1455
1456         Web Inspector: make TextViewerDelegate methods implementations public in SourceFrame.
1457         https://bugs.webkit.org/show_bug.cgi?id=64353
1458
1459         Reviewed by Pavel Feldman.
1460
1461         * inspector/front-end/SourceFrame.js:
1462         (WebInspector.SourceFrame.prototype.beforeTextChanged):
1463         (WebInspector.SourceFrame.prototype.afterTextChanged):
1464         (WebInspector.SourceFrame.prototype.populateTextAreaContextMenu):
1465         (WebInspector.SourceFrame.prototype.suggestedFileName):
1466         (WebInspector.SourceFrame.prototype.doubleClick):
1467         (WebInspector.SourceFrame.prototype.cancelEditing):
1468         (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick):
1469         (WebInspector.TextViewerDelegateForSourceFrame.prototype.beforeTextChanged):
1470         (WebInspector.TextViewerDelegateForSourceFrame.prototype.afterTextChanged):
1471         (WebInspector.TextViewerDelegateForSourceFrame.prototype.commitEditing):
1472         (WebInspector.TextViewerDelegateForSourceFrame.prototype.cancelEditing):
1473         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateLineGutterContextMenu):
1474         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateTextAreaContextMenu):
1475         (WebInspector.TextViewerDelegateForSourceFrame.prototype.suggestedFileName):
1476
1477 2011-07-12  Andrey Kosyakov  <caseq@chromium.org>
1478
1479         Web Inspector: remove more dead code from the Network panel
1480         https://bugs.webkit.org/show_bug.cgi?id=64291
1481
1482         Reviewed by Pavel Feldman.
1483
1484         * inspector/front-end/NetworkPanel.js:
1485         (WebInspector.NetworkPanel.prototype._toggleGridMode):
1486         (WebInspector.NetworkPanel.prototype._toggleViewingResourceMode):
1487         * inspector/front-end/networkPanel.css:
1488
1489 2011-07-12  Adam Roben  <aroben@apple.com>
1490
1491         Unreviewed, rolling out r90811.
1492         http://trac.webkit.org/changeset/90811
1493         https://bugs.webkit.org/show_bug.cgi?id=61025
1494
1495         Several svg tests failing assertions beneath
1496         SVGSMILElement::findInstanceTime
1497
1498         * svg/animation/SVGSMILElement.cpp:
1499         (WebCore::SVGSMILElement::findInstanceTime):
1500
1501 2011-07-12  Oliver Varga  <Varga.Oliver@stud.u-szeged.hu>
1502
1503         Reviewed by Nikolas Zimmermann.
1504
1505         Speed up SVGSMILElement::findInstanceTime.
1506         https://bugs.webkit.org/show_bug.cgi?id=61025
1507
1508         Replace the linear search to binary search on ordered list because
1509         the previous searches from the beginning was not efficient.
1510         Out of index error fixed by Renata Hodovan.
1511
1512         No new tests this is only a performance tweak.
1513
1514         * svg/animation/SVGSMILElement.cpp:
1515         (WebCore::extractTimeFromVector):
1516         (WebCore::SVGSMILElement::findInstanceTime):
1517
1518 2011-07-11  Zeng Huiqing  <huiqing.zeng@intel.com>
1519
1520         Optimize HTMLInputElement::updateCheckedRadioButtons
1521         https://bugs.webkit.org/show_bug.cgi?id=62840
1522
1523         Reviewed by Kent Tamura.
1524
1525         No new tests.
1526
1527         * dom/Document.h:
1528         (WebCore::Document::getFormElements):
1529         * html/HTMLInputElement.cpp:
1530         (WebCore::HTMLInputElement::updateCheckedRadioButtons):
1531         (WebCore::HTMLInputElement::setChecked):
1532
1533 2011-07-11  Pratik Solanki  <psolanki@apple.com>
1534
1535         Reviewed by David Kilzer.
1536
1537         Add NSURLRequest wrapper in ResourceRequest when USE(CFNETWORK) is enabled
1538         https://bugs.webkit.org/show_bug.cgi?id=63276
1539
1540         When USE(CFNETWORK) is enabled on Mac, keep an NSURLRequest object along with the
1541         CFURLRequestRef so that WebKit can continue using the NSURLRequest.
1542
1543         No new tests because no change in functionality and option is not enabled on Mac.
1544
1545         * platform/network/cf/ResourceRequest.h:
1546         (WebCore::ResourceRequest::updateNSURLRequest):
1547         (WebCore::ResourceRequest::ResourceRequest):
1548         * platform/network/cf/ResourceRequestCFNet.cpp:
1549         (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
1550         (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
1551         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1552         (WebCore::ResourceRequest::applyWebArchiveHackForMail):
1553         * platform/network/mac/ResourceRequestMac.mm:
1554         (WebCore::ResourceRequest::nsURLRequest):
1555         (WebCore::ResourceRequest::ResourceRequest):
1556         (WebCore::ResourceRequest::updateNSURLRequest):
1557
1558 2011-07-11  Ryosuke Niwa  <rniwa@webkit.org>
1559
1560         positionForPoint is broken when a block is positioned relatively inside the parent
1561         https://bugs.webkit.org/show_bug.cgi?id=64298
1562
1563         Reviewed by Simon Fraser.
1564
1565         The bug was caused by positionForPointRespectingEditingBoundaries's not taking relativePositionOffset
1566         into account when computing the point in child coordinates. Fixed the bug by adding the offset to
1567         childLocation as needed.
1568
1569         Test: fast/block/positioning/hittest-on-relative-positioned-children.html
1570
1571         * rendering/RenderBlock.cpp:
1572         (WebCore::positionForPointRespectingEditingBoundaries): Fixed the bug; also replaced all instances of
1573         IntPoint by LayoutPoint.
1574
1575 2011-07-11  Dan Bernstein  <mitz@apple.com>
1576
1577         Excessive expansion of justified text when rounding hacks are enabled
1578         https://bugs.webkit.org/show_bug.cgi?id=64331
1579
1580         Reviewed by Anders Carlsson.
1581
1582         Test: platform/mac/fast/text/rounding-hacks-expansion.html
1583
1584         When rounding hacks are enabled, the expansion at each expansion opportunity should be by an
1585         integer. Restored more of the logic that was removed in r78846 in order to ensure this.
1586
1587         * platform/graphics/WidthIterator.cpp:
1588         (WebCore::WidthIterator::advance):
1589         * platform/graphics/mac/ComplexTextController.cpp:
1590         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1591
1592 2011-07-11  Jer Noble  <jer.noble@apple.com>
1593
1594         HTML5 video controller in fullscreen is partly off-screen (at least on youtube) using ClickToFlash
1595         https://bugs.webkit.org/show_bug.cgi?id=64327
1596
1597         Reviewed by Darin Adler.
1598
1599         No new tests; no change in functionality, so covered by existing tests.
1600
1601         Make the rules from fullscreenQuickTime.css !important so they are not overridden
1602         by page authors.
1603
1604         * css/fullscreenQuickTime.css:
1605         (video:-webkit-full-screen::-webkit-media-controls-panel):
1606
1607 2011-07-11  Levi Weintraub  <leviw@chromium.org>
1608
1609         Switch lineTop and lineBottom to new layout types
1610         https://bugs.webkit.org/show_bug.cgi?id=64317
1611
1612         Reviewed by Eric Seidel.
1613
1614         Changing lineTop and lineBottom to LayoutUnits and preparing all uses
1615         of them for the upcoming conversion.
1616
1617         No new tests, no new functionality.
1618
1619         * rendering/EllipsisBox.cpp:
1620         (WebCore::EllipsisBox::nodeAtPoint):
1621         * rendering/EllipsisBox.h:
1622         * rendering/GapRects.h:
1623         (WebCore::GapRects::left):
1624         (WebCore::GapRects::center):
1625         (WebCore::GapRects::right):
1626         (WebCore::GapRects::uniteLeft):
1627         (WebCore::GapRects::uniteCenter):
1628         (WebCore::GapRects::uniteRight):
1629         (WebCore::GapRects::operator LayoutRect):
1630         * rendering/InlineBox.cpp:
1631         (WebCore::InlineBox::nodeAtPoint):
1632         * rendering/InlineBox.h:
1633         * rendering/InlineFlowBox.cpp:
1634         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
1635         (WebCore::InlineFlowBox::flipLinesInBlockDirection):
1636         (WebCore::InlineFlowBox::computeOverflow):
1637         (WebCore::InlineFlowBox::setLayoutOverflow):
1638         (WebCore::InlineFlowBox::setVisualOverflow):
1639         (WebCore::InlineFlowBox::setOverflowFromLogicalRects):
1640         (WebCore::InlineFlowBox::nodeAtPoint):
1641         * rendering/InlineFlowBox.h:
1642         (WebCore::InlineFlowBox::layoutOverflowRect):
1643         (WebCore::InlineFlowBox::visualOverflowRect):
1644         * rendering/InlineTextBox.cpp:
1645         (WebCore::InlineTextBox::nodeAtPoint):
1646         * rendering/RenderLineBoxList.cpp:
1647         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
1648         * rendering/RenderLineBoxList.h:
1649         * rendering/RenderListItem.cpp:
1650         (WebCore::RenderListItem::positionListMarker):
1651         * rendering/RenderTextControl.h:
1652         * rendering/RenderTextControlMultiLine.cpp:
1653         (WebCore::RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight):
1654         * rendering/RenderTextControlSingleLine.cpp:
1655         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
1656         * rendering/RenderTextControlSingleLine.h:
1657         * rendering/RootInlineBox.cpp:
1658         (WebCore::RootInlineBox::nodeAtPoint):
1659         * rendering/RootInlineBox.h:
1660         (WebCore::RootInlineBox::lineTop):
1661         (WebCore::RootInlineBox::lineBottom):
1662         (WebCore::RootInlineBox::setLineTopBottomPositions):
1663         (WebCore::RootInlineBox::logicalTopVisualOverflow):
1664         (WebCore::RootInlineBox::logicalBottomVisualOverflow):
1665         (WebCore::RootInlineBox::logicalTopLayoutOverflow):
1666         (WebCore::RootInlineBox::logicalBottomLayoutOverflow):
1667         * rendering/svg/SVGInlineFlowBox.h:
1668         * rendering/svg/SVGInlineTextBox.cpp:
1669         (WebCore::SVGInlineTextBox::nodeAtPoint):
1670         * rendering/svg/SVGInlineTextBox.h:
1671         * rendering/svg/SVGRootInlineBox.h:
1672
1673 2011-07-11  Martin Robinson  <mrobinson@igalia.com>
1674
1675         Reviewed by Daniel Bates.
1676
1677         [GTK] Transition to Mozilla named cursors have incorrect hotspot and rendering
1678         https://bugs.webkit.org/show_bug.cgi?id=62752
1679
1680         Instead of offsetting the cursor blit by the hotspot, just pass the hotspot
1681         arguments to the GdkCursor constructor.
1682
1683         No new tests. This is covered by manual-tests/cursor.html.
1684
1685         * platform/gtk/CursorGtk.cpp:
1686         (WebCore::createNamedCursor):
1687
1688 2011-07-11  Yi Shen  <yi.4.shen@nokia.com>
1689
1690         [Qt] Unreviewed rollout 90779 which may fail the layout-test.
1691
1692         * platform/network/qt/QNetworkReplyHandler.cpp:
1693         (WebCore::QNetworkReplyHandlerCallQueue::setDeferSignals):
1694         * platform/network/qt/QNetworkReplyHandler.h:
1695
1696 2011-07-11  Bradley Nelson  <bradnelson@chromium.org>
1697
1698         Reviewed by Darin Fisher.
1699
1700         Split webcore_dom off webcore_remaining to reduce its size for
1701         whole program optimization builds.
1702
1703         https://bugs.webkit.org/show_bug.cgi?id=64299
1704
1705         * WebCore.gyp/WebCore.gyp:
1706
1707 2011-07-11  Yi Shen  <yi.4.shen@nokia.com>
1708
1709         [Qt] ASSERTION FAILED in ResourceHandle::setDefersLoading causes crash
1710         https://bugs.webkit.org/show_bug.cgi?id=62808
1711
1712         Reviewed by Benjamin Poulain.
1713
1714         The assertion in ResourceHandle::setDefersLoading assumes asynchronous
1715         content delivery -- To resume a page, first, its main resource loader
1716         calls setDefersLoading to resume loading the main content; then all the
1717         sub-resource loaders calls setDefersLoading to resume sub-contents.
1718         However, since QNetworkReplyHandler delivers content synchronously,
1719         some new sub-resource loaders get created as soon as the main resource
1720         loader resumed, and all these new sub-resource loaders set their
1721         defersLoading flag to false. Then, the assertion fails for these new
1722         sub-resource loaders when calling setDefersLoading on them. As a fix,
1723         this path makes QNetworkReplyHandler deliver content asynchronously.
1724
1725         Test: loader/load-defer-resume-crash.html
1726
1727         * platform/network/qt/QNetworkReplyHandler.cpp:
1728         (WebCore::QNetworkReplyHandlerCallQueue::setDeferSignals):
1729         * platform/network/qt/QNetworkReplyHandler.h:
1730
1731 2011-07-08  Ryosuke Niwa  <rniwa@webkit.org>
1732
1733         Move innerTextElement() from RenderTextControl to HTMLTextFormControlElement
1734         https://bugs.webkit.org/show_bug.cgi?id=64134
1735
1736         Reviewed by Kent Tamura.
1737
1738         Moved innerTextElement from RenderTextControl to HTMLTextFormControlElement. It is implemented by
1739         HTMLInputElement and HTMLTextAreaElement instead of RenderTextControlSingleLine and
1740         RenderTextControlMultiLine.
1741
1742         This refactoring removes the indirection through RenderTextControl and makes the ownership of
1743         shadow DOM for input and textarea elements clear. Accessing the shadow DOM of input and textarea elements
1744         are now less error prone because it no longer depends on the lifetime of the render tree.
1745
1746         * accessibility/AccessibilityRenderObject.cpp:
1747         (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Access innerTextElement via
1748         HTMLTextFormControlElement.
1749         * dom/Node.cpp:
1750         (WebCore::traverseTreeAndMark): No longer calls innerTextElement because this was a work-around
1751         needed before making input and textarea elements use the new shadow DOM model.
1752         * editing/TextIterator.cpp:
1753         (WebCore::TextIterator::handleReplacedElement): Access innerTextElement via HTMLTextFormControlElement.
1754         * html/HTMLFormControlElement.cpp:
1755         (WebCore::hasVisibleTextArea): Takes innerTextElement.
1756         (WebCore::HTMLTextFormControlElement::setSelectionRange): Calls innerTextElement().
1757         (WebCore::HTMLTextFormControlElement::selection): Ditto.
1758         (WebCore::HTMLTextFormControlElement::selectionStart): Ditto; no longer uses a temporary local variable
1759         for innerTextElement because innerTextElement() no longer depends on the lifetime of the render tree.
1760         (WebCore::HTMLTextFormControlElement::selectionEnd): Ditto.
1761         * html/HTMLFormControlElement.h:
1762         * html/HTMLTextAreaElement.cpp:
1763         (WebCore::HTMLTextAreaElement::innerTextElement): Added.
1764         * html/HTMLTextAreaElement.h:
1765         * rendering/RenderTextControl.cpp:
1766         (WebCore::RenderTextControl::textFormControlElement): Made this function a const member.
1767         (WebCore::RenderTextControl::innerTextElement): Added.
1768         * rendering/RenderTextControl.h:
1769         * rendering/RenderTextControlMultiLine.cpp:
1770         * rendering/RenderTextControlMultiLine.h:
1771         * rendering/RenderTextControlSingleLine.cpp:
1772         * rendering/RenderTextControlSingleLine.h:
1773
1774 2011-07-11  Tony Chang  <tony@chromium.org>
1775
1776         rename RenderObject::isFlexibleBox to isDeprecatedFlexibleBox
1777         https://bugs.webkit.org/show_bug.cgi?id=64217
1778
1779         Reviewed by Ojan Vafai.
1780
1781         This is to make way for the new flexbox needing a similar method.
1782         RenderObject also has isFlexingChildren() and isStretchingChildren(),
1783         but we may be able to use those for the new flexbox as well so I
1784         didn't rename them.
1785
1786         No new tests, just refactoring.
1787
1788         * rendering/RenderBlock.cpp:
1789         (WebCore::RenderBlock::removeChild):
1790         (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
1791         (WebCore::shouldCheckLines):
1792         * rendering/RenderBox.cpp:
1793         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
1794         (WebCore::RenderBox::computeLogicalWidth):
1795         (WebCore::RenderBox::sizesToIntrinsicLogicalWidth):
1796         (WebCore::RenderBox::computeLogicalHeight):
1797         * rendering/RenderDeprecatedFlexibleBox.cpp:
1798         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
1799         * rendering/RenderDeprecatedFlexibleBox.h:
1800         (WebCore::RenderDeprecatedFlexibleBox::isDeprecatedFlexibleBox):
1801         * rendering/RenderObject.h:
1802         (WebCore::RenderObject::isDeprecatedFlexibleBox):
1803
1804 2011-07-11  Nate Chapin  <japhet@chromium.org>
1805
1806         [Chromium] Ensure we don't crash when an
1807         HTMLSelectElement mouse release event removes
1808         the element from the DOM.
1809         https://bugs.webkit.org/show_bug.cgi?id=64295
1810
1811         Reviewed by Dimitri Glazkov.
1812
1813         Manual test only because the crash requires a
1814         real popup menu, which DRT doesn't provide.
1815
1816         * manual-tests/chromium/popup-menu-crash.html: Added.
1817         * platform/chromium/PopupMenuChromium.cpp:
1818         (WebCore::PopupContainer::handleMouseReleaseEvent):
1819
1820 2011-07-11  Mike Reed  <reed@google.com>
1821
1822         [skia] remove platform helpers for gradients and patterns
1823         https://bugs.webkit.org/show_bug.cgi?id=64281
1824
1825         Reviewed by Stephen White.
1826
1827         No new tests. fixes canvas/philip/tests/2d.gradient.object.update.html
1828
1829         Remove (now empty) platform helpers for fill/stroke gradients/patterns. We now pickup the platformGradient
1830         and platformPattern fresh when they're needed, so we can see any edits that have occurred to them
1831         2d.gradient.object.update.html sets the fillgradient, and then edits the gradient object. This CL allows
1832         us to see that edit.
1833
1834         * platform/graphics/GraphicsContext.cpp:
1835         (WebCore::GraphicsContext::setStrokePattern):
1836         (WebCore::GraphicsContext::setFillPattern):
1837         (WebCore::GraphicsContext::setStrokeGradient):
1838         (WebCore::GraphicsContext::setFillGradient):
1839         * platform/graphics/GraphicsContext.h:
1840         * platform/graphics/skia/GraphicsContextSkia.cpp:
1841         (WebCore::GraphicsContext::platformInit):
1842         * platform/graphics/skia/PlatformContextSkia.cpp:
1843         (WebCore::PlatformContextSkia::State::State):
1844         (WebCore::PlatformContextSkia::State::~State):
1845         (WebCore::PlatformContextSkia::PlatformContextSkia):
1846         (WebCore::PlatformContextSkia::drawRect):
1847         (WebCore::PlatformContextSkia::setupShader):
1848         (WebCore::PlatformContextSkia::setupPaintForFilling):
1849         (WebCore::PlatformContextSkia::setupPaintForStroking):
1850         (WebCore::PlatformContextSkia::setFillColor):
1851         (WebCore::PlatformContextSkia::setStrokeColor):
1852         (WebCore::PlatformContextSkia::canAccelerate):
1853         * platform/graphics/skia/PlatformContextSkia.h:
1854         (WebCore::PlatformContextSkia::setGraphicsContext):
1855
1856 2011-07-11  Young Han Lee  <joybro@company100.net>
1857
1858         Reviewed by Simon Fraser.
1859
1860         Transition LayoutTest using pause API shows wrong result if it tries to pause a transition after its delay time.
1861         https://bugs.webkit.org/show_bug.cgi?id=63859
1862
1863         The existing code to set the m_startTime haven't worked because 
1864         the animation is not the right state to accept the start event. 
1865         This patch just sets the values directly instead of using event.
1866
1867         Test: transitions/delay.html
1868
1869         * page/animation/AnimationBase.cpp:
1870         (WebCore::AnimationBase::freezeAtTime):
1871
1872 2011-07-11  Ryosuke Niwa  <rniwa@webkit.org>
1873
1874         Move selection related code from RenderTextControl to HTMLTextFormControlElement
1875         https://bugs.webkit.org/show_bug.cgi?id=64133
1876
1877         Reviewed by Dimitri Glazkov.
1878
1879         Moved selectionStart, selectionEnd, hasVisibleTextArea, setSelectionRange, setContainerAndOffsetForRange
1880         and selection from RenderTextControl.cpp to HTMLFormControlElement.cpp.
1881
1882         This refactoring removes RenderTextControl's dependency on FrameSelection.
1883
1884         * accessibility/AccessibilityRenderObject.cpp:
1885         (WebCore::AccessibilityRenderObject::selectedText): Calls HTMLTextFromControl::selectedText.
1886         (WebCore::AccessibilityRenderObject::selectedTextRange): Calls selectionStart and selectionEnd.
1887         (WebCore::AccessibilityRenderObject::setSelectedTextRange): Ditto.
1888         * html/HTMLFormControlElement.cpp:
1889         (WebCore::HTMLTextFormControlElement::selectedText): Extracted from AccessibilityRenderObject::selectedText.
1890         (WebCore::hasVisibleTextArea): Added.
1891         (WebCore::HTMLTextFormControlElement::setSelectionRange): Merged with the function of the same name in RenderTextControl.
1892         (WebCore::HTMLTextFormControlElement::selectionStart): Calls computeSelectionStart instead of RenderTextControl::selectionStart.
1893         (WebCore::HTMLTextFormControlElement::computeSelectionStart): Moved from RenderTextControl::selectionStart.
1894         (WebCore::HTMLTextFormControlElement::selectionEnd): Calls computeSelectionEnd instead of RenderText::selectionEnd.
1895         (WebCore::HTMLTextFormControlElement::computeSelectionEnd): Moved from RenderTextControl::selectionStart.
1896         (WebCore::setContainerAndOffsetForRange): Moved from RenderTextControl.cpp.
1897         (WebCore::HTMLTextFormControlElement::selection): Merged with the function of the same name in RenderTextControl.
1898         (WebCore::HTMLTextFormControlElement::restoreCachedSelection): Calls computeSelectionStart and computeSelectionEnd instead of
1899         RenderTextControl::selectionStart and RenderTextControl::selectionEnd.
1900         (WebCore::HTMLTextFormControlElement::selectionChanged): Calls selectionStart and selectionEnd.
1901         * html/HTMLFormControlElement.h:
1902         * html/HTMLInputElement.cpp:
1903         (WebCore::HTMLInputElement::setValue): Calls setSelectionRange.
1904         * rendering/RenderTextControl.cpp:
1905         (WebCore::RenderTextControl::textFormControlElement): Added.
1906         * rendering/RenderTextControl.h:
1907
1908 2011-07-11  Andreas Kling  <kling@webkit.org>
1909
1910         Reviewed by Oliver Hunt.
1911
1912         Canvas: Use fast, approximate dirty rects for stroke()
1913         https://bugs.webkit.org/show_bug.cgi?id=59764
1914
1915         No new tests, this is an optimization.
1916
1917         * html/canvas/CanvasRenderingContext2D.cpp:
1918         (WebCore::CanvasRenderingContext2D::stroke): Instead of using
1919         Path::strokeBoundingRect() to calculate the exact bounding rect
1920         for a path stroke, get the Path::boundingRect() and inflate it by
1921         miterLimit + lineWidth to get a slightly oversized dirty rect
1922         in a fraction of the time.
1923
1924 2011-07-11  Andrey Kosyakov  <caseq@chromium.org>
1925
1926         Reviewed by Pavel Feldman.
1927
1928         Web Inspector: [refactoring] Remove dependencies of components requiring network resource list from network panel
1929         https://bugs.webkit.org/show_bug.cgi?id=62477
1930
1931         * inspector/front-end/AuditsPanel.js:
1932         * inspector/front-end/ExtensionServer.js:
1933         (WebInspector.ExtensionServer):
1934         (WebInspector.ExtensionServer.prototype._inspectedURLChanged):
1935         (WebInspector.ExtensionServer.prototype._onGetHAR):
1936         (WebInspector.ExtensionServer.prototype.initExtensions):
1937         * inspector/front-end/HAREntry.js:
1938         (WebInspector.HARLog):
1939         (WebInspector.HARLog.prototype.build):
1940         * inspector/front-end/NetworkManager.js:
1941         (WebInspector.NetworkLog):
1942         (WebInspector.NetworkLog.prototype.get resources):
1943         (WebInspector.NetworkLog.prototype._onInspectedURLChanged):
1944         (WebInspector.NetworkLog.prototype._onResourceStarted):
1945         * inspector/front-end/NetworkPanel.js:
1946         (WebInspector.NetworkPanel.prototype._reset):
1947         (WebInspector.NetworkPanel.prototype._copyAll):
1948         (WebInspector.NetworkPanel.prototype._exportAll):
1949         * inspector/front-end/inspector.js:
1950         (WebInspector.reset):
1951
1952 2011-07-11  Pavel Podivilov  <podivilov@chromium.org>
1953
1954         Web Inspector: make SourceFrame a View.
1955         https://bugs.webkit.org/show_bug.cgi?id=64274
1956
1957         Reviewed by Pavel Feldman.
1958
1959         * inspector/front-end/SourceFrame.js:
1960         (WebInspector.SourceFrame):
1961         (WebInspector.SourceFrame.createSearchRegex):
1962         (WebInspector.SourceFrame.prototype.show):
1963         (WebInspector.SourceFrame.prototype.hide):
1964         (WebInspector.SourceFrame.prototype._beforeTextChanged):
1965         (WebInspector.SourceFrame.prototype._afterTextChanged):
1966         (WebInspector.SourceFrame.prototype._initializeTextViewer):
1967         (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches):
1968         (WebInspector.SourceFrame.prototype.performSearch):
1969         (WebInspector.SourceFrame.prototype._populateTextAreaContextMenu):
1970         (WebInspector.SourceFrame.prototype._suggestedFileName):
1971         (WebInspector.SourceFrame.prototype._doubleClick):
1972         (WebInspector.SourceFrame.prototype._cancelEditing):
1973         (WebInspector.TextViewerDelegateForSourceFrame):
1974         (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick):
1975         (WebInspector.TextViewerDelegateForSourceFrame.prototype.beforeTextChanged):
1976         (WebInspector.TextViewerDelegateForSourceFrame.prototype.afterTextChanged):
1977         (WebInspector.TextViewerDelegateForSourceFrame.prototype.commitEditing):
1978         (WebInspector.TextViewerDelegateForSourceFrame.prototype.cancelEditing):
1979         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateLineGutterContextMenu):
1980         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateTextAreaContextMenu):
1981         (WebInspector.TextViewerDelegateForSourceFrame.prototype.suggestedFileName):
1982         * inspector/front-end/TextViewer.js:
1983         (WebInspector.TextViewerDelegate.prototype.populateLineGutterContextMenu):
1984
1985 2011-07-11  Noel Gordon  <noel.gordon@gmail.com>
1986
1987         Reviewed by Adam Roben.
1988
1989         Forward focus events to windowless plugins on the windows port.
1990         https://bugs.webkit.org/show_bug.cgi?id=62375
1991
1992         * plugins/win/PluginViewWin.cpp:
1993         (WebCore::PluginView::setFocus): Forward focus events if the plugin is windowless.
1994
1995 2011-07-11  Shinya Kawanaka  <shinyak@google.com>
1996
1997         Added accessibility notification when value is changed.
1998         https://bugs.webkit.org/show_bug.cgi?id=64256
1999
2000         Notifies the value change of range input when accessibility is enabled.
2001
2002         Reviewed by Kent Tamura.
2003
2004         Covered by existing tests.
2005
2006         * html/RangeInputType.cpp:
2007         (WebCore::RangeInputType::handleKeydownEvent):
2008           Added accessibility notification when value is changed.
2009
2010 2011-07-08  Mikhail Naganov  <mnaganov@chromium.org>
2011
2012         Web Inspector: Fix resizing of sidebar pane in Timeline and Profile panels.
2013         https://bugs.webkit.org/show_bug.cgi?id=64161
2014
2015         Reviewed by Pavel Feldman.
2016
2017         * inspector/front-end/ProfilesPanel.js:
2018         (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
2019         * inspector/front-end/TimelineOverviewPane.js:
2020         (WebInspector.TimelineOverviewPane.prototype.updateMainViewWidth):
2021
2022 2011-07-11  Pavel Feldman  <pfeldman@google.com>
2023
2024         Web Inspector: [REGRESSION r89753-89754] highlight does not respect scroller location.
2025         https://bugs.webkit.org/show_bug.cgi?id=63982
2026
2027         Rolling out 89760, 89756, 89754, 89753 for breaking inspector highlight.
2028
2029         Reviewed by Yury Semikhatsky.
2030
2031         * WebCore.exp.in:
2032         * inspector/DOMNodeHighlighter.cpp:
2033         (WebCore::DOMNodeHighlighter::drawNodeHighlight):
2034         * page/FrameView.cpp:
2035         * page/FrameView.h:
2036         * platform/ScrollView.h:
2037         * platform/Widget.cpp:
2038         * platform/Widget.h:
2039         * rendering/RenderBox.cpp:
2040         (WebCore::RenderBox::mapLocalToContainer):
2041         * rendering/RenderBox.h:
2042         * rendering/RenderInline.cpp:
2043         (WebCore::RenderInline::mapLocalToContainer):
2044         * rendering/RenderInline.h:
2045         * rendering/RenderObject.cpp:
2046         (WebCore::RenderObject::mapLocalToContainer):
2047         (WebCore::RenderObject::localToContainerQuad):
2048         * rendering/RenderObject.h:
2049         (WebCore::RenderObject::localToAbsoluteQuad):
2050         * rendering/RenderView.cpp:
2051         (WebCore::RenderView::mapLocalToContainer):
2052         * rendering/RenderView.h:
2053         * rendering/svg/RenderSVGForeignObject.cpp:
2054         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
2055         * rendering/svg/RenderSVGForeignObject.h:
2056         * rendering/svg/RenderSVGInline.cpp:
2057         (WebCore::RenderSVGInline::mapLocalToContainer):
2058         * rendering/svg/RenderSVGInline.h:
2059         * rendering/svg/RenderSVGModelObject.cpp:
2060         (WebCore::RenderSVGModelObject::mapLocalToContainer):
2061         * rendering/svg/RenderSVGModelObject.h:
2062         * rendering/svg/RenderSVGRoot.cpp:
2063         (WebCore::RenderSVGRoot::mapLocalToContainer):
2064         * rendering/svg/RenderSVGRoot.h:
2065         * rendering/svg/RenderSVGText.cpp:
2066         (WebCore::RenderSVGText::mapLocalToContainer):
2067         * rendering/svg/RenderSVGText.h:
2068         * rendering/svg/SVGRenderSupport.cpp:
2069         (WebCore::SVGRenderSupport::mapLocalToContainer):
2070         * rendering/svg/SVGRenderSupport.h:
2071
2072 2011-07-11  Mustafizur Rahaman  <mustaf.here@gmail.com>
2073
2074         Reviewed by James Robinson.
2075
2076         Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.fill.destination-atop.html
2077         https://bugs.webkit.org/show_bug.cgi?id=48292
2078         
2079         and
2080         
2081         Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.pattern.destination-atop.html
2082         https://bugs.webkit.org/show_bug.cgi?id=48302
2083
2084         * html/canvas/CanvasRenderingContext2D.cpp:
2085         (WebCore::CanvasRenderingContext2D::shouldDisplayTransparencyElsewhere): Added CompositeDestinationAtop 
2086         to draw transparency elsewhere for destination-atop
2087
2088 2011-07-08  Mikhail Naganov  <mnaganov@chromium.org>
2089
2090         Web Inspector: [Chromium] Get rid of flickering "Please wait" message in Heap profiler.
2091         https://bugs.webkit.org/show_bug.cgi?id=61175
2092
2093         The message has been replaced with spinner icons appearing instead of profile's
2094         icon. As each profile owns a worker, they run independently, and there can be
2095         multiple spinners at the same time.
2096
2097         Reviewed by Pavel Feldman.
2098
2099         * WebCore.gypi:
2100         * WebCore.vcproj/WebCore.vcproj:
2101         * inspector/front-end/DetailedHeapshotGridNodes.js:
2102         (WebInspector.HeapSnapshotGridNode.prototype._populate.sorted):
2103         (WebInspector.HeapSnapshotGridNode.prototype._populate):
2104         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved):
2105         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
2106         * inspector/front-end/DetailedHeapshotView.js:
2107         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
2108         (WebInspector.HeapSnapshotRetainingPathsList.prototype.showNext):
2109         (WebInspector.HeapSnapshotRetainingPathsList.prototype.searchCancelled):
2110         (WebInspector.DetailedHeapshotView.profileCallback):
2111         (WebInspector.DetailedHeapshotView):
2112         (WebInspector.DetailedHeapshotView.prototype._changeBase.baseProfileLoaded):
2113         (WebInspector.DetailedHeapshotView.prototype._changeBase):
2114         (WebInspector.DetailedHeapshotView.prototype.processLoadedSnapshot):
2115         (WebInspector.DetailedHeapshotView.prototype._changeView):
2116         * inspector/front-end/HeapSnapshotProxy.js:
2117         (WebInspector.HeapSnapshotWorker):
2118         (WebInspector.HeapSnapshotWorker.prototype.dispose):
2119         (WebInspector.HeapSnapshotWorker.prototype.startCheckingForLongRunningCalls):
2120         (WebInspector.HeapSnapshotWorker.prototype._checkLongRunningCalls):
2121         (WebInspector.HeapSnapshotProxyObject.prototype.callMethod):
2122         (WebInspector.HeapSnapshotProxyObject.prototype.get worker):
2123         * inspector/front-end/Images/spinnerActive.gif: Added. Generated using ajaxload.info.
2124         * inspector/front-end/Images/spinnerActiveSelected.gif: Added. Generated using ajaxload.info.
2125         * inspector/front-end/Images/spinnerInactive.gif: Added. Generated using ajaxload.info.
2126         * inspector/front-end/Images/spinnerInactiveSelected.gif: Added. Generated using ajaxload.info.
2127         * inspector/front-end/PleaseWaitMessage.js: Removed.
2128         * inspector/front-end/ProfilesPanel.js:
2129         (WebInspector.ProfilesPanel.prototype._addProfileHeader):
2130         (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot.setProfileWait):
2131         (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot):
2132         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.parsed):
2133         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
2134         (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
2135         * inspector/front-end/SidebarTreeElement.js:
2136         (WebInspector.SidebarTreeElement.prototype.set wait):
2137         * inspector/front-end/WebKit.qrc:
2138         * inspector/front-end/heapProfiler.css:
2139         (.heap-snapshot-sidebar-tree-item.wait .icon):
2140         (.heap-snapshot-sidebar-tree-item.wait.selected .icon):
2141         (body.inactive .heap-snapshot-sidebar-tree-item.wait .icon):
2142         (body.inactive .heap-snapshot-sidebar-tree-item.wait.selected .icon):
2143         * inspector/front-end/inspector.html:
2144
2145 2011-07-10  Patrick Gansterer  <paroga@webkit.org>
2146
2147         Generate conditional include statements in CodeGeneratorJS
2148         https://bugs.webkit.org/show_bug.cgi?id=64231
2149
2150         Reviewed by Brent Fulgham.
2151
2152         Suround headers with a correspondig #if ENABLE() line.
2153         This allows us to generate bindings only of required IDL files.
2154
2155         Changing the current preprocessor statements to the Conditional attribute
2156         in a next step helps in getting rid of calls to the preprocessor,
2157         which causes so much pain on a natvie Windows environment. 
2158
2159         * bindings/scripts/CodeGeneratorJS.pm:
2160         (GenerateImplementation):
2161         (WriteData):
2162
2163 2011-07-10  Patrick Gansterer  <paroga@webkit.org>
2164
2165         Remove array size from generated JSC binding tables
2166         https://bugs.webkit.org/show_bug.cgi?id=64229
2167
2168         Reviewed by Brent Fulgham.
2169
2170         Because many items in the array are surrounded with #if(ENABLE_XXX) lines,
2171         the array size isn't fix and correct in all cases.
2172         So let the compiler calculate the correct size itself.
2173
2174         * bindings/scripts/CodeGeneratorJS.pm:
2175         (GenerateHashTable):
2176         * bindings/scripts/test/JS/JSTestInterface.cpp:
2177         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2178         * bindings/scripts/test/JS/JSTestObj.cpp:
2179         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2180
2181 2011-07-10  Kenichi Ishibashi  <bashi@chromium.org>
2182
2183         Let plugins participate in form submission
2184         https://bugs.webkit.org/show_bug.cgi?id=13061
2185
2186         Implements HTMLObjectElement::appendFormData() so that object
2187         elements respond as form associated elements.
2188
2189         Reviewed by Anders Carlsson.
2190
2191         Test: plugins/form-value.html
2192
2193         * html/HTMLObjectElement.cpp:
2194         (WebCore::HTMLObjectElement::appendFormData): Implemented.
2195         * plugins/PluginViewBase.h:
2196         (WebCore::PluginViewBase::getFormValue): Added.
2197
2198 2011-07-10  Anders Carlsson  <andersca@apple.com>
2199
2200         WebKit2 is leaking NSCursors created by leakNamedCursor
2201         https://bugs.webkit.org/show_bug.cgi?id=64241
2202         <rdar://problem/9507151>
2203
2204         Reviewed by Oliver Hunt.
2205
2206         * platform/mac/CursorMac.mm:
2207         (WebCore::createNamedCursor):
2208         Rename this from leakNamedCursor to createNamedCursor and make it return a
2209         RetainPtr<NSCursor> instead of a raw pointer.
2210
2211         (WebCore::Cursor::ensurePlatformCursor):
2212         Don't leak cursors here. We still won't deallocate cursors during shutdown (which leakNamedCursor
2213         was said to prevent) because the cursor singletons are all allocated from the heap and are never destroyed
2214         anyway.
2215
2216 2011-07-10  Yuta Kitamura  <yutak@chromium.org>
2217
2218         WebSocket: Add useHixie76Protocol flag to WebSocketChannel and WebSocketHandshake
2219         https://bugs.webkit.org/show_bug.cgi?id=64244
2220
2221         Reviewed by Kent Tamura.
2222
2223         Get the value of Settings::useHixie76WebSocketProtocol() and save it in
2224         WebSocketChannel and WebSocketHandshake instances. Obtained flag value
2225         is not used for now.
2226
2227         No behavior change, thus no new tests.
2228
2229         * websockets/WebSocketChannel.cpp:
2230         (WebCore::WebSocketChannel::WebSocketChannel):
2231         WebSocketChannel is always created in context of Document (see
2232         ThreadableWebSocketChannel::create()).
2233         Because m_useHixie76Protocol must be passed to WebSocketHandshake
2234         constructor, WebSocketHandshake instance is allocated dynamically
2235         and stored in OwnPtr.
2236         (WebCore::WebSocketChannel::connect):
2237         (WebCore::WebSocketChannel::fail):
2238         (WebCore::WebSocketChannel::disconnect):
2239         (WebCore::WebSocketChannel::didOpen):
2240         (WebCore::WebSocketChannel::didFail):
2241         (WebCore::WebSocketChannel::processBuffer):
2242         * websockets/WebSocketChannel.h:
2243         * websockets/WebSocketHandshake.cpp:
2244         (WebCore::WebSocketHandshake::WebSocketHandshake):
2245         * websockets/WebSocketHandshake.h:
2246
2247 2011-07-10  Tom Hudson  <tomhudson@google.com>
2248
2249         Reviewed by James Robinson.
2250
2251         GraphicsContextSkia::drawConvexPolygon doesn't pay attention to shouldAntialias
2252         https://bugs.webkit.org/show_bug.cgi?id=61369
2253
2254         * platform/graphics/skia/GraphicsContextSkia.cpp:
2255         (WebCore::GraphicsContext::drawConvexPolygon): Pass the
2256         shouldAntialias parameter on to Skia.
2257
2258 2011-07-10  Yuzo Fujishima  <yuzo@google.com>
2259
2260         Fix for Bug 63968 - Add comment to explain Vector usage in FontCache::purgeInactiveFontData
2261         https://bugs.webkit.org/show_bug.cgi?id=63968
2262
2263         Reviewed by Dan Bernstein.
2264
2265         No new tests because this changes comments only.
2266
2267         * platform/graphics/FontCache.cpp:
2268         (WebCore::FontCache::purgeInactiveFontData): Add explanation why SimpleFontData is not deleted in the iteration loop.
2269
2270 2011-07-10  Emil A Eklund  <eae@chromium.org>
2271
2272         Switch updateHitTestResult to to new layout types
2273         https://bugs.webkit.org/show_bug.cgi?id=64209
2274
2275         Reviewed by Eric Seidel.
2276
2277         No new tests, no functionality changes.
2278
2279         * rendering/EllipsisBox.cpp:
2280         (WebCore::EllipsisBox::nodeAtPoint):
2281         * rendering/RenderBlock.cpp:
2282         (WebCore::RenderBlock::hitTestFloats):
2283         (WebCore::RenderBlock::updateHitTestResult):
2284         * rendering/RenderBlock.h:
2285         * rendering/RenderInline.cpp:
2286         (WebCore::RenderInline::updateHitTestResult):
2287         * rendering/RenderInline.h:
2288         * rendering/RenderLineBoxList.cpp:
2289         (WebCore::RenderLineBoxList::hitTest):
2290         * rendering/RenderObject.cpp:
2291         (WebCore::RenderObject::updateHitTestResult):
2292         * rendering/RenderObject.h:
2293         * rendering/RenderView.cpp:
2294         (WebCore::RenderView::updateHitTestResult):
2295         * rendering/RenderView.h:
2296         * rendering/svg/RenderSVGContainer.cpp:
2297         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
2298         * rendering/svg/RenderSVGImage.cpp:
2299         (WebCore::RenderSVGImage::nodeAtFloatPoint):
2300         * rendering/svg/RenderSVGPath.cpp:
2301         (WebCore::RenderSVGPath::nodeAtFloatPoint):
2302         * rendering/svg/RenderSVGRoot.cpp:
2303         (WebCore::RenderSVGRoot::nodeAtPoint):
2304
2305 2011-07-10  Patrick Gansterer  <paroga@webkit.org>
2306
2307         Reviewed by Adam Barth.
2308
2309         Fix member variable order of ContextMenuItem
2310         https://bugs.webkit.org/show_bug.cgi?id=59905
2311
2312         Use the same order at decleration and assignment to silence compiler warning.
2313
2314         * platform/ContextMenuItem.h:
2315
2316 2011-07-10  Dan Bernstein  <mitz@apple.com>
2317
2318         <rdar://problem/9750062> REGRESSION: Button text missing in many iTunes Store pages
2319         https://bugs.webkit.org/show_bug.cgi?id=64236
2320
2321         Reviewed by Maciej Stachowiak.
2322
2323         Test: fast/css/empty-display-none.html
2324
2325         When an :empty selector caused an element to not have a renderer, the check for empty style
2326         change when finishing parsing the elemenet did nothing, because it could not check if the
2327         element’s current style was affected by :empty. The fix is to record the fact that the style
2328         was affected by :empty in ElementRareData in the no-renderer case.
2329
2330         * dom/Element.cpp:
2331         (WebCore::Element::recalcStyle): Clear the m_styleAffectedByEmpty flag.
2332         (WebCore::checkForEmptyStyleChange): If the style is null (meaning there is no renderer), check
2333         Element::styleAffectedByEmpty().
2334         (WebCore::Element::setStyleAffectedByEmpty): Added. Sets the flag in rare data.
2335         (WebCore::Element::styleAffectedByEmpty): Added. Checks for the flag in rare data.
2336         * dom/Element.h:
2337         * dom/ElementRareData.h:
2338         (WebCore::ElementRareData::ElementRareData): Added m_styleAffectedByEmpty and initialized it
2339         to false.
2340         * dom/NodeRenderingContext.cpp:
2341         (WebCore::NodeRendererFactory::createRendererAndStyle): If an element doesn’t need a renderer
2342         and its style is affected by :empty, record this fact in the element by calling setStyleAffectedByEmpty().
2343
2344 2011-07-10  Mark Rowe  <mrowe@apple.com>
2345
2346         Fix the build.
2347
2348         * svg/properties/SVGAttributeToPropertyMap.h: Forward-declare SVGPropertyInfo as a struct
2349         since that's what it is.
2350
2351 2011-07-09  Patrick Gansterer  <paroga@webkit.org>
2352
2353         Unreviewed WinCE build fix for r90680.
2354
2355         Repeat the change done in r90681 for all other SVGAnimated*PropertyTearOff.h files.
2356
2357         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: Make create public and remove friendship with SVGAnimatedProperty.
2358         * svg/properties/SVGAnimatedListPropertyTearOff.h: Ditto.
2359         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: Ditto.
2360         * svg/properties/SVGAnimatedPropertyTearOff.h: Ditto.
2361         * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Ditto.
2362
2363 2011-07-09  Nikolas Zimmermann  <nzimmermann@rim.com>
2364
2365         Add a possibility to retrieve the associated SVGAnimatedProperty object for a certain XML attribute
2366         https://bugs.webkit.org/show_bug.cgi?id=63797
2367
2368         Fix WinCE build. Funny none other platform complained.
2369
2370         * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Make create public, SVGAnimatedProperty needs it - remove friendship with it.
2371
2372 2011-07-09  Nikolas Zimmermann  <nzimmermann@rim.com>
2373
2374         Add a possibility to retrieve the associated SVGAnimatedProperty object for a certain XML attribute
2375         https://bugs.webkit.org/show_bug.cgi?id=63797
2376
2377         Reviewed by Dirk Schulze.
2378
2379         In order to prepare animVal support we need a way to map a given SVG DOM attribute to a SVGAnimatedProperty.
2380         eg. SVGNames::xAttr -> SVGRectElement::xAnimated(), etc. This will be needed to update the animVal of the
2381         SVGAnimatedProperty, if an animation is running. It would required adding a new method to all SVG* classes
2382         that define animated properties. Unfortunately we already have lots of repeated code in methods like
2383         synchronizeProperty / fillAttributeToPropertyTypeMap. Look at SVGRectElement for example:
2384
2385         void SVGRectElement::synchronizeProperty(const QualifiedName& attrName)
2386         {
2387             if (attrName == anyQName()) {
2388                 synchronizeX();
2389                 synchronizeY();
2390                  ...
2391               }
2392
2393             if (attrName == SVGNames::xAttr) {
2394                 synchronizeX();
2395                 return;
2396             }
2397
2398             if (attrName == SVGNames::yAttr) {
2399                 synchronizeY();
2400                 return;
2401             }
2402             ...
2403         }
2404
2405         or
2406
2407         void SVGRectElement::fillAttributeToPropertyTypeMap()
2408         {
2409             AttributeToPropertyTypeMap& attributeToPropertyTypeMap = this->attributeToPropertyTypeMap();
2410         
2411             SVGStyledTransformableElement::fillPassedAttributeToPropertyTypeMap(attributeToPropertyTypeMap);
2412             attributeToPropertyTypeMap.set(SVGNames::xAttr, AnimatedLength);
2413             attributeToPropertyTypeMap.set(SVGNames::yAttr, AnimatedLength);
2414             ...
2415         }
2416
2417         These lookups are all performed dynamically. Each synchronizeProperty() call does a lot of comparisons.
2418         fillAttributeToPropertyTypeMap() isn't that bad as the result is cached in a static HashMap per-SVGRectElement.
2419         There's no reason to do these things dynamically!
2420
2421         Inspired by JSC, I'm adding a "static const SVGPropertyInfo s_fooPropertyInfo" object for each animated SVG property.
2422         For example, for SVGRectElements SVGAnimatedLength x property we're storing:
2423         - "AnimatedPropertyType type" (AnimatedLength -- note the enum was named AnimatedAttributeType, I renamed it to AnimatedPropertyType for clarity)
2424         - "const QualifiedName& attributeName" (SVGNames::xAttr)
2425         - "const AtomicString& propertyIdentifier" (SVGNames::xAttr.localName() -- only different if N-wrappers map to a single XML DOM attribute, eg. orientAttr)
2426         - "SynchronizeProperty synchronizeProperty" (callback to SVGRectElement::synchronizeX)
2427         - "LookupOrCreateWrapperForAnimatedProperty lookupOrCreateWrapperForAnimatedProperty" (callback to SVGRectElement::xAnimated)
2428
2429         Using this information, we can replace all the various synchronizeProperty/fillAttributeToPropertyMap implementations, with a single one in SVGElement.
2430         All these are auto-generated, using the standard macros used to define/declare SVG animated properties. This required several changes to the macros.
2431         Here's a summary:
2432     
2433         #1) In all headers, wrap DECLARE_ANIMATED_* calls, in BEGIN_DECLARE_ANIMATED_PROPERTIES(ClassName) / END_DECLARE_ANIMATED_PROPERTIES blocks.
2434         
2435             Sample change for SVGRectElement:
2436             -    DECLARE_ANIMATED_LENGTH(X, x)
2437             -    DECLARE_ANIMATED_LENGTH(Y, y)
2438             -    ...
2439
2440             +    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGRectElement)
2441             +        DECLARE_ANIMATED_LENGTH(X, x)
2442             +        DECLARE_ANIMATED_LENGTH(Y, y)
2443             +         ...
2444             +    END_DECLARE_ANIMATED_PROPERTIES
2445
2446         #2) In all cpp files, add a new section wrapped in BEGIN_REGISTER_ANIMATED_PROPERTIES(ClassName / END_REGISTER_ANIMATED_PROPERTIES blocks:
2447
2448             Sample change for SVGRectElement:
2449             +BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGRectElement)
2450             +    REGISTER_LOCAL_ANIMATED_PROPERTY(x)
2451             +    REGISTER_LOCAL_ANIMATED_PROPERTY(y)
2452             +    ...
2453             +    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledTransformableElement)
2454             +    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests)
2455             +END_REGISTER_ANIMATED_PROPERTIES
2456
2457             This is the main piece of the logic that replaces the manual synchronizeProperty/fillAttributeToPropertyMap implementation. It expands to following:
2458
2459             SVGAttributeToPropertyMap& SVGRectElement::attributeToPropertyMap()
2460             {
2461                 DEFINE_STATIC_LOCAL(SVGAttributeToPropertyMap, s_attributeToPropertyMap, ());
2462             }
2463
2464             static void registerAnimatedPropertiesForSVGRectElement()
2465             {
2466                 SVGAttributeToPropertyMap& map = SVGRectElement::attributeToPropertyMap();
2467                 if (!map.isEmpty())
2468                     return;
2469                 map.addProperty(SVGRectElement::xPropertyInfo());
2470                 map.addProperty(SVGRectElement::yPropertyInfo());
2471                 ...
2472                 map.addProperties(SVGStyledTransformableElement::attributeToPropertyMap());
2473                 map.addProperties(SVGTests::attributeToPropertyMap());
2474             }
2475
2476             A single-instance of SVGAttributeToPropertyMap is created for each SVG*Element. The constructor of SVGRectElement is supposed to call
2477             registerAnimatedPropertiesForSVGRectElement(), which collects all properties of SVGRectElement and all its parent classes and stores them
2478             in a Vector<const SVGPropertyInfo*>. This Vector is stored in a HashMap<QualifiedName, Vector<const SVGPropertyInfo*> > where the key
2479             is the attribute name (eg. SVGNames::xAttr -> SVGRectElement::xPropertyInfo). This is only done _once_ per SVGRectElement.
2480
2481             SVGElement contains a "virtual SVGAttributeToPropertyMap& localAttributeToPropertyMap()" method, and SVGRectElement overrides it
2482             and returns SVGRectElement::attributeToPropertyMap() (which is static!) -- this is hidden again in the macros, no need to write any code.
2483
2484             SVGAttributeToPropertyMap provides following API:
2485             - bool synchronizeProperty(SVGElement* contextElement, const QualifiedName& attributeName)
2486             - void synchronizeProperties(SVGElement* contextElement)
2487             
2488                 A generic way to synchronize a SVGAnimatedProperty with its XML DOM attribute. Any SVG DOM change to eg. <rect>s x property will now trigger
2489                 contextElement->localAttributeToPropertyMap().synchronizeProperty(this, SVGNames::xAttr)
2490                 The SVGAttributeToPropertyMap will ask its HashMap for the Vector containing the properties for SVGNames::xAttr (in that case, just one xAnimated()).
2491
2492             - void animatedPropertyTypeForAttribute(const QualifiedName& attributeName, Vector<AnimatedPropertyType>& propertyTypes)
2493
2494                 This method replaces the fillAttributeToPropertyMap implementations everywhere.
2495         
2496             - void animatedPropertiesForAttribute(SVGElement* contextElement, const QualifiedName& attributeName, Vector<RefPtr<SVGAnimatedProperty> >& properties);
2497
2498                 This method is not used yet, but allows us to collect all SVGAnimatedProperties for a QualifiedName -- the initial goal for this patch.
2499
2500         #3) In all cpp files, add a call to "registerAnimatedPropertiesForClassName()" in the constructor. Forgetting this will result in a compile error.
2501
2502         Doesn't affect any tests.
2503
2504         * CMakeLists.txt:
2505         * GNUmakefile.list.am:
2506         * WebCore.gypi:
2507         * WebCore.pro:
2508         * WebCore.vcproj/WebCore.vcproj:
2509         * WebCore.xcodeproj/project.pbxproj:
2510         * bindings/scripts/CodeGeneratorJS.pm:
2511         (NativeToJSValue):
2512         * bindings/scripts/CodeGeneratorObjC.pm:
2513         (GenerateImplementation):
2514         * bindings/scripts/CodeGeneratorV8.pm:
2515         (GenerateNormalAttrGetter):
2516         * svg/SVGAElement.cpp:
2517         (WebCore::SVGAElement::SVGAElement):
2518         * svg/SVGAElement.h:
2519         (WebCore::SVGAElement::synchronizeRequiredFeatures):
2520         (WebCore::SVGAElement::synchronizeRequiredExtensions):
2521         (WebCore::SVGAElement::synchronizeSystemLanguage):
2522         * svg/SVGAltGlyphElement.cpp:
2523         (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
2524         * svg/SVGAltGlyphElement.h:
2525         * svg/SVGAnimateElement.cpp:
2526         (WebCore::SVGAnimateElement::SVGAnimateElement):
2527         (WebCore::SVGAnimateElement::hasValidAttributeType):
2528         (WebCore::SVGAnimateElement::determineAnimatedPropertyType):
2529         (WebCore::SVGAnimateElement::determinePropertyValueTypes):
2530         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2531         (WebCore::SVGAnimateElement::calculateFromAndToValues):
2532         (WebCore::SVGAnimateElement::calculateFromAndByValues):
2533         (WebCore::SVGAnimateElement::resetToBaseValue):
2534         (WebCore::SVGAnimateElement::applyResultsToTarget):
2535         (WebCore::SVGAnimateElement::calculateDistance):
2536         (WebCore::SVGAnimateElement::ensureAnimator):
2537         * svg/SVGAnimateElement.h:
2538         * svg/SVGAnimateTransformElement.cpp:
2539         (WebCore::SVGAnimateTransformElement::hasValidAttributeType):
2540         (WebCore::SVGAnimateTransformElement::determineAnimatedPropertyType):
2541         (WebCore::SVGAnimateTransformElement::resetToBaseValue):
2542         (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
2543         (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
2544         * svg/SVGAnimateTransformElement.h:
2545         * svg/SVGAnimatedAngle.h:
2546         * svg/SVGAnimatedBoolean.h:
2547         * svg/SVGAnimatedEnumeration.h:
2548         * svg/SVGAnimatedInteger.h:
2549         * svg/SVGAnimatedLength.h:
2550         * svg/SVGAnimatedLengthList.h:
2551         * svg/SVGAnimatedNumber.h:
2552         * svg/SVGAnimatedNumberList.h:
2553         * svg/SVGAnimatedPreserveAspectRatio.h:
2554         * svg/SVGAnimatedRect.h:
2555         * svg/SVGAnimatedString.h:
2556         * svg/SVGAnimatedTransformList.h:
2557         * svg/SVGAnimatedType.cpp:
2558         (WebCore::SVGAnimatedType::SVGAnimatedType):
2559         * svg/SVGAnimatedType.h:
2560         (WebCore::SVGAnimatedType::type):
2561         * svg/SVGAnimatedTypeAnimator.h:
2562         (WebCore::SVGAnimatedTypeAnimator::SVGAnimatedTypeAnimator):
2563         * svg/SVGAnimationElement.cpp:
2564         (WebCore::SVGAnimationElement::SVGAnimationElement):
2565         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
2566         * svg/SVGAnimationElement.h:
2567         (WebCore::SVGAnimationElement::synchronizeRequiredFeatures):
2568         (WebCore::SVGAnimationElement::synchronizeRequiredExtensions):
2569         (WebCore::SVGAnimationElement::synchronizeSystemLanguage):
2570         * svg/SVGAnimatorFactory.h:
2571         (WebCore::SVGAnimatorFactory::create):
2572         * svg/SVGCircleElement.cpp:
2573         (WebCore::SVGCircleElement::SVGCircleElement):
2574         * svg/SVGCircleElement.h:
2575         (WebCore::SVGCircleElement::synchronizeRequiredFeatures):
2576         (WebCore::SVGCircleElement::synchronizeRequiredExtensions):
2577         (WebCore::SVGCircleElement::synchronizeSystemLanguage):
2578         * svg/SVGClipPathElement.cpp:
2579         (WebCore::SVGClipPathElement::SVGClipPathElement):
2580         * svg/SVGClipPathElement.h:
2581         (WebCore::SVGClipPathElement::synchronizeRequiredFeatures):
2582         (WebCore::SVGClipPathElement::synchronizeRequiredExtensions):
2583         (WebCore::SVGClipPathElement::synchronizeSystemLanguage):
2584         * svg/SVGComponentTransferFunctionElement.cpp:
2585         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
2586         * svg/SVGComponentTransferFunctionElement.h:
2587         * svg/SVGCursorElement.cpp:
2588         (WebCore::SVGCursorElement::SVGCursorElement):
2589         * svg/SVGCursorElement.h:
2590         (WebCore::SVGCursorElement::synchronizeRequiredFeatures):
2591         (WebCore::SVGCursorElement::synchronizeRequiredExtensions):
2592         (WebCore::SVGCursorElement::synchronizeSystemLanguage):
2593         * svg/SVGDefsElement.cpp:
2594         (WebCore::SVGDefsElement::SVGDefsElement):
2595         * svg/SVGDefsElement.h:
2596         (WebCore::SVGDefsElement::synchronizeRequiredFeatures):
2597         (WebCore::SVGDefsElement::synchronizeRequiredExtensions):
2598         (WebCore::SVGDefsElement::synchronizeSystemLanguage):
2599         * svg/SVGElement.cpp:
2600         (WebCore::SVGElement::animatedPropertyTypeForAttribute):
2601         (WebCore::SVGElement::updateAnimatedSVGAttribute):
2602         (WebCore::SVGElement::localAttributeToPropertyMap):
2603         (WebCore::SVGElement::synchronizeRequiredFeatures):
2604         (WebCore::SVGElement::synchronizeRequiredExtensions):
2605         (WebCore::SVGElement::synchronizeSystemLanguage):
2606         * svg/SVGElement.h:
2607         (WebCore::SVGElement::svgAttributeChanged):
2608         (WebCore::SVGElement::synchronizeRequiredFeatures):
2609         (WebCore::SVGElement::synchronizeRequiredExtensions):
2610         (WebCore::SVGElement::synchronizeSystemLanguage):
2611         * svg/SVGEllipseElement.cpp:
2612         (WebCore::SVGEllipseElement::SVGEllipseElement):
2613         * svg/SVGEllipseElement.h:
2614         (WebCore::SVGEllipseElement::synchronizeRequiredFeatures):
2615         (WebCore::SVGEllipseElement::synchronizeRequiredExtensions):
2616         (WebCore::SVGEllipseElement::synchronizeSystemLanguage):
2617         * svg/SVGFEBlendElement.cpp:
2618         (WebCore::SVGFEBlendElement::SVGFEBlendElement):
2619         * svg/SVGFEBlendElement.h:
2620         * svg/SVGFEColorMatrixElement.cpp:
2621         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
2622         * svg/SVGFEColorMatrixElement.h:
2623         * svg/SVGFEComponentTransferElement.cpp:
2624         (WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
2625         * svg/SVGFEComponentTransferElement.h:
2626         * svg/SVGFECompositeElement.cpp:
2627         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
2628         * svg/SVGFECompositeElement.h:
2629         * svg/SVGFEConvolveMatrixElement.cpp:
2630         (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
2631         * svg/SVGFEConvolveMatrixElement.h:
2632         * svg/SVGFEDiffuseLightingElement.cpp:
2633         (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
2634         * svg/SVGFEDiffuseLightingElement.h:
2635         * svg/SVGFEDisplacementMapElement.cpp:
2636         (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
2637         * svg/SVGFEDisplacementMapElement.h:
2638         * svg/SVGFEDropShadowElement.cpp:
2639         (WebCore::SVGFEDropShadowElement::SVGFEDropShadowElement):
2640         * svg/SVGFEDropShadowElement.h:
2641         * svg/SVGFEFloodElement.cpp:
2642         * svg/SVGFEFloodElement.h:
2643         * svg/SVGFEGaussianBlurElement.cpp:
2644         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
2645         * svg/SVGFEGaussianBlurElement.h:
2646         * svg/SVGFEImageElement.cpp:
2647         (WebCore::SVGFEImageElement::SVGFEImageElement):
2648         * svg/SVGFEImageElement.h:
2649         * svg/SVGFELightElement.cpp:
2650         (WebCore::SVGFELightElement::SVGFELightElement):
2651         * svg/SVGFELightElement.h:
2652         * svg/SVGFEMergeElement.cpp:
2653         * svg/SVGFEMergeElement.h:
2654         * svg/SVGFEMergeNodeElement.cpp:
2655         (WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement):
2656         * svg/SVGFEMergeNodeElement.h:
2657         * svg/SVGFEMorphologyElement.cpp:
2658         (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
2659         * svg/SVGFEMorphologyElement.h:
2660         * svg/SVGFEOffsetElement.cpp:
2661         (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
2662         * svg/SVGFEOffsetElement.h:
2663         * svg/SVGFESpecularLightingElement.cpp:
2664         (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
2665         * svg/SVGFESpecularLightingElement.h:
2666         * svg/SVGFETileElement.cpp:
2667         (WebCore::SVGFETileElement::SVGFETileElement):
2668         * svg/SVGFETileElement.h:
2669         * svg/SVGFETurbulenceElement.cpp:
2670         (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
2671         * svg/SVGFETurbulenceElement.h:
2672         * svg/SVGFilterElement.cpp:
2673         (WebCore::SVGFilterElement::SVGFilterElement):
2674         * svg/SVGFilterElement.h:
2675         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2676         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
2677         * svg/SVGFilterPrimitiveStandardAttributes.h:
2678         * svg/SVGFitToViewBox.cpp:
2679         * svg/SVGFitToViewBox.h:
2680         * svg/SVGFontElement.cpp:
2681         (WebCore::SVGFontElement::SVGFontElement):
2682         * svg/SVGFontElement.h:
2683         (WebCore::SVGFontElement::rendererIsNeeded):
2684         * svg/SVGForeignObjectElement.cpp:
2685         (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
2686         * svg/SVGForeignObjectElement.h:
2687         (WebCore::SVGForeignObjectElement::synchronizeRequiredFeatures):
2688         (WebCore::SVGForeignObjectElement::synchronizeRequiredExtensions):
2689         (WebCore::SVGForeignObjectElement::synchronizeSystemLanguage):
2690         * svg/SVGGElement.cpp:
2691         (WebCore::SVGGElement::SVGGElement):
2692         * svg/SVGGElement.h:
2693         (WebCore::SVGGElement::synchronizeRequiredFeatures):
2694         (WebCore::SVGGElement::synchronizeRequiredExtensions):
2695         (WebCore::SVGGElement::synchronizeSystemLanguage):
2696         * svg/SVGGlyphElement.cpp:
2697         * svg/SVGGlyphElement.h:
2698         * svg/SVGGradientElement.cpp:
2699         (WebCore::SVGGradientElement::SVGGradientElement):
2700         (WebCore::SVGGradientElement::svgAttributeChanged):
2701         * svg/SVGGradientElement.h:
2702         * svg/SVGImageElement.cpp:
2703         (WebCore::SVGImageElement::SVGImageElement):
2704         * svg/SVGImageElement.h:
2705         (WebCore::SVGImageElement::synchronizeRequiredFeatures):
2706         (WebCore::SVGImageElement::synchronizeRequiredExtensions):
2707         (WebCore::SVGImageElement::synchronizeSystemLanguage):
2708         * svg/SVGLineElement.cpp:
2709         (WebCore::SVGLineElement::SVGLineElement):
2710         * svg/SVGLineElement.h:
2711         (WebCore::SVGLineElement::synchronizeRequiredFeatures):
2712         (WebCore::SVGLineElement::synchronizeRequiredExtensions):
2713         (WebCore::SVGLineElement::synchronizeSystemLanguage):
2714         * svg/SVGLinearGradientElement.cpp:
2715         (WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
2716         * svg/SVGLinearGradientElement.h:
2717         * svg/SVGMPathElement.cpp:
2718         (WebCore::SVGMPathElement::SVGMPathElement):
2719         * svg/SVGMPathElement.h:
2720         * svg/SVGMarkerElement.cpp:
2721         (WebCore::SVGMarkerElement::orientTypePropertyInfo):
2722         (WebCore::SVGMarkerElement::SVGMarkerElement):
2723         (WebCore::SVGMarkerElement::setOrientToAuto):
2724         (WebCore::SVGMarkerElement::setOrientToAngle):
2725         (WebCore::SVGMarkerElement::synchronizeOrientType):
2726         (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
2727         (WebCore::SVGMarkerElement::orientTypeAnimated):
2728         * svg/SVGMarkerElement.h:
2729         * svg/SVGMaskElement.cpp:
2730         (WebCore::SVGMaskElement::SVGMaskElement):
2731         * svg/SVGMaskElement.h:
2732         (WebCore::SVGMaskElement::synchronizeRequiredFeatures):
2733         (WebCore::SVGMaskElement::synchronizeRequiredExtensions):
2734         (WebCore::SVGMaskElement::synchronizeSystemLanguage):
2735         * svg/SVGMissingGlyphElement.cpp:
2736         * svg/SVGMissingGlyphElement.h:
2737         * svg/SVGPathElement.cpp:
2738         (WebCore::SVGPathElement::dPropertyInfo):
2739         (WebCore::SVGPathElement::SVGPathElement):
2740         (WebCore::SVGPathElement::svgAttributeChanged):
2741         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
2742         (WebCore::SVGPathElement::synchronizeD):
2743         (WebCore::SVGPathElement::pathSegList):
2744         (WebCore::SVGPathElement::animatedPathSegList):
2745         * svg/SVGPathElement.h:
2746         (WebCore::SVGPathElement::pathByteStream):
2747         (WebCore::SVGPathElement::synchronizeRequiredFeatures):
2748         (WebCore::SVGPathElement::synchronizeRequiredExtensions):
2749         (WebCore::SVGPathElement::synchronizeSystemLanguage):
2750         * svg/SVGPathSegWithContext.h:
2751         (WebCore::SVGPathSegWithContext::animatedProperty):
2752         * svg/SVGPatternElement.cpp:
2753         (WebCore::SVGPatternElement::SVGPatternElement):
2754         * svg/SVGPatternElement.h:
2755         (WebCore::SVGPatternElement::synchronizeRequiredFeatures):
2756         (WebCore::SVGPatternElement::synchronizeRequiredExtensions):
2757         (WebCore::SVGPatternElement::synchronizeSystemLanguage):
2758         * svg/SVGPolyElement.cpp:
2759         (WebCore::SVGPolyElement::pointsPropertyInfo):
2760         (WebCore::SVGPolyElement::SVGPolyElement):
2761         (WebCore::SVGPolyElement::parseMappedAttribute):
2762         (WebCore::SVGPolyElement::synchronizePoints):
2763         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
2764         (WebCore::SVGPolyElement::points):
2765         (WebCore::SVGPolyElement::animatedPoints):
2766         * svg/SVGPolyElement.h:
2767         (WebCore::SVGPolyElement::synchronizeRequiredFeatures):
2768         (WebCore::SVGPolyElement::synchronizeRequiredExtensions):
2769         (WebCore::SVGPolyElement::synchronizeSystemLanguage):
2770         * svg/SVGRadialGradientElement.cpp:
2771         (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
2772         * svg/SVGRadialGradientElement.h:
2773         * svg/SVGRectElement.cpp:
2774         (WebCore::SVGRectElement::SVGRectElement):
2775         * svg/SVGRectElement.h:
2776         (WebCore::SVGRectElement::synchronizeRequiredFeatures):
2777         (WebCore::SVGRectElement::synchronizeRequiredExtensions):
2778         (WebCore::SVGRectElement::synchronizeSystemLanguage):
2779         * svg/SVGSVGElement.cpp:
2780         (WebCore::SVGSVGElement::SVGSVGElement):
2781         * svg/SVGSVGElement.h:
2782         (WebCore::SVGSVGElement::synchronizeRequiredFeatures):
2783         (WebCore::SVGSVGElement::synchronizeRequiredExtensions):
2784         (WebCore::SVGSVGElement::synchronizeSystemLanguage):
2785         * svg/SVGScriptElement.cpp:
2786         (WebCore::SVGScriptElement::SVGScriptElement):
2787         * svg/SVGScriptElement.h:
2788         * svg/SVGStopElement.cpp:
2789         (WebCore::SVGStopElement::SVGStopElement):
2790         * svg/SVGStopElement.h:
2791         * svg/SVGStyledElement.cpp:
2792         (WebCore::SVGStyledElement::SVGStyledElement):
2793         (WebCore::cssPropertyToTypeMap):
2794         (WebCore::SVGStyledElement::animatedPropertyTypeForAttribute):
2795         * svg/SVGStyledElement.h:
2796         * svg/SVGStyledTransformableElement.cpp:
2797         (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
2798         * svg/SVGStyledTransformableElement.h:
2799         * svg/SVGSwitchElement.cpp:
2800         (WebCore::SVGSwitchElement::SVGSwitchElement):
2801         * svg/SVGSwitchElement.h:
2802         (WebCore::SVGSwitchElement::synchronizeRequiredFeatures):
2803         (WebCore::SVGSwitchElement::synchronizeRequiredExtensions):
2804         (WebCore::SVGSwitchElement::synchronizeSystemLanguage):
2805         * svg/SVGSymbolElement.cpp:
2806         (WebCore::SVGSymbolElement::SVGSymbolElement):
2807         * svg/SVGSymbolElement.h:
2808         * svg/SVGTRefElement.cpp:
2809         (WebCore::SVGTRefElement::SVGTRefElement):
2810         * svg/SVGTRefElement.h:
2811         * svg/SVGTSpanElement.cpp:
2812         * svg/SVGTSpanElement.h:
2813         * svg/SVGTests.cpp:
2814         (WebCore::SVGTests::requiredFeaturesPropertyInfo):
2815         (WebCore::SVGTests::requiredExtensionsPropertyInfo):
2816         (WebCore::SVGTests::systemLanguagePropertyInfo):
2817         (WebCore::SVGTests::attributeToPropertyMap):
2818         (WebCore::SVGTests::synchronizeRequiredFeatures):
2819         (WebCore::SVGTests::synchronizeRequiredExtensions):
2820         (WebCore::SVGTests::synchronizeSystemLanguage):
2821         * svg/SVGTests.h:
2822         * svg/SVGTextContentElement.cpp:
2823         (WebCore::SVGTextContentElement::textLengthPropertyInfo):
2824         (WebCore::SVGTextContentElement::SVGTextContentElement):
2825         (WebCore::SVGTextContentElement::synchronizeTextLength):
2826         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
2827         (WebCore::SVGTextContentElement::textLengthAnimated):
2828         * svg/SVGTextContentElement.h:
2829         (WebCore::SVGTextContentElement::synchronizeRequiredFeatures):
2830         (WebCore::SVGTextContentElement::synchronizeRequiredExtensions):
2831         (WebCore::SVGTextContentElement::synchronizeSystemLanguage):
2832         * svg/SVGTextElement.cpp:
2833         (WebCore::SVGTextElement::SVGTextElement):
2834         * svg/SVGTextElement.h:
2835         * svg/SVGTextPathElement.cpp:
2836         (WebCore::SVGTextPathElement::SVGTextPathElement):
2837         * svg/SVGTextPathElement.h:
2838         * svg/SVGTextPositioningElement.cpp:
2839         (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
2840         * svg/SVGTextPositioningElement.h:
2841         * svg/SVGTitleElement.cpp:
2842         * svg/SVGTitleElement.h:
2843         (WebCore::SVGTitleElement::rendererIsNeeded):
2844         * svg/SVGUseElement.cpp:
2845         (WebCore::SVGUseElement::SVGUseElement):
2846         * svg/SVGUseElement.h:
2847         (WebCore::SVGUseElement::synchronizeRequiredFeatures):
2848         (WebCore::SVGUseElement::synchronizeRequiredExtensions):
2849         (WebCore::SVGUseElement::synchronizeSystemLanguage):
2850         * svg/SVGViewElement.cpp:
2851         (WebCore::SVGViewElement::SVGViewElement):
2852         * svg/SVGViewElement.h:
2853         * svg/SVGViewSpec.cpp:
2854         (WebCore::SVGViewSpec::SVGViewSpec):
2855         * svg/SVGViewSpec.h:
2856         * svg/properties/SVGAnimatedProperty.h:
2857         (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
2858         (WebCore::SVGAnimatedProperty::lookupWrapper):
2859         * svg/properties/SVGAnimatedPropertyMacros.h:
2860         * svg/properties/SVGAnimatedPropertySynchronizer.h:
2861         * svg/properties/SVGAttributeToPropertyMap.cpp: Added.
2862         (WebCore::SVGAttributeToPropertyMap::addProperties):
2863         (WebCore::SVGAttributeToPropertyMap::addProperty):
2864         (WebCore::SVGAttributeToPropertyMap::animatedPropertiesForAttribute):
2865         (WebCore::SVGAttributeToPropertyMap::animatedPropertyTypeForAttribute):
2866         (WebCore::SVGAttributeToPropertyMap::synchronizeProperties):
2867         (WebCore::SVGAttributeToPropertyMap::synchronizeProperty):
2868         (WebCore::SVGAttributeToPropertyMap::animatedProperty):
2869         * svg/properties/SVGAttributeToPropertyMap.h: Added.
2870         (WebCore::SVGAttributeToPropertyMap::SVGAttributeToPropertyMap):
2871         (WebCore::SVGAttributeToPropertyMap::~SVGAttributeToPropertyMap):
2872         (WebCore::SVGAttributeToPropertyMap::isEmpty):
2873         * svg/properties/SVGPropertyInfo.h: Added.
2874         (WebCore::SVGPropertyInfo::SVGPropertyInfo):
2875
2876 2011-07-09  Patrick Gansterer  <paroga@webkit.org>
2877
2878         Unreviewed build fix after r90676.
2879
2880         * platform/graphics/ImageBuffer.cpp:
2881
2882 2011-07-08  Dirk Schulze  <krit@webkit.org>
2883
2884         Refactoring luminance code in RenderSVGResourceMasker
2885         https://bugs.webkit.org/show_bug.cgi?id=64146
2886
2887         Reviewed by Simon Fraser.
2888
2889         Moved luminance calculcation code to ImageBuffer. The code is doing pixel manipulations and can now get replaced
2890         by platform specific algorithms in the ImmageBuffer*.cpp files.
2891
2892         No change of functionality. No new tests.
2893
2894         * WebCore.xcodeproj/project.pbxproj:
2895         * platform/graphics/ImageBuffer.cpp:
2896         (WebCore::ImageBuffer::transformColorSpace):
2897         (WebCore::ImageBuffer::genericConvertToLuminanceMask):
2898         (WebCore::ImageBuffer::convertToLuminanceMask):
2899         * platform/graphics/ImageBuffer.h:
2900         * rendering/svg/RenderSVGResourceMasker.cpp:
2901         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
2902
2903 2011-07-08  Simon Fraser  <simon.fraser@apple.com>
2904
2905         Clean up RenderWidget::destroy() to share more code
2906         https://bugs.webkit.org/show_bug.cgi?id=64138
2907
2908         Reviewed by James Robinson.
2909
2910         RenderWidget::destroy() copied code from various other
2911         destroy() methods, which made code maintenance in this
2912         area very risky.
2913         
2914         Fix by adding a virtual willBeDestroyed() method, which
2915         replaces most instances of destroy(). Now, only RenderWidget
2916         and RenderObject implement destroy(), and each just calls
2917         willBeDestroyed(). Code duplication is averted.
2918         
2919         No behavior change, so no tests.
2920
2921         * rendering/RenderBlock.cpp:
2922         (WebCore::RenderBlock::willBeDestroyed):
2923         * rendering/RenderBlock.h:
2924         * rendering/RenderBox.cpp:
2925         (WebCore::RenderBox::willBeDestroyed):
2926         * rendering/RenderBox.h:
2927         * rendering/RenderBoxModelObject.cpp:
2928         (WebCore::RenderBoxModelObject::willBeDestroyed):
2929         * rendering/RenderBoxModelObject.h:
2930         * rendering/RenderFullScreen.cpp:
2931         (RenderFullScreenPlaceholder::willBeDestroyed):
2932         (RenderFullScreen::willBeDestroyed):
2933         * rendering/RenderFullScreen.h:
2934         * rendering/RenderInline.cpp:
2935         (WebCore::RenderInline::willBeDestroyed):
2936         * rendering/RenderInline.h:
2937         * rendering/RenderListItem.cpp:
2938         (WebCore::RenderListItem::willBeDestroyed):
2939         * rendering/RenderListItem.h:
2940         * rendering/RenderObject.cpp:
2941         (WebCore::RenderObject::willBeDestroyed):
2942         (WebCore::RenderObject::destroy):
2943         * rendering/RenderObject.h:
2944         * rendering/RenderReplaced.cpp:
2945         (WebCore::RenderReplaced::willBeDestroyed):
2946         * rendering/RenderReplaced.h:
2947         * rendering/RenderTableCell.cpp:
2948         (WebCore::RenderTableCell::willBeDestroyed):
2949         * rendering/RenderTableCell.h:
2950         * rendering/RenderTableRow.cpp:
2951         (WebCore::RenderTableRow::willBeDestroyed):
2952         * rendering/RenderTableRow.h:
2953         * rendering/RenderTableSection.cpp:
2954         (WebCore::RenderTableSection::willBeDestroyed):
2955         * rendering/RenderTableSection.h:
2956         * rendering/RenderText.cpp:
2957         (WebCore::RenderText::willBeDestroyed):
2958         * rendering/RenderText.h:
2959         * rendering/RenderTextFragment.cpp:
2960         (WebCore::RenderTextFragment::willBeDestroyed):
2961         * rendering/RenderTextFragment.h:
2962         * rendering/RenderWidget.cpp:
2963         (WebCore::RenderWidget::willBeDestroyed):
2964         (WebCore::RenderWidget::destroy):
2965         * rendering/RenderWidget.h:
2966         * rendering/svg/RenderSVGBlock.cpp:
2967         (WebCore::RenderSVGBlock::willBeDestroyed):
2968         * rendering/svg/RenderSVGBlock.h:
2969         * rendering/svg/RenderSVGInline.cpp:
2970         (WebCore::RenderSVGInline::willBeDestroyed):
2971         * rendering/svg/RenderSVGInline.h:
2972         * rendering/svg/RenderSVGInlineText.cpp:
2973         (WebCore::RenderSVGInlineText::willBeDestroyed):
2974         * rendering/svg/RenderSVGInlineText.h:
2975         * rendering/svg/RenderSVGModelObject.cpp:
2976         (WebCore::RenderSVGModelObject::willBeDestroyed):
2977         * rendering/svg/RenderSVGModelObject.h:
2978         * rendering/svg/RenderSVGResourceContainer.cpp:
2979         (WebCore::RenderSVGResourceContainer::willBeDestroyed):
2980         * rendering/svg/RenderSVGResourceContainer.h:
2981         * rendering/svg/RenderSVGRoot.cpp:
2982         (WebCore::RenderSVGRoot::willBeDestroyed):
2983         * rendering/svg/RenderSVGRoot.h:
2984         * rendering/svg/SVGResourcesCache.h:
2985
2986 2011-07-08  Adam Barth  <abarth@webkit.org>
2987
2988         Unreviewed, rolling out r90662.
2989         http://trac.webkit.org/changeset/90662
2990         https://bugs.webkit.org/show_bug.cgi?id=64210
2991
2992         Introduced regressions in Chromium browser tests (Requested by
2993         rniwa on #webkit).
2994
2995         * accessibility/AccessibilityRenderObject.cpp:
2996         (WebCore::AccessibilityRenderObject::selectedText):
2997         (WebCore::AccessibilityRenderObject::selectedTextRange):
2998         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2999         * html/HTMLFormControlElement.cpp:
3000         (WebCore::HTMLTextFormControlElement::setSelectionRange):
3001         (WebCore::HTMLTextFormControlElement::selectionStart):
3002         (WebCore::HTMLTextFormControlElement::selectionEnd):
3003         (WebCore::HTMLTextFormControlElement::selection):
3004         (WebCore::HTMLTextFormControlElement::restoreCachedSelection):
3005         (WebCore::HTMLTextFormControlElement::selectionChanged):
3006         * html/HTMLFormControlElement.h:
3007         * html/HTMLInputElement.cpp:
3008         (WebCore::HTMLInputElement::setValue):
3009         * rendering/RenderTextControl.cpp:
3010         (WebCore::RenderTextControl::selectionStart):
3011         (WebCore::RenderTextControl::selectionEnd):
3012         (WebCore::RenderTextControl::hasVisibleTextArea):
3013         (WebCore::setSelectionRange):
3014         (WebCore::setContainerAndOffsetForRange):
3015         (WebCore::RenderTextControl::selection):
3016         * rendering/RenderTextControl.h:
3017
3018 2011-07-08  Brian Salomon  <bsalomon@google.com>
3019
3020         Make GL context current before updating layer texture using skia-gpu
3021         https://bugs.webkit.org/show_bug.cgi?id=64206
3022
3023         Reviewed by James Robinson.
3024
3025         Covered by existing tests (when accelerated drawing and compositing are on).
3026
3027         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
3028         (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
3029
3030 2011-07-08  Tony Chang  <tony@chromium.org>
3031
3032         Refactor override size to be a size rather than just an int
3033         https://bugs.webkit.org/show_bug.cgi?id=64195
3034
3035         Reviewed by David Hyatt.
3036
3037         Also convert to LayoutSize and LayoutUnit.
3038
3039         Covered by existing tests.
3040
3041         * rendering/RenderBox.cpp:
3042         (WebCore::RenderBox::overrideSize): Pass in a LayoutSize.
3043         (WebCore::RenderBox::setOverrideSize):
3044         (WebCore::RenderBox::clearOverrideSize): New method for clearing the
3045             override size (previous we would pass in -1)
3046         (WebCore::RenderBox::overrideWidth):
3047         (WebCore::RenderBox::overrideHeight):
3048         (WebCore::RenderBox::computeLogicalWidth):
3049         (WebCore::RenderBox::computeLogicalHeight):
3050         (WebCore::RenderBox::computePercentageLogicalHeight):
3051         (WebCore::RenderBox::availableLogicalHeightUsing):
3052         * rendering/RenderBox.h:
3053         * rendering/RenderDeprecatedFlexibleBox.cpp:
3054         (WebCore::gatherFlexChildrenInfo):
3055         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3056         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
3057         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
3058         * rendering/RenderTableCell.cpp:
3059         (WebCore::RenderTableCell::setOverrideSizeFromRowHeight):
3060         * rendering/RenderTableCell.h: Remove setOverrideSize since it was
3061             only called in one place to clear the override size.  Inline this
3062             logic instead.
3063         * rendering/RenderTableSection.cpp:
3064         (WebCore::RenderTableSection::calcRowLogicalHeight):
3065         * rendering/RenderWidget.cpp:
3066         (WebCore::RenderWidget::destroy):
3067
3068 2011-07-08  Emil A Eklund  <eae@chromium.org>
3069
3070         Switch pointInContainer and accumulatedOffset to to new layout types
3071         https://bugs.webkit.org/show_bug.cgi?id=64112
3072
3073         Reviewed by Eric Seidel.
3074
3075         Convert remaining IntPoint versions of the pointInContainer and
3076         accumulatedOffset arguments to the new layout abstraction.
3077
3078         No new tests, no functionality changes.
3079
3080         * rendering/HitTestResult.cpp:
3081         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
3082         * rendering/HitTestResult.h:
3083         * rendering/RenderBlock.cpp:
3084         (WebCore::RenderBlock::isPointInOverflowControl):
3085         * rendering/RenderBlock.h:
3086         * rendering/RenderBox.cpp:
3087         (WebCore::RenderBox::pushContentsClip):
3088         (WebCore::RenderBox::popContentsClip):
3089         * rendering/RenderBox.h:
3090         * rendering/RenderEmbeddedObject.cpp:
3091         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
3092         * rendering/RenderEmbeddedObject.h:
3093         * rendering/RenderLineBoxList.cpp:
3094         (WebCore::RenderLineBoxList::hitTest):
3095         * rendering/RenderLineBoxList.h:
3096         * rendering/RenderListBox.cpp:
3097         (WebCore::RenderListBox::isPointInOverflowControl):
3098         * rendering/RenderListBox.h:
3099         * rendering/RenderObject.cpp:
3100         (WebCore::RenderObject::hitTest):
3101         * rendering/RenderObject.h:
3102         * rendering/RenderTextControl.cpp:
3103         (WebCore::RenderTextControl::hitInnerTextElement):
3104         * rendering/RenderTextControl.h:
3105         * rendering/RenderTextControlSingleLine.cpp:
3106         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
3107
3108 2011-07-07  Ryosuke Niwa  <rniwa@webkit.org>
3109
3110         Move selection related code from RenderTextControl to HTMLTextFormControlElement
3111         https://bugs.webkit.org/show_bug.cgi?id=64133
3112
3113         Reviewed by Dimitri Glazkov.
3114
3115         Moved selectionStart, selectionEnd, hasVisibleTextArea, setSelectionRange, setContainerAndOffsetForRange
3116         and selection from RenderTextControl.cpp to HTMLFormControlElement.cpp.
3117
3118         This refactoring removes RenderTextControl's dependency on FrameSelection.
3119
3120         * accessibility/AccessibilityRenderObject.cpp:
3121         (WebCore::AccessibilityRenderObject::selectedText): Calls HTMLTextFromControl::selectedText.
3122         (WebCore::AccessibilityRenderObject::selectedTextRange): Calls selectionStart and selectionEnd.
3123         (WebCore::AccessibilityRenderObject::setSelectedTextRange): Ditto.
3124         * html/HTMLFormControlElement.cpp:
3125         (WebCore::HTMLTextFormControlElement::selectedText): Extracted from AccessibilityRenderObject::selectedText.
3126         (WebCore::hasVisibleTextArea):
3127         (WebCore::HTMLTextFormControlElement::setSelectionRange): Merged with the function of the same name in
3128         RenderTextControl.
3129         (WebCore::HTMLTextFormControlElement::selectionStart): Ditto.
3130         (WebCore::HTMLTextFormControlElement::selectionEnd): Ditto.
3131         (WebCore::setContainerAndOffsetForRange): Moved from RenderTextControl.cpp
3132         (WebCore::HTMLTextFormControlElement::selection): Merged with the function of the same name in RenderTextControl.
3133         (WebCore::HTMLTextFormControlElement::selectionChanged): Calls selectionStart and selectionEnd.
3134         * html/HTMLFormControlElement.h:
3135         (WebCore::HTMLTextFormControlElement::restoreCachedSelection): Moved from HTMLFormControlElement.cpp now that
3136         all functions are self-contained in HTMLTextFormControlElement.
3137         * html/HTMLInputElement.cpp:
3138         (WebCore::HTMLInputElement::setValue): Calls setSelectionRange.
3139         * rendering/RenderTextControl.cpp:
3140         (WebCore::RenderTextControl::textFormControlElement): Added.
3141         * rendering/RenderTextControl.h:
3142
3143 2011-07-08  Mike Reed  <reed@google.com>
3144
3145         remove (empty) indirection between GraphicsContextPlatformPrivate and PlatformContextSkia
3146         https://bugs.webkit.org/show_bug.cgi?id=64178
3147
3148         Reviewed by Stephen White.
3149
3150         No new tests. no functionality change, other than removing an indirection that is not needed
3151
3152         * platform/graphics/GraphicsContext.h:
3153         * platform/graphics/skia/GraphicsContextPlatformPrivate.h: Removed.
3154         * platform/graphics/skia/GraphicsContextSkia.cpp:
3155         (WebCore::GraphicsContext::platformInit):
3156         (WebCore::GraphicsContext::platformDestroy):
3157         (WebCore::GraphicsContext::platformContext):
3158
3159 2011-07-08  Jeffrey Pfau  <jpfau@apple.com>
3160
3161         Add framework for a new/dummy XMLDocumentParser
3162         https://bugs.webkit.org/show_bug.cgi?id=63955
3163
3164         Reviewed by Adam Barth.
3165
3166         Added a dummy framework NewXMLDocumentParser
3167
3168         * WebCore.xcodeproj/project.pbxproj:
3169         * dom/Document.cpp:
3170         (WebCore::Document::createParser):
3171         * xml/parser/NewXMLDocumentParser.cpp: Added.
3172         (WebCore::NewXMLDocumentParser::NewXMLDocumentParser):
3173         (WebCore::NewXMLDocumentParser::textPosition):
3174         (WebCore::NewXMLDocumentParser::lineNumber):
3175         (WebCore::NewXMLDocumentParser::insert):
3176         (WebCore::NewXMLDocumentParser::append):
3177         (WebCore::NewXMLDocumentParser::finish):
3178         (WebCore::NewXMLDocumentParser::detach):
3179         (WebCore::NewXMLDocumentParser::hasInsertionPoint):
3180         (WebCore::NewXMLDocumentParser::finishWasCalled):
3181         (WebCore::NewXMLDocumentParser::processingData):
3182         (WebCore::NewXMLDocumentParser::prepareToStopParsing):
3183         (WebCore::NewXMLDocumentParser::stopParsing):
3184         (WebCore::NewXMLDocumentParser::isWaitingForScripts):
3185         (WebCore::NewXMLDocumentParser::isExecutingScript):
3186         (WebCore::NewXMLDocumentParser::executeScriptsWaitingForStylesheets):
3187         * xml/parser/NewXMLDocumentParser.h: Added.
3188         (WebCore::NewXMLDocumentParser::create):
3189
3190 2011-07-08  David Reveman  <reveman@chromium.org>
3191
3192         Remove unused function parameters.
3193
3194         Reviewed by Ryosuke Niwa.
3195
3196         * platform/graphics/gpu/TilingData.cpp:
3197         (WebCore::TilingData::textureOffset):
3198
3199 2011-07-08  David Reveman  <reveman@chromium.org>
3200
3201         Reviewed by Stephen White.
3202
3203         [Chromium] Edge anti-aliasing for composited layers.
3204         https://bugs.webkit.org/show_bug.cgi?id=61388
3205
3206         Add transparent outer border to tiled layers and adjust vertex
3207         coordinates so that use of a bilinear filter creates a smooth
3208         layer edge.
3209
3210         Tests: platform/chromium/compositing/tiny-layer-rotated.html
3211                platform/chromium/compositing/huge-layer-rotated.html (existing)
3212                TilingDataTest in webkit_unit_tests
3213
3214         * platform/graphics/chromium/ContentLayerChromium.cpp:
3215         Change maxUntiledSize to 510 to ensure that tiles are not greater
3216         than 512 with outer borders.
3217         (WebCore::ContentLayerChromium::updateLayerSize): We can't use the
3218         layer size as tile size when we want to avoid tiling as this will
3219         not be enough space to include possible outer borders. We instead use
3220         an empty size, which allows the tiler to automatically adjust the
3221         tile size to be large enough for the layer to fit in one tile.
3222         (WebCore::ContentLayerChromium::createTilerIfNeeded):
3223         (WebCore::ContentLayerChromium::setIsMask): Don't use border texels
3224         for layer used as mask.
3225
3226         * platform/graphics/chromium/ContentLayerChromium.h:
3227         (WebCore::ContentLayerChromium::m_borderTexels) Added.
3228
3229         * platform/graphics/chromium/LayerTilerChromium.cpp:
3230         (WebCore::LayerTilerChromium::tileTexRect): Added.
3231         (WebCore::LayerTilerChromium::tileLayerRect): m_tileSize is no
3232         longer the correct layer size. Size of bounds with border should
3233         be the correct layer size.
3234         (WebCore::LayerTilerChromium::growLayerToContain): Adjust texture
3235         size to include outer borders and handle empty m_tileSize.
3236         (WebCore::LayerTilerChromium::invalidateRect): Use size of rectangle
3237         returned by tileTexRect instead of m_tileSize for texture size.
3238         (WebCore::LayerTilerChromium::prepareToUpdate): Ditto.
3239         (WebCore::LayerTilerChromium::draw): Compute and intersect tile edges
3240         instead of using tile coordinates directly. Edges are adjusted to
3241         include outer borders and make sure all partially covered pixels are
3242         processed.
3243         (WebCore::LayerTilerChromium::drawTexturedQuad): Pass quad to
3244         shader using point uniform.
3245         (WebCore::LayerTilerChromium::invalidateRect): Invalidate old layer
3246         area to clear any contents left from previous layer size.
3247
3248         * platform/graphics/chromium/LayerTilerChromium.h:
3249         (WebCore::LayerTilerChromium::tileTexRect) Added.
3250         (WebCore::LayerTilerChromium::drawTexturedQuad): Add quad parameter.
3251
3252         * platform/graphics/chromium/ShaderChromium.cpp:
3253         (WebCore::VertexShaderPosTexTransform::getShaderString) Get X/Y vertex
3254         components from point uniform.
3255         (WebCore::VertexShaderPosTexTransform::VertexShaderPosTexTransform)
3256         Added point uniform.
3257         (WebCore::VertexShaderPosTexTransform::init) Ditto.
3258         (WebCore::VertexShaderPosTexTransform::pointLocation) Added.
3259
3260         * platform/graphics/chromium/ShaderChromium.h:
3261         (WebCore::VertexShaderPosTexTransform::pointLocation) Added.
3262
3263         * platform/graphics/gpu/TilingData.cpp:
3264         (WebCore::TilingData::tileBoundsWithOuterBorder): Added.
3265         (WebCore::TilingData::computeNumTiles): Adjust for outer border.
3266         (WebCore::TilingData::tileXIndexFromSrcCoord): Ditto.
3267         (WebCore::TilingData::tileYIndexFromSrcCoord): Ditto.
3268         (WebCore::TilingData::tileSizeX): Ditto.
3269         (WebCore::TilingData::tileSizeY): Ditto.
3270         (WebCore::TilingData::intersectDrawQuad): Ditto.
3271         (WebCore::TilingData::textureOffset): Ditto.
3272
3273         * platform/graphics/gpu/TilingData.h:
3274         (WebCore::TilingData::tileBoundsWithOuterBorder): Added.
3275
3276 2011-07-08  Mike Reed  <reed@google.com>
3277
3278         [skia] don't rely on lockPixels failure to detect gpu-backed device (in prep for skia roll)
3279         https://bugs.webkit.org/show_bug.cgi?id=64162
3280
3281         Reviewed by Stephen White.
3282
3283         No new tests. preparing for skia roll, where lockPixels always succeeds (but slowly for gpu-backed)
3284
3285         * platform/graphics/skia/ImageBufferSkia.cpp:
3286         (WebCore::putImageData):
3287
3288 2011-07-08  Chang Shu  <cshu@webkit.org>
3289
3290         Update calling sites after function renamed.
3291         https://bugs.webkit.org/show_bug.cgi?id=59114
3292
3293         Reviewed by Alexey Proskuryakov.
3294
3295         No new tests, just refactoring.
3296
3297         * editing/visible_units.cpp:
3298         (WebCore::previousBoundary):
3299         (WebCore::nextBoundary):
3300         * rendering/RenderText.cpp:
3301         (WebCore::RenderText::setTextInternal):
3302
3303 2011-07-08  Mihnea Ovidenie  <mihnea@adobe.com>
3304
3305         [CSSRegions]Parse content: -webkit-from-flow
3306         https://bugs.webkit.org/show_bug.cgi?id=63133
3307
3308         Reviewed by David Hyatt.
3309
3310         Test: fast/regions/content-webkit-from-flow-parsing.html
3311
3312         * css/CSSComputedStyleDeclaration.cpp:
3313         (WebCore::contentToCSSValue):
3314         * css/CSSParser.cpp:
3315         (WebCore::CSSParser::parseContent):
3316         (WebCore::CSSParser::parseFromFlowContent):
3317         * css/CSSParser.h:
3318         * css/CSSPrimitiveValue.cpp:
3319         (WebCore::CSSPrimitiveValue::cleanup):
3320         (WebCore::CSSPrimitiveValue::getStringValue):
3321         (WebCore::CSSPrimitiveValue::cssText):
3322         * css/CSSPrimitiveValue.h:
3323         * css/CSSStyleSelector.cpp:
3324         (WebCore::CSSStyleSelector::applyProperty):
3325         * rendering/style/RenderStyle.cpp:
3326         (WebCore::RenderStyle::diff):
3327         * rendering/style/RenderStyle.h:
3328         (WebCore::InheritedFlags::regionThread):
3329         (WebCore::InheritedFlags::setRegionThread):
3330         (WebCore::InheritedFlags::initialRegionThread):
3331         * rendering/style/StyleRareNonInheritedData.cpp:
3332         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3333         (WebCore::StyleRareNonInheritedData::operator==):
3334         * rendering/style/StyleRareNonInheritedData.h:
3335
3336 2011-07-08  Ilya Tikhonovsky  <loislo@chromium.org>
3337
3338         Web Inspector: NetworkPanel search failed if the matched sting is in the query part of url
3339         https://bugs.webkit.org/show_bug.cgi?id=64167
3340
3341         Reviewed by Yury Semikhatsky.
3342
3343         * inspector/front-end/NetworkPanel.js:
3344         (WebInspector.NetworkPanel.prototype._matchResource):
3345         (WebInspector.NetworkPanel.prototype._highlightNthMatchedResource):
3346         (WebInspector.NetworkDataGridNode.prototype._refreshNameCell):
3347         * inspector/front-end/Resource.js:
3348         (WebInspector.Resource.prototype.get folder):
3349
3350 2011-07-08  Benjamin Poulain  <benjamin@webkit.org>
3351
3352         [Qt] Enable HTTP Pipelining by default
3353         https://bugs.webkit.org/show_bug.cgi?id=64169
3354
3355         Reviewed by Andreas Kling.
3356
3357         QNetworkAccessManager disables HTTP pipelining by default. We enable it by
3358         setting an attribute on the request.
3359
3360         * platform/network/qt/ResourceRequestQt.cpp:
3361         (WebCore::ResourceRequest::toNetworkRequest):
3362
3363 2011-07-08  Alexander Pavlov  <apavlov@chromium.org>
3364
3365         Web Inspector: CSS inspector gets confused about specificity of !important properties
3366         https://bugs.webkit.org/show_bug.cgi?id=64074
3367
3368         Reviewed by Yury Semikhatsky.
3369
3370         * inspector/front-end/StylesSidebarPane.js:
3371         (WebInspector.StylesSidebarPane.prototype._markUsedProperties):
3372
3373 2011-07-08  Alexander Pavlov  <apavlov@chromium.org>
3374
3375         [Chromium] Unreviewed, clang build fix.
3376
3377         * inspector/InspectorStyleTextEditor.h:
3378
3379 2011-07-08  Pavel Feldman  <pfeldman@google.com>
3380
3381         Web Inspector: add support for drag'n'drop of non-elements (comments, text, etc.)
3382         https://bugs.webkit.org/show_bug.cgi?id=64163
3383
3384         Reviewed by Yury Semikhatsky.
3385
3386         * inspector/Inspector.json:
3387         * inspector/InspectorDOMAgent.cpp:
3388         (WebCore::InspectorDOMAgent::moveTo):
3389         * inspector/front-end/ElementsTreeOutline.js:
3390         (WebInspector.ElementsTreeOutline.prototype._isValidDragSourceOrTarget):
3391
3392 2011-07-08  Andrey Kosyakov  <caseq@chromium.org>
3393
3394         Web Inspector: secure access to extensions API
3395         https://bugs.webkit.org/show_bug.cgi?id=64080
3396
3397         Reviewed by Pavel Feldman.
3398
3399         * inspector/front-end/ExtensionAPI.js:
3400         (WebInspector.injectedExtensionAPI.Panels.prototype.create):
3401         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setPage):
3402         * inspector/front-end/ExtensionPanel.js:
3403         (WebInspector.ExtensionPanel):
3404         * inspector/front-end/ExtensionServer.js:
3405         (WebInspector.ExtensionServer):
3406         (WebInspector.ExtensionServer.prototype._onCreatePanel):
3407         (WebInspector.ExtensionServer.prototype._onSetSidebarPage):
3408         (WebInspector.ExtensionServer.prototype._addExtensions):
3409         (WebInspector.ExtensionServer.prototype._onWindowMessage):
3410         (WebInspector.ExtensionServer.prototype._registerSubscriptionHandler):
3411         (WebInspector.ExtensionServer.prototype._expandResourcePath):
3412         (WebInspector.ExtensionServer.prototype._normalizePath):
3413
3414 2011-07-08  Adam Barth  <abarth@webkit.org>
3415
3416         Unreviewed, rolling out r90615.
3417         http://trac.webkit.org/changeset/90615
3418         https://bugs.webkit.org/show_bug.cgi?id=64158
3419
3420         broke inspector/extensions/extensions.html (Requested by caseq
3421         on #webkit).
3422
3423         * inspector/front-end/ExtensionAPI.js:
3424         (WebInspector.injectedExtensionAPI.Panels.prototype.create):
3425         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setPage):
3426         (WebInspector.injectedExtensionAPI.expandURL):
3427         * inspector/front-end/ExtensionPanel.js:
3428         (WebInspector.ExtensionPanel):
3429         * inspector/front-end/ExtensionServer.js:
3430         (WebInspector.ExtensionServer):
3431         (WebInspector.ExtensionServer.prototype._onCreatePanel):
3432         (WebInspector.ExtensionServer.prototype._onSetSidebarPage):
3433         (WebInspector.ExtensionServer.prototype._addExtensions):
3434         (WebInspector.ExtensionServer.prototype._onWindowMessage):
3435         (WebInspector.ExtensionServer.prototype._registerSubscriptionHandler):
3436
3437 2011-07-07  Alexander Pavlov  <apavlov@chromium.org>
3438
3439         Web Inspector: Adding CSS properties results in messy style rules
3440         https://bugs.webkit.org/show_bug.cgi?id=63622
3441
3442         Reviewed by Pavel Feldman.
3443
3444         Test: inspector/styles/styles-formatting.html
3445
3446         * CMakeLists.txt:
3447         * GNUmakefile.list.am:
3448         * WebCore.gypi:
3449         * WebCore.pro:
3450         * WebCore.vcproj/WebCore.vcproj:
3451         * WebCore.xcodeproj/project.pbxproj:
3452         * css/CSSPropertySourceData.cpp:
3453         (WebCore::SourceRange::length):
3454         * css/CSSPropertySourceData.h:
3455         * inspector/InspectorStyleSheet.cpp:
3456         (WebCore::InspectorStyle::InspectorStyle):
3457         (WebCore::InspectorStyle::setPropertyText):
3458         (WebCore::InspectorStyle::toggleProperty):
3459         (WebCore::InspectorStyle::applyStyleText):
3460         (WebCore::InspectorStyle::newLineAndWhitespaceDelimiters):
3461         * inspector/InspectorStyleSheet.h:
3462         * inspector/InspectorStyleTextEditor.cpp: Added.
3463         (WebCore::InspectorStyleTextEditor::InspectorStyleTextEditor):
3464         (WebCore::InspectorStyleTextEditor::insertProperty):
3465         (WebCore::InspectorStyleTextEditor::replaceProperty):
3466         (WebCore::InspectorStyleTextEditor::removeProperty):
3467         (WebCore::InspectorStyleTextEditor::enableProperty):
3468         (WebCore::InspectorStyleTextEditor::disableProperty):
3469         (WebCore::InspectorStyleTextEditor::disabledIndexByOrdinal):
3470         (WebCore::InspectorStyleTextEditor::shiftDisabledProperties):
3471         (WebCore::InspectorStyleTextEditor::internalReplaceProperty):
3472         * inspector/InspectorStyleTextEditor.h: Added.
3473         (WebCore::InspectorStyleTextEditor::styleText):
3474
3475 2011-07-08  Alexander Pavlov  <apavlov@chromium.org>
3476
3477         Web Inspector: Quotes are rendered as &quot; in the DOM tree
3478         https://bugs.webkit.org/show_bug.cgi?id=64154
3479
3480         Reviewed by Yury Semikhatsky.
3481
3482         Since we currently rely on setting textContent rather than innerHTML for the DOM tree elements,
3483         escapeHTML() calls unnecessarily HTML-escape certain characters in the DOM tree contents.
3484
3485         * inspector/front-end/ElementsTreeOutline.js:
3486         (WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
3487         ():
3488
3489 2011-07-08  Vsevolod Vlasov  <vsevik@chromium.org>
3490
3491         Web Inspector: Remove unused code from InspectorAgent.h.
3492         https://bugs.webkit.org/show_bug.cgi?id=64120
3493
3494         Reviewed by Joseph Pecoraro.
3495
3496         * inspector/InspectorAgent.h:
3497
3498 2011-07-08  Andrey Kosyakov  <caseq@chromium.org>
3499
3500         Web Inspector: secure access to extensions API
3501         https://bugs.webkit.org/show_bug.cgi?id=64080
3502
3503         Reviewed by Pavel Feldman.
3504
3505         * inspector/front-end/ExtensionAPI.js:
3506         (WebInspector.injectedExtensionAPI.Panels.prototype.create):
3507         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setPage):
3508         * inspector/front-end/ExtensionPanel.js:
3509         (WebInspector.ExtensionPanel):
3510         * inspector/front-end/ExtensionServer.js:
3511         (WebInspector.ExtensionServer):
3512         (WebInspector.ExtensionServer.prototype._onCreatePanel):
3513         (WebInspector.ExtensionServer.prototype._onSetSidebarPage):
3514         (WebInspector.ExtensionServer.prototype._addExtensions):
3515         (WebInspector.ExtensionServer.prototype._onWindowMessage):
3516         (WebInspector.ExtensionServer.prototype._registerSubscriptionHandler):
3517         (WebInspector.ExtensionServer.prototype._expandResourcePath):
3518         (WebInspector.ExtensionServer.prototype._normalizePath):
3519
3520 2011-07-08  Yury Semikhatsky  <yurys@chromium.org>
3521
3522         Web Inspector: typing undefined = 1 in console crashes browser
3523         https://bugs.webkit.org/show_bug.cgi?id=64155
3524
3525         Do not access undefined value directly when producing JSON objects as undefined
3526         may be overriden by the inspected page.
3527
3528         Reviewed by Pavel Feldman.
3529
3530         Test: inspector/console/console-eval-undefined-override.html
3531
3532         * inspector/InjectedScriptSource.js:
3533         (.):
3534         ():
3535
3536 2011-07-07  Emil A Eklund  <eae@chromium.org>
3537
3538         Switch HitTestResult to to new layout types
3539         https://bugs.webkit.org/show_bug.cgi?id=64131
3540
3541         Reviewed by Eric Seidel.
3542
3543         No new tests, no functionality changes.
3544
3545         * page/MouseEventWithHitTestResults.cpp:
3546         (WebCore::MouseEventWithHitTestResults::localPoint):
3547         * page/MouseEventWithHitTestResults.h:
3548         * rendering/HitTestResult.cpp:
3549         (WebCore::HitTestResult::HitTestResult):
3550         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
3551         (WebCore::HitTestResult::rectForPoint):
3552         * rendering/HitTestResult.h:
3553         (WebCore::HitTestResult::point):
3554         (WebCore::HitTestResult::localPoint):
3555         (WebCore::HitTestResult::setPoint):
3556         (WebCore::HitTestResult::setLocalPoint):
3557         (WebCore::HitTestResult::rectForPoint):
3558
3559 2011-07-07  Levi Weintraub  <leviw@chromium.org>
3560
3561         Switch remaining paint functions to new layout types
3562         https://bugs.webkit.org/show_bug.cgi?id=64116
3563
3564         Reviewed by Eric Seidel.
3565
3566         Switching all functions with IntPoint paintOffsets to the new Layout types.
3567
3568         No new tests, no functionality changes.
3569
3570         * rendering/EllipsisBox.cpp:
3571         (WebCore::EllipsisBox::paint):
3572         (WebCore::EllipsisBox::paintSelection):
3573         * rendering/EllipsisBox.h:
3574         * rendering/InlineBox.cpp:
3575         (WebCore::InlineBox::paint):
3576         * rendering/InlineBox.h:
3577         * rendering/InlineFlowBox.cpp:
3578         (WebCore::InlineFlowBox::paint):
3579         * rendering/InlineFlowBox.h:
3580         * rendering/InlineTextBox.cpp:
3581         (WebCore::InlineTextBox::paint):
3582         (WebCore::InlineTextBox::paintCustomHighlight):
3583         * rendering/InlineTextBox.h:
3584         * rendering/LayoutTypes.h:
3585         * rendering/RenderBlock.cpp:
3586         (WebCore::RenderBlock::paintColumnRules):
3587         (WebCore::RenderBlock::paintColumnContents):
3588         (WebCore::RenderBlock::paintContents):
3589         (WebCore::RenderBlock::paintChildren):
3590         (WebCore::RenderBlock::paintCaret):
3591         (WebCore::RenderBlock::paintObject):
3592         (WebCore::RenderBlock::paintFloats):
3593         (WebCore::RenderBlock::paintEllipsisBoxes):
3594         (WebCore::RenderBlock::paintContinuationOutlines):
3595         (WebCore::RenderBlock::paintSelection):
3596         * rendering/RenderBlock.h:
3597         * rendering/RenderBox.cpp:
3598         (WebCore::RenderBox::paintCustomHighlight):
3599         * rendering/RenderBox.h:
3600         * rendering/RenderInline.cpp:
3601         (WebCore::RenderInline::paintOutline):
3602         (WebCore::RenderInline::paintOutlineForLine):
3603         * rendering/RenderInline.h:
3604         * rendering/RenderLayer.cpp:
3605         (WebCore::RenderLayer::paintOverflowControls):
3606         (WebCore::RenderLayer::paintScrollCorner):
3607         (WebCore::RenderLayer::paintResizer):
3608         * rendering/RenderLayer.h:
3609         * rendering/RenderLineBoxList.cpp:
3610         (WebCore::RenderLineBoxList::paint):
3611         * rendering/RenderListBox.cpp:
3612         (WebCore::RenderListBox::paintScrollbar):
3613         (WebCore::RenderListBox::paintItemForeground):
3614         (WebCore::RenderListBox::paintItemBackground):
3615         * rendering/RenderListBox.h:
3616         * rendering/RenderObject.cpp:
3617         (WebCore::RenderObject::paintFocusRing):
3618         (WebCore::RenderObject::paintOutline):
3619         * rendering/RenderObject.h:
3620         * rendering/RenderReplaced.cpp:
3621         (WebCore::RenderReplaced::shouldPaint):
3622         * rendering/RenderReplaced.h:
3623         * rendering/RenderScrollbarPart.cpp:
3624         (WebCore::RenderScrollbarPart::paintIntoRect):
3625         * rendering/RenderScrollbarPart.h:
3626         * rendering/RenderTableCell.cpp:
3627         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
3628         * rendering/RenderTableSection.cpp:
3629         (WebCore::RenderTableSection::paintCell):
3630         * rendering/RenderTableSection.h:
3631         * rendering/RenderTextControl.cpp:
3632         (WebCore::RenderTextControl::paintPlaceholder):
3633         * rendering/RootInlineBox.cpp:
3634         (WebCore::RootInlineBox::paintEllipsisBox):
3635         (WebCore::RootInlineBox::paintCustomHighlight):
3636         (WebCore::RootInlineBox::paint):
3637         * rendering/RootInlineBox.h:
3638         * rendering/mathml/RenderMathMLBlock.cpp:
3639         (WebCore::RenderMathMLBlock::paint):
3640         * rendering/mathml/RenderMathMLFraction.cpp:
3641         (WebCore::RenderMathMLFraction::paint):
3642         * rendering/mathml/RenderMathMLRoot.cpp:
3643         (WebCore::RenderMathMLRoot::paint):
3644         * rendering/mathml/RenderMathMLSquareRoot.cpp:
3645         (WebCore::RenderMathMLSquareRoot::paint):
3646
3647 2011-07-07  Steve VanDeBogart  <vandebo@chromium.org>
3648
3649         Work around Skia PDF's lack of inverted path support.
3650         https://bugs.webkit.org/show_bug.cgi?id=64032
3651
3652         Reviewed by James Robinson.
3653
3654         The trick used in http://neugierig.org/software/chromium/notes/2010/07/clipping.html
3655         to support antialiased clips doesn't work when printing to Skia's PDF backend because
3656         the backend does not support inverted paths. This manifests as rounded buttons not being
3657         drawn when printing, tracked as Chrome bug 79519.
3658         
3659         However, when the output is a vector device, like PDF, we don't need antialiased clips.
3660         It's up to the PDF rendering engine to do that.  So we can simply disable the antialiased
3661         clip code if the output is a vector device.
3662         
3663         I think the fix isn't testable because it requires examining the printed output.
3664
3665         * platform/graphics/skia/PlatformContextSkia.cpp:
3666         (WebCore::PlatformContextSkia::clipPathAntiAliased):
3667
3668 2011-07-07  Emil A Eklund  <eae@chromium.org>
3669
3670         Switch rendering tree selection code to to new layout types
3671         https://bugs.webkit.org/show_bug.cgi?id=63762
3672
3673         Reviewed by Eric Seidel.
3674
3675         Switch selection getters and selection gap calculation methods over to
3676         new layout abstraction.
3677
3678         No new tests, no functionality changes.
3679
3680         * rendering/InlineTextBox.cpp:
3681         (WebCore::InlineTextBox::selectionTop):
3682         (WebCore::InlineTextBox::selectionBottom):
3683         (WebCore::InlineTextBox::selectionHeight):
3684         (WebCore::InlineTextBox::isSelected):
3685         * rendering/InlineTextBox.h:
3686         * rendering/RenderBR.h:
3687         (WebCore::RenderBR::selectionRectForRepaint):
3688         * rendering/RenderBlock.cpp:
3689         (WebCore::RenderBlock::selectionGapRectsForRepaint):
3690         (WebCore::RenderBlock::selectionGaps):
3691         (WebCore::RenderBlock::inlineSelectionGaps):
3692         (WebCore::RenderBlock::blockSelectionGaps):
3693         (WebCore::RenderBlock::blockSelectionGap):
3694         (WebCore::RenderBlock::logicalLeftSelectionGap):
3695         (WebCore::RenderBlock::logicalRightSelectionGap):
3696         (WebCore::RenderBlock::logicalLeftSelectionOffset):
3697         (WebCore::RenderBlock::logicalRightSelectionOffset):
3698         (WebCore::RenderBlock::positionForPointWithInlineChildren):
3699         (WebCore::RenderBlock::desiredColumnWidth):
3700         * rendering/RenderBlock.h:
3701         (WebCore::RenderBlock::selectionRectForRepaint):
3702         * rendering/RenderListMarker.cpp:
3703         (WebCore::RenderListMarker::selectionRectForRepaint):
3704         * rendering/RenderListMarker.h:
3705         * rendering/RenderObject.h:
3706         (WebCore::RenderObject::selectionRect):
3707         (WebCore::RenderObject::selectionRectForRepaint):
3708         * rendering/RenderReplaced.cpp:
3709         (WebCore::RenderReplaced::selectionRectForRepaint):
3710         * rendering/RenderReplaced.h:
3711         * rendering/RenderSelectionInfo.h:
3712         (WebCore::RenderSelectionInfo::RenderSelectionInfo):
3713         * rendering/RenderText.cpp:
3714         (WebCore::RenderText::selectionRectForRepaint):
3715         * rendering/RenderText.h:
3716         * rendering/RootInlineBox.cpp:
3717         (WebCore::RootInlineBox::selectionTop):
3718         (WebCore::RootInlineBox::selectionBottom):
3719         * rendering/RootInlineBox.h:
3720         (WebCore::RootInlineBox::selectionHeight):
3721
3722 2011-07-07  Gavin Peters  <gavinp@chromium.org>
3723
3724         Reviewed by Alexey Proskuryakov.
3725
3726         fast/dom/HTMLLinkElement/link-and-subresource-test.html is flaky on chromium debug bots
3727         https://bugs.webkit.org/show_bug.cgi?id=60097
3728
3729         The culprit was that CachedResource:stopLoading() was using *this
3730         after a call to checkNotify(), which isn't kosher.  This patch
3731         uses a CachedResourceHandle to keep the CachedResource alive.
3732
3733         The test is a very close copy of the eponymous
3734         link-and-subresource-test.html, only substituting invalid
3735         resources for the valid ones in that test.  The reproduction is
3736         timing related, and happens much more consistantly with an invalid
3737         resource for whatever reason.
3738         Test: fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html
3739
3740         * loader/cache/CachedResource.cpp:
3741         (WebCore::CachedResource::stopLoading):
3742
3743 2011-07-07  James Robinson  <jamesr@chromium.org>
3744
3745         Reviewed by Kenneth Russell.
3746
3747         Use v8::AdjustAmountOfExternalAllocatedMemory for ArrayBuffers
3748         https://bugs.webkit.org/show_bug.cgi?id=42912
3749
3750         This calls v8's AdjustAmountOfExternalAllocatedMemory when ArrayBuffers are allocated/deallocated so that V8's
3751         garbage collection heuristics can account for the memory held by these objects.  On the new test page, this
3752         reduces the peak memory use from 5BG+ (or a crash in 32-bit systems) to <300MB.
3753
3754         Test: WebCore/manual-tests/array-buffer-memory.html
3755
3756         * html/canvas/ArrayBuffer.cpp:
3757         (WebCore::ArrayBuffer::~ArrayBuffer):
3758         (WebCore::ArrayBuffer::tryAllocate):
3759
3760 2011-07-07  Ryosuke Niwa  <rniwa@webkit.org>
3761
3762         Move all code related to cachedSelection to HTMLTextFormControlElement
3763         https://bugs.webkit.org/show_bug.cgi?id=64118
3764
3765         Reviewed by Alexey Proskuryakov.
3766
3767         Moved m_cachedSelectionStart and m_cachedSelectionEnd from HTMLInputElement
3768         and HTMLTextAreaElement to HTMLTextFormControlElement
3769
3770         Also removed cached selection related functions from RenderTextControl,
3771         RenderTextControlSingleLine, and RenderTextControlMultiLine because they were
3772         merely providing wrapper functions to enable polymorphism between
3773         input and textarea elements and their WML equivalents.
3774
3775         * editing/FrameSelection.cpp:
3776         (WebCore::FrameSelection::notifyRendererOfSelectionChange): Calls HTMLTextFormControlElement's
3777         selectionChanged instead of RenderTextControl's.
3778         * html/HTMLFormControlElement.cpp:
3779         (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement): Initialize
3780         m_cachedSelectionStart and m_cachedSelectionEnd.
3781         (WebCore::HTMLTextFormControlElement::selectionStart):
3782         (WebCore::HTMLTextFormControlElement::selectionEnd):
3783         (WebCore::HTMLTextFormControlElement::selection):
3784         (WebCore::HTMLTextFormControlElement::restoreCachedSelection): Added.
3785         (WebCore::HTMLTextFormControlElement::selectionChanged): Extracted from
3786         RenderTextControl::selectionChanged.
3787         * html/HTMLFormControlElement.h:
3788         (WebCore::HTMLTextFormControlElement::cacheSelection): Extracted from HTMLInputElement
3789         and HTMLTextAreaElement.
3790         (WebCore::HTMLTextFormControlElement::hasCachedSelectionStart): Added.
3791         (WebCore::HTMLTextFormControlElement::hasCachedSelectionEnd): Added.
3792         * html/HTMLInputElement.cpp:
3793         (WebCore::HTMLInputElement::HTMLInputElement):
3794         (WebCore::HTMLInputElement::updateFocusAppearance):
3795         * html/HTMLInputElement.h:
3796         * html/HTMLTextAreaElement.cpp:
3797         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
3798         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
3799         * html/HTMLTextAreaElement.h:
3800         (WebCore::HTMLTextAreaElement::isEmptyValue):
3801         * rendering/RenderTextControl.cpp:
3802         (WebCore::setSelectionRange):
3803         * rendering/RenderTextControl.h:
3804         * rendering/RenderTextControlMultiLine.cpp:
3805         * rendering/RenderTextControlMultiLine.h:
3806         * rendering/RenderTextControlSingleLine.cpp:
3807         * rendering/RenderTextControlSingleLine.h:
3808
3809 2011-07-07  Emil A Eklund  <eae@chromium.org>
3810
3811         Switch addFocusRingRects to to new layout types
3812         https://bugs.webkit.org/show_bug.cgi?id=64114
3813
3814         Reviewed by Eric Seidel.
3815
3816         No new tests, no functionality changes.
3817
3818         * rendering/LayoutTypes.h:
3819         (WebCore::flooredLayoutPoint):
3820         * rendering/RenderBlock.cpp:
3821         (WebCore::RenderBlock::addFocusRingRects):
3822         * rendering/RenderBlock.h:
3823         * rendering/RenderBox.cpp:
3824         (WebCore::RenderBox::addFocusRingRects):
3825         * rendering/RenderBox.h:
3826         * rendering/RenderInline.cpp:
3827         (WebCore::RenderInline::addFocusRingRects):
3828         * rendering/RenderInline.h:
3829         * rendering/RenderListBox.cpp:
3830         (WebCore::RenderListBox::addFocusRingRects):
3831         * rendering/RenderListBox.h:
3832         * rendering/RenderObject.h:
3833         (WebCore::RenderObject::addFocusRingRects):
3834         * rendering/RenderTextControl.cpp:
3835         (WebCore::RenderTextControl::addFocusRingRects):
3836         * rendering/RenderTextControl.h:
3837         * rendering/svg/RenderSVGContainer.cpp:
3838         (WebCore::RenderSVGContainer::addFocusRingRects):
3839         * rendering/svg/RenderSVGContainer.h:
3840         * rendering/svg/RenderSVGImage.cpp:
3841         (WebCore::RenderSVGImage::addFocusRingRects):
3842         * rendering/svg/RenderSVGImage.h:
3843         * rendering/svg/RenderSVGPath.cpp:
3844         (WebCore::RenderSVGPath::addFocusRingRects):
3845         * rendering/svg/RenderSVGPath.h:
3846
3847 2011-07-06  Adrienne Walker  <enne@google.com>
3848
3849         [chromium] Reduce compositor texture memory by skipping layers and clipping surfaces
3850         https://bugs.webkit.org/show_bug.cgi?id=64052
3851
3852         Reviewed by James Robinson.
3853
3854         Layers and surfaces that are entirely transparent are now skipped.
3855         Parent scissor rects are now applied to the content rect of surfaces
3856         so that offscreen surfaces can be skipped.
3857
3858         Landing this for vangelis@chromium.org.
3859
3860         Covered by existing tests.
3861
3862         * platform/graphics/chromium/LayerRendererChromium.cpp:
3863         (WebCore::calculateVisibleRect):
3864         (WebCore::calculateVisibleLayerRect):
3865         (WebCore::LayerRendererChromium::paintLayerContents):
3866         (WebCore::LayerRendererChromium::drawLayers):
3867         (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
3868         (WebCore::LayerRendererChromium::updateCompositorResources):
3869         (WebCore::LayerRendererChromium::drawLayer):
3870         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
3871         (WebCore::RenderSurfaceChromium::RenderSurfaceChromium):
3872
3873 2011-07-07  Adam Barth  <abarth@webkit.org>
3874
3875         Unreviewed, rolling out r90581.
3876         http://trac.webkit.org/changeset/90581
3877         https://bugs.webkit.org/show_bug.cgi?id=64124
3878
3879         Broke a bunch of inspector tests (Requested by ojan on
3880         #webkit).
3881
3882         * inspector/front-end/ExtensionAPI.js:
3883         (WebInspector.injectedExtensionAPI.Panels.prototype.create):
3884         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setPage):
3885         (WebInspector.injectedExtensionAPI.expandURL):
3886         * inspector/front-end/ExtensionPanel.js:
3887         (WebInspector.ExtensionPanel):
3888         * inspector/front-end/ExtensionServer.js:
3889         (WebInspector.ExtensionServer):
3890         (WebInspector.ExtensionServer.prototype._onCreatePanel):
3891         (WebInspector.ExtensionServer.prototype._onSetSidebarPage):
3892         (WebInspector.ExtensionServer.prototype._addExtensions):
3893         (WebInspector.ExtensionServer.prototype._onWindowMessage):
3894         (WebInspector.ExtensionServer.prototype._registerSubscriptionHandler):
3895
3896 2011-07-07  Adrienne Walker  <enne@google.com>
3897
3898         [chromium] Fix crash when compositing gets disabled mid-paint
3899         https://bugs.webkit.org/show_bug.cgi?id=64119
3900
3901         Reviewed by James Robinson.
3902
3903         WebKit paint can disable compositing and call setRootLayer(0). Adding
3904         a check for this in drawLayers prevents a null pointer deref.
3905
3906         * platform/graphics/chromium/LayerRendererChromium.cpp:
3907         (WebCore::LayerRendererChromium::drawLayers):
3908
3909 2011-07-07  Dirk Schulze  <krit@webkit.org>
3910
3911         SVGAnimateTransform does not support calcMode=discrete
3912         https://bugs.webkit.org/show_bug.cgi?id=63914
3913
3914         Reviewed by Rob Buis.
3915
3916         CalcMode discrete specifies that the animation function will jump from one value to the next without any interpolation.
3917         Implemented calcMode discrete by checking current progress of animation. If we are in the first half of the animation,
3918         we use the start value of the aniamtion, end value for the second half of the animation. The key time at 50% is used on
3919         all other animations as well as on other SVG viewers.
3920
3921         Added a manual test. DRT crashes on an automated test with the SVG animation API. Opened a new bug report: 64104.
3922
3923         * manual-tests/svg-animateTransform-calcMode-discrete.svg: Added.
3924         * svg/SVGAnimateTransformElement.cpp:
3925         (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
3926
3927 2011-07-07  Dirk Schulze  <krit@webkit.org>
3928
3929         Reviewed by Rob Buis.
3930
3931         SVGAnimatedPath needs fallback for 'by' animation
3932         https://bugs.webkit.org/show_bug.cgi?id=63865
3933         
3934         Added fallback to 'to' animation for 'by' animated SVGAnimatedPathAnimator.
3935         
3936         Clenup of SVGAnimateElement. Removed all switches since we support all AnimatedTypes
3937         with the exception of AnimatedEnumeration. AnimatedEnumeration gets animated as AnimatedString at the moment. 
3938
3939         Test: svg/animations/svgpath-animation-1.html
3940
3941         * svg/SVGAnimateElement.cpp:
3942         (WebCore::getPropertyValue):
3943         (WebCore::inheritsFromProperty):
3944         (WebCore::attributeValueIsCurrentColor):
3945         (WebCore::SVGAnimateElement::adjustForCurrentColor):
3946         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
3947         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3948         (WebCore::SVGAnimateElement::calculateFromAndToValues):
3949         (WebCore::SVGAnimateElement::calculateFromAndByValues):
3950         (WebCore::SVGAnimateElement::resetToBaseValue):
3951         (WebCore::SVGAnimateElement::applyResultsToTarget):
3952         (WebCore::SVGAnimateElement::calculateDistance):
3953         * svg/SVGAnimatedPath.cpp:
3954         (WebCore::SVGAnimatedPathAnimator::calculateFromAndByValues):
3955
3956 2011-07-07  Andrey Kosyakov  <caseq@chromium.org>
3957
3958         Web Inspector: secure access to extensions API
3959         https://bugs.webkit.org/show_bug.cgi?id=64080
3960
3961         Reviewed by Pavel Feldman.
3962
3963         * inspector/front-end/ExtensionAPI.js:
3964         (WebInspector.injectedExtensionAPI.Panels.prototype.create):
3965         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setPage):
3966         * inspector/front-end/ExtensionPanel.js:
3967         (WebInspector.ExtensionPanel):
3968         * inspector/front-end/ExtensionServer.js:
3969         (WebInspector.ExtensionServer):
3970         (WebInspector.ExtensionServer.prototype._onCreatePanel):
3971         (WebInspector.ExtensionServer.prototype._onSetSidebarPage):
3972         (WebInspector.ExtensionServer.prototype._addExtensions):
3973         (WebInspector.ExtensionServer.prototype._onWindowMessage):
3974         (WebInspector.ExtensionServer.prototype._registerSubscriptionHandler):
3975         (WebInspector.ExtensionServer.prototype._expandResourcePath):
3976
3977 2011-07-07  Kyusun Kim  <maniagoon@company100.net>
3978
3979         The return value of SharedBuffer::createWithContentsOfFile must have valid m_size.
3980         https://bugs.webkit.org/show_bug.cgi?id=63313
3981
3982         Reviewed by Eric Seidel.
3983
3984         * platform/posix/SharedBufferPOSIX.cpp:
3985         (WebCore::SharedBuffer::createWithContentsOfFile):
3986
3987 2011-07-07  Dan Bernstein  <mitz@apple.com>
3988
3989         <rdar://problem/9737435> Re-enable -webkit-column-break-inside: avoid
3990         https://bugs.webkit.org/show_bug.cgi?id=64102
3991
3992         Reviewed by Simon Fraser.
3993
3994         -webkit-column-break-inside: avoid was disabled in r62632 along with page-break-inside: avoid.
3995         The latter remains disabled.
3996
3997         * rendering/RenderBlock.cpp:
3998         (WebCore::RenderBlock::adjustForUnsplittableChild): Treat the child as unsplittable if
3999         '-webkit-column-break-inside: avoid' was specified.
4000
4001 2011-07-07  Andrey Kosyakov  <caseq@chromium.org>
4002
4003         Web Inspector: visual regressions in network panel
4004         https://bugs.webkit.org/show_bug.cgi?id=64089
4005
4006         Reviewed by Pavel Feldman.
4007
4008         * inspector/front-end/networkPanel.css:
4009         (.data-grid.network-log-grid tr.filler td):
4010         (.network.panel .sidebar):
4011
4012 2011-07-07  Julien Chaffraix  <jchaffraix@webkit.org>
4013
4014         Reviewed by David Hyatt.
4015
4016         Partial layout when a flex-box has visibility: collapse
4017         https://bugs.webkit.org/show_bug.cgi?id=63776
4018
4019         Tests: fast/flexbox/crash-button-input-autofocus.html
4020                fast/flexbox/crash-button-keygen.html
4021                fast/flexbox/crash-button-relayout.html
4022
4023         The issue is that FlexBoxIterator would skip any child if it has visibility: collapsed.
4024         However if one of the child is anonymous, it may wrap some other child that would be skipped.
4025         Now FlexBoxIterator is called during the layout phase and thus some nodes would not relayouted
4026         as expected.
4027
4028         * rendering/RenderDeprecatedFlexibleBox.cpp:
4029         (WebCore::FlexBoxIterator::next): When iterating, don't skip anonymous content as there may
4030         be real content hiding below.
4031
4032 2011-07-07  Vsevolod Vlasov  <vsevik@chromium.org>
4033
4034         Web Inspector: URL links in styles open new tab instead of showing resources panel.
4035    &