* Invalidate layout only when necessary.

* Icon view needs to update completely on resize.
-> Fixes graphics glitch when switching between icon and no icon.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@467 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
stippi
2012-07-03 15:43:41 +02:00
committed by Alexandre Deckner
parent a4c1f6783d
commit 5913d4a98b
+3 -2
View File
@@ -529,7 +529,7 @@ class URLInputGroup::PageIconView : public BView {
public:
PageIconView()
:
BView("page icon view", B_WILL_DRAW),
BView("page icon view", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE),
fIcon(NULL)
{
SetDrawingMode(B_OP_OVER);
@@ -578,13 +578,14 @@ public:
{
if (icon == NULL && fIcon == NULL)
return;
if (!(fIcon != NULL && icon != NULL))
InvalidateLayout();
delete fIcon;
if (icon)
fIcon = new BBitmap(icon);
else
fIcon = NULL;
Invalidate();
InvalidateLayout();
}
private: